Method and device for identifying fermented grain level and key compound of Luzhou-flavor liquor

Through the combination of neural network model and compound feature contribution module, efficient and accurate identification of the rich-flavored liquor lee mash level and key compounds is achieved, solving the problems of low efficiency and accuracy in the existing technology, and optimizing the fermentation process and resource allocation.

CN120280039APending Publication Date: 2025-07-08WULIANGYE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510364908.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-26
Publication Date
2025-07-08

AI Technical Summary

Technical Problem

The existing methods for determining the level of strong aroma white wine leeches and key compounds have low efficiency and accuracy, strong subjectivity of sensory judgments, complex physical and chemical detection and high cost, and unstable results of microbial community analysis.

Method used

The neural network model is used to combine the compound feature contribution module to build a data set by obtaining the compound characteristics and hierarchical characteristics of the scattered samples, training the scattered hierarchical prediction model, and using the SHAP algorithm to determine the contribution degree of the compound features, achieving accurate identification of scattered scattered scattered scattered scattered scattered scattered scattered scattered scattered scattered scattered scattered scattered scattered scattered scattered scattered scattered scattered scattered scattered scattered scattered scattered scattered scattered scattered scattered scattered scattered scattered scattered scattered scattered scatter

Benefits of technology

It improves the identification efficiency and accuracy of the mash level and key compounds, can quickly and objectively predict the mash level, optimize fermentation conditions, ensure the quality stability of the mash level, and reduce detection costs and time costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120280039A_ABST
    Figure CN120280039A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of wine brewing, and discloses a method and a device for identifying a fermented grain level and a key compound of Luzhou-flavor liquor, aiming at solving the problem that the existing method for determining the fermented grain level and the key compound is relatively low in efficiency and accuracy, the scheme mainly comprises the following steps: obtaining compound characteristics and fermented grain level characteristics of a plurality of fermented grain samples; constructing a sample data set according to the compound characteristics and the fermented grain level characteristics; training a neural network model according to the sample data set to obtain a fermented grain level prediction model, and embedding a compound feature contribution module in the fermented grain level prediction model; and inputting the compound characteristics of the to-be-predicted fermented grains into the fermented grain level prediction model to obtain a fermented grain level prediction result of the to-be-predicted fermented grains, and obtaining a key compound identification result of the to-be-predicted fermented grains according to the fermented grain level prediction result and based on the compound characteristic contribution module. The method improves the efficiency and accuracy of determining the level of the fermented grains and the key compounds, and is suitable for regulation and control in the wine brewing process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of brewing, and particularly relates to a method and device for identifying the layers and key compounds of fermented grains of strong-flavor Chinese liquor. Background Art

[0002] Fermented grains are the core matrix in the fermentation process of strong-flavor Chinese liquor. Different layers will be formed during the fermentation of fermented grains. There are differences in temperature, humidity, microbial distribution and metabolic activities in each layer. Moreover, the layers of fermented grains in the cellar pit and the content of key compounds directly affect the quality, flavor and yield of liquor. Determining the layers of fermented grains and identifying the key compounds of fermented grains are key links in the brewing process, which is of great significance for optimizing the fermentation process, improving the quality of liquor, ensuring food safety and promoting scientific research.

[0003] The existing methods for determining the layers of fermented grains usually include sensory judgment, physical and chemical detection and microbial community analysis. Among them, sensory judgment is mainly based on the color, smell and texture of fermented grains by winemakers to judge the layers of fermented grains. This method relies on the experience of winemakers, has strong subjectivity, and low accuracy and efficiency. Physical and chemical detection mainly detects parameters such as the temperature, moisture, pH value, compound content, etc. of fermented grains, and judges the layers of fermented grains based on these parameters. This method involves more parameters, and the data analysis and interpretation are relatively complex. It requires professional data analysis tools and personnel, and the detection and analysis cost is high, increasing the technical threshold. Moreover, the physical and chemical detection method also needs to determine which compounds belong to key compounds. Microbial community analysis mainly detects the microbial distribution in fermented grains and determines the layers of fermented grains accordingly. However, the composition and quantity of the microbial community may be affected by various factors, such as temperature, humidity, oxygen content and the fermentation status of fermented grains itself. These factors may lead to the instability of the microbial community analysis results, thus affecting the accurate judgment of the layers of fermented grains.

