A mental stress detection system and method based on single-channel electroencephalogram signal

Through the joint analysis and feature selection of single-channel EEG signals in multiple feature domains, combined with support vector machine classifier, more accurate mental stress status detection is achieved, solving the problems of large subjectivity and complex operation in the prior art. , improves the accuracy and application value of detection.

CN115349861BActive Publication Date: 2024-11-19JINAN XINYU INTELLIGENT ELECTRONIC TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211012472.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-23
Publication Date
2024-11-19
Estimated Expiration
2042-08-23

AI Technical Summary

Technical Problem

The prior art has great subjectivity in detecting mental stress, complex operation and strong individual discomfort, making it difficult to accurately detect mental stress status through a single feature domain analysis of EEG signals.

Method used

Using the joint analysis of single-channel EEG signals in the time domain, frequency domain, time frequency domain and nonlinear feature domain, combined with a mixed feature selection algorithm based on function perturbation method and a support vector machine classifier, the optimal feature set is constructed for mental stress Status detection.

Benefits of technology

It improves the accuracy of mental stress status detection and the application value of EEG signals in mental stress and disease detection, reduces the subjectivity and operational complexity of detection, and has good promotion prospects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115349861B_ABST
    Figure CN115349861B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of physiological signal analysis, and provides a mental stress detection system and method based on a single-channel electroencephalogram signal. The scheme is specifically as follows: the single-channel overall electroencephalogram time signal obtained after preprocessing is divided into multiple sub-band electroencephalogram signals according to different frequency ranges, and the time domain, frequency domain, time-frequency domain and nonlinear features are extracted from the overall and sub-band electroencephalogram signals respectively, and the obtained multi-dimensional features are jointly constructed into a feature set; the risk assessment module is used to classify mental stress based on the feature set and the mental stress state detection model, and detect whether mental stress exists according to the classification result; wherein, when constructing the mental stress state detection model, a hybrid feature selection algorithm based on the idea of ​​a function perturbation method is used for feature selection, and an optimal feature set is constructed according to the nested five-fold cross-validation results, and a support vector machine classifier is used to classify mental stress based on the optimal feature set. The accuracy of mental stress detection can be significantly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of physiological signal analysis, and in particular relates to a mental stress detection system and method based on single-channel electroencephalogram signals. Background Art

