CN112244873B - Electroencephalogram space-time feature learning and emotion classification method based on hybrid neural network - Google Patents

Electroencephalogram space-time feature learning and emotion classification method based on hybrid neural network Download PDF

Info

Publication number
CN112244873B
CN112244873B CN202011057296.2A CN202011057296A CN112244873B CN 112244873 B CN112244873 B CN 112244873B CN 202011057296 A CN202011057296 A CN 202011057296A CN 112244873 B CN112244873 B CN 112244873B
Authority
CN
China
Prior art keywords
cnn
casc
features
model
electroencephalogram
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
Application number
CN202011057296.2A
Other languages
Chinese (zh)
Other versions
CN112244873A (en
Inventor
陈景霞
闵重丹
郝为
张鹏伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shaanxi University of Science and Technology
Original Assignee
Shaanxi University of Science and Technology
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shaanxi University of Science and Technology filed Critical Shaanxi University of Science and Technology
Priority to CN202011057296.2A priority Critical patent/CN112244873B/en
Publication of CN112244873A publication Critical patent/CN112244873A/en
Application granted granted Critical
Publication of CN112244873B publication Critical patent/CN112244873B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/16Devices for psychotechnics; Testing reaction times ; Devices for evaluating the psychological state
    • A61B5/165Evaluating the state of mind, e.g. depression, anxiety
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7203Signal processing specially adapted for physiological signals or for diagnostic purposes for noise prevention, reduction or removal
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7225Details of analogue processing, e.g. isolation amplifier, gain or sensitivity adjustment, filtering, baseline or drift compensation
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7235Details of waveform analysis
    • A61B5/7264Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems

Landscapes

  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Psychiatry (AREA)
  • Signal Processing (AREA)
  • Veterinary Medicine (AREA)
  • General Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Public Health (AREA)
  • Animal Behavior & Ethology (AREA)
  • Biophysics (AREA)
  • Pathology (AREA)
  • Biomedical Technology (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Medical Informatics (AREA)
  • Molecular Biology (AREA)
  • Surgery (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physiology (AREA)
  • Developmental Disabilities (AREA)
  • Educational Technology (AREA)
  • Child & Adolescent Psychology (AREA)
  • Social Psychology (AREA)
  • Hospice & Palliative Care (AREA)
  • Psychology (AREA)
  • Evolutionary Computation (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Power Engineering (AREA)
  • Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)

Abstract

The invention discloses an electroencephalogram space-time feature learning and emotion classification method based on a hybrid neural network, which comprises the following steps: collecting electroencephalogram signals of a plurality of channels; extracting PSD power spectral density characteristics from electroencephalogram signals of a plurality of channels; converting into a two-dimensional reticular matrix sequence; then dividing the mixture into a plurality of fragments P j; establishing CASC _CNN_LSTM model and CASC _CNN_CNN model, extracting deep space features and time features of electroencephalogram signals from each segment P j in a combined mode through the CASC _CNN_LSTM model, and inputting the deep space features and time features extracted by the CASC _CNN_LSTM model into a softmax layer corresponding to the CASC _CNN_LSTM model to conduct emotion type prediction; jointly extracting deep space features of a deeper level of an electroencephalogram signal from each segment P j through CASC _CNN_CNN model; and inputting deeper deep space features extracted by the CASC _CNN_CNN model into a softmax layer corresponding to the CASC _CNN_CNN model for emotion type prediction. The emotion classification of the invention is more accurate.

Description

Electroencephalogram space-time feature learning and emotion classification method based on hybrid neural network
Technical Field
The invention belongs to the technical field of deep learning application, and particularly relates to an electroencephalogram space-time feature learning and emotion classification method based on a hybrid neural network.
Background
Emotions play a vital role in human life, positive emotions may help to improve the efficiency of our daily work, while negative emotions may affect our decisions, attention, etc. With the development of artificial intelligence technology, emotion recognition has become a hotspot in the fields of emotion calculation and pattern recognition research.
Firstly, EEG signals have a very low signal-to-noise ratio and are subject to a large variety of noise and secondly, people tend to only be interested in EEG signals associated with a particular brain activity, but it is difficult to separate this signal from the background. Thus, in order to determine and extract portions of the EEG signal that are related to a particular brain activity or emotion, complex EEG signal analysis and processing techniques are required that take into account both spatial and temporal correlations of the EEG signal.
In dealing with EEG emotion recognition problems, two major technical challenges are typically encountered, one is how to extract more discriminative emotion features from an EEG signal, and the other is how to develop a more efficient computational model for emotion feature recognition. Although the electroencephalogram emotion recognition method is endangered in recent years, in order to further improve the performance of electroencephalogram emotion recognition, some important problems still need to be studied: firstly, how to select and extract more effective brain electrical characteristics from original brain electrical signals and express the characteristics so that the characteristics have more obvious space-time correlation and discriminant; and secondly, how to construct an effective machine learning model, and excavate deeper emotion related features from input brain electrical features, so as to improve emotion recognition capability.
Disclosure of Invention
In order to solve the problems in the prior art, the invention provides an electroencephalogram space-time feature learning and emotion classification method based on a hybrid neural network, which solves the problems of how to select and extract more effective electroencephalogram features from original electroencephalogram signals and express the features so that the features have more obvious space-time correlation and discriminance, and how to construct an effective machine learning model, and excavates deeper emotion correlation features from the input electroencephalogram features, thereby improving emotion recognition capability.
In order to achieve the above purpose, the present invention provides the following technical solutions: an electroencephalogram space-time feature learning and emotion classification method based on a hybrid neural network comprises the following steps:
step 1: collecting electroencephalogram signals of a plurality of channels;
step 2: extracting PSD power spectral density characteristics from electroencephalogram signals of a plurality of channels;
step 3: converting the vector sequence of PSD power spectrum density characteristics into a two-dimensional mesh matrix sequence;
Step 4: dividing the two-dimensional mesh matrix sequence into a plurality of fragments P j by applying a sliding window;
Step 5: establishing CASC _CNN_LSTM model and CASC _CNN_CNN model, extracting deep space-time characteristics of the electroencephalogram signals from each segment P j in a combined mode through the CASC _CNN_LSTM model, and inputting the deep space-time characteristics extracted by the CASC _CNN_LSTM model into a softmax layer corresponding to the CASC _CNN_LSTM model to conduct emotion type prediction;
Jointly extracting deep space features of a deeper level of an electroencephalogram signal from each segment P j through CASC _CNN_CNN model; and inputting deeper deep space features extracted by the CASC _CNN_CNN model into a softmax layer corresponding to the CASC _CNN_CNN model for emotion type prediction.
Further, the specific steps of the step 1 are as follows:
extracting electroencephalogram signals of a plurality of channels from the DEAP data set, and reducing the sampling frequency to 128HZ;
The DEAP data set is obtained by the following steps: and carrying out multiple tests on a plurality of tested objects, and after the electroencephalogram signals of each test are collected, carrying out emotion evaluation on the electroencephalogram signals of each test object by using continuous numerical values of 1-9 in terms of arousal degree, titer, preference, dominance and familiarity to represent various indexes from weak to strong.
Further, the step 1 further includes preprocessing the acquired electroencephalogram signals, where the preprocessing includes: and filtering data by adopting a 4-45Hz band-pass filter, and removing electro-oculogram interference by adopting a blind source separation technology.
Further, the specific steps of the step 2 are as follows:
Based on the electroencephalogram signals of the multiple channels extracted in the step 1, performing non-overlapping segmentation on the electroencephalogram signals of each test, obtaining a plurality of samples for each test, and obtaining the total number of the samples to be tested, wherein each sample comprises a plurality of sampling points, and each sampling point comprises the data of the multiple channels extracted in the step 1, so as to obtain RAW characteristics;
Normalizing the segmented electroencephalogram signals according to channels to obtain NORM features on each tested time domain, and sliding and extracting PSD features of the NORM features on each channel of a single sample in a non-overlapping manner by using a Hamming window on a 4-45Hz frequency band by using a fast Fourier transform algorithm;
Finally, dividing the emotion evaluation values of RAW features, NORM features and PSD features, which are tested in each test, in the range of 1-9 into two classes by taking a median of 5 as a threshold value, wherein more than 5 represents a high class or a positive index, and the 1 represents the evaluation values on the titer and the arousal degree; less than or equal to 5 represents a low class or negative index, represented by 0; and then carrying out equalization treatment on the RAW characteristic, the NORM characteristic and the PSD characteristic, the evaluation of the RAW characteristic, the evaluation of the NORM characteristic and the evaluation of the PSD characteristic.
Further, the specific steps of the step 3 are as follows:
One-dimensional data vector for electroencephalogram signal at time point t And n represents the total number of channels of the acquisition system,Representing the reading of the nth electrode channel at the nth time point; the one-dimensional electroencephalogram signal vector sequence [ X t,Xt+1,...,Xt+N-1 ] in the observation time period [ t, t+N-1] in each test is converted into a two-dimensional matrix sequence [ Y t,Yt+1,...,Yt+N-1 ] according to the electrode space position relation of the electroencephalogram signal acquisition system, and non-zero data in the two-dimensional matrix is normalized through a Z-score algorithm.
Further, the specific steps of the step 4 are as follows:
The two-dimensional mesh matrix sequence is divided into segments P j using a sliding window, each segment P j having a fixed length and no overlap between two adjacent segments P j, P j=[Yt,Yt+1,...,Yt+s-1 ], where: s represents the size of the window, i.e. the number of sampling points; j=1, 2,..q, q is the number of observation time periods divided into electroencephalogram signal segments P j.
Further, in the step 5, a CASC _cnn_lstm model is constructed, deep space-time features of the electroencephalogram signals are jointly extracted from each segment P j, and the extracted deep space-time features are input into a softmax layer for emotion classification prediction, which comprises the following specific steps:
constructing CASC _CNN_LSTM model, inputting each segment P j into a 2D-CNN network, and obtaining deep space features through learning;
Then, a sequence representing deep space features is input into a bidirectional LSTM model, each propagation direction of the model comprises s LSTM units, the hidden state of each LSTM unit at the current time point t is represented by H t, H t-1 represents the hidden state at the previous time point t-1, the information of the previous time point of the same layer is transmitted to the current time point, and the like affects the final output, the hidden state of each LSTM unit is taken as the output of the LSTM unit, the hidden state sequence [ H t,ht+1,...,ht+s-1 ] output by the forward LSTM unit, the hidden state sequence [ H ' t+s-1,...,h't+1,h't ] output by the reverse LSTM unit is taken from two directions, the outputs H t+s-1 and H ' t of the last time point extracted after all time points in the whole window are obtained after the LSTM unit is learned are respectively taken from two directions, H t+s-1 and H ' t are spliced in the dimension describing the size of a feature vector, and recorded as H j, the learned time feature of the whole LSTM network is transmitted to the next full connection layer, and a final soft ax class probability prediction value is generated after the full connection layer.
Further, in the step 5, a CASC _cnn_cnn model is constructed, the CASC _cnn_cnn model extracts deep space features of a deeper level of an electroencephalogram from each segment P j, and the specific steps of inputting the extracted deep space features of the deeper level into a softmax layer for emotion classification prediction are as follows:
Constructing CASC-CNN models, inputting each segment P j into a CNN network, obtaining a sequence Q j of deep space feature vectors of the segments P j through learning, integrating the sequence Q j into a matrix form, further extracting deep space features of the sequence Q j by using a CNN II network, sending the deep space features of the deep layer to the next full-connection layer, and generating a final probability prediction value of each emotion by using a softmax layer after the full-connection layer, wherein the CNN II network is another CNN network.
Compared with the prior art, the invention at least comprises the following beneficial effects:
The invention provides an electroencephalogram space-time feature learning and emotion classification method based on a hybrid neural network, which comprises the steps of extracting PSD features from electroencephalogram signals of a plurality of channels, converting one-dimensional chained PSD features into a two-dimensional reticular matrix sequence, dividing the two-dimensional matrix sequence into equal-length time segments by utilizing a sliding window, selecting and extracting more effective electroencephalogram features from original electroencephalogram signals, representing the features so as to enable the features to have more obvious space-time correlation and discriminance, inputting the two-dimensional meshed PSD features into Casc _CNN_LSTM and Casc _CNN_CNN to be tested, mining deeper emotion correlation features, and respectively obtaining classification accuracy of 93.15 and 92.37, wherein the performances of the two hybrid models are superior to the classification performances of a plurality of reference models and a latest method; compared with the prior study, the model has less pretreatment on the original data, and is more suitable for real-time application such as BCI.
Drawings
FIG. 1 is a flow chart of processing raw EEG signals provided by the present invention;
FIG. 2 is a diagram of a two-dimensional mesh matrix sequence after converting a one-dimensional electroencephalogram sequence according to the present invention;
FIG. 3 is a diagram of CASC _CNN_LSTM model provided by the invention;
FIG. 4 is a diagram of a CASC _CNN_CNN model structure provided by the invention;
FIG. 5 is a table comparing accuracy of two classes of emotion classification in potency for a reference model and a cascade mixed model;
Detailed Description
The invention is further described below with reference to the drawings and the detailed description.
As shown in FIG. 1, the invention provides a brain electricity space-time feature learning and emotion classification method based on mixed nerves, and provides a new EEG feature representation method aiming at original EEG brain electricity signals on a large public DEAP data set, two new mixed depth neural network models are provided on the basis, deep space-time correlation features with higher discriminant are learned and extracted, and two types of emotion depending on a tested are classified, so that the classification accuracy is better compared with the prior method, and the method comprises the following steps:
step 1: collecting electroencephalogram signals of a plurality of channels and preprocessing the electroencephalogram signals of the channels; the invention performs electroencephalogram emotion classification experiments and verification of model performance on a large-scale electroencephalogram emotion data set DEAP;
Step 2: extracting PSD power spectral density characteristics from brain electrical signals of a plurality of channels preprocessed by the DEAP data set;
step 3: performing feature conversion on the PSD features, and converting the PSD features into a two-dimensional mesh matrix sequence from a one-dimensional vector sequence form;
Step 4: dividing the two-dimensional mesh matrix sequence into a plurality of fragments P j by applying a sliding window;
Step 5: and constructing a cascade convolution-cyclic neural network (CASC _CNN_LSTM) model and a cascade convolution-cyclic neural network (CASC _CNN_CNN) model, jointly extracting deep space-time characteristics of an electroencephalogram signal from each segment P j through the CASC _CNN_LSTM model, jointly extracting deep space characteristics of a deeper level of the electroencephalogram signal from each segment P j through the CASC _CNN_CNN model, and respectively inputting the deep space-time characteristics extracted by the CASC _CNN_LSTM model and the deep space characteristics extracted by the CASC _CNN_CNN model into corresponding softmax layers to carry out emotion category prediction.
Specifically, as shown in the left half of fig. 1, the specific steps of step1 are as follows:
EEG-based emotion brain-machine interface systems typically use a portable wearable multichannel electrode cap to collect EEG signals, with sensors on the electrode cap capturing fluctuations in scalp current of the subject's brain as the subject views the stimulus video;
In this embodiment, experiments are performed based on the electroencephalogram signals collected in the public large-scale DEAP dataset, the dataset records that 32 testees watch 40 physiological signals such as electroencephalogram signals, electrocardio signals, myoelectricity signals and the like induced by music videos with different emotion tendencies for about 1 minute, and then the testees perform emotion evaluation on all indexes from weak to strong in terms of arousal degree, titer, preference, dominance and familiarity of the watched videos by using continuous values of 1-9, wherein the evaluation values respectively represent all indexes from negative to positive or from weak to strong from small to large. The 40 stimulus videos contain 20 high-titer/arousal degree stimulus and 20 low-titer/arousal degree stimulus;
In this embodiment, the EEG signals of 32 channels are extracted, the sampling frequency is reduced to 128Hz, in order to eliminate dc noise, power supply noise and other artifacts, a band-pass filter of 4-45Hz is used to perform data filtering, and then blind source separation technology is used to remove electro-oculogram interference, so as to obtain an EEG signal with a total duration of 63 seconds, including 60 seconds for watching video and 3 seconds for resting state before watching.
Further, the specific steps of step 2 are as follows:
the invention extracts each video-induced 60-second EEG sequence from the 63-second EEG signal for further analysis; to correct for the variation of stimulus independent signals over time, the EEG signal 3 seconds before video viewing was taken as a baseline, the baseline was removed from the 60 second test signal to obtain stimulus dependent sequence variation, each sequence was segmented non-overlapping with a window length of 1 second, 60 segments were obtained for each test, the total number of EEG segments (also referred to as samples) for each 40 tests tested was 40 x 60 = 2400, each segment contained 128 sampling points (i.e. window size 128), each sampling point contained 32 EEG channel data, simply referred to as RAW features, with dimension size expressed as 2400 x 128 x 32. And normalizing the segmented EEG data according to the channel to obtain NORM characteristics of each tested time domain. The 64 PSD features on the NORM feature were extracted by sliding without overlapping using a Hamming window of 0.5s on each channel of the 1s EEG segment using a fast Fourier transform algorithm over the 4-45Hz frequency band, the dimensions of the total extracted PSD features for each 40 trials tested were 2400X 64X 32;
Then, based on the emotion evaluation value of each video in the range of 1-9, dividing the evaluation values on the titer and the arousal degree into two types by taking a median 5 as a threshold, and when the problem of 2 classification is solved in a certain dimension, representing a high class or a positive index by more than 5, and representing the high class or the positive index by 1; less than or equal to 5 represents a low class or negative index, represented by 0. And carrying out equalization processing on the data and the labels, so that the quantity of the EEG data and the labels in each of the two types is the same, wherein the data respectively refer to the RAW characteristic, the NORM characteristic and the PSD characteristic, and the labels respectively refer to the evaluation of the RAW characteristic, the NORM characteristic and the PSD characteristic.
Further, the steps of the step 3 and the step 4 are shown in the right half of fig. 1, wherein an EEG electrode map shows the electrode position distribution on a BCI common electrode cap, and the distribution of electrodes of different BCI systems is different due to different numbers of electroencephalogram recording channels. The sensor readings acquired by the EEG acquisition system represent an electroencephalogram signal time sequence under a certain sampling frequency; typically, the raw EEG signal acquired at time t is represented by a one-dimensional data vectorAnd represents, where n represents the total number of channels of the acquisition system,Indicating the reading of the nth electrode channel at the t-th time point. For the observation period [ t, t+N-1], there are N one-dimensional such data vectors, each vector containing N elements, corresponding to the reading of the nth electrode on the electrode cap.
It can be seen from the EEG scalp electrode profile that each electrode is physically adjacent to a plurality of electrodes for measuring EEG signals of a region of the brain, and that different brain regions correspond to different brain activities. The one-dimensional chain type EEG data vector can only represent the correlation between two adjacent electrode positions, and the step 3 converts the one-dimensional chain type vector sequence of the PSD characteristics of the electroencephalogram signals into a two-dimensional mesh matrix sequence, so that the matrix structure corresponds to the brain area of the EEG electrode positions, thereby better representing the spatial correlation between the EEG signals of a plurality of physically adjacent electrodes, specifically:
The present invention converts the 32 channels of one-dimensional EEG data vector X t into a two-dimensional mesh matrix Y t as shown in FIG. 2, based on the electrode spatial positional relationship of the EEG acquisition system. Where t represents a specific point in time, the unused electrode position is set to 0 and is not active in the neural network. By conversion, the one-dimensional EEG vector sequence [ X t,Xt+1,...,Xt+N-1 ] over the observation period [ t, t+n-1] is converted into a two-dimensional matrix sequence [ Y t,Yt+1,...,Yt+N-1 ], where the number of two-dimensional mesh matrices is still N. And carrying out normalization processing on non-zero data in the two-dimensional matrix through a Z-score algorithm. Thus, the resulting two-dimensional mesh matrix sequence contains both temporal information and spatial information about the brain activity at that point in time.
The specific steps of the step 4 are as follows: then, as shown in the last step of fig. 1, a sliding window is applied to divide the two-dimensional mesh matrix sequence into individual segments P j, each segment having a fixed length (window size) and non-overlapping between two adjacent segments, specifically denoted as: p j=[Yt,Yt+1,...,Yt+s-1 ]. Wherein s represents the size of the window, i.e. the number of sampling points; j=1, 2,..q, q is the number of EEG sample fragments into which the observation period is divided.
Further, in the implementation process of CASC _cnn_lstm model in step 5: construction of CASC _CNN_LSTM model As shown in FIG. 3, the input to the model is a two-dimensional mesh matrix sequence (e.g., sample P j) that has been pre-processed as described above, which is a three-dimensional data structure containing spatial and temporal information. Firstly, extracting deep space features of EEG data from each two-dimensional mesh matrix by adopting a CNN network, then inputting the extracted deep space feature sequences into an LSTM network, and further extracting time features of the EEG data. Finally, receiving the output of the last time point of the LSTM through a full connection layer, and inputting the obtained deep space-time characteristics into a softmax layer for final emotion type prediction; specific:
to extract the deep spatial features of each two-dimensional mesh matrix, we use a deep two-dimensional CNN network as shown in figure 3 for spatial feature learning,
Specific: firstly, a two-dimensional mesh matrix sequence of each tested electroencephalogram characteristic is obtained, then a cascading hybrid Casc _CNN_LSTM model is constructed as shown in fig. 3, the jth EEG segment of the input model is represented by a two-dimensional mesh matrix sequence P j=[Yt,Yt+1,...,Yt+s-1]∈Rs×h×w, wherein the input model comprises s two-dimensional mesh matrix elements represented by Y k (k=t, t+1,...
Each mesh matrix is input into a 2D-CNN network, and the corresponding deep space feature representation Z k(k=t,t+1,...,t+s-1):Zk=CNN2D(Yk),Zk∈Rl.Zk is learned to be a one-dimensional feature vector containing l elements, whereby the input EEG matrix sequence is converted into a sequence of deep space feature vectors: cas-CNN: p j→Qj,where Qj=[Zt,Zt+1,...,Zt+s-1]∈Rs×l. The 2D-CNN model comprises 4 convolution layers, each layer adopts 16, 32, 64 and 128 convolution kernels with the size of 3*3 to carry out non-filling convolution operation, each layer adopts ReLu activation functions and Adam optimizers, the learning rate is 0.0005, after learning, the first convolution layer obtains 16 characteristic images of 7*7, the second convolution layer obtains 32 characteristic images of 5*5, the third convolution layer obtains 64 characteristic images of 3*3, and the fourth convolution layer converts 128 characteristic images into a final deep space characteristic representation Z k∈R128 by using a full-connection layer containing 128 neurons after obtaining 128 characteristic images of 1*1.
Then, the deep space feature representation sequence Q j is input into a single-layer bidirectional LSTM model shown in fig. 3 to further calculate correlation features of EEG segment time domains, and in the bidirectional LSTM model, the relation between a certain node EEG and the front and rear segments of the node EEG can be extracted through forward and backward sequence propagation, so that the extracted features of the model are objective and accurate. Each propagation direction of the model contains s LSTM units, the hidden state of the LSTM units at the current time point t is represented by h t, h t-1 represents the hidden state at the previous time point t-1, the information of the previous time point of the same layer is transmitted to the current time point, and the last output is affected by the same. The invention uses the hidden state of the LSTM unit as its output, the hidden state sequence of the forward LSTM unit [ h t,ht+1,...,ht+s-1 ], the hidden state sequence of the reverse LSTM unit [ h' t+s-1,...,h't+1,h't ]. Since we are interested in the emotion classification of the brain over the whole sample period, the outputs h t+s-1 and h' t at the last time point extracted after all time points in the whole window after LSTM learning is taken from both directions, respectively. H t+s-1 and H' t are stitched in the dimension describing the feature vector size, denoted as H j, and fed into the next fully connected layer as the time feature learned by the whole LSTM network, as shown in the final stage of fig. 3.
To this end, the temporal feature H j of the EEG mesh matrix sequence P j is expressed as: cas-LSTM: h t+s-1(ht')=RNNlstm(Zj),Hj∈R2i, where i represents the size of the hidden state of one LSTM cell. Finally, a softmax layer is adopted after the full connection layer to generate the final probability prediction value of each emotion type: softmax: c j=SoftMax(Hj),Cj∈Rk, wherein k represents the number of emotion categories that the model is ultimately to identify.
In summary, the process of processing the one-dimensional PSD characteristic sequence of the electroencephalogram signal through the feature transformation and Casc-CNN-LSTM model can be described as :Input(s×n)-Trans(s×h×w)-Conv(s×h×w×16)-Conv(s×h×w×32)-Conv(s×h×w×64)-Conv(s×h×w×128)-FC(l)-LSTM(s×2i)-FC(l)-softmax(k)., wherein Input (sXn) represents the one-dimensional PSD characteristic sequence of the electroencephalogram signal with segment size s and n channels; the Trans (s×h×w) table is to convert the one-dimensional PSD characteristic sequence into a mesh matrix sequence with the length s of h×w; conv (s×h×w×m) means that a convolution layer learns m feature maps from a mesh matrix; FC (l) represents a fully connected layer with l neurons; LSTM (s×2i) means that hidden layers with s LSTM units in the forward and reverse propagation directions learn to obtain a hidden state with a size i: softmax (k) represents the number k of emotion categories that are predicted.
In the step 5, a CASC _cnn_cnn model is constructed, the CASC _cnn_cnn model further extracts deep space features of the electroencephalogram signals from each segment P j, and the steps of inputting the extracted deep space features into a softmax layer for emotion classification prediction are approximately as follows: constructing CASC _CNN_CNN model shown in figure 4, wherein the input of CASC _CNN_CNN model is the same as the input of CASC _CNN_LSTM, and is a three-dimensional data tensor containing space and time information, then rearranging the extracted deep space features according to time sequence, inputting a CNN network again to continuously extract deep space features of a deeper layer on the basis of the deep space features extracted for the first time, finally receiving the output of CNN network through a full connection layer, and inputting the obtained feature vector into a softmax layer to carry out final emotion category prediction;
specifically, as shown in fig. 4, a CASC _cnn_cnn model is constructed, and the two-dimensional mesh matrix sequence P j is input into a CNN network composed of four convolution layers and a full connection layer, and converted into a sequence Q j having deep space feature vectors, i.e., Q j=[Zt,Zt+1,...,Zt+s-1]∈Rs×l. And integrating Q j to form a matrix such as sxl, then further extracting deeper deep space features of the Q j obtained in the step by using a CNNII (CNNII is just another CNNI network) network, wherein s represents the length of a vector sequence, l represents the number of elements contained in each sequence, the CNNII consists of two convolution layers, two pooling layers and a full connection layer, the two pooling layers are respectively connected with the two convolution layers, the pooled data of the second pooling layer is quantized and then is connected with the full connection layer with the number of 512 neurons, finally, the full connection is connected with a soft max layer to generate a probability prediction value of each type of emotion, the two convolution layers respectively adopt convolution kernels with the sizes of 32 and 64 3*3 to carry out filled convolution operation, and the two pooling layers adopt Maxpooling filters with the sizes of 2 x2 and the step size to sample convolution results. The convolutional layer and the full-connection layer adopt ReLu activation functions and Adam optimizers, and the learning rate is 0.0001.
In summary, the process of processing the one-dimensional PSD signature sequence of the electroencephalogram signal by the feature transformation and the cas_cnn_cnn model can be described :Input(s×n)-Trans(s×h×w)-Conv(s×h×w×16)-Conv(s×h×w×32)-Conv(s×h×w×64)-Conv(s×h×w×128)-FC(l)-Cat(b)-Trans(s×h×w)-Conv(s×h×w×32)-Pooling(max,2)-Conv(s×h×w×64)-Pooling(max,2)-FC(l)-softmax(k)., where Input (s×n) represents the one-dimensional PSD signature sequence with segment size s and containing n channel data; trans (sXhXw) represents the conversion of a one-dimensional EEG recording sequence into a mesh matrix sequence of length s of size h Xw; conv (s×h×w×m) means that a convolution layer learns m feature maps from a mesh matrix; cat (b) represents a chronological concatenation of b vectors; pooling (max, 2) represents the maximum pooling layer using a step size of 2 and a kernel of 2 x 2; FC (l) represents a fully connected layer with l neurons; softmax (k) represents the softmax layer used to predict k emotion categories.
According to the method, the two-dimensional mesh PSD features are taken as input Casc _CNN_LSTM and Casc _CNN_CNN models, which respectively obtain 93.15 and 92.37% emotion classification accuracy, and the two mixed models are better than the classification performance of several reference models and the latest method, so that the deep space and time information learned in the method is very critical for improving EEG emotion classification recognition performance.
Finally, it should be noted that: the above examples are only specific embodiments of the present invention, and are not intended to limit the scope of the present invention, but it should be understood by those skilled in the art that the present invention is not limited thereto, and that the present invention is described in detail with reference to the foregoing examples: any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or perform equivalent substitution of some of the technical features, while remaining within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (6)

1. The brain electricity space-time characteristic learning and emotion classification method based on the hybrid neural network is characterized by comprising the following steps of:
step 1: collecting electroencephalogram signals of a plurality of channels;
step 2: extracting PSD power spectral density characteristics from electroencephalogram signals of a plurality of channels;
step 3: converting the vector sequence of PSD power spectrum density characteristics into a two-dimensional mesh matrix sequence;
Step 4: dividing the two-dimensional mesh matrix sequence into a plurality of fragments P j by applying a sliding window;
Step 5: establishing CASC _CNN_LSTM model and CASC _CNN_CNN model, extracting deep space-time characteristics of the electroencephalogram signals from each segment P j in a combined mode through the CASC _CNN_LSTM model, and inputting the deep space-time characteristics extracted by the CASC _CNN_LSTM model into a softmax layer corresponding to the CASC _CNN_LSTM model to conduct emotion type prediction;
Jointly extracting deep space features of a deeper level of an electroencephalogram signal from each segment P j through CASC _CNN_CNN model; inputting deeper deep space features extracted by the CASC _CNN_CNN model into a softmax layer corresponding to the CASC _CNN_CNN model for emotion type prediction;
In the step 5, a CASC _cnn_lstm model is constructed, deep space-time characteristics of the electroencephalogram signals are jointly extracted from each segment P j, and the extracted deep space-time characteristics are input into a softmax layer for emotion type prediction, which comprises the following specific steps:
constructing CASC _CNN_LSTM model, inputting each segment P j into a 2D-CNN network, and obtaining deep space features through learning;
Then inputting a sequence representing deep space features into a bidirectional LSTM model, wherein each propagation direction of the model comprises s LSTM units, the hidden state of each LSTM unit at the current time point t is represented by H t, H t-1 represents the hidden state at the previous time point t-1, the information of the previous time point of the same layer is transmitted to the current time point, and the like affects the final output, the hidden state of each LSTM unit is taken as the output of the LSTM unit, the hidden state sequence [ H t,ht+1,...,ht+s-1 ] output by the forward LSTM unit, the hidden state sequence [ H ' t+s-1,...,h′t+1,h′t ] output by the reverse LSTM unit are respectively taken from two directions, the outputs H t+s-1 and H ' t of the last time point extracted after all time points in the whole window are obtained after the LSTM unit is learned, H t+s-1 and H ' t are spliced in the dimension describing the size of a feature vector, and recorded as H j, the learned time feature of the whole LSTM network is transmitted to the next full connection layer, and a final soft ax class probability prediction value is generated after the full connection layer;
In the step 5, a CASC _cnn_cnn model is constructed, the CASC _cnn_cnn model extracts deep space features of a deeper level of an electroencephalogram signal from each segment P j, and the specific steps of inputting the extracted deep space features into a softmax layer for emotion classification prediction are as follows:
Constructing CASC-CNN models, inputting each segment P j into a CNN network, obtaining a sequence Q j of deep space feature vectors of the segments P j through learning, integrating the sequence Q j into a matrix form, further extracting deep space features of the sequence Q j by using a CNN II network, sending the deep space features of the deep layer to the next full-connection layer, and generating a final probability prediction value of each emotion by using a softmax layer after the full-connection layer, wherein the CNN II network is another CNN network.
2. The brain electricity space-time feature learning and emotion classification method based on the hybrid neural network according to claim 1, wherein the method is characterized in that: the specific steps of the step 1 are as follows:
extracting electroencephalogram signals of a plurality of channels from the DEAP data set, and reducing the sampling frequency to 128HZ;
The DEAP data set is obtained by the following steps: and carrying out multiple tests on a plurality of tested objects, and after the electroencephalogram signals of each test are collected, carrying out emotion evaluation on the electroencephalogram signals of each test object by using continuous numerical values of 1-9 in terms of arousal degree, titer, preference, dominance and familiarity to represent various indexes from weak to strong.
3. The method for learning and emotion classification of electroencephalogram space-time features based on a hybrid neural network according to claim 2, wherein the step 1 further comprises preprocessing the acquired electroencephalogram signals, and the preprocessing comprises: and filtering data by adopting a 4-45Hz band-pass filter, and removing electro-oculogram interference by adopting a blind source separation technology.
4. The brain electricity space-time feature learning and emotion classification method based on the hybrid neural network according to claim 2, wherein the specific steps of the step 2 are as follows:
Based on the electroencephalogram signals of the multiple channels extracted in the step 1, performing non-overlapping segmentation on the electroencephalogram signals of each test, obtaining a plurality of samples for each test, and obtaining the total number of the samples to be tested, wherein each sample comprises a plurality of sampling points, and each sampling point comprises the data of the multiple channels extracted in the step 1, so as to obtain RAW characteristics;
Normalizing the segmented electroencephalogram signals according to channels to obtain NORM features on each tested time domain, and sliding and extracting PSD features of the NORM features on each channel of a single sample in a non-overlapping manner by using a Hamming window on a 4-45Hz frequency band by using a fast Fourier transform algorithm;
Finally, dividing the emotion evaluation values of RAW features, NORM features and PSD features, which are tested in each test, in the range of 1-9 into two classes by taking a median of 5 as a threshold value, wherein more than 5 represents a high class or a positive index, and the 1 represents the evaluation values on the titer and the arousal degree; less than or equal to 5 represents a low class or negative index, represented by 0; and then carrying out equalization treatment on the RAW characteristic, the NORM characteristic and the PSD characteristic, the evaluation of the RAW characteristic, the evaluation of the NORM characteristic and the evaluation of the PSD characteristic.
5. The brain electricity space-time feature learning and emotion classification method based on the hybrid neural network according to claim 1, wherein the specific steps of the step 3 are as follows:
One-dimensional data vector for electroencephalogram signal at time point t And n represents the total number of channels of the acquisition system,Representing the reading of the nth electrode channel at the nth time point; the one-dimensional electroencephalogram signal vector sequence [ X t,Xt+1,...,Xt+N-1 ] in the observation time period [ t, t+N-1] in each test is converted into a two-dimensional matrix sequence [ Y t,Yt+1,...,Yt+N-1 ] according to the electrode space position relation of the electroencephalogram signal acquisition system, and non-zero data in the two-dimensional matrix is normalized through a Z-score algorithm.
6. The method for learning and emotion classification of brain electrical space-time characteristics based on the hybrid neural network according to claim 1, wherein the specific steps of the step 4 are as follows:
The two-dimensional mesh matrix sequence is divided into segments P j using a sliding window, each segment P j having a fixed length and no overlap between two adjacent segments P j, P j=[Yt,Yt+1,...,Yt+s-1 ], where: s represents the size of the window, i.e. the number of sampling points; j=1, 2,..q, q is the number of observation time periods divided into electroencephalogram signal segments P j.
CN202011057296.2A 2020-09-29 2020-09-29 Electroencephalogram space-time feature learning and emotion classification method based on hybrid neural network Active CN112244873B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011057296.2A CN112244873B (en) 2020-09-29 2020-09-29 Electroencephalogram space-time feature learning and emotion classification method based on hybrid neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011057296.2A CN112244873B (en) 2020-09-29 2020-09-29 Electroencephalogram space-time feature learning and emotion classification method based on hybrid neural network

Publications (2)

Publication Number Publication Date
CN112244873A CN112244873A (en) 2021-01-22
CN112244873B true CN112244873B (en) 2024-07-16

Family

ID=74233700

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011057296.2A Active CN112244873B (en) 2020-09-29 2020-09-29 Electroencephalogram space-time feature learning and emotion classification method based on hybrid neural network

Country Status (1)

Country Link
CN (1) CN112244873B (en)

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112932502B (en) * 2021-02-02 2022-05-03 杭州电子科技大学 Electroencephalogram emotion recognition method combining mutual information channel selection and hybrid neural network
CN113017650B (en) * 2021-03-12 2022-06-28 南昌航空大学 An EEG feature extraction method and system based on power spectral density image
CN113509190A (en) * 2021-03-18 2021-10-19 上海交通大学 A product design evaluation method and system
CN113069117A (en) * 2021-04-02 2021-07-06 中山大学 Electroencephalogram emotion recognition method and system based on time convolution neural network
CN113191395B (en) * 2021-04-07 2024-02-09 杭州电子科技大学 Target detection method based on multi-level information fusion of double brains
CN113221996A (en) * 2021-04-30 2021-08-06 山东大学 Bearing fault diagnosis method and system based on multi-head attention mechanism
CN113288146A (en) * 2021-05-26 2021-08-24 杭州电子科技大学 Electroencephalogram emotion classification method based on time-space-frequency combined characteristics
CN113297981B (en) * 2021-05-27 2023-04-07 西北工业大学 End-to-end electroencephalogram emotion recognition method based on attention mechanism
CN113558644B (en) * 2021-07-20 2024-03-22 陕西科技大学 Emotion classification method, medium and equipment for 3D matrix and multidimensional convolution network
CN113705398B (en) * 2021-08-17 2022-12-27 陕西师范大学 Music electroencephalogram space-time characteristic classification method based on convolution-long and short term memory network
CN114155461B (en) * 2021-11-29 2024-08-02 北京国瑞数智技术有限公司 Method and system for filtering and purifying tiny video content
CN114224342B (en) * 2021-12-06 2023-12-15 南京航空航天大学 A multi-channel EEG signal emotion recognition method based on spatiotemporal fusion feature network
CN114461069A (en) * 2022-02-07 2022-05-10 上海图灵智算量子科技有限公司 An emotion recognition method based on quantum CNN-LSTM
CN115804602A (en) * 2022-12-21 2023-03-17 西京学院 Electroencephalogram emotion signal detection method, equipment and medium based on attention mechanism and with multi-channel feature fusion
CN117009777A (en) * 2023-04-20 2023-11-07 上海零唯一思科技有限公司 Artistic professionalism and emotion recognition methods, systems and electronic devices
CN117598711B (en) * 2024-01-24 2024-04-26 中南大学 A QRS wave group detection method, device, equipment and medium of electrocardiogram signal
CN120241035B (en) * 2025-06-04 2025-08-22 爱梦睡眠(珠海)智能科技有限公司 Respiration depth measurement method, device and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110309797A (en) * 2019-07-05 2019-10-08 齐鲁工业大学 Motion imagery recognition method and system integrating CNN-BiLSTM model and probabilistic cooperation
CN111128387A (en) * 2020-02-26 2020-05-08 上海鹰瞳医疗科技有限公司 Method and equipment for establishing epileptic seizure detection model

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10460747B2 (en) * 2016-05-10 2019-10-29 Google Llc Frequency based audio analysis using neural networks
CN110321783A (en) * 2019-05-07 2019-10-11 北京慧脑云计算有限公司 A kind of MEG spike detection method and system based on 1D convolutional neural networks
CN110236520B (en) * 2019-05-20 2020-09-29 上海数创医疗科技有限公司 Electrocardiogram type recognition device based on double convolution neural network
CN111317468B (en) * 2020-02-27 2024-04-19 腾讯科技(深圳)有限公司 Electroencephalogram signal classification method, electroencephalogram signal classification device, computer equipment and storage medium
CN111616721B (en) * 2020-05-31 2022-05-27 天津大学 Emotion recognition system and application based on deep learning and brain-computer interface

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110309797A (en) * 2019-07-05 2019-10-08 齐鲁工业大学 Motion imagery recognition method and system integrating CNN-BiLSTM model and probabilistic cooperation
CN111128387A (en) * 2020-02-26 2020-05-08 上海鹰瞳医疗科技有限公司 Method and equipment for establishing epileptic seizure detection model

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Emotion recognition from spatiotemporal EEG representations with hybrid convolutional recurrent neural networks via wearable multi-channel headset;Chen JX,et al;COMPUTER COMMUNICATIONS;第154卷;58-65 *

Also Published As

Publication number Publication date
CN112244873A (en) 2021-01-22

Similar Documents

Publication Publication Date Title
CN112244873B (en) Electroencephalogram space-time feature learning and emotion classification method based on hybrid neural network
Salama et al. EEG-based emotion recognition using 3D convolutional neural networks
CN111134666B (en) Emotion recognition method and electronic device based on multi-channel EEG data
CN113558644B (en) Emotion classification method, medium and equipment for 3D matrix and multidimensional convolution network
CN110353673B (en) An EEG channel selection method based on standard mutual information
CN110070105B (en) Electroencephalogram emotion recognition method and system based on meta-learning example rapid screening
Li et al. Patient-specific seizure prediction from electroencephalogram signal via multichannel feedback capsule network
CN115804602A (en) Electroencephalogram emotion signal detection method, equipment and medium based on attention mechanism and with multi-channel feature fusion
CN113010013A (en) Wasserstein distance-based motor imagery electroencephalogram migration learning method
CN109375776B (en) EEG signal action intention recognition method based on multi-task RNN model
Wang et al. Multiband decomposition and spectral discriminative analysis for motor imagery BCI via deep neural network
Xu et al. EEG signal classification and feature extraction methods based on deep learning: a review
CN114795247B (en) EEG signal analysis methods, devices, electronic equipment and storage media
CN118766459A (en) A method for emotion recognition of EEG signals integrating multi-scale residual attention network
Sun et al. Meeg-transformer: transformer network based on multi-domain eeg for emotion recognition
Jo et al. Channel-aware self-supervised learning for EEG-based BCI
He et al. A parallel neural networks for emotion recognition based on EEG signals
CN110141211B (en) A Classification Method of Steady-State Visual Evoked Potentials Based on Empirical Mode Decomposition
Ren et al. Extracting and supplementing method for EEG signal in manufacturing workshop based on deep learning of time–frequency correlation
Menaka et al. Emotion detection mastery: EEG signal analysis with balanced vs. unbalanced data
Samarpita et al. Differentiating mental stress levels: Analysing machine learning algorithms comparatively for eeg-based mental stress classification using mne-python
CN120217160A (en) A method for classifying EEG signals of cross-subject motion phenomena based on TSLANet and Riemannian geometry features
CN118948277B (en) Electroencephalogram identification method and system based on nonlinear cross frequency modulation network
CN118797410B (en) A dual-stream adaptive convolutional recurrent hybrid EEG emotion recognition method combined with attention mechanism
Lu et al. LGL-BCI: a lightweight geometric learning framework for motor imagery-based brain-computer interfaces

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