Emotion recognition method and system based on brain electron space discrimination
By finely preprocessing the EEG signals and building the brain electronic space, combining multi-dimensional feature extraction and personalized model training, the problem of poor emotional recognition accuracy in the existing technology is solved, and high accuracy and real-time emotional recognition effects are achieved.
Patent Information
- Application Number
- CN202411929417.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-03-28
AI Technical Summary
The existing emotional recognition technology based on EEG signals has poor accuracy, mainly due to low signal quality, incomplete feature extraction and insufficient model generalization capabilities.
By obtaining the user's EEG signals in real time and performing fine preprocessing, including signal filtering, denoising, segmentation and baseline correction; building a brain electronic space, combining time domain, frequency domain and nonlinear features for emotional feature extraction; and building an emotion recognition model through personalized model training.
It significantly improves the accuracy and real-time nature of emotional recognition, ensures the accuracy and user experience of emotional recognition, adapts to different user characteristics, and improves system performance.
Smart Images

Figure CN119700117A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of emotion recognition technology, and specifically to an emotion recognition method based on brain electronic space discrimination, a system based on the emotion recognition method based on brain electronic space discrimination, a computer device and a computer-readable storage medium. Background Art
[0002] With the continuous development of artificial intelligence and biomedical engineering technology, emotion recognition technology based on EEG signals has become a research hotspot in the field of human-computer interaction and affective computing. Traditional emotion recognition methods mostly rely on external behavioral features such as facial expressions, voice intonation, and body language. These methods can recognize the user's emotional state to a certain extent, but are often limited by subjectivity and environmental factors. The recognition accuracy and real-time performance are difficult to meet higher-level application requirements. In recent years, electroencephalogram (EEG), as a method that directly reflects brain activity, has gradually become the research focus of emotion recognition technology due to its high temporal resolution and relatively easy-to-obtain signal source.
[0003] However, the existing emotion recognition technology based on EEG signals still has some shortcomings, and the accuracy of emotion recognition is poor. Summary of the invention
[0004] In order to solve the above technical problems, a method for emotion recognition based on brain electronic space discrimination is proposed, including:
[0005] Acquire the user's EEG signal, preprocess the collected EEG signal, and extract eigenvalues, wherein the preprocessing includes one or more of signal filtering, signal denoising, signal segmentation and baseline correction for the collected EEG signal; construct a brain electronic space according to the eigenvalues, and extract emotional features in the brain electronic space, wherein the brain electronic space is a set of eigenvectors composed of the eigenvalues; train the emotional features using a machine learning algorithm to obtain an emotion recognition model, input the collected new EEG signal into the emotion recognition model, identify the emotional state, and obtain a recognition result.
[0006] As a preferred solution of the method for emotion recognition based on brain electronic spatial discrimination described in the present application, obtaining the user's EEG signal includes: obtaining user information, wherein the user information includes one or more of the user's age, gender and health status; adjusting acquisition parameters of an EEG acquisition device according to the user information, wherein the acquisition parameters include one or more of sampling frequency, signal gain and filtering settings; and using the EEG acquisition device with adjusted parameters to acquire the user's EEG signal.
[0007] As a preferred solution of the method for emotion recognition based on brain electronic space discrimination described in the present application, the collected EEG signal is preprocessed and characteristic values are extracted, including: preprocessing the collected EEG signal to obtain a preprocessed EEG signal, wherein the preprocessing includes signal filtering, signal denoising, signal segmentation and baseline correction, signal filtering includes filtering the EEG signal with a bandpass filter, removing non-EEG signal components, setting the cutoff frequency of the filter, and retaining emotion recognition EEG activity, signal denoising includes processing the filtered signal with independent component analysis technology, separating independent signal sources, and identifying noise components, and automatically removing non-EEG noise based on the detection results, and signal segmentation includes dividing the denoised continuous EEG signal into fixed lengths, The length is set to two seconds, the baseline correction is to eliminate the influence of signal baseline drift, and the average value of the signal is used as the baseline, and the signal is corrected by subtracting the baseline value; the characteristic value is extracted from the preprocessed EEG signal, wherein the feature extraction method includes one or more of time domain feature extraction, frequency domain feature extraction, nonlinear feature extraction and comprehensive feature construction, wherein the time domain feature extraction includes calculating the average value, standard deviation, variance, peak value and root mean square of each signal segment, the frequency domain feature extraction includes performing fast Fourier transform on each signal segment, converting the time domain signal into a frequency domain signal, and calculating the power spectral density of different frequency bands, the nonlinear feature extraction includes calculating the nonlinear characteristics of the EEG signal, and the comprehensive feature construction includes combining the time domain, frequency domain and nonlinear features to construct a multidimensional feature vector.
[0008] As a preferred solution of the method for distinguishing emotion recognition based on brain electronic space described in the present application, constructing the brain electronic space according to the eigenvalues includes: combining a preset number of extracted eigenvalues into a eigenvector, taking each eigenvalue as an element in the eigenvector, taking each eigenvector as a point in the space, and using a set of points to construct the brain electronic space, wherein the brain electronic space is:
[0009] S = {v1, v2, ..., v n},
[0010] Where S is the brain electronic space, v i is the feature vector of the i-th sample, i is the variable index, and n is the number of samples.
[0011] As a preferred solution of the method for distinguishing emotion based on brain electronic space described in the present application, extracting emotion features in the brain electronic space includes: using a principal component analysis formula to determine features related to the emotional state, and the principal component analysis formula is:
[0012]
[0013] Among them, C is the covariance matrix, X is the EEG signal eigenvector matrix, X T is the transpose of the EEG signal feature vector matrix, and n is the number of samples; according to the selected features, the preliminary emotional features of each sample are extracted using the emotional feature extraction formula, wherein the emotional feature extraction formula is:
[0014] f i =g(v i ),
[0015] Among them, f i is the preliminary sentiment feature of the i-th sample, v i is the feature vector of the i-th sample, i is the variable index, and g(·) is the feature extraction function; the extracted initial emotional features are standardized by a standardized processing formula to obtain the processed emotional features, and the standardized processing formula is:
[0016]
[0017] Among them, f′ i is the emotional feature of the i-th sample after standardization, f i is the initial sentiment feature of the i-th sample, i is the variable index, μ is the mean of the feature vector, and σ is the standard deviation of the feature vector.
[0018] As a preferred solution of the method for emotion recognition based on brain electronic spatial discrimination described in the present application, the emotion features are trained using a machine learning algorithm to obtain an emotion recognition model, including: obtaining a labeled EEG signal data set, selecting a support vector machine algorithm for training, and constructing the emotion recognition model.
[0019] As a preferred solution of the method for emotion recognition based on brain electronic spatial discrimination described in the present application, the collected new EEG signal is input into the emotion recognition model to identify the emotional state and obtain the recognition result, including: standardizing the new EEG signal, inputting the standardized new EEG signal into the trained emotion recognition model, using the emotion recognition model to predict the emotional state, and outputting the emotional state predicted by the emotion recognition model in real time to obtain the recognition result.
[0020] As a preferred solution of the emotion recognition system based on brain electronic space discrimination described in the present application, it includes: an EEG signal acquisition and preprocessing module, which is used to obtain the user's EEG signal, preprocess the collected EEG signal, and extract characteristic values, wherein the preprocessing includes one or more of signal filtering, signal denoising, signal segmentation and baseline correction on the collected EEG signal; a feature extraction module, which is used to obtain the user's EEG signal, preprocess the collected EEG signal, and extract characteristic values, wherein the preprocessing includes one or more of signal filtering, signal denoising, signal segmentation and baseline correction on the collected EEG signal; an emotion recognition model training module, which is used to train the emotion features using a machine learning algorithm to obtain an emotion recognition model, input the collected new EEG signal into the emotion recognition model, identify the emotional state, and obtain a recognition result.
[0021] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of a method for emotion recognition based on brain electronic space discrimination are implemented.
[0022] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a method for emotion recognition based on brain electronic spatial discrimination.
[0023] The beneficial effects of the present application are as follows: by acquiring the user's EEG signals in real time and preprocessing them, including signal filtering, denoising, segmentation and baseline correction, the preliminary purification and structuring of the EEG signals are achieved, the quality and availability of the signals are improved, and it is helpful to reduce errors in the subsequent feature extraction and emotion recognition processes, and ensure the accuracy of emotion recognition; mapping the feature vectors to a high-dimensional space and constructing a brain electronic space provide a more abstract and comprehensive information dimension for the extraction and recognition of emotional features, so that the analysis of emotional features is no longer limited to a single dimension, but is carried out from a more macro perspective, achieving the beneficial effect of enhancing the depth and breadth of emotional feature extraction and recognition; by collecting labeled EEG signal data sets, constructing an emotion recognition model, and using the emotion recognition model to identify emotional states, a more accurate recognition result can be obtained. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work, among which:
[0025] Figure 1An overall flow chart of an emotion recognition method based on brain electronic space discrimination is provided for one embodiment of the present application.
[0026] Figure 2 A system solution flow chart of an emotion recognition system based on brain electronic spatial discrimination is provided for one embodiment of the present application. DETAILED DESCRIPTION
[0027] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.
[0028] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0029] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor is it an embodiment that is mutually exclusive with other embodiments, either individually or selectively.
[0030] The present invention is described in detail with reference to the schematic diagram. When describing the embodiments of the present invention in detail, for the sake of convenience, the cross-sectional diagrams showing the device structure will not be partially enlarged according to the general scale, and the above schematic diagrams are only examples, which should not limit the scope of protection of the present invention. In addition, in actual production, the three-dimensional dimensions of length, width and depth should be included.
[0031] At the same time, in the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "upper, lower, inner and outer" are based on the directions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as limiting the present invention. In addition, the terms "first, second or third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0032] In the present invention, unless otherwise clearly specified and limited, the terms "install, connect, connect" should be understood in a broad sense, for example: it can be a fixed connection, a detachable connection or an integral connection; it can also be an electrical connection or a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0033] In view of the above-mentioned existing problems, the present application provides a method for emotion recognition based on brain electronic space discrimination, a system, a computer device and a computer-readable storage medium based on the method for emotion recognition based on brain electronic space discrimination, which effectively solves the problems of low signal quality, incomplete feature extraction, insufficient model generalization ability, and the need to improve real-time and accuracy in existing emotion recognition technologies through sophisticated EEG signal preprocessing, multi-dimensional feature extraction, brain electronic space construction and personalized model training. It realizes accurate and real-time recognition of the user's emotional state, thereby providing users with more personalized and intelligent services and significantly improving the user experience.
[0034] This application can provide users with richer, more intimate and intelligent services; the system of this application uses machine learning algorithms to train emotional features and build an emotion recognition model, and collects the user's EEG signals in real time and inputs them into the emotion recognition model to achieve real-time recognition of the user's emotional state.
[0035] Example 1, reference Figure 1 , which is the first embodiment of the present invention, provides an emotion recognition method based on brain electronic space discrimination, comprising:
[0036] S1: obtaining an electroencephalogram (EEG) signal of a user, preprocessing the collected EEG signal, and extracting a characteristic value, wherein the preprocessing includes performing one or more of signal filtering, signal denoising, signal segmentation, and baseline correction on the collected EEG signal;
[0037] Specifically, the EEG acquisition device is used to obtain the user's EEG signals in real time, and the collected EEG signals are preprocessed and feature values are extracted.
[0038] Obtaining the user's electroencephalogram (EEG) signal includes: obtaining user information, wherein the user information includes one or more of the user's age, gender, and health status; adjusting acquisition parameters of an EEG acquisition device according to the user information, wherein the acquisition parameters include one or more of a sampling frequency, a signal gain, and a filtering setting; and using the EEG acquisition device with adjusted parameters to acquire the user's EEG signal.
[0039] It should be noted that the above-mentioned real-time acquisition of the user's EEG signal includes entering the user's age, gender and health status, adjusting the acquisition parameters according to the user's characteristics, selecting the EEG acquisition device according to the user information, configuring the EEG signal acquisition parameters, and checking the signal quality, and storing the collected EEG signal data in real time.
[0040] The above-mentioned configuration of the EEG signal acquisition parameters includes sampling frequency, signal gain and filter settings; the above-mentioned checking of signal quality includes checking whether the contact between the sensor and the scalp is good and whether there is obvious interference in the signal.
[0041] Preprocessing the collected EEG signals and extracting characteristic values includes: preprocessing the collected EEG signals to obtain preprocessed EEG signals, wherein the preprocessing includes signal filtering, signal denoising, signal segmentation and baseline correction, signal filtering includes filtering the EEG signals with a bandpass filter, removing non-EEG signal components, setting the filter cutoff frequency, and retaining emotion recognition EEG activities, signal denoising includes processing the filtered signals with independent component analysis technology, separating independent signal sources, and identifying noise components, and automatically removing non-EEG noise based on the detection results, signal segmentation includes dividing the denoised continuous EEG signals into fixed lengths, and setting the length to two seconds, and baseline correction includes eliminating The influence of signal baseline drift is eliminated, and the average value of the signal is used as the baseline, and the signal is corrected by subtracting the baseline value; characteristic values are extracted from the above-mentioned preprocessed EEG signal, wherein the feature extraction method includes one or more of time domain feature extraction, frequency domain feature extraction, nonlinear feature extraction and comprehensive feature construction, wherein time domain feature extraction includes calculating the average value, standard deviation, variance, peak value and root mean square of each signal segment, frequency domain feature extraction includes fast Fourier transform of each signal segment, converting the time domain signal into a frequency domain signal, and calculating the power spectral density of different frequency bands, nonlinear feature extraction includes calculating the nonlinear characteristics of the EEG signal, and comprehensive feature construction includes combining the time domain, frequency domain and nonlinear features to construct a multidimensional feature vector.
[0042] It should be further explained that the above-mentioned preprocessing includes signal filtering, signal denoising, signal segmentation and baseline correction of the collected EEG signals.
[0043] The above-mentioned signal filtering includes filtering the EEG signal with a bandpass filter to remove non-EEG signal components, setting the cutoff frequency of the filter to 0.5Hz~70Hz, and retaining emotion recognition EEG activity; the above-mentioned signal denoising includes processing the filtered signal with independent component analysis technology to separate independent signal sources and identify noise components, and automatically remove non-EEG noise based on the detection results; the above-mentioned signal segmentation includes dividing the denoised continuous EEG signal into fixed lengths and setting the length to two seconds; the above-mentioned baseline correction includes eliminating the influence of signal baseline drift, taking the average value of the signal as the baseline, and correcting the signal by subtracting the baseline value.
[0044] Furthermore, the feature extraction includes time domain feature extraction, frequency domain feature extraction, nonlinear feature extraction and comprehensive feature construction of the preprocessed EEG signal.
[0045] The above-mentioned time domain feature extraction includes calculating the mean, standard deviation, variance, peak value and root mean square of each signal segment; the above-mentioned frequency domain feature extraction includes performing fast Fourier transform on each signal segment, converting the time domain signal into a frequency domain signal, and calculating the power spectral density of different frequency bands; the above-mentioned nonlinear feature extraction includes calculating the nonlinear characteristics of the EEG signal; the above-mentioned comprehensive feature construction includes combining the time domain, frequency domain and nonlinear features to construct a multidimensional feature vector, and performing emotion recognition analysis.
[0046] Furthermore, the above fast Fourier transform package formula is:
[0047]
[0048] Where X(k) is the amplitude of the signal at frequency k, x(n) is the signal value at the nth sampling point, n is the variable index, N is the total length of the signal, j is the imaginary unit, k is the frequency index, e is the base of the natural logarithm, and π is the circumference of a circle.
[0049] The above calculation of the nonlinear characteristics of the EEG signal includes calculating the Lyapunov exponent formula as follows:
[0050]
[0051] Among them, λ is the Lyapunov index, s is the number of iterations, i is the iteration index, h is the dynamic system equation, l is the value of the system state variable, ln is the natural logarithm function, and |·| is the absolute value; when λ>0, it indicates that the system exhibits chaotic behavior.
[0052] S2: constructing a brain electronic space according to the above eigenvalues, and extracting emotional features in the above brain electronic space, wherein the above brain electronic space is a set of eigenvectors composed of the above eigenvalues;
[0053] Specifically, the eigenvalues are used to construct the brain electronic space, and the emotional features are extracted from the brain electronic space.
[0054] The brain electronic space is constructed according to the above-mentioned eigenvalues, including: combining a preset number (for example, 3 or 5) of the above-mentioned eigenvalues extracted into a eigenvector, taking each of the above-mentioned eigenvalues as an element in the above-mentioned eigenvector, taking each of the above-mentioned eigenvectors as a point in the space, and using a set of points to construct the above-mentioned brain electronic space.
[0055] Furthermore, the above-mentioned construction of brain electronic space using eigenvalues includes combining the extracted eigenvalues into a eigenvector, taking each eigenvalue as an element in the vector, taking each eigenvector as a point in a high-dimensional space, and forming the brain electronic space with a set of points.
[0056] The above-mentioned brain electronic space includes:
[0057] S = {v1, v2, ..., v n},
[0058] Where S is the brain electronic space, v i is the feature vector of the i-th sample, i is the variable index, and n is the number of samples.
[0059] Extracting emotional features in the above-mentioned brain electronic space includes: using the principal component analysis formula to determine the features related to the emotional state; according to the selected features, using the emotional feature extraction formula to extract the preliminary emotional features of each sample; using the standardization processing formula to standardize the extracted initial emotional features to obtain the above-mentioned processed emotional features.
[0060] Furthermore, the above-mentioned extraction of emotional features in the brain electronic space includes using principal component analysis to select features related to the emotional state, extracting the emotional features of each sample based on the selected features, performing emotion recognition, and standardizing the extracted emotional features.
[0061] The principal component analysis formula is:
[0062]
[0063] Among them, C is the covariance matrix, X is the EEG signal eigenvector matrix, X T is the transpose of the EEG signal feature vector matrix, and n is the number of samples.
[0064] The above formula for extracting emotional features is:
[0065] f i =g(v i ),
[0066] Among them, f iis the sentiment feature vector of the i-th sample, v i is the feature vector of the i-th sample, i is the variable index, and g(·) is the feature extraction function.
[0067] The above formula for standardizing the extracted emotional features is:
[0068]
[0069] Among them, f′ i is the standardized sentiment feature vector of the ith sample, f i is the sentiment feature vector of the i-th sample, i is the variable index, μ is the mean of the feature vector, and σ is the standard deviation of the feature vector.
[0070] S3: Use a machine learning algorithm to train the above-mentioned emotional features to obtain an emotion recognition model, input the collected new EEG signals into the above-mentioned emotion recognition model, identify the emotional state, and obtain a recognition result.
[0071] The recognition results are used for sentiment analysis, and different results correspond to different emotions.
[0072] Specifically, the emotional features are trained using machine learning algorithms, and an emotion recognition model is constructed. The real-time collected EEG signals are input into the emotion recognition model to perform real-time recognition of the emotional state.
[0073] The emotion features are trained using a machine learning algorithm to obtain an emotion recognition model, including: obtaining a labeled EEG signal data set, selecting a support vector machine algorithm for training, and constructing the emotion recognition model.
[0074] Furthermore, the above-mentioned construction of the emotion recognition model includes collecting a labeled EEG signal data set, constructing an emotion recognition model, selecting a support vector machine to train the emotion recognition model, and using an independent test set to verify the performance of the model and calculate whether the accuracy and recall rate meet the standards.
[0075] The above support vector machine formula is:
[0076]
[0077] Among them, w is the weight, b is the bias term, D is the penalty parameter, ξ i is the slack variable, i is the variable index, and Q is the support vector machine.
[0078] The above calculation accuracy formula is:
[0079]
[0080] Among them, Precision is the accuracy, TP is the number of samples in the positive class that are correctly predicted as positive by the model, and FP is the number of samples in the negative class that are incorrectly predicted as positive by the model.
[0081] The above recall calculation formula is:
[0082]
[0083] Among them, TP is the number of samples that are positive and correctly predicted as positive by the model, and FN is the number of samples that are positive but incorrectly predicted as negative by the model.
[0084] Among them, when the accuracy rate is lower than 90% and the recall rate is lower than 90%, it means that the model needs to be optimized; if the accuracy rate and the recall rate are both greater than or equal to 90%, it means that the model does not need to be improved and the existing parameters should continue to be maintained.
[0085] The collected new EEG signal is input into the above-mentioned emotion recognition model to identify the emotional state and obtain the recognition result, including: standardizing the new EEG signal, inputting the standardized new EEG signal into the trained emotion recognition model, using the above-mentioned emotion recognition model to predict the emotional state, and outputting the emotional state predicted by the above-mentioned emotion recognition model in real time to obtain the above-mentioned recognition result.
[0086] Furthermore, the real-time recognition of the above-mentioned emotional state includes using a trained recognition model to standardize real-time features, inputting the standardized feature vector into the trained emotion recognition model, using the model to predict the emotional state, and outputting the emotional state predicted by the model in real time for user use.
[0087] The existing emotion recognition technology based on EEG signals still has some shortcomings, and the accuracy of emotion recognition is poor. First, the traditional EEG signal preprocessing method is often relatively simple, and fails to effectively remove noise and non-EEG signal components, resulting in low accuracy of feature extraction. Secondly, the extraction of emotional features mostly relies on a single or limited feature dimension, which is difficult to fully reflect complex emotional states. Furthermore, during the training process, the existing emotion recognition models often ignore the impact of individual differences of users on emotion recognition, resulting in insufficient generalization ability of the model. In response to these problems, the present application proposes an emotion recognition method based on brain electronic space discrimination, a system based on brain electronic space discrimination emotion recognition method, a computer device and a computer-readable storage medium, which significantly improves the accuracy and real-time performance of emotion recognition through precise signal preprocessing, multi-dimensional feature extraction and personalized model training, and provides users with more accurate emotion computing services.
[0088] Based on the analysis of the deficiencies in the existing technology, this application specifically designs a sophisticated preprocessing process for EEG signals, including signal filtering, denoising, segmentation, and baseline correction, to ensure the accuracy of feature extraction. At the same time, by constructing a brain electronic space and combining time domain, frequency domain, and nonlinear features, a comprehensive analysis of emotional states is achieved. In addition, this application also takes into account individual differences among users, and further improves the accuracy and adaptability of recognition by adjusting acquisition parameters and training personalized emotion recognition models. These innovations are expected to bring new breakthroughs to the development of emotion recognition technology.
[0089] The beneficial effects of the present application are as follows: the present application obtains the user's EEG signal in real time and preprocesses it, including signal filtering, denoising, segmentation and baseline correction, thereby achieving preliminary purification and structuring of the EEG signal, improving the quality and availability of the signal, helping to reduce errors in subsequent feature extraction and emotion recognition, and ensuring the accuracy of emotion recognition; the acquisition parameters are adjusted according to the user's age, gender and health status, thereby achieving personalization of EEG signal acquisition, ensuring the pertinence and adaptability of EEG signal acquisition, thereby improving the accuracy and universality of emotion recognition, and through personalized configuration, achieving the beneficial effect of adapting to the characteristics of different users and improving the overall system performance; a multidimensional feature vector is constructed by extracting the time domain, frequency domain and nonlinear features of the preprocessed EEG signal, providing a rich information basis for emotion recognition, helping to more comprehensively capture emotion-related information in EEG signals, and through comprehensive analysis of multidimensional features, achieving improvement The beneficial effects of emotion recognition model robustness and recognition effect; mapping feature vectors to high-dimensional space and constructing brain electronic space provide a more abstract and comprehensive information dimension for the extraction and recognition of emotion features, so that the analysis of emotion features is no longer limited to a single dimension, but is carried out from a more macro perspective, achieving the beneficial effect of improving the depth and breadth of emotion feature extraction and recognition; using principal component analysis to select features related to emotional state and perform standardization processing, reducing feature dimensions, while enhancing the comparability and distinguishability of features, and improving the training efficiency and prediction accuracy of emotion recognition models through dimensionality reduction and feature standardization, achieving the beneficial effects of optimizing model performance and reducing computational complexity; by collecting labeled EEG signal data sets, constructing emotion recognition models, and using independent test sets to verify the performance of the models, the generalization ability of the models and practical application value are ensured, and the accuracy and recall rate of emotion recognition models are guaranteed through precise model training and verification.
[0090] The present application solves the problems that the prior art fails to remove noise and non-EEG signal components, resulting in low accuracy of feature extraction and the extraction of emotional features mostly relying on a single or limited feature dimension, making it difficult to fully reflect complex emotional states and ignoring the impact of user individual differences on emotion recognition in the training model.
[0091] Example 2, reference Figure 2 , which is the second embodiment of the present invention, provides an emotion recognition system based on brain electronic space discrimination, including an EEG signal acquisition and preprocessing module 100, a feature extraction module 200 and an emotion recognition model training module 300.
[0092] An EEG signal acquisition and preprocessing module, used to obtain the user's EEG signal, preprocess the collected EEG signal, and extract feature values, wherein the preprocessing includes one or more of signal filtering, signal denoising, signal segmentation, and baseline correction on the collected EEG signal;
[0093] A feature extraction module, used to obtain the user's EEG signal, pre-process the collected EEG signal, and extract feature values, wherein the pre-processing includes one or more of signal filtering, signal denoising, signal segmentation, and baseline correction on the collected EEG signal;
[0094] The emotion recognition model training module is used to use a machine learning algorithm to train the above-mentioned emotion features to obtain an emotion recognition model, input the collected new EEG signals into the above-mentioned emotion recognition model, identify the emotional state, and obtain a recognition result.
[0095] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
[0096] Embodiment 3, the third embodiment of the present invention, is different from the first two embodiments in that:
[0097] If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the above methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0098] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0099] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the above-mentioned program is printed, since the above-mentioned program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or processing in other suitable ways as necessary, and then stored in a computer memory.
[0100] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
Claims
1. A method for emotion recognition based on brain electronic space discrimination, characterized in that: include, Acquire the user's electroencephalogram (EEG) signal, preprocess the collected EEG signal, and extract characteristic values, wherein the preprocessing includes performing one or more of signal filtering, signal denoising, signal segmentation, and baseline correction on the collected EEG signal; Constructing a brain electronic space according to the eigenvalues, and extracting emotional features in the brain electronic space, wherein the brain electronic space is a set of eigenvectors composed of the eigenvalues; The emotion features are trained using a machine learning algorithm to obtain an emotion recognition model, and the collected new EEG signals are input into the emotion recognition model to identify the emotion state and obtain a recognition result.
2. The method for emotion recognition based on brain electronic space discrimination as claimed in claim 1, characterized in that: Obtain the user's EEG signals, including: Acquiring user information, wherein the user information includes one or more of the user's age, gender, and health status; Adjusting acquisition parameters of an EEG acquisition device according to the user information, wherein the acquisition parameters include one or more of a sampling frequency, a signal gain, and a filter setting; The EEG acquisition device with adjusted parameters is used to acquire the EEG signal of the user.
3. The method for emotion recognition based on brain electronic space discrimination as claimed in claim 2, characterized in that: Preprocessing the collected EEG signals and extracting feature values includes: Preprocessing the collected EEG signals to obtain preprocessed EEG signals, wherein the preprocessing includes signal filtering, signal denoising, signal segmentation and baseline correction. Signal filtering includes filtering the EEG signals with a bandpass filter to remove non-EEG signal components, setting the filter cutoff frequency, and retaining emotion recognition EEG activities. Signal denoising includes processing the filtered signals with independent component analysis technology to separate independent signal sources and identify noise components. Based on the detection results, non-EEG noise is automatically removed. Signal segmentation includes dividing the denoised continuous EEG signals into fixed lengths and setting the length to two seconds. Baseline correction includes eliminating the influence of signal baseline drift, taking the average value of the signal as the baseline, and correcting the signal by subtracting the baseline value. Extract characteristic values from the preprocessed EEG signal, wherein the feature extraction method includes one or more of time domain feature extraction, frequency domain feature extraction, nonlinear feature extraction and comprehensive feature construction, wherein the time domain feature extraction includes calculating the average value, standard deviation, variance, peak value and root mean square of each signal segment, the frequency domain feature extraction includes performing a fast Fourier transform on each signal segment, converting the time domain signal into a frequency domain signal, and calculating the power spectral density of different frequency bands, the nonlinear feature extraction includes calculating the nonlinear characteristics of the EEG signal, and the comprehensive feature construction includes combining the time domain, frequency domain and nonlinear features to construct a multidimensional feature vector.
4. The method for emotion recognition based on brain electronic space discrimination as claimed in claim 3, characterized in that: Constructing a brain electronic space according to the characteristic values includes: The extracted preset number of eigenvalues are combined into a eigenvector, each eigenvalue is used as an element in the eigenvector, each eigenvector is used as a point in space, and the brain electronic space is formed by a set of points. Wherein, the brain electronic space is: S={v1,v2,...,v n }, Where S is the brain electronic space, v i is the feature vector of the i-th sample, i is the variable index, and n is the number of samples.
5. The method for emotion recognition based on brain electronic space discrimination as claimed in claim 4, characterized in that: Extracting emotional features in the brain electronic space includes: The features related to the emotional state are determined using the principal component analysis formula, which is: Among them, C is the covariance matrix, X is the EEG signal eigenvector matrix, X T is the transpose of the EEG signal feature vector matrix, n is the number of samples; According to the selected features, the preliminary emotional features of each sample are extracted using the emotional feature extraction formula, wherein the emotional feature extraction formula is: f i =g(v i ), Among them, f i is the preliminary sentiment feature of the i-th sample, v i is the feature vector of the i-th sample, i is the variable index, and g(·) is the feature extraction function; The extracted initial emotional features are standardized by using a standardized processing formula to obtain the processed emotional features. The standardized processing formula is: Among them, f′ i is the emotional feature of the i-th sample after standardization, f i is the initial sentiment feature of the i-th sample, i is the variable index, μ is the mean of the feature vector, and σ is the standard deviation of the feature vector.
6. The method for emotion recognition based on brain electronic space discrimination as claimed in claim 5, characterized in that: The emotion features are trained using a machine learning algorithm to obtain an emotion recognition model, including: Obtain a labeled EEG signal data set, select a support vector machine algorithm for training, and build the emotion recognition model.
7. The method for emotion recognition based on brain electronic space discrimination as claimed in claim 6, characterized in that: The collected new EEG signal is input into the emotion recognition model to identify the emotion state and obtain the recognition result, including: The new EEG signal is standardized, the standardized new EEG signal is input into the trained emotion recognition model, the emotion recognition model is used to predict the emotional state, the emotional state predicted by the emotion recognition model is output in real time, and the recognition result is obtained.
8. A system using the method for emotion recognition based on brain electronic space discrimination as claimed in any one of claims 1 to 7, characterized in that: include: An EEG signal acquisition and preprocessing module, used to acquire the user's EEG signal, preprocess the collected EEG signal, and extract feature values, wherein the preprocessing includes performing one or more of signal filtering, signal denoising, signal segmentation, and baseline correction on the collected EEG signal; A feature extraction module, used to obtain the user's EEG signal, pre-process the collected EEG signal, and extract feature values, wherein the pre-processing includes one or more of signal filtering, signal denoising, signal segmentation, and baseline correction on the collected EEG signal; The emotion recognition model training module is used to train the emotion features using a machine learning algorithm to obtain an emotion recognition model, input the collected new EEG signals into the emotion recognition model, identify the emotion state, and obtain a recognition result.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of an emotion recognition method based on brain electronic space discrimination as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of an emotion recognition method based on brain electronic space discrimination as described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Wearable emotion recognition method and system based on electroencephalogram
CN105395192A
Emotional electroencephalography (EEG) recognition method for improving time robustness of emotion recognition model
CN106108894A
EEG signal emotion recognition based on ensemble learning method AdaBoost
CN112200016A
Electroencephalogram emotion recognition method based on robust low-rank subspace self-representation features
CN114118298A
Emotion recognition method, device and equipment suitable for multi-modal physiological signals
CN116401619A