[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.

[0003] In modern society, "involution" is serious, competition is rampant in all walks of life, and many people are under great mental pressure. If continuous psychological pressure is not released, it will have adverse effects on people's physical and mental health. In severe cases, it will induce a series of mental illnesses such as depression and anxiety. However, the clinical detection of mental stress is not very ideal. On the one hand, many people are either unaware of their own mental stress state or are ashamed to express it, which poses great risks; on the other hand, the clinical detection of mental stress and mental illness mainly relies on psychological test scales and doctors' experience and judgment, which is relatively subjective. Therefore, it is of great practical significance and urgent clinical need to collect human physiological signals, extract information related to mental stress, and then objectively detect the existence of psychological stress.

[0004] The collection of EEG signals is non-invasive, low-cost, and relatively simple to operate, and is widely used to monitor brain activity. EEG signals are a general reflection of the brain's neurophysiological activity in the cerebral cortex. They contain a wealth of information related to mental stress and have great application prospects in the field of mental illness detection. Existing technologies mostly record the activity of many channels by placing a series of electrodes on the head. The operation is complicated, the individual feels uncomfortable, and the wearable performance is poor, which is not conducive to large-scale promotion and application.

[0005] At the same time, due to the complexity of EEG signals, if we only analyze EEG signals as a whole or perform EEG signal analysis on a single feature domain, we cannot obtain accurate EEG signal features, and we cannot accurately obtain the mental stress state through EEG signal detection. Summary of the invention

[0006] In order to solve at least one technical problem existing in the above-mentioned background technology, the present invention provides a mental stress detection system and method based on single-channel EEG signals, which jointly analyzes multiple feature domains of EEG signals in time domain, frequency domain, time-frequency domain and nonlinearity, can improve the accuracy of mental stress state detection and effectively improve the application value of EEG signals in mental stress and disease detection.

[0007] In order to achieve the above object, the present invention adopts the following technical solution:

[0008] The first aspect of the present invention provides a mental stress detection system based on a single-channel electroencephalogram signal, comprising:

[0009] The EEG electrode sensor unit is used to collect the single-channel original EEG signal of the test subject;

[0010] The EEG signal processing unit is used to amplify and filter the original EEG signal, preliminarily remove power frequency interference and baseline drift, and wirelessly transmit it to the main control unit after analog-to-digital conversion;

[0011] Main control unit, including data processing module and risk assessment module;

[0012] The data processing module is used to remove noise, power frequency interference and electrooculographic artifacts outside the required frequency range based on the original EEG signal to obtain an overall EEG time signal, divide the overall EEG time signal into multiple sub-band EEG signals according to different frequency ranges, extract time domain, frequency domain, time-frequency domain and nonlinear features from the overall and sub-band EEG signals respectively, and jointly construct a feature set with the obtained multi-dimensional features;

[0013] The risk assessment module is used to classify mental stress based on the feature set and the mental stress state detection model, and detect whether mental stress exists according to the classification result;

[0014] Among them, when constructing the mental stress state detection model, a hybrid feature selection algorithm based on the function perturbation method is used for feature selection, and an optimal feature set is constructed according to the nested five-fold cross-validation results. Based on the optimal feature set, a support vector machine classifier is used to classify mental stress.

[0015] A second aspect of the present invention provides a method for detecting mental stress based on a single-channel electroencephalogram signal, comprising the following steps:

[0016] Obtain the single-channel original EEG signal of the subject;

[0017] Preprocess the single-channel original EEG signal to obtain the overall EEG time signal;

[0018] The overall EEG time signal is divided into multiple sub-band EEG signals according to different frequency ranges, and the time domain, frequency domain, time-frequency domain and nonlinear features are extracted from the overall and sub-band EEG signals respectively, and the obtained multi-dimensional features are jointly constructed into a feature set;

[0019] Classify mental stress based on feature set and mental stress state detection model, and detect whether mental stress exists according to the classification result;

[0020] Among them, when constructing the mental stress state detection model, a hybrid feature selection algorithm based on the function perturbation method is used for feature selection, and an optimal feature set is constructed according to the nested five-fold cross-validation results. Based on the optimal feature set, a support vector machine classifier is used to classify mental stress.

[0021] A third aspect of the present invention provides a computer-readable storage medium.

[0022] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the mental stress detection method based on a single-channel electroencephalogram signal as described above.

[0023] A fourth aspect of the present invention provides a computer device.

[0024] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps in the mental stress detection method based on a single-channel electroencephalogram signal as described above are implemented.

[0025] Compared with the prior art, the present invention has the following beneficial effects:

[0026] The present invention subdivides the overall EEG time signal into sub-band signals of five frequency bands according to frequency. Since EEG signals are relatively complex and signals in different frequency ranges reflect different brain activity information, the present invention not only extracts EEG features in general, but also extracts a series of EEG features from sub-band signals of different frequencies and between different signals. It is not a feature analysis only in a single feature domain, but a joint analysis of multiple feature domains of EEG signals in time domain, frequency domain, time-frequency domain and nonlinearity.

[0027] The present invention inputs features into a stress state detection model and then detects the mental stress state of an individual based on the output. The present invention can obtain better classification performance than previous studies, improve the accuracy of mental stress state detection, and effectively improve the application value of EEG signals in mental stress and disease detection, bringing good news to patients.

[0028] The present invention collects a single-channel EEG signal at the forehead, has low requirements on time and space, and has good application and promotion prospects.

[0029] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0031] Figure 1 2 is a schematic diagram of the structure of a mental stress detection system based on a single-channel EEG signal according to an embodiment of the present invention;

[0032] Figure 2 1 is a schematic diagram of the hardware structure of a wireless single-channel EEG signal acquisition device according to an embodiment of the present invention;

[0033] Figure 3 It is a flow chart of the mental stress detection method based on single-channel EEG signal of the present invention. DETAILED DESCRIPTION

[0034] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0035] It should be noted that the following detailed descriptions are all illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0036] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0037] Embodiment 1

[0038] like Figure 1 As shown, the present invention provides a mental stress detection system based on a single-channel EEG signal, comprising: an EEG electrode sensor unit 100, an EEG signal processing unit 200 and a main control unit 300;

[0039] The EEG electrode sensor unit is placed on the EEG electrode of the human head to collect the single-channel original EEG signal of the test subject;

[0040] As one or more embodiments, Figure 2 As shown, the EEG electrode sensor unit 100 includes a left frontal electrode 1A, a left ear electrode 1B and a frontal central electrode 1C.