[0004] In addition, the existing methods for determining key compounds in fermented grains usually include empirical determination and experimental research determination. Empirical determination is that winemakers determine which compounds belong to key compounds according to experience. This method has strong subjectivity and low accuracy. Experimental research determination is to simulate the fermentation system, study the changes of different compounds during the fermentation process and their effects on the flavor of the final product, and then determine which compounds belong to key compounds. This method is complex in operation and low in efficiency. Summary of the Invention

[0005] The present invention aims to solve the problems of low efficiency and accuracy existing in the existing methods for determining the layers of fermented grains and key compounds, and proposes a method and device for identifying the layers and key compounds of fermented grains of strong-flavor Chinese liquor.

[0006] The technical solutions adopted by the present invention to solve the above technical problems are as follows:

[0007] In a first aspect, the present invention provides a method for identifying the layers and key compounds of Luzhou-flavor liquor fermented grains, and the method includes:

[0008] Obtain the compound characteristics and fermented grain layer characteristics of multiple fermented grain samples, and construct a sample data set according to the compound characteristics and fermented grain layer characteristics;

[0009] Train a neural network model according to the sample data set to obtain a fermented grain layer prediction model, and embed a compound feature contribution module in the fermented grain layer prediction model;

[0010] Input the compound characteristics of the fermented grain to be predicted into the fermented grain layer prediction model to obtain the fermented grain layer prediction result of the fermented grain to be predicted, and based on the compound feature contribution module according to the fermented grain layer prediction result, obtain the key compound identification result of the fermented grain to be predicted.

[0011] Further, based on the fermented grain layer of the fermented grain to be predicted and the compound feature contribution module, obtain the key compounds of the fermented grain to be predicted, which specifically includes:

[0012] The compound feature contribution module calculates the SHAP value of each compound feature of the fermented grain to be predicted on the fermented grain layer prediction result through the SHAP algorithm, and determines the contribution degree of each compound feature of the fermented grain to be predicted according to the SHAP value;

[0013] Sort the contribution degrees from large to small, and take the compounds corresponding to the top K contribution degree compound features as the key compounds of the fermented grain to be predicted.

[0014] Further, the calculation formula of the SHAP value is as follows:

[0015]

[0016] where φ j represents the SHAP value of the j-th compound feature on the fermented grain layer prediction result, N represents the set of all compound features, |N| represents the total number of compound features, S represents an arbitrary compound feature subset that does not include the j-th compound feature, |S| represents the size of the compound feature subset S, v(S) represents the fermented grain layer prediction result corresponding to the compound feature subset S, and v(S∪{j}) represents the fermented grain layer prediction result corresponding to the compound feature subset S after adding the j-th compound feature.

[0017] Further, the compound features at least include: the contents of 2-methylphenol, 3-ethylphenol, guaiacol, eugenol, and 4-ethylguaiacol.

[0018] Further, the fermented grain layer characteristics include the upper layer of fermented grains, the middle layer of fermented grains, and the bottom layer of fermented grains.

[0019] Further, the neural network model is one model or a combination of multiple models among MLP, LSTM, RNN, CNN, GRU, and Transformer.

[0020] Further, the method further includes:

[0021] After constructing the sample data set, removing the missing values and outliers in the sample data set;

[0022] After obtaining the compound features and pit mud layer features of the pit mud samples, and after obtaining the compound features of the to-be-predicted pit mud, performing normalization processing on the compound features and pit mud layer features.

[0023] Further, training the neural network model according to the sample data set includes:

[0024] Dividing the sample data set into a training set and a test set according to a preset ratio;

[0025] Using the compound features in the sample data set as input features, and using the corresponding pit mud layer features as true labels to train the neural network model. During the training process, comparing the prediction results of the neural network model with the true labels, calculating the corresponding loss function, and optimizing the neural network model through backpropagation;

[0026] Using the test set to determine the accuracy of the neural network model. When the corresponding loss function is less than the loss function threshold and the accuracy is greater than the accuracy threshold, the training of the neural network model is completed.

