Taste recognition method, system and equipment based on electroencephalogram data, medium and product
By using the EEGNet-SE-GRU hybrid model in EEG signal recognition and combining it with differential evolution algorithm to optimize hyperparameters, the problem of low taste recognition accuracy was solved, and a highly efficient taste recognition effect was achieved.
Patent Information
- Application Number
- CN202511117757.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-11
- Publication Date
- 2025-11-21
AI Technical Summary
Existing taste recognition technologies suffer from low accuracy, especially in deep learning models based on electroencephalogram (EEG) signals, where hyperparameters need to be manually set, leading to low training efficiency and a tendency to overfit.
We adopted the EEGNet-SE-GRU hybrid model as the feature extraction module and combined it with the differential evolution algorithm for overall hyperparameter tuning to construct the DE-EEGNet-SE-GRU deep learning model. The differential evolution algorithm was used to optimize the hyperparameters to improve the model performance.
It significantly improved the accuracy of taste recognition to 84.76% and enhanced the generalization performance of the model, demonstrating the effectiveness of the hybrid model and hyperparameter optimization.
Smart Images

Figure CN120995274A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of taste classification, and in particular to a taste recognition method, system, device, medium and product based on electroencephalogram (EEG) data. Background Technology
[0002] Taste, as one of the most important sensory organs in humans, interacts extensively with the external environment in daily life, providing the body with information from the outside world. It has the ability to identify nutrients and potentially harmful substances, thus playing a crucial role in determining whether the body accepts or rejects food. Taste perception is a complex biochemical and neural process, beginning with taste buds on the inner surface of the mouth. Taste buds are composed of multiple taste receptor cells that interact with dissolved chemicals in food, converting them into nerve signals. These signals are ultimately transmitted to the brain, where they are interpreted and form a specific taste experience. Sour, sweet, bitter, salty, and umami, as the five basic tastes, play an important role in maintaining the body's nutritional balance.
[0003] Electroencephalography (EEG), due to its high temporal resolution and ability to record brain electrical activity in real time, is widely used in taste research, providing a relatively objective reflection of actual sensory experiences. Nevertheless, current taste recognition research still faces certain limitations, particularly in classification models and task design. Current classification tasks mostly focus on binary classification problems between two tastes, and the models used are largely based on basic algorithms, lacking in-depth exploration of more complex and efficient models.
[0004] Compared to traditional machine learning methods, deep learning can automatically extract useful features from raw data, reducing reliance on manual feature extraction. Deep learning methods have also achieved significant results in the field of physiological signal processing. However, deep networks generally suffer from the problem of requiring manual setting of hyperparameters, leading to low training efficiency and a tendency to overfit. Therefore, when deep models are applied to taste recognition corresponding to EEG signals, the accuracy of taste recognition is low. Summary of the Invention
[0005] The purpose of this application is to provide a taste recognition method, system, device, medium, and product based on electroencephalogram (EEG) data to solve the problem of low accuracy in taste recognition.
[0006] To achieve the above objectives, this application provides the following solution:
[0007] In a first aspect, this application provides a taste recognition method based on electroencephalogram (EEG) data, comprising:
[0008] A dataset was constructed based on the electroencephalogram (EEG) signals of different basic taste stimuli; the basic tastes include sour, sweet, bitter, salty, and umami.
[0009] The EEGNet-SE-GRU hybrid model was used as a feature extraction module to determine the preliminary basic taste corresponding to the EEG signal.
[0010] Based on the aforementioned basic taste, the EEGNet-SE-GRU hybrid model was optimized using the differential evolution algorithm to perform overall hyperparameter tuning, and a DE-EEGNet-SE-GRU deep learning model was constructed.
[0011] The DE-EEGNet-SE-GRU deep learning model was trained using the dataset, and the basic taste corresponding to the EEG signal to be tested was determined using the trained DE-EEGNet-SE-GRU deep learning model.
[0012] Secondly, this application provides a taste recognition system based on electroencephalogram (EEG) data, comprising:
[0013] The dataset construction module is used to construct datasets based on EEG signals during different basic taste stimuli; the basic tastes include sour, sweet, bitter, salty, and umami.
[0014] The preliminary basic taste determination module is used to use the EEGNet-SE-GRU hybrid model as a feature extraction module to determine the preliminary basic taste corresponding to the EEG signal.
[0015] The hyperparameter tuning module is used to perform overall hyperparameter tuning on the EEGNet-SE-GRU hybrid model based on the preliminary basic taste and using the differential evolution algorithm to construct the DE-EEGNet-SE-GRU deep learning model.
[0016] The basic taste determination module is used to train the DE-EEGNet-SE-GRU deep learning model using the dataset, and to determine the basic taste corresponding to the EEG signal to be tested using the trained DE-EEGNet-SE-GRU deep learning model.
[0017] Thirdly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described taste recognition method based on electroencephalogram (EEG) data.
[0018] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described taste recognition method based on electroencephalogram (EEG) data.
[0019] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the above-described taste recognition method based on electroencephalogram (EEG) data.
[0020] According to the specific embodiments provided in this application, this application has the following technical effects:
[0021] This application uses the EEGNet-SE-GRU hybrid model as a feature extraction module to determine the preliminary basic taste corresponding to the EEG signal, fully extract the temporal and spatial features of the EEG signal, and enhance the expression of important features.
[0022] Furthermore, to address the issue of the blind nature of manually setting hyperparameters, this application incorporates the differential evolution algorithm into the EEGNet-SE-GRU hybrid model for overall hyperparameter tuning. This allows the various models to be better integrated, constructing the DE-EEGNet-SE-GRU deep learning model to improve the taste recognition accuracy of the DE-EEGNet-SE-GRU deep learning model. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 A flowchart of a taste recognition method based on electroencephalogram (EEG) data is provided as an embodiment of this application;
[0025] Figure 2 The flowchart of the EEGNet-SE-GRU hybrid model provided in this application;
[0026] Figure 3 The flowchart for hyperparameter optimization of the DE-EEGNet-SE-GRU deep learning model provided in this application is shown. Detailed Implementation
[0027] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0028] To make the objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0029] The Differential Evolutionary Algorithm (DEA) exhibits significant advantages due to its simple structure and high execution efficiency. This algorithm demonstrates strong robustness and reliability in handling complex, nonlinear, and multimodal optimization problems. It exhibits good tolerance for parameter tuning, which helps simplify practical applications and reduce implementation costs. With its high fault tolerance and relatively simple parameter setting method, the DEA has been widely applied in constrained optimization, multi-objective optimization, and various engineering fields. For example, in the manufacturing industry, the DEA is applied to the production scheduling optimization process for multiple parts, thereby simplifying practical applications and reducing implementation costs.
[0030] Based on this, this application applies the differential evolution algorithm to deep learning hyperparameter optimization. An embodiment of this application provides a taste recognition method based on electroencephalogram (EEG) data, including:
[0031] S1: Construct a dataset based on the EEG signals of different basic taste stimuli; the basic tastes include sour, sweet, bitter, salty and umami.
[0032] S2: Using the EEGNet-SE-GRU hybrid model as a feature extraction module, the preliminary basic taste corresponding to the EEG signal is determined.
[0033] S3: Based on the preliminary basic taste, the EEGNet-SE-GRU hybrid model is optimized by using the differential evolution algorithm to construct the DE-EEGNet-SE-GRU deep learning model.
[0034] S4: Train the DE-EEGNet-SE-GRU deep learning model using the dataset, and use the trained DE-EEGNet-SE-GRU deep learning model to determine the basic taste corresponding to the EEG signal to be tested.
[0035] In one exemplary embodiment, the EEG signal acquisition device was a 32-lead wireless EEG acquisition device from Boruikang Company, with reference electrodes placed on both mastoid processes and a sampling rate of 1000Hz. Thirty-one healthy young adults with sensitive taste were selected as subjects. The task was conducted in a safe, quiet, odorless, and temperature-appropriate EEG testing room. Subjects sequentially sipped 20 ml of five different taste enhancer solutions (sour, sweet, bitter, salty, and umami), each solution held in the mouth for 40 seconds. After obtaining 40 seconds of EEG signals, the waste liquid was spat out. After obtaining a taste EEG signal, the subject rinsed their mouth with purified water and rested for 40 seconds to eliminate the influence of the stimulus, allowing the recorded electrical signal to return to near the baseline, before starting the next taste EEG signal test. The task ended after all recordings were completed. S1 specifically includes:
[0036] S11: Preprocess the EEG signal to determine the preprocessed EEG signal.
[0037] S12: Extract features from the preprocessed EEG signals under different rhythms and construct a dataset.
[0038] In practical applications, in order to increase the sample size, according to the experimental procedure, a 1-second non-overlapping time window is selected to segment the reference EEG signal.
[0039] In one exemplary embodiment, S2 specifically includes:
[0040] The EEGNet-SE-GRU hybrid model includes an EEGNet model, an SE network, a bidirectional GRU network, a fully connected layer, and a softmax layer connected in sequence.
[0041] S21: Extract the spatiotemporal features of the EEG signal using the EEGNet model; the spatiotemporal features include temporal features and spatial features.
[0042] S22: Use the SE network to adjust the weights of each feature channel of the spatiotemporal features to determine the adjusted spatiotemporal features.
[0043] S23: Arrange the feature dimensions of the adjusted spatiotemporal features to generate feature dimensions that match the input format of the bidirectional GRU network, and determine the arranged spatiotemporal features.
[0044] S24: Input the arranged spatiotemporal features into the bidirectional GRU network and output the feature tensor.
[0045] S25: Merge the feature channels and feature dimensions of the feature tensor, and sequentially input the merged features into the fully connected layer and the softmax layer to determine the preliminary basic taste corresponding to the EEG signal.
[0046] In practical applications, 1) EEGNet model: EEGNet is a compact convolutional neural network specifically designed for EEG data, mainly composed of convolutional layers, deep convolutional layers, and separable convolutional layers. First, the multi-channel EEG signal is progressively refined through three consecutive convolutional layers to extract features, with kernel sizes of (1,64), (1,32), and (1,16), and an output channel count of 64. After each convolution, batch normalization is used to reduce internal covariate shift, followed by ReLU activation before being input into the next convolutional layer.
[0047] Following this, features are further extracted using depthwise convolution. A spatial filter is learned using a depthwise convolution of size (Ch,1), where Ch represents the number of channels (30) in the dataset used in this application. Since this convolutional method does not fully connect all previous feature maps, depthwise convolution can significantly reduce the number of trainable parameters. The number of spatial filters is 64. Next, batch normalization is used to normalize the output, followed by downsampling through an average pooling layer of size (1,4).
[0048] Finally, the features are passed through separable convolutional layers composed of depthwise convolutions and pointwise convolutions to further enhance the expressive power of the features. The kernel sizes are (1,16) and (1,1), respectively, and a batch normalization layer is applied after each convolutional layer. In addition, an average pooling layer of (1,8) is used to reduce the size, and a dropout layer is used to prevent overfitting.
[0049] 2) Squeeze-and-Excitation (SE) network:
[0050] Channel attention is a mechanism designed to improve the performance of neural networks. It primarily involves adaptive feature selection and weighting along the channel dimension of the feature map. The basic principle is to learn to assign weights to each channel, thereby weighted fusion of features from each channel. This approach allows the network to more effectively focus on important channel features and reduce reliance on less important channels, thus enhancing the model's expressive power and generalization performance.
[0051] In channel attention mechanisms, the SE network is one of the representative models. The SE network mainly consists of two stages: compression and activation. In the compression stage, the input feature map, with dimensions "H×W×C" (where H, W, and C represent the height, width, and number of channels of the feature map, respectively), is compressed to "1×1×C" through a global average pooling operation. This process extracts global spatial information and learns the importance weights for each channel. Subsequently, in the activation stage, these compressed features are incorporated into the network through fully connected layers to predict the weight allocation for each channel. Through this mechanism, the SE network can effectively improve the flexibility and accuracy of feature selection.
[0052] 3) Gated Recurrent Unit (GRU) Network: GRU is a widely used variant of Recurrent Neural Network (RNN). It was proposed later than Long Short-Term Memory (LSTM) networks, but its architecture is simpler. GRU consists of reset gates and update gates. This design makes GRU more computationally efficient while requiring relatively less data to achieve generalization capabilities.
[0053] This application selects a bidirectional GRU network, which consists of two independent GRU units. Compared with the traditional unidirectional GRU network, where information flows only along a single direction of the time series, the bidirectional GRU network can simultaneously capture the complete contextual information of each data point in the sequence, thereby providing a deeper understanding of the sequence data.
[0054] In practical applications, hybrid model fusion, such as Figure 2 As shown, spatiotemporal features are first extracted using EEGNet to capture temporal and spatial information. Next, a channel attention mechanism (SE network) adjusts the weights of each feature channel to enhance key information without altering the dimensionality of the EEGNet output. The feature dimensions are then rearranged to match the input format of the bidirectional GRU network, enabling the capture of deep temporal dependencies. The output format (batch_size, channels, time_steps, features) from the separable convolutional layer is further transformed into (batch_size, time_steps, channels, features), allowing the time step to serve as the sequence dimension for the GRU input. Then, the tensor is flattened, the channel and feature dimensions are merged, and the result is passed to a fully connected layer, finally undergoing classification via a softmax layer.
[0055] In an exemplary embodiment, S3 specifically includes:
[0056] S31: Use the preliminary basic taste as input to the fitness function to determine the fitness value.
[0057] S32: Based on the fitness value, the EEGNet-SE-GRU hybrid model is tuned as a whole using the differential evolution algorithm to construct the DE-EEGNet-SE-GRU deep learning model.
[0058] In an exemplary embodiment, S31 specifically includes:
[0059] S311: Based on the fitness function, the average classification accuracy of the preliminary basic taste corresponding to all EEG signals is calculated using the 5-fold cross-validation method.
[0060] S312: Use the average classification accuracy as the fitness value.
[0061] In an exemplary embodiment, S32 specifically includes:
[0062] S321: Based on the fitness value, the EEGNet-SE-GRU hybrid model is tuned using the differential evolution algorithm, employing mutation, crossover, and selection operations to optimize the overall hyperparameters, so that the fitness value reaches the set fitness range, and the tuned EEGNet-SE-GRU hybrid model is used as the DE-EEGNet-SE-GRU deep learning model.
[0063] In practical applications, hyperparameters include model parameters and training parameters; model parameters include EEGNet abandonment rate, SE reduction rate, and number of GRU neurons; training parameters include learning rate, learning period, decay coefficient, and batch size.
[0064] like Figure 3 As shown, the EEGNet-SE-GRU hybrid model is trained using the dataset, and the hyperparameters of the EEGNet-SE-GRU hybrid model are tuned using the differential evolution algorithm to determine the trained DE-EEGNet-SE-GRU deep learning model.
[0065] In practical applications, the parameters of the differential evolution algorithm are set as follows.
[0066] 1) Initialize the population.
[0067] To ensure the accuracy of the results and reduce the computational load, the initial population size was set to 20, and the maximum number of iterations was set to 50.
[0068] 2) Fitness calculation.
[0069] The average classification accuracy of all subjects' final classification results was selected as the fitness value.
[0070] 3) Mutation operation.
[0071] The algorithm employs a unique mutation method based on differential evolution, where mutation is performed based on the difference between three random solutions. The scaling factor F is set to a default value of 0.5. A larger F value leads to greater mutations, increasing diversity but potentially destroying optimal solutions; a smaller F value results in less mutation and reduced search capability.
[0072] 4) Cross-operation.
[0073] A random crossover strategy is employed, meaning crossover is performed on every individual in the population. The crossover rate is set to a default value of 0.3. The purpose of crossover is to generate greater diversity, which helps prevent the algorithm from getting trapped in local optima.
[0074] 5) Select operation.
[0075] Greedy selection is used to retain the optimal solution and eliminate individuals with poor performance.
[0076] By changing hyperparameters through accuracy, mutation, crossover, and selection operations, the average classification accuracy is altered, resulting in increasingly higher fitness values until the fitness value meets the fitness range.
[0077] In practical applications, given the significant differences in EEG signals among different subjects, the data of each subject are analyzed separately, and the average classification accuracy of all subjects is calculated as the fitness value of the differential evolution algorithm and the main evaluation index.
[0078] In practical applications, a 5-fold cross-validation method is used to evenly divide the original dataset into five subsets. Each subset is used as the test set in turn, while the remaining four subsets are used as the training set. This process is repeated five times, each time using a different subset as the test set, thus ensuring the stability and reliability of the evaluation results. Finally, the results of the five evaluations are averaged to obtain the average classification accuracy, which is used to determine the final classification performance.
[0079] In an exemplary embodiment, before training the DE-EEGNet-SE-GRU deep learning model using the dataset, the EEG signals in the dataset need to be z-score normalized and then input into the DE-EEGNet-SE-GRU deep learning model.
[0080] z-score normalization can improve the convergence speed and performance of the algorithm and make it conform to a standard normal distribution. The calculation formula is as follows:
[0081]
[0082] Where z represents the normalized EEG signal, x represents the original EEG signal, μ represents the mean of the original EEG signal, and σ represents the standard deviation of the original EEG signal.
[0083] Experimental verification shows that Table 1 is a comparison table of the ablation experimental effects of this application. As shown in Table 1, different modules have significantly improved the recognition performance of taste EEG, clarifying their independent impact on the overall performance of the model.
[0084] Table 1
[0085] Model Accuracy (%) Accuracy (%) Recall rate (%) F1 Index (%) EEGNet 72.98±14.61 75.00±13.88 73.65±13.06 72.99±14.32 EEGNet-GRU 80.32±12.58 82.21±11.35 80.71±11.90 80.15±12.36 EEGNet-SE 75.87±14.20 77.43±13.30 76.35±13.62 75.82±13.86 EEGNet-SE-GRU 81.39±11.60 81.99±11.39 80.69±11.76 80.29±12.11 DE-EEGNet-SE-GRU 84.76±11.15 84.77±10.97 84.76±11.67 84.75±11.96
[0086] Experimental results demonstrate that all components of this application are essential. Based on the SE network, an adaptive weight adjustment mechanism is introduced to the information captured by different channels, thereby enhancing the output of channels highly relevant to the classification target. This mechanism can ignore irrelevant or redundant features, enhance the expressive power of important features, and avoid the problem of reduced information utilization efficiency caused by treating all channel outputs equally. Experimental data show that after introducing the channel attention mechanism, the classification accuracy is improved by 2.89% compared to the baseline model EEGNet, and other evaluation metrics are also improved, further demonstrating the crucial role of the SE network in feature selection.
[0087] Furthermore, the GRU network significantly improves classification performance. As a recurrent neural network, GRU effectively captures the dependencies between data at different times. Introducing the GRU network significantly enhances the model's temporal modeling capabilities, especially for physiological data with significant temporal characteristics, such as EEG signals. The GRU network can fully utilize temporal information to improve classification accuracy. The EEGNet-GRU model achieves a 7.34% improvement in accuracy compared to EEGNet, validating the importance of the GRU network in temporal modeling.
[0088] It is worth noting that this application compared the performance of bidirectional GRU with GRU, and the results showed that bidirectional GRU often achieves better classification performance. This may be because the taste stimulation process in this experiment is continuous, and bidirectional GRU can simultaneously capture the forward and backward dependencies of the signal. This bidirectional processing method can make full use of complex temporal dependencies and is more suitable for this dataset.
[0089] Analysis reveals a synergistic effect between the SE network and the GRU network. GRU excels at capturing short-term and long-term dependencies in time series, while the channel attention mechanism enhances the selection of weights for different spatial feature channels. The combination of the two enables the model to extract deep features in both time and space. The channel attention mechanism provides GRU with more refined input features, thereby improving the effectiveness of temporal modeling. Therefore, the combination of the SE network and the GRU network not only improves the performance of each individually but also complements each other at different levels, exerting a synergistic effect and achieving better results.
[0090] Theoretically, even for the optimal hyperparameters of a single module, there is still room for further optimization in the hybrid model. After optimizing the hyperparameters of the EEGNet-SE-GRU model using DE, the final accuracy reached 84.76%, and all other evaluation metrics also reached their maximum values. This indicates that the introduction of optimization algorithms can further explore the potential of the model based on the model structure design.
[0091] In summary, integrating the SE network and GRU network into the EEGNet model, and combining it with DE hyperparameter optimization techniques, can significantly improve the classification performance of five basic tastes, verifying the effectiveness and advantages of this hybrid model.
[0092] Experimental results show that Table 2 compares the performance of this application with other methods. As shown in Table 2, compared with other methods, this application has significantly higher recognition performance in taste EEG and has better generalization performance.
[0093] Table 2
[0094] Model Accuracy (%) Accuracy (%) Recall rate (%) F1 Index (%) ResNet 53.27±13.49 59.62±12.61 52.65±13.60 50.23±14.25 TSception 61.08±15.96 63.33±14.68 61.31±15.92 58.84±17.16 DeprNet 62.65±12.98 64.18±13.31 62.16±13.32 60.45±14.21 CNN-LSTM 63.00±13.10 63.33±10.24 56.76±11.11 53.78±11.63 DE-EEGNet-SE-GRU 84.76±11.15 84.77±10.97 84.76±11.67 84.75±11.96
[0095] In addition, this application also provides a taste recognition system based on electroencephalogram (EEG) data, comprising:
[0096] The dataset construction module is used to construct datasets based on EEG signals during different basic taste stimuli; the basic tastes include sour, sweet, bitter, salty, and umami.
[0097] The preliminary basic taste determination module is used to determine the preliminary basic taste corresponding to the EEG signal by using the EEGNet-SE-GRU hybrid model as a feature extraction module.
[0098] The hyperparameter tuning module is used to perform overall hyperparameter tuning on the EEGNet-SE-GRU hybrid model based on the preliminary basic taste and using the differential evolution algorithm to construct the DE-EEGNet-SE-GRU deep learning model.
[0099] The basic taste determination module is used to train the DE-EEGNet-SE-GRU deep learning model using the dataset, and to determine the basic taste corresponding to the EEG signal to be tested using the trained DE-EEGNet-SE-GRU deep learning model.
[0100] In an exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments. The computer device can be a server or a terminal. The computer device includes a processor, a memory, an input / output interface (I / O), and a communication interface. The processor, memory, and I / O are connected via a system bus, and the communication interface is connected to the system bus via the I / O. The processor of the computer device provides computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device stores data to be processed. The I / O interface of the computer device is used for exchanging information between the processor and external devices. The communication interface of the computer device is used for communicating with an external terminal via a network connection. When the computer program is executed by the processor, it implements a taste recognition method based on electroencephalogram (EEG) data.
[0101] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0102] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0103] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0104] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0105] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by hardware related to computer program instructions. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
[0106] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0107] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0108] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for taste recognition based on electroencephalogram data, characterized in that, The application relates to a method for determining basic tastes based on electroencephalogram (EEG) signals. The method comprises the following steps: constructing a data set based on EEG signals under stimulation of different basic tastes, wherein the basic tastes include sour, sweet, bitter, salty and umami; determining a preliminary basic taste corresponding to the EEG signals by using an EEGNet-SE-GRU hybrid model as a feature extraction module; based on the preliminary basic taste, performing overall hyperparameter optimization on the EEGNet-SE-GRU hybrid model by using a differential evolution algorithm to construct a DE-EEGNet-SE-GRU deep learning model; 2.The taste recognition method based on electroencephalogram data according to claim 1, wherein, training the DE-EEGNet-SE-GRU deep learning model by using the data set, and determining a basic taste corresponding to a to-be-detected EEG signal by using the trained DE-EEGNet-SE-GRU deep learning model. The method comprises the following steps: constructing a data set based on EEG signals under stimulation of different basic tastes, wherein the basic tastes include sour, sweet, bitter, salty and umami; 3.The taste recognition method based on electroencephalogram data according to claim 1, wherein, preprocessing the EEG signals to determine preprocessed EEG signals; extracting features of the preprocessed EEG signals under different rhythms to construct a data set. The method comprises the following steps: determining a preliminary basic taste corresponding to the EEG signals by using an EEGNet-SE-GRU hybrid model as a feature extraction module, wherein the EEGNet-SE-GRU hybrid model comprises an EEGNet model, an SE network, a bidirectional GRU network, a fully connected layer and a softmax layer connected in sequence; extracting spatiotemporal features of the EEG signals by using the EEGNet model, wherein the spatiotemporal features include time features and space features; adjusting weights of each feature channel of the spatiotemporal features by using the SE network to determine adjusted spatiotemporal features; arranging feature dimensions of the adjusted spatiotemporal features to generate feature dimensions matching an input format of the bidirectional GRU network to determine arranged spatiotemporal features; 4.The method of identifying taste based on electroencephalogram data according to claim 1, wherein, inputting the arranged spatiotemporal features into the bidirectional GRU network to output a feature tensor; merging feature channels and feature dimensions of the feature tensor, and sequentially inputting the merged features into the fully connected layer and the softmax layer to determine the preliminary basic taste corresponding to the EEG signals. based on the preliminary basic taste, performing overall hyperparameter optimization on the EEGNet-SE-GRU hybrid model by using a differential evolution algorithm to construct a DE-EEGNet-SE-GRU deep learning model, wherein the method comprises the following steps: 5.The taste recognition method based on electroencephalogram data according to claim 4, characterized in that, determining a fitness value by using the preliminary basic taste as an input of a fitness function; based on the fitness value, performing overall hyperparameter optimization on the EEGNet-SE-GRU hybrid model by using a differential evolution algorithm to construct a DE-EEGNet-SE-GRU deep learning model. determining a fitness value by using the preliminary basic taste as an input of a fitness function, wherein the method comprises the following steps: based on the fitness function, calculating an average classification accuracy of the preliminary basic taste corresponding to all EEG signals by using a 5-fold cross-validation method; using the average classification accuracy as the fitness value. 6.The method of identifying taste based on electroencephalogram data according to claim 4, wherein, Based on the fitness value, the differential evolution algorithm is used to perform overall hyperparameter tuning on the EEGNet-SE-GRU hybrid model, and a DE-EEGNet-SE-GRU deep learning model is constructed, specifically including: Based on the fitness value, the differential evolution algorithm is used to perform overall hyperparameter tuning on the EEGNet-SE-GRU hybrid model by using mutation operation, crossover operation and selection operation, so that the fitness value reaches a set fitness range, and the tuned EEGNet-SE-GRU hybrid model is used as a DE-EEGNet-SE-GRU deep learning model.
7. A taste recognition system based on electroencephalographic data, characterized by Including: The data set construction module is used to construct a data set according to the electroencephalogram signals under different basic taste stimuli; the basic tastes include sour, sweet, bitter, salty and fresh; The preliminary basic taste determination module uses the EEGNet-SE-GRU hybrid model as a feature extraction module to determine the preliminary basic taste corresponding to the electroencephalogram signal; The hyperparameter tuning module uses the differential evolution algorithm to perform overall hyperparameter tuning on the EEGNet-SE-GRU hybrid model based on the preliminary basic taste, and constructs a DE-EEGNet-SE-GRU deep learning model; The basic taste determination module trains the DE-EEGNet-SE-GRU deep learning model using the data set, and determines the basic taste corresponding to the to-be-tested electroencephalogram signal using the trained DE-EEGNet-SE-GRU deep learning model.
8. A computer device comprising: A memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor executes the computer program to implement the taste recognition method based on electroencephalogram data according to any one of claims 1-6.
9. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the taste recognition method based on electroencephalogram data according to any one of claims 1-6.
10. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the taste recognition method based on electroencephalogram data according to any one of claims 1-6.