[0041] The left forehead electrode 1A is attached to the left forehead of the scalp as a positive electrode, the left ear electrode 1B is attached to the left earlobe as a negative electrode, and the central forehead electrode 1C is attached to the central forehead of the scalp as a grounded reference electrode.

[0042] The original EEG signal is collected by the EEG electrodes and then sent to the EEG signal processing unit 200 .

[0043] The EEG signal processing unit 200 includes a signal amplification and filtering circuit module 201, an embedded main control module 202 and a wireless transmission module 203;

[0044] As one or more embodiments, the signal amplification and filtering circuit module 201 is used to amplify and filter the original EEG signal to remove baseline drift and power frequency interference from the original signal.

[0045] The embedded main control module 202 performs analog-to-digital conversion on the processed EEG signal and transmits it to the main control unit 300 via the wireless transmission module 203 .

[0046] In this embodiment, the wireless transmission mode of the wireless transmission module 203 includes but is not limited to Bluetooth and WIFI.

[0047] The main control unit 300 is used to receive wirelessly transmitted EEG data, perform data processing, feature extraction and classification, and output detection results.

[0048] It includes a wireless receiving module 301 , a data acquisition module 302 , a data processing module 303 , a risk assessment module 304 and a display module 305 .

[0049] The wireless receiving module 301 is used to receive the EEG data transmitted by the wireless transmission module 203, and after the data acquisition module 302 completes the data acquisition, the data is processed by the data processing module 303;

[0050] The data processing module is used to remove noise, power frequency interference and electrooculographic artifacts outside the required frequency range, obtain an overall EEG time signal, decompose the signal by frequency band, divide the overall EEG time signal into multiple sub-band EEG signals according to different frequency ranges, extract time domain, frequency domain, time-frequency domain and nonlinear features from the overall and sub-band EEG signals respectively, and jointly construct a feature set with the obtained multi-dimensional features;

[0051] The risk assessment module 304 is used to classify mental stress based on the feature set and the mental stress state detection model, detect whether mental stress exists according to the classification result, and display the detection result through the display module 305.

[0052] As one or more embodiments, the data processing module 303 includes a 0.5-50 Hz bandpass filter and a 50 Hz notch filter; the EEG data is bandpass filtered at 0.5-50 Hz, and the 50 Hz power frequency interference is removed, and the electrooculogram artifacts are removed based on the WT-EEMD-ICA algorithm; and finally the required clean EEG signal is obtained;

[0053] Used to subdivide EEG signals into five sub-band signals according to the frequency range: δ (0.5-4Hz), θ (4-8Hz), α (0.5-4), β (13-30Hz) and γ (30-50Hz); used to extract single-channel EEG features in multiple feature domains on the signals of the total frequency band and the signals of the sub-frequency bands respectively.

[0054] Furthermore, the risk assessment module 304 inputs the feature set into the mental stress state detection model to obtain an output result, and detects whether the mental stress is obviously present according to the output result.

[0055] The mental stress state detection model adopts a hybrid feature selection algorithm proposed based on the function perturbation method to screen features; and uses a five-fold nested cross-validation method to verify the results.

[0056] As one or more embodiments, the data processing module further includes a time domain feature extraction module, a frequency domain feature extraction module, a time-frequency domain feature extraction module, and a nonlinear feature extraction module;

[0057] 1. The time domain feature extraction module is used to calculate the time features of 0.5-50Hz EEG signals and EEG signals in each frequency band in the time domain, including mean, standard deviation, standard error, median, skewness, kurtosis, maximum amplitude, minimum amplitude, amplitude range, average zero-crossing rate, average peak-to-peak value, Hjorth parameter (activity, complexity), coefficient of variation, root mean square, ratio of average peak value to root mean square, average slope, maximum slope, minimum slope, integral, and fluctuation index.

[0058] In this embodiment, the average zero-crossing rate refers to the average number of times the time signal crosses the zero axis per second.

[0059] In this embodiment, the method for calculating the average peak-to-peak value is: after removing the mean of the signal, all peaks and troughs of the signal are detected, and the average peak-to-peak value is defined as the difference between the average amplitude of all peaks and the average amplitude of all troughs.

[0060] In this embodiment, the fluctuation index of the EEG signal is defined as the sum of the absolute values ​​of the amplitude differences between adjacent points on the time signal.

[0061] In this embodiment, the average slope is defined as the slope of the straight line best fitted by the least square method.

