A method and
system for EEG
emotion recognition based on multi-task and attention mechanisms is disclosed. The method comprises: S1. Acquiring corresponding EEG
signal data according to the locations of emotion-related EEG channels in the
international standard 10-20
electrode placement
system; S2. Preprocessing the acquired EEG signals using
bandpass filtering,
power frequency notch filtering, downsampling, baseline correction, artifact removal, and
signal segmentation, dividing the
signal into windows with a duration of 0.5 seconds; S3. Extracting power
spectral density and differential entropy features from the
EEG data of each time slice, representing the feature vectors using a two-dimensional brain map to preserve spatial information, and stacking brain maps of all bands and features in three-dimensional space, with each map serving as input to the model; S4. Integrating a convolutional module, a long short-
term memory network variant module, and an attention module, employing a multi-
task learning strategy to obtain an optimal model capable of accurately identifying both
arousal and valence of emotions in EEG signals simultaneously. This invention solves the problem of previous models focusing only on a single feature and a single recognition task, constructing a highly accurate multi-task model in the field of
emotion recognition.