A method and device for analyzing emotion of electroencephalogram signal

By extracting and comparing the similarity of the target user's EEG signals, the problem of inaccurate emotions recognition in the prior art is solved, and more accurate and personalized emotions recognition is achieved, with real-time and adaptability.

CN118648899BActive Publication Date: 2025-04-15JINAN UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410830088.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2025-04-15
Estimated Expiration
2044-06-25

AI Technical Summary

Technical Problem

Existing emotional recognition technologies based on EEG signals are susceptible to external environment interference, resulting in inaccurate recognition results.

Method used

By performing feature extraction of the target user's EEG signals over a specific time period, a target feature data set is constructed, and similarity is compared with multiple standard feature data sets to determine the user's sentiment category.

Benefits of technology

It improves the accuracy and personalization of emotion recognition, realizes real-time detection and adaptability of emotions, and can more accurately reflect the user's emotional state.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118648899B_ABST
    Figure CN118648899B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method and device for analyzing the emotion of an electroencephalogram signal, which belongs to the field of emotion recognition technology. The method includes: extracting features from a target electroencephalogram signal to obtain a target feature data set; the target electroencephalogram signal is an electroencephalogram signal of a target user in the current first time period, and the target feature data set includes features for reflecting the emotion of the target user; the emotion category of the target user is determined according to the similarity between the target feature data set and each standard feature data set; each standard feature data set includes multiple standard features of one emotion category. The present disclosure can make the result of emotion recognition more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure belongs to the technical field of emotion recognition, and more specifically, to a method and device for analyzing emotions of electroencephalogram signals. Background Art

[0002] Brain waves are electrical signals generated by the activity of brain neurons, which can be recorded and classified into different frequency bands, each of which is associated with a specific emotional state or brain activity pattern. Although emotion recognition technology based on EEG (Electroencephalogram) has made some progress, EEG signals are easily interfered by the external environment, and the recognition results may be inaccurate. Summary of the invention

[0003] The purpose of the present invention is to provide a method and device for analyzing emotion of EEG signals to improve the accuracy of emotion recognition.

[0004] A first aspect of the embodiments of the present disclosure provides a method for analyzing emotions of EEG signals, comprising:

[0005] Extracting features of the target EEG signal to obtain a target feature data set; the target EEG signal is an EEG signal of the target user in the current first time period, and the target feature data set includes features for reflecting the emotions of the target user;

[0006] The emotion category of the target user is determined according to the similarity between the target feature data set and each standard feature data set; each standard feature data set includes multiple standard features of one emotion category.

[0007] A second aspect of the embodiments of the present disclosure provides an electroencephalogram (EEG) signal emotion analysis device, comprising:

[0008] A feature extraction module is used to extract features from a target EEG signal to obtain a target feature data set; the target EEG signal is an EEG signal of a target user within a current first time period, and the target feature data set includes features for reflecting the emotions of the target user;

[0009] The emotion recognition module is used to determine the emotion category of the target user based on the similarity between the target feature data set and each standard feature data set; each standard feature data set includes multiple standard features of one emotion category.

[0010] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of the above-mentioned method for analyzing emotions of EEG signals when executing the computer program.

[0011] According to a fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned method for analyzing emotions of EEG signals are implemented.

[0012] The beneficial effects of the method and device for analyzing EEG signal emotions provided by the embodiments of the present disclosure are:

[0013] On the one hand, the EEG signal emotion analysis method provided by the present disclosure is more accurate and personalized, as shown in the following:

[0014] By extracting features from the EEG signals of the target user within a specific time period, a more accurate and specific target feature dataset can be obtained. These features can more accurately reflect the user's emotional state. Compared with existing rule-based or general model-based emotion recognition methods, using the target feature dataset to compare similarities with the standard feature dataset can more accurately determine the user's emotion category. This is because this method takes into account the user's unique emotional characteristics and patterns. Each user may have their own unique emotional expression and characteristics, and these characteristics can be more accurately captured and identified through personalized analysis, thereby providing emotion recognition results that are more in line with the user's actual situation.

[0015] On the other hand, the EEG signal emotion analysis method provided by the present disclosure has real-time and good adaptability, as shown in the following:

