A method and device for predicting the quantity of yeast in fermented grains, a computer device, a medium and a product

By constructing a sample database and training candidate prediction models, multiple machine learning models are used to predict the number of yeast cells in the brewing process of Maotai-flavor liquor in real time. This solves the problem of long time consumption of traditional detection methods and realizes real-time monitoring of yeast cell count and accurate reflection of fermentation status.

CN122369596APending Publication Date: 2026-07-10GUIZHOU MOUTAI WINERY GRP XIJIU CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUIZHOU MOUTAI WINERY GRP XIJIU CO LTD
Filing Date
2026-04-03
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

In traditional methods, detecting the number of yeast cells in the mash during the brewing process of Maotai-flavor liquor is time-consuming and cannot meet the needs of real-time monitoring of the fermentation status.

Method used

A sample database was constructed, and candidate prediction models were trained using training samples. Single prediction models and combined prediction models were adopted, including linear combination models and stacked combination models. Extreme gradient boosting models, random forest models, gradient boosting tree models and support vector regression models were used to predict the number of yeast cells.

Benefits of technology

It enables real-time acquisition of yeast count, timely reflection of the fermentation status of the saccharification pile, and improves the accuracy and precision of prediction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122369596A_ABST
    Figure CN122369596A_ABST
Patent Text Reader

Abstract

This application relates to a method, apparatus, computer equipment, medium, and product for predicting the number of yeast cells in fermented grains. The method includes: acquiring a mixed fermented grain sample, constructing a sample database based on the mixed fermented grain sample, obtaining training samples and test samples from the sample database, training candidate prediction models using the training samples, obtaining model evaluation parameters of the candidate prediction models when training stops, determining a target prediction model from the candidate prediction models based on the model evaluation parameters, and predicting the number of yeast cells in the fermented grains based on the target prediction model. This method can improve the real-time performance of predictions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of prediction model optimization technology, and in particular to a method, apparatus, computer equipment, medium and product for predicting the number of yeast cells in fermented mash. Background Technology

[0002] The brewing process of Maotai-flavor baijiu is complex, involving multiple rounds of pile fermentation and pit fermentation throughout the year's production cycle. The purpose of pile fermentation is to raise the temperature inside the pit and concentrate the microorganisms (yeasts, molds, and bacteria) in the fermentation starter and environment. Yeasts show the most significant increase in proportion during the saccharification pile accumulation process, promoting the transition from saccharification to fermentation and providing the initial impetus for ethanol production in the pit. Therefore, real-time monitoring of yeast activity during pile fermentation can effectively reflect the fermentation status of the saccharification pile and plays a crucial role in guiding production.

[0003] In traditional detection methods, the main way to quickly obtain information about the microorganisms in the mash is through laboratory dilution plating. However, these microorganisms require 2-5 days of incubation, and after incubation, different types of yeast need to be counted manually. This is time-consuming and labor-intensive, and it is difficult to meet the needs of real-time reaction of yeast count in the saccharification pile, which is not conducive to monitoring the fermentation status. Summary of the Invention

[0004] Therefore, it is necessary to provide a method, apparatus, computer equipment, medium, and product for predicting the number of yeast cells in fermented mash, which can improve the real-time accuracy of prediction, in response to the above-mentioned technical problems.

[0005] In a first aspect, this application provides a method for predicting the number of yeast cells in brewing mash, including:

[0006] Obtain mixed mash samples and construct a sample database based on the mixed mash samples;

[0007] Training and test samples are obtained from the sample database, and candidate prediction models are trained using the training samples. Candidate prediction models include single prediction models and combined prediction models. Combined prediction models include linear combination models and stacked combination models.

[0008] If the training stopping condition is met, obtain the model evaluation parameters of the candidate prediction models, and determine the target prediction model from the candidate prediction models based on the model evaluation parameters.

[0009] Predicting the number of yeast cells in fermented mash based on a target prediction model.

[0010] In one embodiment, the step of constructing a sample database based on mixed mash samples includes:

[0011] Extract the physicochemical indicators, environmental indicators, and yeast count of the mixed mash samples; the mixed mash samples include mash samples from multiple locations on the surface and center of the saccharification pile.

[0012] A sample database was constructed using the physicochemical and environmental indicators of the samples as independent variables and the number of yeast cells in the samples as the dependent variable.

[0013] In one embodiment, the single prediction model includes an extreme gradient boosting model, a random forest model, a gradient boosting tree model, and a support vector regression model; the process of constructing the combined prediction model includes:

[0014] A linear combination model is obtained by linearly fusing the random forest model, gradient boosting tree model, and support vector regression model.

[0015] A stacked combined model is constructed using extreme gradient boosting model, random forest model, lightweight gradient boosting tree model, and support vector regression model as the first-layer base model and ridge regression model as the second-layer meta-model; the second-layer meta-model uses the output data of the first-layer base model as input data.

[0016] In one embodiment, the step of obtaining the model evaluation parameters of the candidate prediction model includes:

[0017] Obtain the model prediction values ​​of the candidate prediction models;

[0018] Obtain the residual sum of squares and the total sum of squares between the model's predicted values ​​and the actual values ​​of the corresponding training samples, and obtain the first evaluation index based on the residual sum of squares and the total sum of squares.

[0019] The root mean square error between the model's predicted values ​​and the actual sample values ​​is used as the second evaluation index, and the first and second evaluation indices are used as the model evaluation parameters for the candidate prediction model.