[0062] 2. The frequency domain feature extraction module is used to perform Fourier transform on the 6 groups of EEG time signals, and calculate the frequency domain features of the spectrum in the total frequency band and each sub-frequency band, including the absolute power, relative power, maximum power, maximum power frequency, power average and median, center of gravity frequency, and frequency standard deviation of each spectrum; in addition, the relative power ratio between sub-band signals and the spectrum asymmetry index SASI are calculated.

[0063] Taking the α and β frequency bands as an example, the formula for calculating the spectrum asymmetry index of the two frequency bands is:

[0064]

[0065] 3. Time-frequency domain feature extraction module: EEG signals have the characteristics of time-varying and non-stationary. Wavelet decomposition and reconstruction of EEG signals and simultaneous analysis of EEG signals in the time domain and frequency domain are crucial for mining stress-related information. The present invention uses the db4 wavelet basis function to decompose the EEG into 10 layers, and reconstructs the 8 layers of detail coefficients using the 3rd, 4th, 5th, 6th, 7th, 8th, 9th, and 10th layers of wavelets to calculate the statistical characteristics of each reconstructed signal, including: mean, standard deviation, maximum, minimum, median, skewness, kurtosis, upper quartile, and lower quartile.

[0066] In addition, this embodiment calculates the total energy of 8 layers of reconstructed detail coefficients and the energy proportion of each layer.

[0067] Finally, this embodiment uses the same db4 wavelet basis function to perform 10-layer wavelet packet decomposition on the EEG signal, reconstructs the decomposition coefficients of each node in the last layer, and extracts the energy E of each reconstructed signal. i , where i = 1, 2, ... 2 10 , the energy sum of each reconstructed signal is obtained after accumulation, and the energy proportion P of each reconstructed signal is calculated i , the wavelet energy entropy is calculated according to the following formula:

[0068]

[0069] 4. Nonlinear extraction module. EEG signals are typical nonlinear signals. Their nonlinear characteristics reflect the activity and complexity of the brain's neural electrical activities, which need to be explored. This embodiment calculates the nonlinear characteristics of a series of EEG signals, including three entropy characteristics: sample entropy, permutation entropy, and power spectrum entropy, Higuchi fractal dimension, Katz fractal dimension, Lempel-Ziv complexity, Hurst index, and DFA scaling index.

[0070] In this embodiment, the calculation process on the sample is:

[0071] (1) For the N-dimensional EEG time signal U(N){u(1),u(2),…u(N)}, the variable m=2 and the measure value of "similarity" r=0.15 are set, and N-m+1 m-dimensional vectors X(N){x(1),x(2),…x(N-m+1)} are reconstructed, where x(i)=[u(i),u(i+1),…u(i+m-1)], that is, when m=2, X(i)=[u(i),u(i+1)].

[0072] (2) Define two different sequences X, X * The distance between them is the absolute value of the maximum difference between the corresponding elements. As shown below:

[0073] d[X,X * ]=max|u(a)-u * (a)|

[0074] Among them, u(a) and u * (a) X and X respectively * Corresponding elements in a sequence.

[0075] Then for the reconstructed m-dimensional vector X(i), 1≤i≤N-m+1, calculate the distance d[X(i),X(j)], i≠j, between it and the remaining Nm m-dimensional vectors, and count the number of X(j) that satisfy d[X(i),X(j)]≤r, and get:

[0076]

[0077] (3) Seek The average value for all i values, that is

[0078]

[0079] (4) Increase m by 1, that is, t = m + 1 = 3, and repeat the above steps to obtain

[0080]

[0081]

[0082] (5) Calculate the sample entropy as shown below:

[0083] SampEn=-ln[A t (r) / B m (r)]

[0084] In this embodiment, the calculation process of EEG permutation entropy is:

[0085] (1) The embedding dimension m is estimated by the false nearest neighbor method, and the time delay τ is estimated by the average mutual information method. The phase space of the N-dimensional EEG time signal u(1), u(2), …u(N) is reconstructed to obtain the following matrix:

[0086]

[0087] Wherein, k = n-(m-1)τ.

[0088] (2) Arrange the reconstruction components of each row in the matrix in ascending order of numerical value. For example, for the i-th component u(i),u(i+τ),…,u(i+(m-1)τ), we have

[0089] u(i+(i1-1)τ)≤u(i+(i2-1)τ)≤…u(i+(i m -1)τ)

[0090] Among them, i1,i2,…i m It can be regarded as the subscript index value of the corresponding element.