[0016] The target EEG signal is collected in real time, so real-time detection of emotions can be achieved. This is very important for application scenarios that require immediate feedback (such as human-computer interaction, mental illness prediction, etc.). By using multiple standard feature data sets (each emotion category contains multiple standard features), the present disclosure can adapt to the differences in emotional features of different users. With the accumulation of data and the development of technology, the standard feature data set can be continuously updated and optimized, thereby improving the accuracy and adaptability of emotion recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0018] Figure 1 A flowchart of a method for analyzing emotions of EEG signals provided in one embodiment of the present disclosure;

[0019] Figure 2 A structural block diagram of an EEG signal emotion analysis device provided in one embodiment of the present disclosure;

[0020] Figure 3 A schematic block diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0021] In the following description, specific details such as specific system structures and technologies are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present disclosure. However, it should be clear to those skilled in the art that the present disclosure may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obstructing the description of the present disclosure with unnecessary details.

[0022] In order to make the purpose, technical solutions and advantages of the present disclosure more clear, specific embodiments will be described below in conjunction with the accompanying drawings.

[0023] Please refer to Figure 1 , Figure 1 A flowchart of a method for analyzing emotion of an EEG signal provided in an embodiment of the present disclosure includes:

[0024] S101: extracting features from a target EEG signal to obtain a target feature data set; the target EEG signal is an EEG signal of a target user in a current first time period, and the target feature data set includes features for reflecting the emotions of the target user.

[0025] In this embodiment, the EEG signal refers to the potential changes of the electrical activity of brain neurons recorded by EEG technology in a specific individual (i.e., the target user) in a specific situation. In the fields of medicine, psychology, neuroscience, etc., EEG signals are often used to study the function and state of the brain. By analyzing these signals, information such as brain activity, attention level, and emotional state can be understood. The target EEG signal is the EEG signal of the target user in the current first time period, and the first time period refers to the specific time period in which the target user generates the target EEG signal. This time period can be a few seconds, a few minutes, or longer, depending on the needs of the research and the experimental design.

[0026] Because EEG signals contain rich features, these features can play a key role in emotion recognition, so the features in EEG signals can be extracted for emotion recognition. EEG signals are also called brain waves. The frequency and characteristics of brain waves can reflect different psychological and emotional states, such as happiness and tension. Brain waves can be divided into different bands according to frequency, and each band represents a different state of brain activity. For example, beta waves are related to alertness and concentration, and may play a key role in emotion recognition.

[0027] In signal processing and data analysis, feature extraction is a key step, which involves extracting effective information from raw data, which can represent the essential characteristics of the data. For example, in EEG signal analysis, feature extraction usually involves extracting indicators representing specific brain activities or states from complex EEG signals. These features can be used for subsequent tasks such as classification or prediction.

[0028] The target feature dataset contains the features that can reflect the target user's emotions obtained by extracting the target EEG signals. Emotional features refer to features that can reflect the target user's emotional state. These features may include parameters such as the frequency, amplitude, and phase of the EEG signals, as well as the change patterns of these parameters in different time windows. By analyzing these features, we can understand the target user's emotional state within a specific time, such as happiness, sadness, anger, etc. This is of great significance for applications such as emotion recognition and emotion regulation.

[0029] S102: Determine the emotion category of the target user according to the similarity between the target feature data set and each standard feature data set; each standard feature data set includes a plurality of standard features of one emotion category.

[0030] In this embodiment, the standard feature data set is a predefined data set containing features of a specific emotion category. Each standard feature data set contains multiple standard features representing an emotion category. The standard feature data set provides a reference benchmark for the target feature data set, which is used to compare with the target feature data set to determine the emotion category of the target user. These data sets are usually obtained through a large number of experiments and data analysis, and have high accuracy and reliability.

[0031] Similarity is an indicator to measure the similarity between two data sets, and is usually obtained by calculating a certain distance or difference between the two data sets. In this embodiment, similarity is a key basis for judging the target user's emotional category. By calculating the similarity between the target feature data set and each standard feature data set, the standard feature data set that is most similar to the target feature data set can be found, thereby determining the target user's emotional category.

[0032] It can be concluded from the above that, on the one hand, the EEG signal emotion analysis method provided by the present disclosure is more accurate and personalized, as shown in the following:

[0033] By extracting features from the EEG signals of the target user within a specific time period, a more accurate and specific target feature dataset can be obtained. These features can more accurately reflect the user's emotional state. Compared with existing rule-based or general model-based emotion recognition methods, using the target feature dataset to compare similarities with the standard feature dataset can more accurately determine the user's emotion category. This is because this method takes into account the user's unique emotional characteristics and patterns. Each user may have their own unique emotional expression and characteristics, and these characteristics can be more accurately captured and identified through personalized analysis, thereby providing emotion recognition results that are more in line with the user's actual situation.

