A method and system for evaluating the quality grade of Maotai-flavor liquor based on electroencephalography technology

By using an EEG-based method for evaluating the quality grade of baijiu (Chinese liquor), olfactory and tasting EEG signals are collected, and a model is trained using the LightGBM classifier. This method solves the subjectivity problem in baijiu quality grade evaluation and achieves objective and accurate baijiu grade assessment. It is applicable to the flavor and quality evaluation of baijiu and other alcoholic beverages.

CN122221050APending Publication Date: 2026-06-16CHINA NAT RES INST OF FOOD & FERMENTATION IND CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA NAT RES INST OF FOOD & FERMENTATION IND CO LTD
Filing Date
2026-04-21
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

Existing technologies for evaluating the quality grade of baijiu (Chinese liquor) suffer from strong subjectivity and a disconnect between existing instrumental analysis and human perception, lacking a method that objectively, accurately, and comprehensively reflects the human brain's overall perception of baijiu quality grade.

Method used

A method for evaluating the quality grade of Maotai-flavor liquor based on electroencephalography (EEG) technology was adopted. By collecting EEG signals from subjects when smelling and/or tasting the liquor, multi-channel features were extracted, and a quality grade prediction model was trained using the LightGBM ensemble learning classifier to achieve an objective assessment of the liquor's quality grade.

Benefits of technology

It achieves objective and accurate assessment of the quality grade of baijiu. The accuracy rate of the olfactory mode reaches 60.0% ± standard deviation, and the accuracy rate of the combined olfactory and tasting mode reaches 50.4% ± standard deviation, which significantly improves the consistency and accuracy of the evaluation. It is applicable to the flavor quality assessment of baijiu and other alcoholic beverages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122221050A_ABST
    Figure CN122221050A_ABST
Patent Text Reader

Abstract

The application discloses a method and system for evaluating the quality grade of Maotai-flavor liquor based on electroencephalogram technology, and belongs to the technical field of machine learning. The method comprises the following steps: collecting EEG signals of subjects after being stimulated by liquor samples of different quality grades in different stages as a data set; preprocessing each EEG signal sample in the data set and extracting multi-channel features, including absolute power features of different frequency bands and multi-scale permutation entropy, and splicing the multi-channel features into a comprehensive feature vector; training a LightGBM integrated learning classifier by using the comprehensive feature vector obtained from different EEG signal samples, obtaining a trained quality grade prediction model, and outputting a liquor quality grade result by the LightGBM integrated learning classifier; and predicting the EEG data obtained after being stimulated by a to-be-tested liquor sample by using the trained quality grade prediction model, and obtaining the quality grade result of the to-be-tested liquor sample. The application can relatively objectively and accurately obtain the quality grade of liquor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of machine learning technology, and more specifically to a method and system for evaluating the quality grade of Maotai-flavor liquor based on electroencephalography (EEG) technology. Background Technology

[0002] As a traditional Chinese distilled spirit, baijiu's quality grading (superior, first-grade, and second-grade) is the core basis for product classification, pricing, and quality control. Currently, baijiu quality grading mainly relies on sensory evaluation by professional tasters. Tasters subjectively score baijiu based on multiple dimensions, including color, aroma, taste, and style, by observing its color, smelling its aroma, and tasting its flavor. Although this method is widely used in the industry, its results are easily influenced by factors such as the taster's personal experience, physical condition, emotions, and environmental interference. The consistency among different tasters is typically less than 70%, leading to insufficient objectivity and poor repeatability of the evaluation results, making standardization and quantitative management difficult.

[0003] In recent years, to compensate for the shortcomings of sensory evaluation, the industry has gradually introduced instrumental analysis techniques such as gas chromatography-mass spectrometry (GC-MS), electronic noses, and electronic tongues. While these methods can provide some physicochemical indicators, they have significant limitations: GC-MS focuses on the chemical composition analysis of volatile flavor compounds and cannot directly reflect the human brain's comprehensive perception of the aroma and taste of liquor; although electronic noses and electronic tongues can simulate olfactory and gustatory receptors, the response patterns of their sensor arrays differ significantly from the neural coding mechanisms of the human brain, resulting in insufficient ability to distinguish subtle flavor differences. More importantly, none of the above technologies can capture the overall perceptual experience generated by the synergistic effect of aroma and taste, and this multimodal perception is precisely the core of baijiu tasting. Therefore, current technology still lacks a new evaluation method that can objectively, accurately, and comprehensively reflect the human brain's comprehensive perception of the quality grade of baijiu.