[0091] When there exists u(i+(i a -1)τ)=u(i+(i b -1)τ)andi a b , then according to the corresponding element's subscript i a and i b The size of the order, that is, u(i+(i a -1)τ)≤u(i+(i b -1)τ).

[0092] For the i-th component, the corresponding reconstructed symbol sequence can be obtained as follows:

[0093] S(i)=(i1,i2,…i m )

[0094] Then, for the k reconstruction components, we can obtain m-dimensional reconstruction symbol sequences:

[0095] S(i)=(i1,i2,…i m ), i=1,2,…k

[0096] (3) For an m-dimensional symbol sequence, there are m! permutations and combinations. Assuming that there are b permutations in S(i), calculate the probability of each permutation occurring, p(1), p(2)…p(b), b≤m!.

[0097] (4) Calculate the permutation entropy:

[0098]

[0099] ​Normalizing the permutation entropy, we get:

[0100] PE=PE(m) / ln(m!)

[0101] In this embodiment, the calculation process of EEG power spectrum entropy is:

[0102] (1) Obtain the power spectrum of the N-dimensional EEG time signal U(N){u(1),u(2),…u(N)};

[0103] (2) In the power spectrum, each frequency point is regarded as a frequency band, and the energy of each frequency band and the energy sum of all frequency bands are calculated to obtain the energy proportion P of each frequency band. i ,i=1,2,…N.

[0104] (3) Calculate the power spectrum entropy.

[0105]

[0106] In this embodiment, the calculation process of the EEG Higuchi fractal dimension is:

[0107] (1) Specify the maximum value k of k max =10.

[0108] (2) For the N-dimensional EEG time signals u(1), u(2), ... u(N), a new time series is constructed using the K and m parameters. Let k be 1, 2, ... k max , for each K, we have:

[0109]

[0110] Among them, [] means rounding the value in the brackets.

[0111] (3) For each new sequence obtained, the curve length is calculated according to the following formula:

[0112]

[0113] Among them, |A(k,m,i)| refers to the absolute value of the difference between two adjacent elements in the sequence, that is:

[0114] |A(k,m,i)|=u(m+ik)-u(m+(i-1)k)

[0115] (4) For each L on k m (k) Taking the absolute value of m, we obtain:

[0116]

[0117] (5) Calculate the Higuchi fractal dimension. HFD is the slope of the ln(L(k)) to ln(1 / k) curve fitted by the least squares method.

[0118] In this embodiment, the calculation process of the EEG Katz fractal dimension is:

[0119] (1) For the N-dimensional EEG time signal U(N){u(1),u(2),…u(N)}, calculate the total length of the signal as shown in the following formula:

[0120]

[0121] (2) Calculate the plane distance of the time signal waveform. Calculate the plane distance d between the first point in the signal and the remaining points. The distance between the first point and the point farthest from it (i.e., the maximum value in d) is defined as the plane distance of the waveform, as shown below:

[0122]

[0123] (3) Calculate the Katz fractal dimension. The calculation formula is:

[0124]

[0125] In this embodiment, the process of calculating the EEG Lempel-Ziv complexity is:

[0126] (1) Binarize the N-dimensional EEG time signal U(N){u(1),u(2),…u(N)}. The specific method is to calculate the mean of the time signal and compare each element in the signal with the mean to construct an N-dimensional 01 sequence string {x(1),x(2),…x(N)}. Among them, the element greater than the mean corresponds to 1, otherwise it corresponds to 0.

[0127] (2) Create strings S and Q, and initialize S = [x(1)], Q = [x(2)].

[0128] (3) The parameter C is set to an initial value of 0 to represent the number of new patterns in the string. Let SQ be the concatenation of S and Q. After removing the last character in SQ, the new string SQ is obtained. v . Determine whether Q is SQ v If Q is a substring of SQ v If a substring in , it means that no new pattern appears at this position, continue to cascade the next character in the 01 sequence string to Q, and repeat the above operation; if Q is not SQ v If a substring in is found, it means the emergence of a new pattern, and C is accumulated by 1. At this time, Q is cascaded to S to form a new S=SQ, and the Q string is cleared to zero and reconstructed.

[0129] Repeat the above process until Q reaches the last bit of the 01 sequence.

[0130] (4) Calculate the Lempel-Ziv complexity according to the following formula.

[0131]

[0132] In this embodiment, the process of obtaining the Hurst index and the DFA scaling index by detrending the EEG signal is as follows:

[0133] (1) Filter out the mean of the N-dimensional EEG time signal U(n){u(1),u(2),…u(N)} The sum sequence X(n){x(1),x(2),…x(N)} of the EEG signal after removing the mean is obtained. It is shown in the following formula:

[0134]

[0135] (2) Segmentation and sequence data length: Split X(n){x(1),x(2),…x(N)} into non-overlapping segments of length s, where the number of segments is k = [N / s].

[0136] (3) Fitting local trends. The local trend function on each subinterval v (v = 1, 2, ... k) is fitted by the least squares method to obtain the fitting polynomial x on the vth segment. v (n).

[0137] (4) Subtract the local trend function of each subinterval from the sum sequence X(n) and calculate the root mean square of the new sequence:

[0138]

[0139] (5) Changing the segmentation length s. In the present invention, the sum sequence is segmented into 150 groups of different segmentation lengths, s = 100, 200, 300, ..., 15000, and the above (2)-(4) processes are repeated to calculate F(s) after each segmentation.

[0140] (6) Calculate the Hurst exponent α, which characterizes the long-range correlation of the EEG signal. Plot the relationship between F(s) and the length of the sub-segment s using double logarithmic coordinates, and its slope is the Hurst exponent α.

[0141] (7) The segmentation length s in step (5) is limited to s = 100, 200, 300, ..., 2000, for a total of 20 groups. The above process is repeated to obtain the DFA scaling index α1, which characterizes the short-range correlation of the EEG signal.

[0142] (8) The segmentation length s in step (5) is limited to s = 2100, 2200, ..., 15000, for a total of 180 groups. The above process is repeated to obtain the DFA scaling index α2, which more clearly characterizes the long-range correlation of the EEG signal.

[0143] As one or more embodiments, the risk assessment module includes an optimal feature set selection module, which is used to select features of the original feature set using four feature selection algorithms based on support vector machine recursive elimination, mutual information, random forest and support vector machine weight, respectively, to obtain the optimal feature subsets S1, S2, S3 and S4 of each algorithm;

[0144] For the features that appear 2 times, 3 times, 4 times, 2 times or more, and 3 times or more in the S1-S4 feature subsets, new feature sets sr_2, sr_3, sr_4, sr_234 and sr_34 are constructed respectively. The five feature sets are input into the classifier respectively, and the feature set with the highest classification accuracy is determined as the optimal feature set of the stress detection model, that is, the most useful indicator combination for stress diagnosis.

[0145] The optimal feature set contains a total of 39 features, 7 of which are from the overall signal, namely, the mean of the overall signal, the mean of the 3rd layer detail coefficient reconstructed by the wavelet transform coefficient, the minimum of the 8th layer detail coefficient, the median of the 6th and 9th layer detail coefficients, and the skewness of the 5th and 10th layer detail coefficients;

[0146] There are 31 features from each subband signal, of which 7 features come from delta signal, namely the maximum amplitude, average zero-crossing rate, skewness, average slope, maximum power frequency, Higuchi fractal dimension and LZ complexity of delta signal; 4 features come from theta signal, namely the average peak-to-peak value, relative power, Hurst exponent and Katz fractal dimension of the theta signal; 8 features come from alpha signal, namely the average zero-crossing rate, skewness, average peak-to-root-mean-square ratio, average slope, frequency The features are standard deviation of rate, sample entropy, permutation entropy and LZ complexity; 10 features come from beta signal, which are the maximum amplitude, amplitude range, Hjorth complexity, kurtosis, maximum slope, maximum power, maximum power frequency, LZ complexity, Katz fractal dimension and permutation entropy of beta signal; 2 features come from gamma signal, which are the median amplitude of gamma signal and the sum of 1 / 3 maximum amplitude and 2 / 3 minimum amplitude; the power asymmetry index between delta signal and theta signal in different subbands is included in the optimal feature set.

[0147] As one or more embodiments, the risk assessment module also includes a classification module, which is used to use a support vector machine as a classifier and use a nested five-fold cross-validation method to verify the classification effect; when performing five-fold nested cross-validation, the cross-validation includes two inner and outer loops, the outer loop divides the overall data set into five parts, and takes one part as a test set and the rest as a training set in turn, for a total of five iterations; in the inner loop, the training set in the outer loop is further divided into four training sets and one validation set, and five cross-validations are performed.

[0148] Embodiment 2