[0034] On the other hand, the EEG signal emotion analysis method provided by the present disclosure has real-time and good adaptability, as shown in the following:

[0035] The target EEG signal is collected in real time, so real-time detection of emotions can be achieved. This is very important for application scenarios that require immediate feedback (such as human-computer interaction, mental illness prediction, etc.). By using multiple standard feature data sets (each emotion category contains multiple standard features), the present disclosure can adapt to the differences in emotional features of different users. With the accumulation of data and the development of technology, the standard feature data set can be continuously updated and optimized, thereby improving the accuracy and adaptability of emotion recognition.

[0036] In one embodiment of the present disclosure, the method for analyzing EEG signal emotions further includes:

[0037] In response to a change in the emotion category of the target user within the second duration, the emotion category in which the target user has been for the longest time within the second duration is used as the emotion category of the target user.

[0038] In this embodiment, the target user's emotions may fluctuate in a short period of time due to various reasons, such as external stimulation. However, real emotional changes often take some time to persist and stabilize. Therefore, by considering the stability of the emotional category in the second time period, the result of emotional analysis can be ensured to be more accurate, avoiding misjudgment caused by short-term emotional fluctuations.

[0039] For some application scenarios that require continuous monitoring of user emotions, providing stable and accurate emotion category recognition results is crucial to the user experience. If the emotion recognition results fluctuate frequently, it may cause confusion to the user. By considering the emotion stability within the second time period, the emotion recognition results can be ensured to be more stable, thereby improving the user experience.

[0040] The present disclosure can also present the identified emotion categories of the target users to medical professionals to help them accurately interpret the EEG data and promote timely intervention and treatment for users with insomnia disorders and mental health problems such as anxiety and depression.

[0041] In one embodiment of the present disclosure, the standard feature data set includes a first standard feature data set and a second standard feature data set; the first standard feature data set corresponds to a first emotion category, and the second standard feature data set corresponds to a second emotion category; the first emotion category and the second emotion category are different;

[0042] The category of the target user's emotion is determined based on the similarity between the target feature dataset and the standard feature dataset, including:

[0043] Calculate the similarity between the target feature data set and the first standard feature data set and the second standard feature data set respectively;

[0044] The emotion category corresponding to the standard feature dataset with the highest similarity is determined as the emotion category of the target user.

[0045] In this embodiment, the standard feature data set includes a first standard feature data set and a second standard feature data set, each of which corresponds to a specific emotion category, and the two emotion categories are different. For example, the first standard feature data set may be a set of standard features in the "anxiety" state; the second standard feature data set may be a set of standard features in the "depression" state, and the features in the two data sets are different.

[0046] Calculating the similarity between the target feature data set and the first standard feature data set and the second standard feature data set, and determining the emotion category corresponding to the standard feature data set with the highest similarity as the emotion category of the target user, including:

[0047] Calculate the similarity between each feature in the target feature data set and each standard feature in the first standard feature data set as the first similarity; calculate the similarity between each feature in the target feature data set and each standard feature in the second standard feature data set as the second similarity;

[0048] A standard feature data set corresponding to a value with the highest similarity between the first similarity and the second similarity is determined as a feature data set for determining an emotion category of the target user.

[0049] For example, the first standard feature data set may contain m standard features, using A 11 Indicates that A 11 ={A1, A2, ..., A m}. The second standard feature data set can contain n standard features, using B 11 To indicate that B 11 ={B1,B2,…,B n}.

[0050] Calculating the similarity between each feature in the target feature dataset and each standard feature in the first standard feature dataset as a first similarity includes:

[0051] The first similarity is obtained by calculating the similarity according to each feature and the duration of each feature in the target feature data set, and each standard feature and the standard duration of each standard feature in the first standard feature data set.

[0052] Calculating the similarity between each feature in the target feature dataset and each standard feature in the second standard feature dataset as a second similarity includes:

[0053] The second similarity is obtained by calculating the similarity according to each feature and the duration of each feature in the target feature data set, and each standard feature and the standard duration of each standard feature in the second standard feature data set.

[0054] The first similarity is calculated according to the first formula, which is as follows:

[0055]