[0004] Therefore, how to solve the technical bottlenecks of the strong subjectivity of traditional sensory evaluation and the disconnect between existing instrumental analysis and human perception, and provide a new scientific, objective and repeatable quality grade evaluation system for the liquor industry, is an urgent problem that needs to be solved by those skilled in the art. Summary of the Invention

[0005] In view of the above problems, the present invention is proposed to provide a method and system for evaluating the quality grade of Maotai-flavor liquor based on electroencephalography (EEG) technology, which overcomes or at least partially solves the above problems.

[0006] To achieve the above objectives, the present invention adopts the following technical solution:

[0007] In a first aspect, embodiments of the present invention provide a method for evaluating the quality grade of Maotai-flavor liquor based on electroencephalography (EEG) technology, comprising the following steps: The EGG signals of subjects were collected when they smelled and / or tasted samples of baijiu of different quality grades, and this data was used as a dataset. Each EGG signal sample in the dataset is preprocessed and multi-channel features are extracted, including absolute power features of different frequency bands and multi-scale permutation entropy. The multi-channel features are then concatenated into a comprehensive feature vector. The LightGBM ensemble learning classifier is trained using the comprehensive feature vector obtained from different EGG signal samples to obtain a trained quality grade prediction model. The LightGBM ensemble learning classifier outputs the quality grade result of the liquor. The quality grade prediction model is used to predict the quality grade of the liquor sample by using the EEG data obtained from the stimulation of the liquor sample.

[0008] Furthermore, in the step of collecting EGG signals from subjects after being stimulated by different quality grades of baijiu samples at different stages, the different quality grades of baijiu samples included three different quality grades of sauce-flavored baijiu (superior, first-grade, and second-grade) produced by different brewing processes, as well as a 53% vol pure alcohol control sample.

[0009] Furthermore, in the step of collecting EGG signals from subjects after being stimulated by baijiu samples of different quality grades at different stages, the subjects were stimulated by baijiu samples at different stages, including the smelling stage and the tasting stage.

[0010] Furthermore, in the step of collecting EGG signals from subjects after being stimulated by different quality grades of liquor samples at different stages, a 32-lead EEG cap was used to collect the subjects' EGG signals at a sampling rate of 500 Hz.

[0011] Furthermore, each EGG signal sample in the dataset is preprocessed, and multi-channel features are extracted, specifically including... The raw EEG signal of each sample was bandpass filtered from 0.5 to 80 Hz and downsampled to 256 Hz. Whole-brain average reference replaces Cz reference in the original EEG signal; Mark "stim_start" as the 0 point, extract the data segment from -5 to 10 seconds, remove the first 5 seconds as the baseline data, and retain the data of the effective stimulus response period of 0-10 seconds; Each 10-second epoch was divided into 10 non-overlapping 1-second short segments, which were used as preprocessed EGG signal samples. For each 1-second segment in each preprocessed EGG signal sample, the absolute power of the five frequency bands delta, theta, alpha, beta, and gamma is calculated using db4 wavelet transform as the absolute power characteristics of different frequency bands; Using the entropy toolbox, the permutation entropy value of each EGG signal sample at each scale is calculated to form a 32-channel, 64-dimensional MPE feature.

[0012] Furthermore, during the training process, the quality level prediction model performs multi-round model construction and updates on the comprehensive feature vector based on gradient boosting decision trees.

[0013] Furthermore, the quality level prediction model was trained and evaluated using hierarchical 10-fold cross-validation, with accuracy used as the evaluation metric.

[0014] Furthermore, the core parameters of the LightGBM ensemble learning classifier are set as follows: objective function is multiclass, learning rate is 0.05, number of trees is 500, number of leaf nodes is 31, subsampling rate is 0.9, column sampling rate is 0.8, class weights are balanced, and random seed is 42.

[0015] Secondly, embodiments of the present invention provide a quality grading system for Maotai-flavor liquor based on electroencephalography (EEG) technology, comprising: a 32-lead EEG acquisition device, a data preprocessing module, a sample augmentation module, a DWT-MPE feature extraction and fusion module, a LightGBM classification model training module, and a grade prediction output module, wherein each module works together to implement the method described in any one of the first aspects of the present invention.