[0020] In one embodiment, the step of determining the target prediction model from candidate prediction models based on model evaluation parameters includes:

[0021] The candidate prediction model corresponding to the first evaluation index exceeding the index threshold is used as the reference prediction model;

[0022] The reference prediction model corresponding to the lowest value of the second evaluation index is used as the target prediction model.

[0023] In one embodiment, the method further includes:

[0024] Obtain the target prediction value obtained by predicting the number of yeast cells in the mash based on the target prediction model, and determine the current fermentation state based on the target prediction value;

[0025] Obtain production control instructions based on the current fermentation status.

[0026] Secondly, this application also provides a device for predicting the number of yeast cells in fermented mash, comprising:

[0027] The sample acquisition module is used to acquire mixed mash samples and build a sample database based on the mixed mash samples;

[0028] The model training module is used to obtain training samples and test samples from the sample database, and to train the candidate prediction models using the training samples respectively; the candidate prediction models include single prediction models and combined prediction models; the combined prediction models include linear combination models and stacked combination models;

[0029] The model selection module is used to obtain the model evaluation parameters of candidate prediction models when the training stopping condition is met, and to determine the target prediction model from the candidate prediction models based on the model evaluation parameters.

[0030] The quantity prediction module is used to predict the quantity of yeast in fermented mash based on the target prediction model.

[0031] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method steps of any one of the first aspects.

[0032] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method steps of any one of the first aspects.

[0033] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the method steps of any one of the first aspects.

[0034] The aforementioned method, apparatus, computer equipment, medium, and product for predicting yeast count in fermented mash achieves real-time acquisition of yeast count during fermentation, promptly reflects the fermentation status of the saccharification pile, improves model prediction accuracy, and thus enhances the accuracy of prediction results. This is achieved by acquiring mixed fermented mash samples and constructing a sample database based on these samples. Under training termination conditions, model evaluation parameters for candidate prediction models are obtained, and a target prediction model is determined from the candidate models based on these parameters. Attached Figure Description

[0035] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0036] Figure 1 This is a diagram illustrating the application environment of a yeast count prediction method in fermented mash in one embodiment.

[0037] Figure 2 This is a flowchart illustrating a method for predicting the number of yeast cells in fermented mash in one embodiment.

[0038] Figure 3 This is a schematic diagram of the collection points for a mixed mash sample in one embodiment;

[0039] Figure 4 This is a schematic diagram comparing the predicted values ​​and actual values ​​of a random forest model in one embodiment;

[0040] Figure 5 This is a schematic diagram comparing the predicted values ​​and actual values ​​of a linear combination model in one embodiment;

[0041] Figure 6 This is a schematic diagram comparing the predicted and actual values ​​of a stacked combination model in one embodiment;

[0042] Figure 7 This is a flowchart illustrating a method for predicting the number of yeast cells in fermented mash in another embodiment;

[0043] Figure 8 This is a structural block diagram of a yeast count prediction device for fermentation mash in one embodiment;

[0044] Figure 9 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0045] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0046] The method for predicting the number of yeast cells in fermented mash provided in this application can be applied to, for example... Figure 1In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed on a cloud or other network server. Terminal 102 is used to acquire mixed fermented mash samples, construct a sample database based on the mixed fermented mash samples, obtain training samples and test samples from the sample database, train candidate prediction models using the training samples, acquire model evaluation parameters of the candidate prediction models when the training stopping condition is met, and determine the target prediction model from the candidate prediction models based on the model evaluation parameters. The target prediction model is then used to predict the yeast count in the fermented mash. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, drones, low-altitude aircraft, IoT devices, and portable wearable devices. IoT devices can be smart speakers, smart TVs, smart air conditioners, smart vehicle devices, projection devices, etc. Portable wearable devices can be smartwatches, smart bracelets, head-mounted devices, etc. Headset devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. Server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0047] In one exemplary embodiment, such as Figure 2 As shown, a method for predicting the number of yeast cells in fermented mash is provided, and this method is applied to... Figure 1 Taking terminal 102 as an example, the explanation includes the following steps 202 to 208. Wherein:

[0048] S202: Obtain mixed mash samples and construct a sample database based on the mixed mash samples.

[0049] Optionally, such as Figure 3As shown, samples were taken from six locations on the surface (upper, middle, and lower) and center (upper, middle, and lower) of the saccharification pile of Maotai-flavor liquor. This sampling method covers different spatial locations within the saccharification pile, avoiding the randomness of sampling from a single location and ensuring that the samples accurately reflect the fermentation state of the entire saccharification pile. This solves the problem of insufficient sample representativeness caused by the spatial heterogeneity of the fermentation mash. Subsequently, the physicochemical indicators (including acidity, reducing sugar, moisture, and starch) of the mash samples were tested using a Foss near-infrared rapid detection device to ensure the efficiency and consistency of indicator acquisition. Simultaneously, the number of yeast cells (including Saccharomyces cerevisiae, Pichia galbana, and Pichia kudneri, in log CFU / mL) was detected. The quantitative detection of culturable yeast was completed using the dilution plating method combined with agar medium, providing dependent variable data for the model. The temperature indicators of the saccharification pile (including top temperature, mesotemperature, bottom temperature, and combined temperature) and the stacking time were collected as key dynamic indicators of the fermentation process. Finally, these samples were integrated into a structured sample database to achieve standardized data correlation and meet the input requirements of the machine learning model.