[0056] Among them, S1 represents the first similarity, P i represents the i-th feature in the target feature set, T i represents the duration of the i-th feature in the target feature dataset, Q j represents the jth standard feature in the first standard feature dataset, T j represents the standard duration of the jth feature in the first standard feature dataset, p represents the number of features in the target feature dataset, and q represents the number of standard features in the first standard feature dataset.

[0057] The second similarity is calculated according to the second formula, which is as follows:

[0058]

[0059] Among them, S2 represents the second similarity, P i represents the i-th feature in the target feature set, T i represents the duration of the i-th feature in the target feature dataset, V l represents the lth standard feature in the second standard feature dataset, T l represents the standard duration of the lth feature in the second standard feature dataset, p represents the number of features in the target feature dataset, and r represents the number of standard features in the second standard feature dataset.

[0060] From the above, it can be concluded that the target feature dataset is compared with the standard feature datasets representing different emotion categories, which not only takes into account the similarity of the feature values ​​themselves, but also takes into account the influence of the feature duration on the similarity, making the calculated similarity more accurate.

[0061] In one embodiment of the present disclosure, the method for analyzing EEG signal emotions further includes:

[0062] Statistical analysis of historical EEG signal data was performed to obtain multiple standard feature data sets.

[0063] In this embodiment, the historical EEG signal data is obtained by collecting EEG signals from multiple different users using an EEG device (such as an electroencephalograph). The collected original EEG signals can be filtered, de-noised, downsampled, and other operations to enhance signal quality and reduce interference. Then, emotion-related features are extracted from the preprocessed historical EEG signals, and statistical analysis is performed on the extracted features, such as calculating statistics such as the mean, standard deviation, and median. K-fold cross-validation and other techniques can be used to evaluate the effectiveness of different features in emotion recognition. The features of different subjects or under different emotional states are clustered or classified to form multiple standard feature data sets.

[0064] In this embodiment, the principal component analysis method or feature selection algorithm (such as correlation analysis, information gain, etc.) can also be used to select or reduce the dimension of the extracted standard features to reduce redundant information and avoid overfitting. These methods can help determine which features are most important for emotion recognition and reduce unnecessary computational complexity. Based on the results of feature extraction and selection, the features are combined into multiple standard feature data sets, each of which may contain features from different subjects or in different emotional states.

[0065] From the above, it can be concluded that the present disclosure can significantly improve the accuracy and efficiency of emotion analysis by obtaining multiple standard feature data sets through statistical analysis of historical EEG signal data. These standard feature data sets not only contain the core features of emotion information, but also provide a reliable benchmark for subsequent emotion recognition, thereby optimizing the overall performance of emotion analysis.

[0066] In one embodiment of the present disclosure, feature extraction is performed on a target EEG signal to obtain a target feature data set, including:

[0067] All features in the target EEG signal whose duration is greater than the preset duration are selected as the target feature data set.

[0068] In this embodiment, the target EEG signal is subjected to frequency domain analysis to obtain a delta wave signal, a theta wave signal, an alpha wave signal, a beta wave signal and a gamma wave signal within a first time length; and all features of the delta wave signal, theta wave signal, the alpha wave signal, the beta wave signal and the gamma wave signal whose duration is greater than a preset time length are respectively selected as the target feature data set.

[0069] For example, the collected EEG signal is 10 minutes of data, the preset duration is 30 seconds, and the beta wave signal has 20 feature data within 10 minutes. If the duration of 4 feature data is less than 30 seconds, these 4 feature data are regarded as invalid feature data, and the remaining data are regarded as valid feature data.

[0070] It can be concluded from the above that after filtering out redundant data, the quality of the target feature data set can be improved, which is conducive to reducing the complexity of subsequent calculations of the similarity between the target feature data set and each standard feature data set, thereby optimizing the computing efficiency and making real-time analysis or large-scale data set processing possible. By adjusting the preset duration, the present disclosure can adapt to different application scenarios and data requirements. For example, in a scenario that requires more sophisticated analysis, a longer preset duration can be set to filter more stable feature data.

[0071] In one embodiment of the present disclosure, feature extraction is performed on a target EEG signal to obtain a target feature data set, including:

[0072] The target EEG signal is preprocessed to obtain a standard EEG signal, and the feature extraction of the standard EEG signal is performed to obtain a target feature data set.