[0016] Thirdly, embodiments of the present invention provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for evaluating the quality grade of baijiu (Chinese liquor) based on electroencephalography and machine learning algorithms as described in any of the first aspects of the present invention. As can be seen from the above technical solution, compared with the prior art, the present invention discloses a method and system for evaluating the quality grade of Maotai-flavor liquor based on electroencephalography (EEG) technology, which has the following beneficial effects: 1. This invention, by collecting EEG signals after olfactory and tasting stimulation, can directly reflect the objective neural coding of the central nervous system in response to baijiu stimulation, overcoming the empirical limitations of subjective evaluation.

[0017] 2. The liquor quality classification model constructed based on this invention achieves a three-classification accuracy of 60.0% ± standard deviation under smell alone, which is significantly higher than the 45-50% recognition rate of traditional electronic nose technology; the accuracy of taste alone reaches 46.6% ± standard deviation; and the accuracy of comprehensive evaluation (smell & taste) reaches 50.4% ± standard deviation, with the smell mode showing the best performance. 3. This invention can simultaneously capture the neural responses induced by aroma and taste, realizing a quantitative assessment of the overall perception of "olfactory-taste synergy" in baijiu, which is closer to the comprehensive evaluation of professional wine tasters. 4. The LightGBM classifier used in this invention has a fast training speed and low memory usage. A single round of 10-fold cross-validation can be completed within 5 minutes on a regular computer, meeting the timeliness requirements of actual production testing. 5. The framework of this invention is not only applicable to baijiu (Chinese liquor), but can also be used, with appropriate adjustments, for flavor quality evaluation of other alcoholic beverages or foods such as wine and huangjiu (yellow wine), and has broad application prospects. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0019] Figure 1 This is a flowchart illustrating the overall process of the liquor quality grade evaluation method described in this invention.

[0020] Figure 2 Flowchart for LightGBM model training and 10-fold hierarchical cross-validation. Detailed Implementation

[0021] The following will be based on embodiments of the present invention. Figures 1-2 The technical solutions in the embodiments of the present invention are clearly and completely described herein. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0022] like Figure 1 As shown, this invention discloses a method for evaluating the quality grade of Maotai-flavor liquor based on electroencephalography (EEG) technology, comprising the following steps: The EGG signals of subjects were collected when they smelled and / or tasted samples of baijiu of different quality grades, and this data was used as a dataset. Each EGG signal sample in the dataset is preprocessed and multi-channel features are extracted, including absolute power features of different frequency bands and multi-scale permutation entropy. The multi-channel features are then concatenated into a comprehensive feature vector. The LightGBM ensemble learning classifier is trained using the comprehensive feature vector obtained from different EGG signal samples to obtain a trained quality grade prediction model. The LightGBM ensemble learning classifier outputs the quality grade result of the liquor. The quality grade prediction model is used to predict the quality grade of the liquor sample by using the EEG data obtained from the stimulation of the liquor sample.

[0023] Furthermore, in the step of collecting EGG signals from subjects after being stimulated by different quality grades of baijiu samples at different stages, the different quality grades of baijiu samples included three different quality grades of sauce-flavored baijiu (superior, first-grade, and second-grade) produced by different brewing processes, as well as a 53% vol pure alcohol control sample.

[0024] Furthermore, in the step of collecting EGG signals from subjects after being stimulated by baijiu samples of different quality grades at different stages, the subjects were stimulated by baijiu samples at different stages, including the smelling stage and the tasting stage.

[0025] Furthermore, in the step of collecting EGG signals from subjects after being stimulated by different quality grades of liquor samples at different stages, a 32-lead EEG cap was used to collect the subjects' EGG signals at a sampling rate of 500 Hz.

[0026] Furthermore, each EGG signal sample in the dataset is preprocessed, and multi-channel features are extracted, specifically including... The raw EEG signal of each sample was bandpass filtered from 0.5 to 80 Hz and downsampled to 256 Hz. Whole-brain average reference replaces Cz reference in the original EEG signal; Mark "stim_start" as the 0 point, extract the data segment from -5 to 10 seconds, remove the first 5 seconds as the baseline data, and retain the data of the effective stimulus response period of 0-10 seconds; Each 10-second epoch was divided into 10 non-overlapping 1-second short segments, which were used as preprocessed EGG signal samples. For each 1-second segment in each preprocessed EGG signal sample, the absolute power of the five frequency bands delta, theta, alpha, beta, and gamma is calculated using db4 wavelet transform as the absolute power characteristics of different frequency bands; Using the entropy toolbox, the permutation entropy value of each EGG signal sample at each scale is calculated to form a 32-channel, 64-dimensional MPE feature.