[0149] like Figure 3 As shown, this embodiment provides a mental stress detection method based on a single-channel EEG signal, comprising the following steps:

[0150] Obtain the single-channel original EEG signal of the subject;

[0151] Based on the original EEG signal, the noise power frequency interference and eye artifacts outside the required frequency range are removed to obtain the overall EEG time signal, which is then divided into multiple sub-band EEG signals according to different frequency ranges. The time domain, frequency domain, time-frequency domain and nonlinear features are extracted from the overall and sub-band EEG signals respectively, and the obtained multi-dimensional features are combined to construct a feature set.

[0152] Classify mental stress based on feature set and mental stress state detection model, and detect whether mental stress exists according to the classification result;

[0153] Among them, when constructing the mental stress state detection model, a hybrid feature selection algorithm based on the function perturbation method is used for feature selection, and an optimal feature set is constructed according to the nested five-fold cross-validation results. Based on the optimal feature set, a support vector machine classifier is used to classify mental stress.

[0154] Embodiment 3

[0155] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps in the mental stress detection method based on a single-channel EEG signal as described above are implemented.

[0156] Embodiment 4

[0157] This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps in the mental stress detection method based on a single-channel EEG signal as described above are implemented.

[0158] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.

[0159] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0160] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0161] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0162] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0163] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A mental stress detection system based on single-channel EEG signals, characterized in that: include: The EEG electrode sensor unit is used to collect the single-channel original EEG signal of the test subject; The EEG signal processing unit is used to amplify and preliminarily filter the original EEG signal, and transmit it wirelessly to the main control unit after analog-to-digital conversion; Main control unit, including data processing module and risk assessment module; The data processing module is used to remove the noise power frequency interference and eye artifacts outside the required frequency range based on the original EEG signal to obtain the overall EEG time signal, divide the overall EEG time signal into multiple sub-band EEG signals according to different frequency ranges, extract the time domain, frequency domain, time-frequency domain and nonlinear features from the overall and sub-band EEG signals respectively, and jointly construct a feature set with the obtained multi-dimensional features; The risk assessment module is used to classify mental stress based on the feature set and the mental stress state detection model, and detect whether mental stress exists according to the classification result; When constructing the mental stress state detection model, a hybrid feature selection algorithm based on the function perturbation method is used for feature selection, and an optimal feature set is constructed according to the nested five-fold cross-validation results. Based on the optimal feature set, a support vector machine classifier is used to classify mental stress; The data processing module includes a signal preprocessing module and a feature extraction module; The signal preprocessing module is used to perform a 0.5-50 Hz bandpass filter on the EEG data, and further perform a notch filter to remove 50 Hz power frequency interference; For electrooculographic artifacts, the WT-EEMD-ICA method was used to remove them and obtain the required clean overall EEG time signal; The feature extraction module includes a time domain feature extraction module, a frequency domain feature extraction module, a time-frequency domain feature extraction module and a nonlinear feature extraction module; The time domain feature extraction module is used to calculate the time domain features of the 0.5-50Hz EEG signal and the EEG signals of each sub-frequency band in the time domain; The frequency domain feature extraction module is used to perform Fourier transform on multiple sub-band EEG signals, obtain the frequency spectrum and calculate the frequency domain features in the total frequency band and each sub-band, and calculate the relative power ratio and spectrum asymmetry index between multiple sub-band EEG signals; The time-frequency domain feature extraction module is used to decompose the EEG into 10 layers using the db4 wavelet basis function, and reconstruct the 8 layers of detail coefficients using the wavelet of the 3rd, 4th, 5th, 6th, 7th, 8th, 9th, and 10th layers respectively, calculate the statistical characteristics of each reconstructed signal, and calculate the total energy of the 8 layers of reconstructed detail coefficients and the energy proportion of each layer P i , and calculate the wavelet energy entropy; The nonlinear extraction module is used to extract three entropy features: sample entropy, permutation entropy and power spectrum entropy, Higuchi fractal dimension, Katz fractal dimension, Lempel-Ziv complexity, Hurst index and DFA scaling index; The risk assessment module includes an optimal feature set selection module, which is used to adopt a hybrid feature selection algorithm based on the function perturbation method, that is, to adopt four feature selection algorithms based on support vector machine recursive elimination, mutual information, random forest and support vector machine weight, respectively select features of the original feature set, and obtain the optimal feature subsets S1, S2, S3 and S4 of each algorithm; For the features that appear 2 times, 3 times, 4 times, 2 times or more, and 3 times or more in the S1-S4 feature subsets, new feature sets sr_2, sr_3, sr_4, sr_234 and sr_34 are constructed respectively. The five feature sets are input into the classifier respectively, and the feature set with the highest classification accuracy is determined as the optimal feature set of the stress detection model, that is, the most useful indicator combination for stress diagnosis.

