Emotion recognition system based on electroencephalogram signals
Through the EEG signal-based emotion recognition system, the electrode array is used to collect and process EEG signals, and combined with the support vector machine training model, the problems of low recognition accuracy and incomplete data in sentiment analysis are solved, achieving high accuracy and The detailed emotion recognition enhances the reliability of analysis and real-time monitoring capabilities.
Patent Information
- Application Number
- CN202411120400.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-15
- Publication Date
- 2024-12-31
AI Technical Summary
In the sentiment analysis, existing AI technologies have problems such as low recognition accuracy, incomplete data, privacy issues and limited application scope, especially the inability to accurately and meticulously identify human emotional information.
Design an emotional recognition system based on EEG signals, including a signal acquisition module, a signal processing module and an emotional state judgment module, collect EEG signals through an electrode array, perform noise reduction and feature extraction, and use support vector machines to train the emotion recognition model. And display emotional state in the visual interface.
It improves the accuracy and accuracy of emotion recognition, can reflect emotional intensity in detail, enhances the reliability and segmentation ability of analysis, and realizes efficient model training and real-time recognition.
Smart Images

Figure CN119226902A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electroencephalogram (EEG) signal recognition, and in particular to an emotion recognition system based on EEG signals. Background Art
[0002] In the current market, sentiment analysis mostly relies on AI technology. It is the mainstream trend in today's society to let AI analyze human emotions by combining voice, text, facial expressions, and personality traits input into the system. However, AI is not human and cannot accurately replace humans, let alone accurately analyze human's current emotional information. Therefore, under the current social development, sentiment analysis systems designed with AI technology basically have the following problems:
[0003] 1. The data supporting sentiment analysis is weak, and misjudgment events occur frequently;
[0004] 2. The categories of collected information are unclear, and AI cannot identify more detailed emotions;
[0005] 3. AI analysis of emotions often requires a large amount of labeled data for multiple trainings, so the popularity and application of this technology are limited;
[0006] 4. The collection and analysis of personal emotional data involves issues such as privacy, which also leads to incomplete data. Summary of the invention
[0007] In view of the defects in the prior art, the object of the present invention is to provide an emotion recognition system based on EEG signals, comprising a signal acquisition module, a signal processing module and an emotion state judgment module;
[0008] The signal acquisition module is used to collect EEG signals in real time through an electrode array and transmit the EEG signals to the signal processing module;
[0009] The signal processing module is used to preprocess and extract features from the EEG signal, generate a feature vector, and transmit the feature vector to the emotion state judgment module;
[0010] The emotional state judgment module is used to receive the feature vector from the signal processing module, input it into the trained emotion recognition model, obtain the emotional state, and judge the emotional state to obtain the corresponding emotion.
[0011] Furthermore, the system also includes a visualization module for displaying the emotion in a visualization interface.
[0012] Furthermore, the system also includes a model training module, which is used to train the emotion recognition model using the feature vector, and after the training is completed, the trained emotion recognition model is saved.
[0013] Furthermore, the preprocessing of the EEG signal is specifically:
[0014] Receiving the EEG signal transmitted by the signal acquisition module;
[0015] The electroencephalogram signal is subjected to noise reduction and artifact removal operations to obtain a pure electroencephalogram signal.
[0016] Furthermore, the artifacts include electrooculographic artifacts, electromyographic artifacts, electrocardiographic artifacts, skin electrode activity interference, power frequency interference, and magnetic field interference; the pure EEG signal is a set of time series data.
[0017] Furthermore, the feature extraction of the EEG signal is specifically:
[0018] The pure EEG signal is converted into frequency domain features using a short-time Fourier transform algorithm; the frequency domain features are differential entropy features;
[0019] The differential entropy feature is smoothed by using a feature smoothing algorithm to obtain a feature vector.
[0020] Furthermore, the emotion recognition model is trained by using the feature vector, specifically:
[0021] Receiving a feature vector transmitted by the signal processing module;
[0022] Combining the feature vector with its corresponding emotion label to form a training data set;
[0023] A support vector machine (SVM) is used to perform model training on the training data set to obtain an emotion recognition model, and the trained emotion recognition model is saved.
[0024] Furthermore, the emotion labels include basic emotions, positive emotions, and negative emotions; the basic emotions include joy, sadness, anger, fear, surprise, and disgust; the positive emotions include happiness, satisfaction, excitement, and pride; and the negative emotions include depression, anxiety, tension, and guilt.
[0025] Furthermore, the judgment obtains the corresponding emotion, specifically:
[0026] Receive the feature vector transmitted in real time by the signal processing module, input it into the trained emotion recognition model, perform recognition based on the emotion recognition model, and finally output the predicted emotional state; the emotional state is a numerical value representing the intensity of the emotion, such as a numerical value from 0 to 100, where a larger numerical value represents a more positive emotion, and a smaller numerical value represents a more negative emotion;
[0027] By judging and processing the specific numerical value of the emotional state, the corresponding emotion is obtained, and the emotion is transmitted to the visualization module.
[0028] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0029] 1. Emotion recognition based on EEG signals effectively improves the accuracy of recognition
[0030] Since EEG signals are signals of the central nervous system, emotion recognition based on EEG signals can more accurately and objectively reflect changes in a person's emotional state than facial expressions, body postures, and voice.
[0031] 2. Multi-source artifact removal effectively improves the accuracy and reliability of subsequent analysis
[0032] It can effectively remove various artifacts such as electrooculographic artifacts, electromyographic artifacts, electrocardiographic artifacts, skin electrodermal activity interference, power frequency interference, magnetic field interference, etc., so as to obtain purer EEG signals and improve the accuracy and reliability of subsequent analysis.
[0033] 3. Accurate expression of emotion intensity makes emotion recognition more detailed
[0034] Indicating the intensity of emotions with numerical values from 0 to 100 can more accurately reflect the subtle changes and degree of emotions rather than just simple classification. It covers basic emotions, positive emotions, and negative emotions, and provides detailed subdivisions for each type, making the identification and classification of emotions more comprehensive and detailed.
[0035] 4. Efficient model training and recognition, effectively improving the generalization ability and recognition efficiency of the model
[0036] The support vector machine (SVM) is used to train the model on the training data set, which can achieve better classification results under limited data samples and improve the generalization ability of the model. At the same time, it can also receive and process EEG signals in real time, quickly identify and output the predicted emotional state, and transmit the results to the visualization module, realizing real-time emotional monitoring and feedback. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following is a brief introduction to the drawings required for the specific embodiments or the description of the prior art. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn according to the actual scale.
[0038] Figure 1 It is a schematic diagram of the overall structure of the present invention;
[0039] Figure 2 Flowchart for the implementation of emotion recognition model training based on feature vectors. DETAILED DESCRIPTION
[0040] The following embodiments of the technical solution of the present invention are described in detail in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and are therefore only used as examples, and cannot be used to limit the protection scope of the present invention.
[0041] It should be noted that, unless otherwise specified, the technical terms or scientific terms used in this application should have the common meanings understood by those skilled in the art to which the present invention belongs.
[0042] like Figure 1 As shown, an embodiment of the present invention provides an emotion recognition system based on EEG signals, comprising:
[0043] The signal acquisition module 10 is used to collect EEG signals through an electrode array and transmit the EEG signals to the signal processing module 11;
[0044] The signal processing module 11 is used to pre-process and extract features of the EEG signal, generate a feature vector, and transmit the feature vector to the emotion state judgment module 13 and the model training module 12;
[0045] A model training module 12 is used to train an emotion recognition model using the feature vector, and after the training is completed, save the trained emotion recognition model;
[0046] The emotional state judgment module 13 is used to receive the feature vector generated by the signal processing module 11, input it into the trained emotion recognition model, obtain the emotional state, and judge the emotional state to obtain the corresponding emotion;
[0047] The visualization module 14 is used to display the emotion in a visualization interface.
[0048] Furthermore, the preprocessing of the EEG signal is specifically:
[0049] Receiving the EEG signal transmitted by the signal acquisition module 10;
[0050] Performing noise reduction and artifact removal operations on the EEG signal to obtain a pure EEG signal;
[0051] Specifically, in the implementation process, assuming that the collected EEG signal is X, the independent component S and the mixing matrix A are decomposed based on the independent component analysis (ICA) algorithm, so that X = A × S. By analyzing the characteristics of the independent components, the components related to the artifacts are identified and removed to obtain a pure EEG signal.
[0052] The artifacts include electrooculographic artifacts, electromyographic artifacts, electrocardiographic artifacts, skin electrical activity interference, power frequency interference, and magnetic field interference; the pure EEG signal is a set of time series data.
[0053] Furthermore, the feature extraction of the EEG signal is specifically:
[0054] The pure EEG signal is converted into frequency domain features using a short-time Fourier transform algorithm; the frequency domain features are differential entropy features;
[0055] Specifically, the pure EEG signal x(t) is segmented according to a fixed time length T and an overlap length O to obtain multiple short-time EEG signals n(t). For each short-time EEG signal n(t), a short-time Fourier transform is performed:
[0056] n(f)=∫n(t)×e (-2πft) dt
[0057] Among them, n(f) represents the frequency domain result of the EEG signal of the nth time period at frequency f after short-time Fourier transform, n(t) represents the EEG signals of multiple short time periods, t represents time, and f represents frequency.
[0058] From the frequency domain result n(f) obtained by short-time Fourier transform, calculate the power spectral density P of each frequency component = |n(f)| 2 , and then the frequency domain features, namely the differential entropy features, are calculated through the power spectral density P.
[0059] The differential entropy feature is smoothed using a moving average algorithm to obtain a feature vector.
[0060] Furthermore, the emotion recognition model is trained using the feature vector, and the specific implementation steps are as follows: Figure 2 As shown:
[0061] S1, data preparation stage;
[0062] Specifically, the feature vector transmitted by the signal processing module 11 is received, and a corresponding emotion label is marked for the feature vector, where the emotion label includes basic emotion, positive emotion, and negative emotion.
[0063] S2, dataset construction phase;
[0064] Specifically, the feature vectors and their corresponding emotion labels are combined to form data samples, and the data samples are collected to construct a training data set.
[0065] S3, model training stage;
[0066] Specifically, the support vector machine (SVM) algorithm is used for model training. The support vector machine (SVM) will continuously adjust the parameters of the hyperplane to find an optimal hyperplane so that the feature vectors corresponding to different emotion labels can be separated as accurately as possible.
[0067] S4, model evaluation phase;
[0068] Specifically, other uninvolved feature vectors are combined with their corresponding emotion labels to obtain a test set, and the trained model is evaluated by calculating the precision, recall rate, and F1 value using the test set. If the F1 value is closer to 1, the model performance is better.
[0069] The precision is the accuracy of the detection system, and its calculation formula is:
[0070]
[0071] Where Pi represents the precision, TP represents the number of samples correctly predicted by the model as positive, and FP represents the number of samples predicted by the model as negative. The recall rate is a measure of the recall rate of the detection system, and its calculation formula is:
[0072]
[0073] Among them, Rc represents the recall rate, TP represents the number of positive samples predicted correctly by the model, and FN represents the number of positive samples in the actual observation data. The F1 value is a concept of F1 value proposed on the basis of the precision and recall rate in order to evaluate the advantages and disadvantages of different algorithms. The calculation formula of F1 value is:
[0074]
[0075] S5, model preservation stage;
[0076] After multiple evaluations, when the F1 value closest to 1 is obtained, it means that the emotion recognition model at this time has the best performance. It is saved and used as a subsequent training model.
[0077] Furthermore, the judgment obtains the corresponding emotion, specifically:
[0078] The feature vector transmitted in real time by the signal processing module 11 is received, and is input into a trained emotion recognition model, and recognition is performed based on the emotion recognition model, and finally a predicted emotional state is output.
[0079] Specifically, after receiving the feature vector from the signal processing module 11, it will check whether its data structure and value range are consistent with the input format required by the trained emotion recognition model. If not, the value will be scaled and converted to obtain the standard feature.
[0080] The standard features are input into the emotion recognition model stored in the model training module 12 for training to obtain a predicted emotional state. The emotional state is a numerical value representing the intensity of the emotion, such as a numerical value from 0 to 100, where a larger numerical value represents a more positive emotion and a smaller numerical value represents a more negative emotion.
[0081] Based on the emotional state value, a specific emotion is determined, such as 0-30 for negative emotion, 31-70 for basic emotion, and 71-100 for positive emotion;
[0082] Specifically, 0-7 is depression, 8-15 is anxiety, 16-22 is tension, 23-30 is guilt; 31-37 is joy, 38-45 is sadness, 46-50 is anger, 51-56 is fear, 57-63 is surprise, 63-70 is disgust; 71-78 is happiness, 79-85 is satisfaction, 86-92 is excitement, and 93-100 is pride.
[0083] Preferably, a non-real-time feature vector may also be received and input into a trained emotion recognition model, and recognition is performed based on the emotion recognition model to finally output a predicted emotional state.
[0084] Specifically, the signal processing module can save the processed feature vector in an Oracle database, and if the subject does not want to perform emotion recognition on the spot, the save processing can be performed. For example, if the subject informs through a remote device that he wants to perform emotion recognition, the corresponding feature vector can be extracted from the database to perform the emotion recognition operation.
[0085] The beneficial effects of the present invention are embodied in:
[0086] 1. Emotion recognition based on EEG signals effectively improves the accuracy of recognition
[0087] Since EEG signals are signals of the central nervous system, emotion recognition based on EEG signals can more accurately and objectively reflect changes in a person's emotional state than facial expressions, body postures, and voice.
[0088] 2. Multi-source artifact removal effectively improves the accuracy and reliability of subsequent analysis
[0089] It can effectively remove various artifacts such as electrooculographic artifacts, electromyographic artifacts, electrocardiographic artifacts, skin electrodermal activity interference, power frequency interference, magnetic field interference, etc., so as to obtain purer EEG signals and improve the accuracy and reliability of subsequent analysis.
[0090] 3. Accurate expression of emotion intensity makes emotion recognition more detailed
[0091] Indicating the intensity of emotions with numerical values from 0 to 100 can more accurately reflect the subtle changes and degree of emotions rather than just simple classification. It covers basic emotions, positive emotions, and negative emotions, and provides detailed subdivisions for each type, making the identification and classification of emotions more comprehensive and detailed.
[0092] 4. Efficient model training and recognition, effectively improving the generalization ability and recognition efficiency of the model
[0093] The support vector machine (SVM) is used to train the model on the training data set, which can achieve better classification results under limited data samples and improve the generalization ability of the model. At the same time, it can also receive and process EEG signals in real time, quickly identify and output the predicted emotional state, and transmit the results to the visualization module, realizing real-time emotional monitoring and feedback.
[0094] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. These modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be included in the scope of the claims and specification of the present invention.
Claims
1. An emotion recognition system based on EEG signals, characterized in that: It includes a signal acquisition module, a signal processing module and an emotional state judgment module; The signal acquisition module is used to collect EEG signals in real time through an electrode array and transmit the EEG signals to the signal processing module; The signal processing module is used to preprocess and extract features from the EEG signal, generate a feature vector, and transmit the feature vector to the emotion state judgment module; The emotional state judgment module is used to receive the feature vector from the signal processing module, input it into the trained emotion recognition model, obtain the emotional state, and judge the emotional state to obtain the corresponding emotion.
2. The emotion recognition system based on EEG signals according to claim 1, characterized in that: The system also includes a visualization module, which is used to display the emotion in a visualization interface.
3. The emotion recognition system based on EEG signals according to claim 1, characterized in that: The system also includes a model training module, which is used to train the emotion recognition model using the feature vector, and save the trained emotion recognition model after the training is completed.
4. The emotion recognition system based on EEG signals according to claim 1, characterized in that: The preprocessing of the EEG signal is specifically: Receiving the EEG signal transmitted by the signal acquisition module; The electroencephalogram signal is subjected to noise reduction and artifact removal operations to obtain a pure electroencephalogram signal.
5. The emotion recognition system based on EEG signals according to claim 4, characterized in that: The artifacts include electrooculographic artifacts, electromyographic artifacts, electrocardiographic artifacts, skin electrical activity interference, power frequency interference, and magnetic field interference; the pure EEG signal is a set of time series data.
6. The emotion recognition system based on EEG signals according to claim 4, characterized in that: The feature extraction of the EEG signal is specifically as follows: The pure EEG signal is converted into frequency domain features using a short-time Fourier transform algorithm; the frequency domain features are differential entropy features; The differential entropy feature is smoothed by using a feature smoothing algorithm to obtain a feature vector.
7. The emotion recognition system based on EEG signals according to claim 3, characterized in that: The emotion recognition model is trained by using the feature vector, specifically: Receiving a feature vector transmitted by the signal processing module; Combining the feature vector with its corresponding emotion label to form a training data set; A support vector machine (SVM) is used to perform model training on the training data set to obtain an emotion recognition model, and the trained emotion recognition model is saved.
8. The emotion recognition system based on EEG signals according to claim 7, characterized in that: The emotion labels include basic emotions, positive emotions, and negative emotions; the basic emotions include joy, sadness, anger, fear, surprise, and disgust; the positive emotions include happiness, satisfaction, excitement, and pride; and the negative emotions include depression, anxiety, tension, and guilt.
9. The emotion recognition system based on EEG signals according to claim 1, characterized in that: The judgment obtains the corresponding emotion, specifically: Receive the feature vector transmitted in real time by the signal processing module, input it into the trained emotion recognition model, perform recognition based on the emotion recognition model, and finally output the predicted emotional state; By judging and processing the specific numerical value of the emotional state, the corresponding emotion is obtained, and the emotion is transmitted to the visualization module.