[0027] Further, the loss function is as follows:

[0028]

[0029] Where Loss represents the loss function, M represents the number of Daqu samples, C represents the number of pit mud layers, p ij represents the true label of the i-th Daqu sample at the j-th pit mud layer. If the i-th Daqu sample belongs to the j-th pit mud layer, then p ij = 1, otherwise p ij = 0, represents the probability that the neural network model predicts the i-th Daqu sample belongs to the j-th pit mud layer.

[0030] In a second aspect, the present invention provides an identification device for the pit mud layer and key compounds of Luzhou-flavor liquor, and the device includes:

[0031] An acquisition module, configured to acquire the compound features and pit mud layer features of multiple pit mud samples, and construct a sample data set according to the compound features and pit mud layer features;

[0032] A training module, configured to train a neural network model according to the sample data set to obtain a fermented grains layer prediction model, and embed a compound feature contribution module in the fermented grains layer prediction model;

[0033] A prediction module, configured to input the compound features of the fermented grains to be predicted into the fermented grains layer prediction model to obtain a prediction result of the fermented grains layer of the fermented grains to be predicted, and based on the prediction result of the fermented grains layer and the compound feature contribution module, obtain a key compound recognition result of the fermented grains to be predicted.

[0034] The beneficial effects of the present invention are as follows: The method and device for identifying the fermented grains layer and key compounds of Luzhou-flavor liquor provided by the present invention can accurately predict the fermented grains layer by using the compound features of the fermented grains as input parameters and the fermented grains layer prediction model, thereby improving the efficiency and accuracy of determining the fermented grains layer. Moreover, the present invention uses the compound feature contribution module to determine the contribution degree of each compound feature to the prediction result, thereby realizing the identification of key compounds, and improving the efficiency and accuracy of key compound identification. Description of the Drawings

[0035] Figure 1 It is a schematic flowchart of the method for identifying the fermented grains layer and key compounds of Luzhou-flavor liquor provided in the embodiment;

[0036] Figure 2 It is a schematic diagram of the loss change during the training process of the neural network model provided in the embodiment;

[0037] Figure 3 It is a schematic diagram of the number of prediction results of the fermented grains layer and the corresponding true labels of some sample data in the test set provided in the embodiment;

[0038] Figure 4 It is a schematic diagram of the SHAP values corresponding to each compound of the fermented grains to be predicted provided in the embodiment;

[0039] Figure 5 It is a schematic structural diagram of the device for identifying the fermented grains layer and key compounds of Luzhou-flavor liquor provided in the embodiment. Detailed Embodiments

[0040] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the present embodiment will be clearly and completely described below in conjunction with the accompanying drawings in the present embodiment.

[0041] In some of the processes described in the specification of the present invention and the above-mentioned figures, multiple operations appearing in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this document or may be executed in parallel. The sequence numbers of the operations are only used to distinguish different operations, and the sequence numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel.

[0042] In order to improve the efficiency and accuracy of determining the mash ​​level and key compounds, the technical scheme of the present invention is proposed. In the present invention, the compound characteristics and mash ​​level characteristics of multiple mash ​​samples are obtained, and a sample data set is constructed according to the compound characteristics and mash ​​level characteristics; a neural network model is trained according to the sample data set to obtain a mash ​​level prediction model, and a compound characteristic contribution module is embedded in the mash ​​level prediction model; the compound characteristics of the mash ​​to be predicted are input into the mash ​​level prediction model to obtain a mash ​​level prediction result of the mash ​​to be predicted, and according to the mash ​​level prediction result and based on the compound characteristic contribution module, a key compound identification result of the mash ​​to be predicted is obtained.