[0073] In this embodiment, the target EEG signal is preprocessed to obtain a standard EEG signal. Preprocessing may include methods such as removing baseline drift, removing artifacts, and filtering. For example, the baseline drift may be removed by calculating the average value of the EEG signal or fitting a trend line and subtracting the trend from the original signal. An independent component analysis algorithm may be applied to decompose the EEG signal to identify and remove independent components related to noise such as electrooculogram and electromyography. A bandpass filter or a notch filter may be used to filter out noise in the EEG signal. A blind source analysis algorithm may be used to separate the EEG signal to obtain a purer EEG signal.

[0074] Extracting features from standard EEG signals to obtain target feature data sets includes: extracting features from the standard EEG signals in the time domain, frequency domain, time-frequency domain, or nonlinear domain for subsequent analysis. These feature extraction methods can be selected and optimized according to specific application scenarios and data characteristics.

[0075] From the above, it can be concluded that by preprocessing the target EEG signal to obtain a standard EEG signal and performing feature extraction to construct a target feature data set, this method significantly improves the data quality, ensures the validity and reliability of the features, and provides more accurate basic data for subsequent EEG analysis, which helps to improve the accuracy of the analysis results.

[0076] In one embodiment of the present disclosure, feature extraction is performed on a standard EEG signal to obtain a target feature data set, including:

[0077] Feature extraction is performed on the standard EEG signal to obtain a first feature set, and the first feature set is input into a feature selection model to obtain a target feature data set.

[0078] In this embodiment, the feature selection model can be an embedded feature selection model, which integrates the feature selection task into the model training process through regularization technology or modification of the objective function, and can obtain more stable and reliable feature selection results. The feature selection model can also be a feature selection model based on a tree model, which uses methods such as decision trees and random forests to evaluate the importance of features. These methods measure the importance of features by calculating the splitting criterion of features in decision trees or the average impurity reduction in random forests. It is intuitive and easy to explain, but sensitive to the distribution of data and the construction method of decision trees.

[0079] Through feature extraction, the present disclosure can extract key features related to the task or research target from complex standard EEG signals to form a first feature set. Then, the first feature set is further screened and optimized using a feature selection model to ensure that the selected features are highly representative and discriminative for the target task, and finally form a target feature data set.

[0080] It can be concluded from the above that the present disclosure can improve data quality, optimize model performance, reduce computational complexity and resource consumption by reducing the number of features, and accelerate the model training and reasoning process.

[0081] Corresponding to a method for analyzing EEG emotion in the above embodiment, Figure 2 This is a structural block diagram of an EEG signal emotion analysis device provided by an embodiment of the present disclosure. For ease of explanation, only the parts related to the embodiment of the present disclosure are shown. Figure 2 The EEG signal emotion analysis device 20 includes: a feature extraction module 21 and an emotion recognition module 22 .

[0082] The feature extraction module 21 is used to extract features from the target EEG signal to obtain a target feature data set; the target EEG signal is the EEG signal of the target user in the current first time period, and the target feature data set includes features for reflecting the emotions of the target user;

[0083] The emotion recognition module 22 is used to determine the emotion category of the target user according to the similarity between the target feature data set and each standard feature data set; each standard feature data set includes multiple standard features of one emotion category.

[0084] In one embodiment of the present disclosure, the EEG signal emotion analysis device 20 further includes an emotion judgment module;

[0085] The emotion judgment module is used to respond to the change of the emotion category of the target user within the second time period and use the emotion category in which the target user has been in the longest time within the second time period as the emotion category of the target user.

[0086] In one embodiment of the present disclosure, the standard feature data set includes a first standard feature data set and a second standard feature data set; the first standard feature data set corresponds to a first emotion category, and the second standard feature data set corresponds to a second emotion category; the first emotion category and the second emotion category are different;

[0087] The emotion recognition module 22 is specifically used for:

[0088] Calculate the similarity between the target feature data set and the first standard feature data set and the second standard feature data set respectively;

[0089] The emotion category corresponding to the standard feature dataset with the highest similarity is determined as the emotion category of the target user.

[0090] In one embodiment of the present disclosure, the EEG signal emotion analysis device 20 further includes a first determination module;

[0091] The first determination module is used to perform statistical analysis on historical EEG signal data to obtain multiple standard feature data sets.

[0092] In one embodiment of the present disclosure, the emotion recognition module 22 is specifically used for:

[0093] All features in the target EEG signal whose duration is greater than the preset duration are selected as the target feature data set.

[0094] In one embodiment of the present disclosure, the emotion recognition module 22 is specifically used for:

[0095] The target EEG signal is preprocessed to obtain a standard EEG signal, and the feature extraction of the standard EEG signal is performed to obtain a target feature data set.

[0096] In one embodiment of the present disclosure, the emotion recognition module 22 is specifically used for:

[0097] Feature extraction is performed on the standard EEG signal to obtain a first feature set, and the first feature set is input into a feature selection model to obtain a target feature data set.

[0098] See also Figure 3 , Figure 3 A schematic block diagram of an electronic device provided by an embodiment of the present disclosure. Figure 3 The electronic device 300 in the embodiment shown may include: one or more processors 301, one or more input devices 302, one or more output devices 303 and one or more memories 304. The processors 301, input devices 302, output devices 303 and memories 304 communicate with each other via a communication bus 305. The memory 304 is used to store computer programs, which include program instructions. The processor 301 is used to execute the program instructions stored in the memory 304. The processor 301 is configured to call the program instructions to execute the functions of each module / unit in the above-mentioned device embodiments, such as Figure 2 The functions of modules 21 to 22 are shown.

[0099] It should be understood that in the embodiment of the present disclosure, the processor 301 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0100] The input device 302 may include a touch panel, a fingerprint collection sensor (for collecting the user's fingerprint information and fingerprint direction information), a microphone, etc., and the output device 303 may include a display (LCD, etc.), a speaker, etc.

[0101] The memory 304 may include a read-only memory and a random access memory, and provide instructions and data to the processor 301. A portion of the memory 304 may also include a non-volatile random access memory. For example, the memory 304 may also store information about the device type.

[0102] In a specific implementation, the processor 301, input device 302, and output device 303 described in the embodiments of the present disclosure can execute the implementation methods described in the first and second embodiments of an EEG signal emotion analysis method provided in the embodiments of the present disclosure, and can also execute the implementation methods of the electronic device described in the embodiments of the present disclosure, which will not be repeated here.

[0103] In another embodiment of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by the processor, all or part of the processes in the above-mentioned embodiment method are implemented, and the computer program can also be completed by instructing the relevant hardware through the computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, the steps of each of the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0104] The computer-readable storage medium may be an internal storage unit of the electronic device of any of the aforementioned embodiments, such as a hard disk or memory of the electronic device. The computer-readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Furthermore, the computer-readable storage medium may also include both an internal storage unit of the electronic device and an external storage device. The computer-readable storage medium is used to store computer programs and other programs and data required by the electronic device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.

[0105] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this disclosure.

[0106] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the electronic devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0107] In the several embodiments provided in the present application, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces or units, or it can be an electrical, mechanical or other form of connection.

[0108] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present disclosure.

[0109] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0110] The above are only specific embodiments of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present disclosure, and these modifications or replacements should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. A method for analyzing emotion of an electroencephalogram signal, characterized in that: include: Extract features of the target EEG signal to obtain a target feature data set; The target EEG signal is an EEG signal of the target user in the current first time period, and the target feature data set includes features used to reflect the emotions of the target user; Determine the emotion category of the target user according to the similarity between the target feature data set and each standard feature data set; each standard feature data set includes multiple standard features of one emotion category; The standard feature data set includes a first standard feature data set and a second standard feature data set; the first standard feature data set corresponds to a first emotion category, and the second standard feature data set corresponds to a second emotion category; The first emotion category and the second emotion category are different; The step of determining the category of the target user's emotion according to the similarity between the target feature data set and the standard feature data set includes: Calculating the similarity between the target feature data set and the first standard feature data set and the second standard feature data set respectively; Determine the emotion category corresponding to the standard feature data set with the highest similarity as the emotion category of the target user; Calculating the similarity between each feature in the target feature dataset and each standard feature in the first standard feature dataset as a first similarity includes: Calculating similarity according to each feature and the duration of each feature in the target feature data set, and each standard feature and the standard duration of each standard feature in the first standard feature data set to obtain a first similarity; The first similarity is calculated according to the first formula, which is as follows: Among them, S1 represents the first similarity, P i represents the i-th feature in the target feature set, T i represents the duration of the i-th feature in the target feature dataset, Q j represents the jth standard feature in the first standard feature dataset, T j represents the standard duration of the jth feature in the first standard feature dataset, p represents the number of features in the target feature dataset, and q represents the number of standard features in the first standard feature dataset; Calculating the similarity between each feature in the target feature dataset and each standard feature in the second standard feature dataset as a second similarity includes: Calculating similarity according to each feature and the duration of each feature in the target feature dataset, and each standard feature and the standard duration of each standard feature in the second standard feature dataset to obtain a second similarity; The second similarity is calculated according to the second formula, which is as follows: Among them, S2 represents the second similarity, P i represents the i-th feature in the target feature set, T i represents the duration of the i-th feature in the target feature dataset, V l represents the lth standard feature in the second standard feature dataset, T l represents the standard duration of the lth feature in the second standard feature dataset, p represents the number of features in the target feature dataset, and r represents the number of standard features in the second standard feature dataset; The EEG signal emotion analysis method further includes: In response to a change in the emotion category of the target user within the second duration, the emotion category in which the target user has been for the longest time within the second duration is used as the emotion category of the target user.