[0050] S204: Obtain training samples and test samples from the sample database, and train the candidate prediction models using the training samples respectively; the candidate prediction models include single prediction models and combined prediction models; the combined prediction models include linear combination models and stacked combination models.

[0051] Optionally, the sample database is randomly split into an 80% training set and a 20% test set. The training set is used for model parameter learning and fitting, while the test set is used for independent performance validation of the model, avoiding overfitting and ensuring the model's generalization ability to unknown data. The single prediction models include Extreme Gradient Boosting (XGBoost), Random Forest, Gradient Boosting Tree (GBM), and Support Vector Regression (SVR), all classic regression prediction machine learning models. XGBoost, Random Forest, and GBM learn the nonlinear mapping relationship between the independent variable and the number of yeast cells through multiple rounds of data splitting, feature selection, and gradient boosting. SVR uses a kernel function to map low-dimensional data to a high-dimensional space, constructing the optimal classification hyperplane to achieve regression prediction of the continuous dependent variable (number of yeast cells). Based on the single models, prediction performance is improved through model fusion, resulting in linear combination models and stacked combination models. The linear combination model uses a linear fusion method to weight and integrate the prediction results of each base model. The core training objective is to learn the optimal linear weighting coefficients, weakening the prediction bias of the single base model. The stacked ensemble model adopts a two-layer modeling structure. The first layer is the base model, which predicts on the training set and generates a new feature set. The second layer uses ridge regression as the meta-model to retrain the new feature set generated by the base model. Ridge regression can solve the multicollinearity problem through L2 regularization, improve the stability of the ensemble model, and achieve deep integration of the prediction results of the base model.

[0052] S206: If the training stopping condition is met, obtain the model evaluation parameters of the candidate prediction models, and determine the target prediction model from the candidate prediction models based on the model evaluation parameters.

[0053] Optionally, considering the training characteristics of machine learning models, training is stopped when the model's fit on the training set no longer improves, its performance on the test set stabilizes, or it reaches a preset number of training iterations. This avoids overfitting caused by overtraining and ensures the model's practical application value. The model evaluation parameters employ two core regression evaluation metrics: the coefficient of determination (R²) and the root mean square error (RMSE), achieving dual quantification of the model's predictive performance. R² ranges from 0 to 1, reflecting the model's ability to explain variations in yeast cell numbers; a value closer to 1 indicates a higher proportion of dependent variable variation explained by the model and a better fit. RMSE reflects the average deviation between the model's predicted values ​​and the true values; a value closer to 0 indicates higher prediction accuracy and smaller error. By comparing the R² and RMSE values ​​of all candidate models, the model with the largest R² and smallest RMSE is selected as the target prediction model.

[0054] S208: Predicting the number of yeast cells in fermented mash based on a target prediction model.

[0055] Optionally, in the actual production of Maotai-flavor liquor fermentation, real-time indicators of the saccharification pile (acidity, reducing sugar, moisture, starch, top temperature, medium temperature, bottom temperature, overall temperature, and stacking time) are collected. The indicator detection methods are consistent with those in the modeling stage to ensure data compatibility. The standardized real-time indicators are input into the target prediction model. The model, through the learned feature mapping and parameter system, quickly calculates and outputs the predicted value of yeast count. The actual prediction effect of the model can be continuously verified by calculating the average absolute error between the predicted value and the actual detected value and verifying the order of magnitude consistency between the predicted value and the true value.

[0056] The above-mentioned method for predicting the number of yeast cells in fermented mash involves obtaining mixed fermented mash samples and constructing a sample database based on these samples. When the training stopping condition is met, model evaluation parameters for candidate prediction models are obtained, and a target prediction model is determined from the candidate models based on these parameters. This method enables real-time acquisition of the number of yeast cells during fermentation, promptly reflecting the fermentation status of the saccharification pile, improving model prediction accuracy, and thus enhancing the accuracy of the prediction results.

[0057] In an exemplary embodiment, the step of constructing a sample database based on mixed mash samples includes: extracting sample physicochemical indicators, sample environmental indicators, and sample yeast count from the mixed mash samples; the mixed mash samples include mash samples from multiple locations on the surface and center of the saccharification pile; and constructing a sample database using the sample physicochemical indicators and sample environmental indicators as independent variables and the sample yeast count as the dependent variable.

[0058] Optionally, the saccharification pile is the core carrier for the fermentation of Maotai-flavor liquor. Significant differences exist in the microenvironment (temperature, oxygen, nutrients) between its surface and center, and at different heights, leading to spatial heterogeneity in the distribution and quantity of yeast. Sampling from a single location cannot reflect the true fermentation state of the entire saccharification pile. Therefore, mixed samples were prepared from six points on the surface (upper, middle, and lower) and center (upper, middle, and lower) of the saccharification pile. Through spatial full-coverage sampling and homogenization, the differences in the microenvironment at different points were offset, ensuring that the sample data accurately and comprehensively represent the fermentation level of the entire saccharification pile. This avoids model training errors caused by sample bias from the outset, laying a data foundation for the accuracy of subsequent models.