[0043] Specifically, the fermented grains level prediction model in the present invention realizes a rapid and objective prediction of the fermented grains level by quantitatively analyzing the characteristics of the fermented grains compounds, and the fermented grains level prediction model can mine the complex nonlinear relationship between the compound characteristics, thereby improving the efficiency and accuracy of the determination of the fermented grains level. By determining the fermented grains level, the fermentation conditions can be better controlled and the fermentation process can be optimized. And by quantifying the contribution of each compound characteristic to the fermented grains level prediction result, the present invention can quickly and accurately identify which compounds play a vital role in the fermentation process, realize the identification of key compounds, and thus improve the identification efficiency and accuracy. By identifying key compounds, the content of key compounds can be more targetedly monitored, thereby adjusting the production process parameters, ensuring the stability and consistency of the quality of the fermented grains, while reducing the monitoring and analysis of non-key compounds, reducing the detection cost and time cost, optimizing resource allocation, and when there is a problem with the quality of the fermented grains, the abnormal changes of key compounds can be quickly located, shortening the time for troubleshooting.

[0044] Based on this, the technical solution in this embodiment will be clearly and completely described below in combination with the drawings in this embodiment. Obviously, the described embodiment is only a part of the embodiments of the present invention, rather than all the embodiments.

[0045] Figure 1 A schematic diagram showing a method for identifying the layers and key compounds of Luzhou-flavor liquor lees is shown in FIG. Figure 1 , the method comprises the following steps:

[0046] S1. Obtain the compound characteristics and pit mud layer characteristics of multiple pit mud samples, and construct a sample data set based on the compound characteristics and pit mud layer characteristics.

[0047] In this embodiment, the compound characteristics at least include the contents of 2-methylphenol, 3-ethylphenol, guaiacol, eugenol, and 4-ethylguaiacol. The compound characteristics may also include the contents of other common metabolic compounds during the pit mud fermentation process. In practical applications, gas chromatography and mass spectrometry can be used to obtain the compound contents in the pit mud samples.

[0048] In this embodiment, 11 flavor substances including 2-methylphenol, 3-ethylphenol, guaiacol, eugenol, and 4-ethylguaiacol are considered, and are represented as compound 1, compound 2,..., compound 11.

[0049] In this embodiment, the pit mud layer characteristics include the upper layer of pit mud, the middle layer of pit mud, and the bottom layer of pit mud. The pit mud layer characteristics may also be the pit mud layer divided by other pit mud layer division methods recognized by experts in the field.

[0050] After obtaining the compound characteristics and pit mud layer characteristics of each pit mud sample, construct a sample data set that can reflect the corresponding relationship between the compound characteristics and the pit mud layer characteristics.

[0051] In this embodiment, after constructing the sample data set, it also includes data cleaning, that is, removing the missing values and outliers in the sample data set. Through data cleaning, the data quality and the accuracy of the model can be improved. After obtaining the compound characteristics and pit mud layer characteristics of the pit mud samples, this embodiment also includes normalizing the compound characteristics and the pit mud layer characteristics. In practical applications, the sklearn.preprocessing.StandardScaler function can be used for normalization to standardize the data into a normal distribution with a mean of 0 and a standard deviation of 1. Through normalization, the influence of different compound magnitudes can be eliminated, and the data quality and the accuracy of the model can be further improved.

[0052] S2. Train a neural network model according to the sample data set to obtain a pit mud layer prediction model, and embed a compound feature contribution module in the pit mud layer prediction model.

[0053] In this embodiment, the neural network model is one model or a combination of multiple models among MLP, LSTM, RNN, CNN, GRU, and Transformer. These neural network models can mine the complex non-linear relationships between compounds, thereby further improving the accuracy of pit mud layer prediction.

[0054] For example, the neural network model is an MLP, which is implemented based on the Python language using the PyTorch library. The specific model is as follows:

[0055]

[0056] In this embodiment, training the neural network model according to the sample data set includes:

[0057] Dividing the sample data set into a training set and a test set according to a preset ratio; using the compound features in the sample data set as input features and the corresponding fermented grains layer features as true labels to train the neural network model. During the training process, comparing the prediction results of the neural network model with the true labels, calculating the corresponding loss function, and optimizing the neural network model through backpropagation; using the test set to determine the accuracy of the neural network model. When the corresponding loss function is less than the loss function threshold and the accuracy is greater than the accuracy threshold, the training of the neural network model is completed.