[0027] Furthermore, during the training process, the quality level prediction model performs multi-round model construction and updates on the comprehensive feature vector based on gradient boosting decision trees.

[0028] Furthermore, the quality level prediction model was trained and evaluated using hierarchical 10-fold cross-validation, with accuracy used as the evaluation metric.

[0029] Furthermore, the core parameters of the LightGBM ensemble learning classifier are set as follows: objective function is multiclass, learning rate is 0.05, number of trees is 500, number of leaf nodes is 31, subsampling rate is 0.9, column sampling rate is 0.8, class weights are balanced, and random seed is 42.

[0030] The present invention will be further described below. Experimental design and sample preparation.

[0031] This embodiment uses three different brewing processes for soy sauce-flavored baijiu, and classifies them into three quality grades: superior, first grade, and second grade. Prepare a separate 53% vol pure alcohol solution as a control stimulus to establish a baseline response. Prepare 30 ml of each grade of sample, place it in a sealed brown glass bottle, and maintain a constant temperature of 16-26℃ before the experiment.

[0032] Subject screening and preparation A total of 33 healthy adult participants (18 males and 15 females), aged 22-35, were recruited. All participants had experience drinking baijiu (Chinese liquor) but were not professional sommeliers. The selection criteria in one specific implementation method are as follows: 1. No history of mental illness, neurological disorders, or chronic alcohol dependence; 2. No olfactory or gustatory dysfunction (verified by standard olfactory stick and gustatory solution tests); 3. No history of alcohol allergy or intolerance; 4. Do not consume alcoholic beverages within 24 hours prior to the experiment, and refrain from eating or drinking for 2 hours prior to the experiment; 5. Sign an informed consent form and obtain approval from the ethics committee.

[0033] The experiment was conducted in a soundproof electromagnetic shielded room at a temperature of 22±2℃ and a humidity of 50%-60%. Subjects wore 32-lead EEG caps (Neuracle NeuroHUB), and electrodes were arranged according to the international 10-20 system, with Cz as the reference electrode.

[0034] Each subject must complete two independent testing phases in a soundproof electromagnetic shielding room, with an interval of no less than 48 hours to rule out tolerance effects. The two phases are as follows: Phase 1: Smell Test The subjects sat still, closed their eyes, and kept their heads fixed.

[0035] The experimenter opened the glass bottle containing the wine sample, placed it 1 cm below the subject's nose, and marked the "stim_start" event.

[0036] Subjects were instructed to breathe naturally and smell the air for 10 seconds, during which they were not allowed to swallow or make any noise.

[0037] After smelling, remove the sample, smell the coffee beans and rest for at least 60 seconds before moving on to the next round.

[0038] Phase Two: Taste Test The subject opened their mouth, and the experimenter used a medical syringe to inject 5ml of alcohol sample onto their tongue at a constant speed, marking the "stim_start" event.

[0039] Subjects closed their eyes and held the medicine in their mouths for 10 seconds, without swallowing, and kept their heads still.

[0040] After tasting, spit the liquid into the waste bin, rinse your mouth three times with purified water, and rest for 90 seconds.

[0041] EEG acquisition parameters: sampling rate set at 500Hz, electrode impedance all below 5kΩ. Continuous EEG signals were recorded throughout the process, with each grade sample presented three times at each stage, using pseudo-random sequential balancing.

[0042] The offline data obtained from the test was processed strictly according to the following process (taking the sniffing stage as an example). The preprocessing included the following steps: 1. Downsampling: The acquired EEG signal data is downsampled from 500Hz to 256Hz to reduce the amount of computation and retain effective information.

[0043] 2. Filtering: A zero-phase FIR filter is applied to the acquired EEG signal data to perform 0.5-80Hz bandpass filtering to remove power frequency interference and high-frequency noise.

[0044] 3. Rereference: Replace the Cz reference in the EGG signal with the whole-brain average reference to eliminate the influence of reference electrode activity.