[0059] Optionally, physicochemical indicators, including acidity, reducing sugar, moisture, and starch, are core parameters reflecting the basic state of fermentation in the mash. These are detected using a Foss near-infrared rapid detection device. The principle is based on the differences in the characteristic absorption of near-infrared light by different physicochemical components. Through spectral analysis and quantitative calibration models, multiple indicators can be detected simultaneously quickly, adapting to the detection needs of large-scale modeling samples. Temperature is measured at three core temperature measurement sites on the saccharification pile using a thermometer. The comprehensive temperature is the average of the top, middle, and bottom temperatures, comprehensively reflecting the overall temperature level of the saccharification pile. Temperature is a core environmental factor affecting yeast growth and reproduction. The stacking time is the fermentation duration from completion of the stack to sampling, reflecting the temporal evolution of yeast during the stacking fermentation process. Yeast quantity is the core prediction target (dependent variable) of the model. For key yeasts in the stacking fermentation of Maotai-flavor liquor, such as *Pichia pastoris*, *Pichia kudzuensis*, and *Pichia kudzuensis*, the dilution plating method combined with WL agar medium is used for detection. WL agar medium is a specialized identification medium for yeast, enabling the isolation and counting of different yeast species. The dilution plating method is the gold standard for culturing and counting microorganisms, accurately obtaining the number of yeast cells and providing accurate labeling data for models.

[0060] Optionally, physicochemical indicators (acidity, reducing sugar, moisture, starch) and environmental indicators (top temperature, mesotemperature, bottom temperature, combined temperature, stacking time) are used as independent variables. These indicators are quantitative parameters that can be quickly detected on-site and are the core explanatory variables affecting changes in yeast cell count. The yeast cell count in the sample is used as the dependent variable, i.e., the target parameter that the model needs to predict. By structurally integrating multi-dimensional indicators according to the correspondence between "sample-independent variable-dependent variable," a standardized sample database is formed, ensuring that the data meets the input format requirements of the machine learning model: the independent variables are continuous quantitative features, and the dependent variable is a continuous prediction target. This achieves a precise correlation between fermentation process parameters and microbial count features and labels, allowing the model to learn the inherent mapping law between the two.

[0061] In this embodiment, by extracting the physicochemical indicators, environmental indicators, and yeast count of the mixed mash samples, and using the physicochemical and environmental indicators as independent variables and the yeast count as the dependent variable to construct a sample database, the predictive reliability of the model can be improved, overfitting due to data quality issues can be avoided, and the prediction accuracy of the model can be improved.

[0062] In an exemplary embodiment, a single prediction model includes an extreme gradient boosting model, a random forest model, a gradient boosting tree model, and a support vector regression model; the process of constructing a combined prediction model includes: linearly fusing the random forest model, the gradient boosting tree model, and the support vector regression model to obtain a linear combined model; constructing a stacked combined model using the extreme gradient boosting model, the random forest model, the lightweight gradient boosting tree model, and the support vector regression model as the first layer base model and the ridge regression model as the second layer meta-model; the second layer meta-model uses the output data of the first layer base model as input data.

[0063] Optionally, the construction of the combined prediction model revolves around model complementarity and hierarchical / weighted fusion. The linear combination model adopts a single-layer linear weighted fusion method, while the stacked combination model adopts a two-layer cascaded modeling method. Both methods are based on the differences in the learning ability of different individual models to data features, achieving superimposed optimization of prediction results. The extreme gradient boosting (XGBoost), random forest, gradient boosting tree (GBM), lightweight gradient boosting tree (LightGBM), and support vector regression (SVR) models involved in the combination have significantly different learning characteristics for fermentation data of mash, providing a foundation for model fusion. Among them, tree-based models (such as XGBoost, random forest, GBM, and LightGBM) are good at mining nonlinear, high-dimensional feature correlations between physicochemical indicators, environmental indicators, and yeast count of mash. They can capture the complex influence of dynamic changes in indicators such as stacking time, temperature, and reducing sugar on yeast growth. The SVR model maps low-dimensional fermentation data to a high-dimensional space through kernel functions, and is good at handling regression problems where the feature dimension and sample size do not match well, which can compensate for the bias of tree-based models in local feature fitting. The learning advantages of different models complement each other, and the prediction biases of a single model can be offset by model fusion, thereby improving the overall prediction accuracy.

[0064] Specifically, the linear combination model uses Random Forest, GBM, and SVR as base models and is constructed using a linear fusion method. The core of this method is to learn the optimal linear weighting coefficients to weight and integrate the prediction results of the three base models. First, the modeling dataset is split into training and test sets at a ratio of 80% and 20%, respectively. Random Forest, GBM, and SVR are trained on each set to obtain the predicted yeast cell count sequences for the training set. Using the predictions of the three base models as input features and the actual yeast cell count as the target value, the optimal weighting coefficients are learned through linear regression to satisfy the linear fusion formula. The learning of the weighting coefficients aims to minimize the error between the fusion result and the actual value, giving higher weights to base models with better prediction performance and smaller biases, while weakening the influence of base models with larger biases. This results in the overall prediction result of the linear combination model. This fusion method is a single-layer shallow fusion, only weighting the final prediction results of the base models without deep reconstruction of data features. It is simple to operate and can achieve basic accuracy improvement.