2. A mental stress detection system based on single-channel EEG signals as claimed in claim 1, characterized in that: The EEG electrode sensor unit includes a left frontal electrode, a left ear electrode and a central frontal electrode. The left frontal electrode is attached to the left forehead of the scalp as a positive electrode, the left ear electrode is attached to the left earlobe as a negative electrode, and the central frontal electrode is attached to the central position of the forehead of the scalp as a grounded reference electrode.

3. A mental stress detection system based on single-channel EEG signals as claimed in claim 1, characterized in that: The EEG signal processing unit includes a signal amplification and filtering circuit module, an embedded main control module and a wireless transmission module; The signal amplification and filtering circuit module is used to amplify and filter the original EEG signal, and preliminarily remove the baseline drift and power frequency interference of the original signal; The embedded main control module is used to perform analog-to-digital conversion on the amplified and filtered EEG signals, and transmit them to the main control unit via the wireless transmission module.

4. A mental stress detection system based on single-channel EEG signals as claimed in claim 1, characterized in that: The optimal feature set contains a total of 39 features, 7 of which are from the overall signal, namely, the mean of the overall signal, the mean of the 3rd layer detail coefficient reconstructed by the wavelet transform coefficient, the minimum of the 8th layer detail coefficient, the median of the 6th and 9th layer detail coefficients, and the skewness of the 5th and 10th layer detail coefficients; There are 31 features from each subband signal, of which 7 features come from delta signal, namely the maximum amplitude, average zero-crossing rate, skewness, average slope, maximum power frequency, Higuchi fractal dimension and LZ complexity of delta signal; 4 features come from theta signal, namely the average peak-to-peak value, relative power, Hurst exponent and Katz fractal dimension of the theta signal; 8 features come from alpha signal, namely the average zero-crossing rate, skewness, average peak-to-root-mean-square ratio, average slope, frequency The features are standard deviation of rate, sample entropy, permutation entropy and LZ complexity; 10 features come from beta signal, which are the maximum amplitude, amplitude range, Hjorth complexity, kurtosis, maximum slope, maximum power, maximum power frequency, LZ complexity, Katz fractal dimension and permutation entropy of beta signal; 2 features come from gamma signal, which are the median amplitude of gamma signal and the sum of 1 / 3 maximum amplitude and 2 / 3 minimum amplitude; the power asymmetry index between delta signal and theta signal in different subbands is included in the optimal feature set.

5. The mental stress detection system based on single-channel EEG signal as claimed in claim 1, characterized in that: The risk assessment module also includes a classification module, which is used to use a support vector machine as a classifier and use a nested five-fold cross-validation method to verify the classification effect; when performing five-fold nested cross-validation, the cross-validation includes two inner and outer loops, the outer loop divides the entire data set into five parts, and takes one part as a test set and the rest as a training set in turn, and iterates five times in total; in the inner loop, the training set in the outer loop is further divided into four training sets and one validation set, and five cross-validations are performed.

6. A method for detecting mental stress based on a single-channel EEG signal according to any one of claims 1 to 5, characterized in that: The steps include: Obtain the single-channel original EEG signal of the subject; Based on the original EEG signal, the noise power frequency interference and eye artifacts outside the required frequency range are removed to obtain the overall EEG time signal, which is then divided into multiple sub-band EEG signals according to different frequency ranges. The time domain, frequency domain, time-frequency domain and nonlinear features are extracted from the overall and sub-band EEG signals respectively, and the obtained multi-dimensional features are combined to construct a feature set. Classify mental stress based on feature set and mental stress state detection model, and detect whether mental stress exists according to the classification result; Among them, when constructing the mental stress state detection model, a hybrid feature selection algorithm based on the function perturbation method is used for feature selection, and an optimal feature set is constructed according to the nested five-fold cross-validation results. Based on the optimal feature set, a support vector machine classifier is used to classify mental stress.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of a mental stress detection method based on a single-channel EEG signal as described in claim 6 are implemented.

8. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the mental stress detection method based on a single-channel EEG signal as described in claim 6 are implemented.