[0058] Specifically, during the training process of the neural network model, the sample data set is divided into a training set and a test set. The training set is used to train the neural network model, and the test set is used to evaluate the training effect of the neural network model. When the corresponding loss function is less than the loss function threshold and the accuracy of the neural network model on the test set is higher than the preset accuracy threshold, it is considered that the training of the neural network model is completed, and a fermented grains layer prediction model is obtained.

[0059] For the change of loss during the training process of the neural network model, please refer to Figure 2 , when the loss function is less than the loss function threshold, the R 2 value between the prediction result of the test set and the true label can be used as an accuracy index to evaluate the model effect. When the R 2 mean is greater than 0.9, the training of the neural network model is completed.

[0060] After the training of the neural network model in this embodiment is completed, for the prediction results of the fermented grains layer of some sample data in the test set and the quantity of the corresponding true labels, please refer to Figure 3 .

[0061] In this embodiment, the loss function is as follows:

[0062]

[0063] Among them, Loss represents the loss function, M represents the quantity of Daqu samples, C represents the quantity of fermented grains layers, p ij represents the true label of the i-th Daqu sample at the j-th fermented grains layer. If the i-th Daqu sample belongs to the j-th fermented grains layer, then p ij =1, otherwise p ij =0. It represents the probability that the i-th Daqu sample predicted by the neural network model belongs to the j-th zao mash level.

[0064] After the mash fry level prediction model is obtained through training, a compound feature contribution module is embedded in the mash fry level prediction model, and the compound feature contribution module is used to determine the contribution of each compound feature to the mash fry level prediction result.

[0065] S3. Inputting the compound characteristics of the mash to be predicted into the mash hierarchical prediction model to obtain the mash hierarchical prediction result of the mash to be predicted, and obtaining the key compound identification result of the mash to be predicted according to the mash hierarchical prediction result and based on the compound characteristic contribution module.

[0066] In practical applications, the compound characteristics of the mash to be predicted are first obtained. Similar to the mash sample, the compound characteristics at least include: the content of 2-methylphenol, 3-ethylphenol, guaiacol, eugenol and 4-ethylguaiacol. The compound characteristics may also include the content of other common metabolic compounds in the mash fermentation process. In practical applications, gas chromatography and mass spectrometry can be used to obtain the compound content in the mash to be predicted.

[0067] After obtaining the compound characteristics of the mash to be predicted, it is processed by the same normalization method as the mash sample and then input into the mash hierarchy prediction model. The mash hierarchy prediction model realizes the rapid and objective prediction of the mash hierarchy through the quantitative analysis of the compound characteristics, and obtains the mash hierarchy prediction result of the mash to be predicted. At the same time, the mash hierarchy prediction model can mine the complex nonlinear relationship between the compound characteristics, thereby improving the efficiency and accuracy of the mash hierarchy determination.

[0068] After obtaining the mash hierarchical prediction result of the mash to be predicted, the compound feature contribution module is used to determine the contribution of each compound feature to the mash hierarchical prediction result, thereby identifying the key compounds. In this embodiment, it specifically includes:

[0069] The compound feature contribution module calculates the SHAP value of each compound feature of the mash to be predicted to the mash hierarchical prediction result through the SHAP algorithm, and determines the contribution of each compound feature of the mash to be predicted according to the SHAP value; sorts the contributions from large to small, and takes the compounds corresponding to the compound features with the first K contributions as the key compounds of the mash to be predicted.

[0070] It can be understood that the SHAP (Shapley Additive Explanations) algorithm is based on the SHAP value in game theory, regarding the contribution of each feature value to the model output as a fair distribution. The SHAP value provides an intuitive way to understand the impact of features on the prediction result. It can accurately reflect the contribution of each feature to a single prediction and has local accuracy.

[0071] In this embodiment, the SHAP value of each compound feature of the to-be-predicted fermented grains for the fermented grains hierarchical prediction result is calculated based on the SHAP algorithm. The larger the SHAP value, the greater the contribution degree of the corresponding compound feature to the fermented grains hierarchical prediction result. Then, several compounds corresponding to the compound features with the largest contribution degree are selected as key compounds according to the SHAP value, realizing the identification of key compounds.

[0072] In this embodiment, the calculation formula of the SHAP value is as follows:

[0073]