[0065] The stacked combined model is a two-layer cascaded deep fusion. The first layer uses XGBoost, Random Forest, LightGBM, and SVR as base models, and the second layer uses Ridge Regression as the meta-model. The core is to reconstruct features from the original data using the base models, and then use the meta-model to perform secondary learning and prediction on the reconstructed features. The modeling dataset is split into training and testing sets, and the four base models (XGBoost, Random Forest, LightGBM, and SVR) are trained separately to optimize the parameters of each model. Using the four trained base models, cross-validation prediction is performed on the training set to obtain the predicted value of each sample under the four base models. These four predicted values ​​are used as new feature dimensions, combined with or directly replacing the original features to form a reconstructed feature set. This process transforms the original physicochemical / environmental indicators of the fermentation mash into features from the perspective of base model prediction, uncovering deep correlations in the original features that were not captured by a single model. Using the reconstructed feature set obtained from the first layer as the input independent variable and the actual yeast count as the target dependent variable, a ridge regression meta-model is trained. Ridge regression is a linear regression model with L2 regularization, which can effectively solve the multicollinearity problem in the reconstructed feature set (the predicted values ​​of the four base models may have feature redundancy). By using regularization constraint coefficients, overfitting of the meta-model is avoided, improving the stability of the fusion model. In actual prediction, the real-time indicators of the fermentation mash are first input into the four base models to obtain the predicted values ​​of the four base models. Then, these predicted values ​​are input into the ridge regression meta-model, which outputs the final predicted value of the yeast count, achieving a two-layer optimization of feature extraction from the base models and comprehensive prediction from the meta-model.

[0066] In this embodiment, a linear combination model is obtained by linearly fusing the random forest model, the gradient boosting tree model, and the support vector regression model. The extreme gradient boosting model, the random forest model, the lightweight gradient boosting tree model, and the support vector regression model are used as the first layer base model, and the ridge regression model is used as the second layer meta model to construct a stacked combination model. This can improve the generalization ability of the model and thus improve the prediction accuracy of yeast cell count.

[0067] In an exemplary embodiment, the step of obtaining model evaluation parameters of a candidate prediction model includes: obtaining the model prediction value of the candidate prediction model; obtaining the residual sum of squares and the total sum of squares between the model prediction value and the true values ​​of the samples corresponding to the training samples, and obtaining a first evaluation index based on the residual sum of squares and the total sum of squares; using the root mean square error between the model prediction value and the true values ​​of the samples as a second evaluation index, and using the first evaluation index and the second evaluation index as model evaluation parameters of the candidate prediction model.

[0068] Optionally, the test set of the modeling dataset is input into the trained candidate prediction model, and the model outputs the model prediction value corresponding to the yeast count in the fermentation mash. The test set consists of independent data that did not participate in model training during modeling, and the true values ​​of the corresponding yeast count samples are known data. Calculating evaluation parameters based on the predicted and true values ​​of the test set avoids evaluation bias caused by model overfitting, ensuring the objectivity and reliability of the evaluation results. The first evaluation index is the coefficient of determination R², derived by calculating the residual sum of squares (RSS) and total sum of squares (TSS). It primarily reflects the proportion of yeast count variation that the model can explain to the total variation, and its calculation formula is as follows:

[0069]

[0070] Wherein, RSS is the sum of squares of the differences between the model's predicted values ​​and the actual values, reflecting the unexplained variance in the model, and its calculation formula is:

[0071]

[0072] in, It is the actual value. is the model prediction value, and n is the sample size.

[0073] The TSS is the sum of squared differences between the true value and the mean, reflecting the total variation of the response variable. Its calculation formula is as follows:

[0074]

[0075] in, It is the mean of the response variable.

[0076] The second evaluation metric is the root mean square error (RMSE), which is calculated directly based on the deviation between the model's predicted values ​​and the actual sample values. It primarily reflects the average deviation of the model's predicted values ​​from the actual values, and the average magnitude of this deviation. A value closer to 0 indicates a better model. The calculation formula is as follows:

[0077]

[0078] In this embodiment, by obtaining the model prediction value of the candidate prediction model, obtaining the residual sum of squares and the total sum of squares between the model prediction value and the sample true value corresponding to the training sample, and obtaining the first evaluation index based on the residual sum of squares and the total sum of squares, and using the root mean square error between the model prediction value and the sample true value as the second evaluation index, and using the first evaluation index and the second evaluation index as the model evaluation parameters of the candidate prediction model, the model performance can be accurately quantified, and the objectivity and accuracy of the model evaluation can be improved.

[0079] In an exemplary embodiment, the step of determining the target prediction model from candidate prediction models based on model evaluation parameters includes: using the candidate prediction model corresponding to the first evaluation index exceeding the index threshold as a reference prediction model; and using the reference prediction model corresponding to the second evaluation index being the lowest as the target prediction model.

[0080] Optionally, the first evaluation index, R², reflects the model's explanatory power and goodness of fit for yeast cell count variation, ranging from 0 to 1. A value closer to 1 indicates a more comprehensive understanding of the correlation between fermentation indicators and yeast cell count. Considering the actual production needs of Maotai-flavor liquor's stacking fermentation, a threshold index is set as the core criterion for model qualification to ensure the model possesses basic practical value. The R² values ​​of all candidate prediction models are compared with the preset threshold. Models with R² values ​​below the threshold are eliminated, and only candidate models with R² values ​​exceeding the threshold are listed as reference prediction models. Models with poor fit and inability to effectively explain fermentation data patterns are excluded, ensuring that subsequent selected models all possess basic predictive reliability and avoiding the inclusion of models with no practical value in the final selection.