[0045] 4. Epoch Extraction: Mark "stim_start" as the 0 point, extract the data segment from -5 to 10 seconds in the EGG signal, with the first 5 seconds as the baseline data, and retain the effective stimulus response period of 0-10 seconds.

[0046] 5. Sample augmentation: Each 10-second epoch is divided into 10 non-overlapping 1-second segments, increasing the sample size from approximately 286 trials to 2860 samples, significantly improving the scale of training data.

[0047] 6. Bad segment removal: Remove segments with amplitudes exceeding ±100μV and retain clean data.

[0048] For each 1-second segment after preprocessing, two types of core features are extracted from the 32 channels of the whole brain, specifically including: (1) DWT band power characteristics A 5-level decomposition using the db4 wavelet was employed to decompose the 256Hz sampling rate signal into approximation coefficients (cA5: 0-4Hz) and detail coefficients (cD5: 4-8Hz, cD4: 8-16Hz, cD3: 16-32Hz, cD2: 32-64Hz, cD1: 64-128Hz). Based on the decomposed coefficients, the absolute power spectrum of each frequency band was reconstructed and calculated, and mapped to standard EEG frequency bands. Delta (0.5-4Hz) Theta (4-8Hz) Alpha (8-13Hz) Beta (13-30Hz) Gamma (30-80Hz) Each channel extracts 5-dimensional backpropagation features, for a total of 160 dimensions across 32 channels.

[0049] (2) Multiscale permutation entropy characteristics The MPE was calculated using the EntropyHub toolbox with the following parameters: template length m=3, embedding delay τ=1, and scales=[1,2]. One entropy value was calculated for each scale, resulting in 2 dimensions per channel and a total of 64 dimensions across 32 channels.

[0050] Finally, feature fusion is performed: the 160-dimensional BP feature and the 64-dimensional MPE feature are concatenated along the feature axis to form a 224-dimensional comprehensive feature vector for each sample, which includes both frequency domain energy information and nonlinear complexity information, significantly improving the discriminative power.

[0051] In this embodiment of the invention, the LightGBM classifier is used to construct a three-class classification model, and the key parameters are set as follows: lgb_params = { 'objective': 'multiclass', 'num_class': 3, 'n_estimators': 500, 'learning_rate': 0.05, 'num_leaves': 31, 'subsample': 0.9, 'colsample_bytree': 0.8, 'class_weight': 'balanced', 'random_state': 42, 'n_jobs': -1 } refer to Figure 2 A 10-fold stratified cross-validation structure was constructed based on StratifiedKFold(n_splits=10, shuffle=True, random_state=42). All samples were stratified into 10 parts according to their true labels (three classes), ensuring that the proportion of samples from each class in each fold remained consistent with the overall data. In each fold cross-validation, 9 parts were used as the training set, and the remaining part as the test set. The LightGBM classifier was used to train the model on the training set, and then the classification accuracy was calculated and recorded on the corresponding test set. After 10 cross-validations, the average accuracy and standard deviation of the 10 test results were calculated as the final performance metric of the model, used to evaluate the model's generalization ability on unknown data.

[0052] Example 1: Evaluation of a single smell pattern This embodiment only uses EEG data from the olfactory stage. Approximately 286 olfactory tests were collected from 33 subjects, resulting in 2860 samples after 1-second segmentation. Feature extraction was performed and input into the LightGBM model for 10-fold cross-validation. The overall classification accuracy was 60.0% ± standard deviation, significantly higher than the flavor grade discrimination rate of traditional chromatographic analysis (approximately 45%).

[0053] Example 2: Evaluation using a single taste model This embodiment uses only EEG data from the tasting phase. Following the same preprocessing and feature extraction procedures, 2870 samples were obtained. Cross-validation results show that the overall accuracy of the tasting mode alone reached 46.6% ± standard deviation, lower than the olfactory mode, reflecting the relatively high difficulty of taste recognition.

[0054] Example 3: Evaluation using the combined olfactory-tasting (all) model This embodiment combines the data from both the olfactory and tasting conditions. All samples from both conditions are mixed to construct a larger dataset of 5730 samples. Cross-validation results show that the overall accuracy of the combined model is 50.4% ± standard deviation. This accuracy falls between that of pure olfactory and pure tasting models, but the increased sample size improves statistical robustness. The olfactory model performs best in this dataset, achieving the highest recognition rate.