[0074] Among them, φ j represents the SHAP value of the j-th compound feature for the fermented grains hierarchical prediction result, N represents the set of all compound features, |N| represents the total number of compound features, S represents an arbitrary subset of compound features that does not include the j-th compound feature, |S| represents the size of the compound feature subset S, v(S) represents the fermented grains hierarchical prediction result corresponding to the compound feature subset S, and v(S∪{j}) represents the fermented grains hierarchical prediction result after adding the j-th compound feature to the compound feature subset S.

[0075] In this embodiment, the SHAP values of the compounds corresponding to each compound feature are as Figure 4 shown. Among them, Compound 11, Compound 4, and Compound 1 are the top three compounds with the highest SHAP values and can be considered as key compounds.

[0076] In summary, the method for identifying the levels of Luzhou-flavor liquor fermented grains and key compounds provided in this embodiment uses the fermented grains level prediction model to quantitatively analyze the compound characteristics of fermented grains, achieving rapid and objective prediction of the fermented grains levels. Moreover, the fermented grains level prediction model can uncover the complex non-linear relationships between compound characteristics, thereby improving the efficiency and accuracy of determining the fermented grains levels. By determining the fermented grains levels, the fermentation conditions can be better controlled and the fermentation process optimized. Additionally, in this invention, by quantifying the contribution degree of each compound characteristic to the prediction result of the fermented grains levels, the compounds that play crucial roles during the fermentation process can be quickly and accurately identified, realizing the identification of key compounds, thus improving the identification efficiency and accuracy. By identifying key compounds, the content of key compounds can be monitored more specifically, thereby adjusting the production process parameters to ensure the stability and consistency of the quality of fermented grains. Meanwhile, the monitoring and analysis of non-key compounds can be reduced, lowering the detection cost and time cost, optimizing resource allocation, and when there are problems with the quality of fermented grains, the abnormal changes of key compounds can be quickly located, shortening the problem troubleshooting time.

[0077] Based on the above technical solution, this embodiment further proposes an apparatus for identifying the levels of Luzhou-flavor liquor fermented grains and key compounds. Please refer to Figure 5 The apparatus includes:

[0078] An acquisition module, configured to acquire the compound characteristics and fermented grains level characteristics of multiple fermented grains samples, and construct a sample data set based on the compound characteristics and fermented grains level characteristics;

[0079] A training module, configured to train a neural network model according to the sample data set to obtain a fermented grains level prediction model, and embed a compound characteristic contribution module in the fermented grains level prediction model;

[0080] A prediction module, configured to input the compound characteristics of the fermented grains to be predicted into the fermented grains level prediction model to obtain the fermented grains level prediction result of the fermented grains to be predicted, and obtain the key compound identification result of the fermented grains to be predicted based on the fermented grains level prediction result and the compound characteristic contribution module.

[0081] It can be understood that since the apparatus for identifying the levels of Luzhou-flavor liquor fermented grains and key compounds described in this embodiment is an apparatus for implementing the method for identifying the levels of Luzhou-flavor liquor fermented grains and key compounds described in the embodiment, for the apparatus disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple. For the relevant parts, refer to the partial description of the method, and details will not be elaborated here.

Claims

1. A method for identifying the layers and key compounds of Luzhou-flavor liquor fermented grains, characterized in that The method includes: Obtaining the compound characteristics and pit mud layer characteristics of multiple pit mud samples, and constructing a sample data set according to the compound characteristics and pit mud layer characteristics; Training a neural network model according to the sample data set to obtain a pit mud layer prediction model, and embedding a compound feature contribution module in the pit mud layer prediction model; Inputting the compound characteristics of the pit mud to be predicted into the pit mud layer prediction model to obtain the pit mud layer prediction result of the pit mud to be predicted, and obtaining the key compound identification result of the pit mud to be predicted according to the pit mud layer prediction result and based on the compound feature contribution module.