[0081] Furthermore, the second evaluation index, RMSE, reflects the average deviation between the model's predicted values ​​and the actual values. It is an absolute indicator of the model's actual prediction accuracy. The closer its value is to 0, the smaller the deviation between the model's individual prediction results and the actual detection results, and the higher its guiding value for production. After screening using the R² threshold, all reference prediction models have met the basic requirements for good fit. At this point, the core difference between the models lies in the actual prediction accuracy. Therefore, using RMSE as the core selection index is reasonable. For all the selected reference prediction models, their RMSE values ​​are compared, and the reference prediction model with the lowest RMSE value is selected as the final target prediction model. While ensuring the model's good fit, the prediction accuracy is maximized, so that the final determined model can both capture the inherent laws of the fermentation process and output prediction results with the smallest deviation, perfectly meeting the needs of accurate and rapid prediction of yeast count in the production of Maotai-flavor liquor.

[0082] For example, 176 modeling indicators, totaling 1760 indicators, including acidity, reducing sugar, moisture, starch, yeast count, top temperature, middle temperature, bottom temperature, overall temperature, and stacking time, were selected. These indicators were then predicted using various candidate prediction models. The resulting comparison diagram between the predicted and actual values ​​is shown below. Figure 4-6 As shown. By Figure 4 It can be seen that the R² of the random forest model for predicting the number of yeast cells in stacked fermented mash is below 0.8, indicating a poor fit. Figure 5 It can be seen that the linear combination model improves the R² for predicting the number of yeast cells in stacked fermented mash, but it is still below 0.8, indicating an unsatisfactory fit. Figure 6 It can be seen that the stacked combination model significantly improves the R² of predicting the number of yeast cells in stacked fermented mash, has a good fitting effect, and the stacked combination model also has the lowest RMSE value.

[0083] In this embodiment, by using the candidate prediction model corresponding to the first evaluation index exceeding the index threshold as the reference prediction model, and the reference prediction model corresponding to the lowest second evaluation index as the target prediction model, the model fitting degree and model prediction accuracy can be improved, adapting to actual production needs, thereby improving the accuracy of yeast quantity prediction.

[0084] In an exemplary embodiment, the method further includes: obtaining a target prediction value obtained by predicting the number of yeast cells in the fermentation mash based on a target prediction model; determining the current fermentation state based on the target prediction value; and obtaining production control instructions based on the current fermentation state.

[0085] Optionally, yeast is a core functional microorganism in the fermentation of Maotai-flavor liquor, promoting the transition from saccharification to fermentation. The dynamic changes in its quantity directly reflect the fermentation process, microenvironmental stability, and fermentation efficiency of the saccharification pile, and there is a clear quantitative correlation between the two. The target predicted value of yeast quantity output by the target prediction model is precisely matched with a preset process threshold range to promptly reflect the fermentation status of the saccharification pile, thereby generating production control instructions to guide the production process.

[0086] For example, 20 samples of mash from different time points during the stacking process of Maotai-flavor liquor were collected, along with their corresponding top temperature, stacking time, reducing sugar, moisture, overall temperature, starch content, mid-saccharification temperature, acidity, and bottom temperature. These data were then imported into a stacking combination model to predict the number of yeast cells in the mash. The results are shown in Table 1. The average absolute error between the predicted and actual yeast cell counts for the 20 samples was 0.32, with 95% of the predicted values ​​being on the same order of magnitude as the actual values. Overall, the prediction of the number of yeast cells in the mash during the stacking process of Maotai-flavor liquor has good accuracy.

[0087] Table 1. Prediction results of yeast count in fermented mash during the stacking process.

[0088]

[0089] In one exemplary embodiment, such as Figure 7 As shown, a method for predicting the number of yeast cells in fermented mash is provided. The method includes the following steps:

[0090] (1) Sample database construction: Obtain mixed mash samples and extract the sample physicochemical indicators, sample environmental indicators and sample yeast count of the mixed mash samples; the mixed mash samples include mash samples from multiple locations on the surface and center of the saccharification pile; the sample database is constructed with the sample physicochemical indicators and sample environmental indicators as independent variables and the sample yeast count as dependent variable.

[0091] (2) Candidate prediction model training: Training samples and test samples are obtained from the sample database, and candidate prediction models are trained using the training samples respectively; the candidate prediction models include single prediction models and combined prediction models; the combined prediction models include linear combination models and stacked combination models. Among them, the single prediction models include extreme gradient boosting models, random forest models, gradient boosting tree models, and support vector regression models; the construction process of the combined prediction models includes: linearly fusing the random forest model, gradient boosting tree model, and support vector regression model to obtain a linear combination model; using the extreme gradient boosting model, random forest model, lightweight gradient boosting tree model, and support vector regression model as the first layer base model and the ridge regression model as the second layer meta-model, a stacked combination model is constructed; the second layer meta-model uses the output data of the first layer base model as input data.

[0092] (3) Target prediction model screening: Under the condition of training stopping, obtain the model prediction value of the candidate prediction model; obtain the residual sum of squares and total sum of squares between the model prediction value and the sample true value corresponding to the training sample, and obtain the first evaluation index based on the residual sum of squares and total sum of squares; take the root mean square error between the model prediction value and the sample true value as the second evaluation index, and take the first evaluation index and the second evaluation index as the model evaluation parameters of the candidate prediction model; take the candidate prediction model corresponding to the first evaluation index exceeding the index threshold as the reference prediction model; take the reference prediction model corresponding to the lowest second evaluation index as the target prediction model.