[0055] Comparative analysis with existing technologies Compared to traditional sensory evaluation, this invention enhances the objectivity and consistency of wine tasting and is unaffected by fluctuations in the sommelier's condition. Compared to physicochemical analyses such as GC-MS, this method directly measures brain perception, making it closer to actual consumer perception. Regarding feature composition, compared to methods using only single-band power spectrum features and traditional classification models, the DWT-MPE multi-feature fusion and LightGBM classification framework constructed in this invention effectively improves the model's classification performance, while also offering advantages in training efficiency and resource consumption, making it more suitable for practical flavor evaluation scenarios.

[0056] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.

[0057] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for evaluating the quality grade of Maotai-flavor liquor based on electroencephalography (EEG) technology, characterized in that, Includes the following steps: The EGG signals of subjects were collected when they smelled and / or tasted samples of baijiu of different quality grades, and this data was used as a dataset. Each EGG signal sample in the dataset is preprocessed and multi-channel features are extracted, including absolute power features of different frequency bands and multi-scale permutation entropy. The multi-channel features are then concatenated into a comprehensive feature vector. The LightGBM ensemble learning classifier is trained using the comprehensive feature vector obtained from different EGG signal samples to obtain a trained quality grade prediction model. The LightGBM ensemble learning classifier outputs the quality grade result of the liquor. The quality grade prediction model is used to predict the quality grade of the liquor sample by using the EEG data obtained from the stimulation of the liquor sample.

2. The method according to claim 1, characterized in that, In the step of collecting EGG signals from subjects after being stimulated by different quality grades of baijiu samples at different stages, the different quality grades of baijiu samples included three different quality grades of sauce-flavored baijiu (superior, first-grade, and second-grade) produced by different brewing processes, as well as a 53% vol pure alcohol control sample.

3. The method according to claim 1, characterized in that, In the step of collecting EGG signals from subjects after being stimulated by baijiu samples of different quality grades at different stages, the subjects were stimulated by baijiu samples at different stages, including the smelling stage and the tasting stage.

4. The method according to claim 1, characterized in that, In the step of collecting EGG signals from subjects after being stimulated by different quality grades of liquor samples at different stages, a 32-lead EEG cap was used to collect the subjects' EGG signals at a sampling rate of 500 Hz.

5. The method according to claim 1, characterized in that, Each EGG signal sample in the dataset is preprocessed, and multi-channel features are extracted, specifically including: The raw EEG signal of each sample was bandpass filtered from 0.5 to 80 Hz and downsampled to 256 Hz. Whole-brain average reference replaces Cz reference in the original EEG signal; Mark "stim_start" as the 0 point, extract the data segment from -5 to 10 seconds, remove the first 5 seconds as the baseline data, and retain the data of the effective stimulus response period of 0-10 seconds; Each 10-second sample data epoch is divided into 10 non-overlapping 1-second short time segments, which are used as preprocessed EGG signal samples. For each 1-second segment in each preprocessed EGG signal sample, the absolute power of the five frequency bands delta, theta, alpha, beta, and gamma is calculated using db4 wavelet transform as the absolute power characteristics of different frequency bands; Using the entropy toolbox, the permutation entropy value of each EGG signal sample at each scale is calculated to form a 32-channel, 64-dimensional MPE feature.

6. The method according to claim 1, characterized in that, During the training process, the quality level prediction model constructs and updates the comprehensive feature vector based on a gradient boosting decision tree.

7. The method according to claim 1, characterized in that, The quality grade prediction model was trained and evaluated using hierarchical 10-fold cross-validation, with accuracy used as the evaluation metric.

8. The method according to claim 1, characterized in that, The core parameters of the LightGBM ensemble learning classifier are set as follows: objective function is multiclass, learning rate is 0.05, number of trees is 500, number of leaf nodes is 31, subsampling rate is 0.9, column sampling rate is 0.8, class weight is balanced, and number of random seeds is 42.

9. A quality grading system for Maotai-flavor liquor based on electroencephalography (EEG) technology, characterized in that, include: The 32-lead EEG acquisition device, data preprocessing module, sample enhancement module, DWT-MPE feature extraction and fusion module, LightGBM classification model training module, and grade prediction output module work together to implement the method described in any one of claims 1-8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by the processor, the program implements the method for evaluating the quality grade of baijiu (Chinese liquor) based on electroencephalography and machine learning algorithms as described in any one of claims 1-8.