2. The method for identifying the layers and key compounds of Luzhou-flavor liquor fermented grains according to claim 1, characterized in that, Obtaining the key compounds of the pit mud to be predicted according to the pit mud layer of the pit mud to be predicted and based on the compound feature contribution module, specifically including: The compound feature contribution module calculates the SHAP value of each compound feature of the pit mud to be predicted on the pit mud layer prediction result through the SHAP algorithm, and determines the contribution degree of each compound feature of the pit mud to be predicted according to the SHAP value; Sorting the contribution degrees from large to small, and taking the compounds corresponding to the top K contribution degree compound features as the key compounds of the pit mud to be predicted.

3. The method for identifying the layers and key compounds of the Luzhou-flavor liquor fermented grains according to claim 2, wherein The calculation formula of the SHAP value is as follows: where φ j represents the SHAP value of the j-th compound feature on the prediction result of the fermented grains level, N represents the set of all compound features, |N| represents the total number of compound features, S represents any subset of compound features that does not contain the j-th compound feature, |S| represents the size of the compound feature subset S, v(S) represents the prediction result of the fermented grains level corresponding to the compound feature subset S, and v(S∪{j}) represents the prediction result of the fermented grains level corresponding to the compound feature subset S after adding the j-th compound feature.

4. The method for identifying the layers and key compounds of Luzhou-flavor liquor fermented grains according to claim 1, characterized in that The compound characteristics at least include the contents of 2-methylphenol, 3-ethylphenol, guaiacol, eugenol, and 4-ethylguaiacol.

5. The method for identifying the layers and key compounds of Luzhou-flavor liquor fermented grains according to claim 1, characterized in that The pit mud layer characteristics include the upper layer of pit mud, the middle layer of pit mud, and the bottom layer of pit mud.

6. The method for identifying the levels of Luzhou-flavor liquor fermented grains and key compounds according to claim 1, wherein The neural network model is one model or a combination of multiple models among MLP, LSTM, RNN, CNN, GRU, and Transformer.

7. The method for identifying the levels of Luzhou-flavor liquor fermented grains and key compounds according to claim 1, wherein The method further includes: After constructing the sample data set, removing the missing values and outliers in the sample data set; After obtaining the compound characteristics and pit mud layer characteristics of the pit mud samples, and after obtaining the compound characteristics of the pit mud to be predicted, performing normalization processing on the compound characteristics and pit mud layer characteristics.

8. The method for identifying the layers and key compounds of Luzhou-flavor liquor fermented grains according to claim 1, characterized in that, Training the neural network model according to the sample data set includes: Dividing the sample data set into a training set and a test set according to a preset ratio; Taking the compound characteristics in the sample data set as input features, taking the corresponding pit mud layer characteristics as true labels, training the neural network model, comparing the prediction result of the neural network model with the true label during the training process, calculating the corresponding loss function, and optimizing the neural network model through backpropagation; Using the test set to determine the accuracy of the neural network model. When the corresponding loss function is less than the loss function threshold and the accuracy is greater than the accuracy threshold, the training of the neural network model is completed.

9. The method for identifying the levels of Luzhou-flavor liquor fermented grains and key compounds according to claim 8, characterized in that, The loss function is as follows: Among them, Loss represents the loss function, M represents the number of Daqu samples, C represents the number of fermented grains layers, and p ij represents the true label of the i-th Daqu sample at the j-th fermented grains layer. If the i-th Daqu sample belongs to the j-th fermented grains layer, then p ij = 1; otherwise, p ij = 0. represents the probability that the neural network model predicts the i-th Daqu sample belongs to the j-th fermented grains layer.

10. An apparatus for identifying the layers and key compounds of Luzhou-flavor liquor fermented grains, characterized in that, The device includes: An acquisition module, configured to acquire the compound characteristics and pit mud layer characteristics of multiple pit mud samples, and construct a sample data set according to the compound characteristics and pit mud layer characteristics; A training module, configured to train a neural network model according to the sample data set to obtain a pit mud layer prediction model, and embed a compound feature contribution module in the pit mud layer prediction model; A prediction module, which is used to input the compound features of the fermented grains to be predicted into the fermented grains hierarchical prediction model to obtain the fermented grains hierarchical prediction result of the fermented grains to be predicted, and based on the compound feature contribution module according to the fermented grains hierarchical prediction result, obtain the key compound identification result of the fermented grains to be predicted.