[0093] (4) Yeast quantity prediction: Predict the yeast quantity of fermentation mash based on the target prediction model; obtain the target prediction value obtained by predicting the yeast quantity of fermentation mash based on the target prediction model, determine the current fermentation state based on the target prediction value; obtain production control instructions based on the current fermentation state.

[0094] In this embodiment, by acquiring mixed fermentation mash samples and constructing a sample database based on these samples, and under the condition that the training stops, the model evaluation parameters of candidate prediction models are obtained. Based on these model evaluation parameters, a target prediction model is determined from the candidate prediction models. This process enables real-time acquisition of the number of yeast cells during fermentation, promptly reflecting the fermentation status of the saccharification pile, improving the model prediction accuracy, and thus enhancing the accuracy of the prediction results.

[0095] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0096] Based on the same inventive concept, this application also provides a yeast quantity prediction device for implementing the yeast quantity prediction method for fermented mash mentioned above. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more yeast quantity prediction device embodiments provided below can be found in the limitations of the yeast quantity prediction method for fermented mash mentioned above, and will not be repeated here.

[0097] In one exemplary embodiment, such as Figure 8 As shown, a device for predicting the number of yeast cells in fermented mash is provided, comprising: a sample acquisition module 10, a model training module 20, a model screening module 30, and a number prediction module 40, wherein:

[0098] The sample acquisition module 10 is used to acquire mixed mash samples and build a sample database based on the mixed mash samples.

[0099] The model training module 20 is used to obtain training samples and test samples from the sample database, and to train the candidate prediction models using the training samples respectively; the candidate prediction models include single prediction models and combined prediction models; the combined prediction models include linear combination models and stacked combination models.

[0100] The model selection module 30 is used to obtain the model evaluation parameters of the candidate prediction models when the training stopping condition is met, and to determine the target prediction model from the candidate prediction models based on the model evaluation parameters.

[0101] The quantity prediction module 40 is used to predict the quantity of yeast in the fermentation mash based on the target prediction model.

[0102] In an exemplary embodiment, the sample acquisition module 10 is further used to extract the sample physicochemical indicators, sample environmental indicators, and sample yeast count of the mixed mash samples; the mixed mash samples include mash samples from multiple locations on the surface and center of the saccharification pile; a sample database is constructed using the sample physicochemical indicators and sample environmental indicators as independent variables and the sample yeast count as the dependent variable.

[0103] In an exemplary embodiment, a single prediction model includes an extreme gradient boosting model, a random forest model, a gradient boosting tree model, and a support vector regression model; the model training module 20 is further used to linearly fuse the random forest model, the gradient boosting tree model, and the support vector regression model to obtain a linear combination model; a stacked combination model is constructed using the extreme gradient boosting model, the random forest model, the lightweight gradient boosting tree model, and the support vector regression model as the first layer base model and the ridge regression model as the second layer meta-model; the second layer meta-model uses the output data of the first layer base model as input data.

[0104] In an exemplary embodiment, the model screening module 30 is further configured to obtain the model prediction value of the candidate prediction model; obtain the residual sum of squares and the total sum of squares between the model prediction value and the sample true value corresponding to the training sample, and obtain a first evaluation index based on the residual sum of squares and the total sum of squares; use the root mean square error between the model prediction value and the sample true value as a second evaluation index, and use the first evaluation index and the second evaluation index as model evaluation parameters of the candidate prediction model.

[0105] In an exemplary embodiment, the model screening module 30 is further configured to use the candidate prediction model corresponding to the first evaluation index exceeding the index threshold as the reference prediction model; and use the reference prediction model corresponding to the second evaluation index being the lowest as the target prediction model.

[0106] In an exemplary embodiment, the quantity prediction module 40 is further configured to obtain the target prediction value obtained by predicting the number of yeast cells in the mash based on the target prediction model, determine the current fermentation state based on the target prediction value, and obtain production control instructions based on the current fermentation state.

[0107] Each module in the aforementioned yeast count prediction device for fermented mash can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.

[0108] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 9As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When executed by the processor, the computer program implements a method for predicting the number of yeast cells in fermented mash. The display unit is used to form a visually visible image and can be a display screen, projection device, or virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0109] Those skilled in the art will understand that Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0110] 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 perform the following steps: acquiring mixed mash samples and constructing a sample database based on the mixed mash samples; acquiring training samples and test samples from the sample database, and training candidate prediction models using the training samples respectively; the candidate prediction models include single prediction models and combined prediction models; the combined prediction models include linear combination models and stacked combination models; when the training stopping condition is met, acquiring model evaluation parameters of the candidate prediction models, and determining a target prediction model from the candidate prediction models based on the model evaluation parameters; and predicting the number of yeast cells in the mash based on the target prediction model.

[0111] In one embodiment, the process of a processor executing a computer program involves constructing a sample database based on mixed mash samples, including: extracting physicochemical indicators, environmental indicators, and yeast counts of the mixed mash samples; the mixed mash samples include mash samples from multiple locations on the surface and center of the saccharification pile; and constructing the sample database using the physicochemical and environmental indicators as independent variables and the yeast count as the dependent variable.