2. The method for analyzing the emotion of an EEG signal according to claim 1, characterized in that: Also includes: Statistical analysis of historical EEG signal data was performed to obtain multiple standard feature data sets.

3. The method for analyzing the emotion of an EEG signal according to claim 1, characterized in that: The step of extracting features from the target EEG signal to obtain a target feature data set includes: All features in the target EEG signal whose duration is greater than the preset duration are selected as the target feature data set.

4. The method for analyzing the emotion of an EEG signal according to claim 1, characterized in that: The step of extracting features from the target EEG signal to obtain a target feature data set includes: The target EEG signal is preprocessed to obtain a standard EEG signal, and features are extracted from the standard EEG signal to obtain a target feature data set.

5. The method for analyzing the emotion of an EEG signal according to claim 4, characterized in that: The step of extracting features from the standard EEG signal to obtain a target feature data set includes: Perform feature extraction on the standard EEG signal to obtain a first feature set, and input the first feature set into a feature selection model to obtain a target feature data set.

6. An electroencephalogram signal emotion analysis device, characterized in that: include: A feature extraction module is used to extract features from target EEG signals to obtain a target feature data set; The target EEG signal is an EEG signal of the target user in the current first time period, and the target feature data set includes features used to reflect the emotions of the target user; An emotion recognition module is used to determine the emotion category of the target user based on the similarity between the target feature data set and each standard feature data set; each standard feature data set includes multiple standard features of one emotion category; The standard feature data set includes a first standard feature data set and a second standard feature data set; the first standard feature data set corresponds to a first emotion category, and the second standard feature data set corresponds to a second emotion category; the first emotion category and the second emotion category are different; The emotion recognition module is specifically used for: Calculate the similarity between the target feature data set and the first standard feature data set and the second standard feature data set respectively; Determine the emotion category corresponding to the standard feature data set with the highest similarity as the emotion category of the target user; Calculating the similarity between each feature in the target feature dataset and each standard feature in the first standard feature dataset as a first similarity includes: Calculating similarity according to each feature and the duration of each feature in the target feature data set, and each standard feature and the standard duration of each standard feature in the first standard feature data set to obtain a first similarity; The first similarity is calculated according to the first formula, which is as follows: Among them, S1 represents the first similarity, P i represents the i-th feature in the target feature set, T i represents the duration of the i-th feature in the target feature dataset, Q j represents the jth standard feature in the first standard feature dataset, T j represents the standard duration of the jth feature in the first standard feature dataset, p represents the number of features in the target feature dataset, and q represents the number of standard features in the first standard feature dataset; Calculating the similarity between each feature in the target feature dataset and each standard feature in the second standard feature dataset as a second similarity includes: Calculating similarity according to each feature and the duration of each feature in the target feature dataset, and each standard feature and the standard duration of each standard feature in the second standard feature dataset to obtain a second similarity; The second similarity is calculated according to the second formula, which is as follows: Among them, S2 represents the second similarity, P i represents the i-th feature in the target feature set, T i represents the duration of the i-th feature in the target feature dataset, V l represents the lth standard feature in the second standard feature dataset, T l represents the standard duration of the lth feature in the second standard feature dataset, p represents the number of features in the target feature dataset, and r represents the number of standard features in the second standard feature dataset; The emotion judgment module is used to respond to the change of the emotion category of the target user within the second time period and use the emotion category in which the target user has been in the longest time within the second time period as the emotion category of the target user.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Electroencephalogram signal grading emotion recognition method and system, electronic equipment and medium

    CN116369949A

  • Voice emotion determination method and device, equipment and medium

    CN116524959A