[0112] In one embodiment, a single prediction model includes an extreme gradient boosting model, a random forest model, a gradient boosting tree model, and a support vector regression model; the process of constructing a combined prediction model involved when the processor executes the computer program includes: linearly fusing the random forest model, the gradient boosting tree model, and the support vector regression model to obtain a linear combined model; constructing a stacked combined model using the extreme gradient boosting model, the random forest model, the lightweight gradient boosting tree model, and the support vector regression model as the first-layer base model and the ridge regression model as the second-layer meta-model; the second-layer meta-model uses the output data of the first-layer base model as input data.

[0113] In one embodiment, the process of obtaining model evaluation parameters for a candidate prediction model when the processor executes a computer program includes: obtaining the model prediction value of the candidate prediction model; obtaining the residual sum of squares and the total sum of squares between the model prediction value and the actual values ​​of the training samples, and obtaining a first evaluation index based on the residual sum of squares and the total sum of squares; using the root mean square error between the model prediction value and the actual values ​​of the samples as a second evaluation index, and using the first evaluation index and the second evaluation index as model evaluation parameters for the candidate prediction model.

[0114] In one embodiment, the process of determining a target prediction model from candidate prediction models based on model evaluation parameters when the processor executes a computer program includes: using the candidate prediction model corresponding to a first evaluation index exceeding an index threshold as a reference prediction model; and using the reference prediction model corresponding to the lowest second evaluation index as the target prediction model.

[0115] In one embodiment, when the processor executes the computer program, it further performs the following steps: obtaining a target prediction value obtained by predicting the number of yeast cells in the fermentation mash based on a target prediction model; determining the current fermentation state based on the target prediction value; and obtaining production control instructions based on the current fermentation state.

[0116] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.

[0117] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0118] 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 a computer program instructing related hardware. 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 memory 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). 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, artificial intelligence (AI) processors, etc., and are not limited to these.

[0119] 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 application.

[0120] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for predicting the number of yeast cells in fermented mash, characterized in that, The method includes: Obtain mixed mash samples and construct a sample database based on the mixed mash samples; Training samples and test samples are obtained from the sample database, and candidate prediction models are trained using the training samples respectively; the candidate prediction models include single prediction models and combined prediction models; the combined prediction models include linear combination models and stacked combination models; If the training stopping condition is met, obtain the model evaluation parameters of the candidate prediction models, and determine the target prediction model from the candidate prediction models based on the model evaluation parameters. The number of yeast cells in the fermentation mash is predicted based on the target prediction model.

2. The method according to claim 1, characterized in that, The construction of the sample database based on the mixed mash sample includes: Extract the physicochemical indicators, environmental indicators, and yeast count of the mixed mash samples; the mixed mash samples include mash samples from multiple locations on the surface and center of the saccharification pile; A sample database was constructed using the physicochemical and environmental indicators of the samples as independent variables and the number of yeast cells in the samples as the dependent variable.

3. The method according to claim 1, characterized in that, The single prediction model includes an extreme gradient boosting model, a random forest model, a gradient boosting tree model, and a support vector regression model; the construction process of the combined prediction model includes: The random forest model, the gradient boosting tree model, and the support vector regression model are linearly fused to obtain a linear combination model; A stacked combined model is constructed using the extreme gradient boosting model, the random forest model, the lightweight gradient boosting tree model, and the support vector regression model as the first layer base model and the ridge regression model as the second layer meta-model; the second layer meta-model uses the output data of the first layer base model as input data.

4. The method according to claim 1, characterized in that, The step of obtaining the model evaluation parameters of the candidate prediction model includes: Obtain the model prediction value of the candidate prediction model; Obtain the residual sum of squares and the total sum of squares between the model's predicted values ​​and the actual values ​​of the corresponding training samples, and obtain a first evaluation index based on the residual sum of squares and the total sum of squares; The root mean square error between the model's predicted value and the sample's true value is used as the second evaluation index, and the first evaluation index and the second evaluation index are used as the model evaluation parameters of the candidate prediction model.

5. The method according to claim 4, characterized in that, The step of determining the target prediction model from the candidate prediction models based on the model evaluation parameters includes: The candidate prediction model corresponding to the first evaluation index exceeding the index threshold is used as the reference prediction model. The reference prediction model corresponding to the lowest value of the second evaluation index is used as the target prediction model.

6. The method according to claim 1, characterized in that, The method further includes: Obtain the target prediction value obtained by predicting the number of yeast cells in the fermentation mash based on the target prediction model, and determine the current fermentation state based on the target prediction value; Production control instructions are obtained based on the current fermentation status.

7. A device for predicting the number of yeast cells in fermented mash, characterized in that, The device includes: The sample acquisition module is used to acquire mixed mash samples and construct a sample database based on the mixed mash samples; The model training module is used to obtain training samples and test samples from the sample database, and to train the candidate prediction models using the training samples respectively; the candidate prediction models include single prediction models and combined prediction models; the combined prediction models include linear combination models and stacked combination models; The model selection module is used to obtain the model evaluation parameters of the candidate prediction models when the training stopping condition is met, and to determine the target prediction model from the candidate prediction models based on the model evaluation parameters. The quantity prediction module is used to predict the quantity of yeast in the fermentation mash based on the target prediction model.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.