A method, medium, and system for optimizing the secondary fermentation process of coffee.

By establishing a quantitative correlation model and neural network mapping for coffee secondary fermentation, the problem of empirical parameter adjustment in existing technologies has been solved, thereby improving the stability and controllability of coffee quality.

CN119446304BActive Publication Date: 2025-10-31LINCANG YUNJIA COFFEE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411471788.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-22
Publication Date
2025-10-31
Estimated Expiration
2044-10-22

AI Technical Summary

Technical Problem

The parameter adjustments in the existing coffee secondary fermentation process are too empirical, making it difficult to guarantee the stability of product quality.

Method used

By acquiring full-process data from small-scale experimental production of coffee secondary fermentation, a quantitative correlation model between fermentation parameters, fermentation state, and coffee quality was established. Using Bayesian networks and time series analysis, a multi-input multi-output embedded deep neural network model was trained. Combined with knowledge distillation and inverse neural networks, the mapping from target quality parameters to optimal initial fermentation parameters was realized.

Benefits of technology

It enables precise control of the fermentation process, improves the stability and controllability of product quality, and provides data support for real-time process adjustment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119446304B_ABST
    Figure CN119446304B_ABST
Patent Text Reader

Abstract

This invention provides a method, medium, and system for optimizing the secondary fermentation process of coffee, belonging to the field of coffee secondary fermentation technology. The method includes: First, acquiring full-process data from a small-scale experimental production. Based on this data, time-series models of various fermentation parameters and dynamic models of state parameters are established, and correlation mappings are established with quality parameters to construct a multi-input, multi-output embedded deep neural network prediction model. To enhance the model's generalization ability, data augmentation and knowledge distillation techniques are used to further optimize and obtain a second prediction model. Next, based on the second prediction model, a reverse neural network model is constructed to achieve a reverse mapping from the target quality to the initial fermentation parameters. Finally, using the reverse model, ideal quality parameters are input to inversely obtain the optimal initial parameters for secondary fermentation. Simultaneously, these initial parameters are input into the prediction model to obtain the trend of fermentation parameter changes at each time point, providing a basis for process control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of coffee secondary fermentation technology, specifically, it relates to a method, medium and system for optimizing the coffee secondary fermentation process. Background Technology

[0002] Traditional coffee making involves multiple stages, including roasting, grinding, and extraction, each significantly impacting the final coffee quality. Secondary fermentation is one of the key steps in coffee production. During secondary fermentation, microorganisms such as yeast and lactic acid bacteria transform the organic matter in the coffee beans, producing metabolic byproducts that affect quality factors such as flavor, acidity, and sweetness. Therefore, precisely controlling fermentation parameters to achieve ideal coffee quality has always been a key focus in the industry.

[0003] Currently, the industry mainly uses an experience-based parameter setting method to control the secondary fermentation process of coffee. This involves summarizing a set of initial fermentation parameters through years of production practice and then making empirical adjustments based on these parameters. Although this method is simple and easy to implement, the parameter adjustments are prone to being too experience-based and make it difficult to guarantee the stability of product quality. Summary of the Invention

[0004] In view of this, the present invention provides a method, medium and system for optimizing the secondary fermentation process of coffee, which can solve the problem that the parameter adjustment of the prior art is too empirical and it is difficult to guarantee the stability of product quality.

[0005] This invention is implemented as follows:

[0006] The first aspect of the present invention provides a method for optimizing a coffee secondary fermentation process, comprising the following steps:

[0007] S10. Obtain full-process data of small-scale experimental production of coffee secondary fermentation, including initial fermentation parameters, fermentation parameters and fermentation status parameters at each collection time, and coffee quality parameters after the secondary fermentation production is completed.

[0008] S20. Based on the data from the entire process, establish a time series model for each fermentation parameter and a dynamic change model for each fermentation state parameter.

[0009] S30. Using Bayesian networks and time series analysis, establish time series models for each fermentation parameter and dynamic change models for each fermentation state parameter, and establish a correlation mapping between these models and each coffee quality parameter.

[0010] S40. Repeat steps S10-S30 to obtain multiple sets of full-process data and their corresponding association mappings. Based on the multiple sets of association mappings, train a multi-input multi-output embedded deep neural network model to obtain a first prediction model, which is used to predict coffee quality parameters under different combinations of fermentation parameters and state parameters. The first prediction model embeds a mathematical model of fermentation parameter changes.

[0011] S50. Expand the multiple sets of full-process data using data augmentation technology to generate more diverse virtual samples, thereby enhancing the generalization ability of the model; use knowledge distillation technology to use the first prediction model as the teacher model to train a smaller and more efficient student model.

[0012] S60. Transfer the knowledge from the teacher model to the student model to obtain the second prediction model;

[0013] S70. Based on the second prediction model, a reverse neural network is constructed. The backpropagation algorithm and gradient descent method are used to train the network to achieve the mapping from the target coffee quality parameters to the initial fermentation parameters, thus obtaining the third model.

[0014] S80. Using preset ideal coffee quality parameters as input, the third model performs reverse calculations to obtain the optimal initial fermentation parameters for the secondary coffee fermentation and output them.

[0015] S90. Input the optimal initial fermentation parameters of coffee secondary fermentation into the mathematical model of fermentation parameter change in the first prediction model to obtain fermentation parameters at multiple sampling times and output them as a reference for adjusting fermentation parameters in the coffee secondary fermentation process.

[0016] Based on the above technical solution, the method for optimizing the coffee secondary fermentation process of the present invention can be further improved as follows:

[0017] The fermentation parameters include adjustable parameters and non-adjustable parameters. The adjustable parameters are specifically temperature, stirring speed, dissolved oxygen content, and fermenter pressure. The non-adjustable parameters are specifically pH value, fermentation broth specific gravity, conductivity, redox potential, carbon dioxide concentration, ammonia nitrogen concentration, total nitrogen content, free amino nitrogen content, water activity, and fermentation broth color.

[0018] Furthermore, the structure of the multi-input multi-output embedded deep neural network model specifically includes a mathematical model of fermentation parameter changes, a branch network for the influence of adjustable parameters on quality, a branch network for the influence of non-adjustable parameters on quality, a branch network for the influence of long-term parameters, a branch network for the influence of short-term parameters, and a fusion network.

[0019] Furthermore, the mathematical model for fermentation parameter changes is used to predict the dynamic changes of each parameter during fermentation. The input is the initial fermentation parameters and time, and the output is the predicted value of the fermentation parameters at each time point.

[0020] Furthermore, the adjustable parameter quality influence branch network is used to simulate the influence of adjustable parameters on coffee quality. The input is the time series data of the adjustable parameters, and the output is the degree of influence of each quality parameter. The structure is a combination of multi-layer convolutional neural network and long short-term memory network.

[0021] Furthermore, the non-adjustable parameter quality influence branch network is used to simulate the influence of non-adjustable parameters on coffee quality. The input is the time series data of the non-adjustable parameters, and the output is the degree of influence of each quality parameter. The structure is a combination of multilayer perceptron and attention mechanism.

[0022] Furthermore, the long-term parameter influence branch network is used to capture the impact of long-term variation trends of fermentation parameters on quality. The input is long-term span data of all fermentation parameters, and the output is long-term influence factors. The structure is a Transformer-based time series analysis network.

[0023] Furthermore, the short-term parameter influence branch network is used to capture the impact of short-term fluctuations in fermentation parameters on quality. The input is short-time window data of all fermentation parameters, and the output is short-term influence factors. The structure is a recurrent neural network based on gated recurrent units.

[0024] The fusion network is used to integrate the outputs of each branch network and generate the final quality prediction result. The input is the output of each branch network, and the output is the predicted coffee quality parameters. The structure is a combination of a multi-layer fully connected network and a softmax layer.

[0025] Specifically, step S10 includes acquiring data from the entire process of a small-scale experimental production of coffee secondary fermentation, including initial fermentation parameters, fermentation parameters at each sampling time, fermentation state parameters, and coffee quality parameters after the secondary fermentation process. The sampling times include sequential time sampling times and key stage sampling times. Sequential time sampling times involve collecting data every 2 hours, while key stage sampling times involve collecting data at key moments such as the start of fermentation, the first drop in pH to its lowest point, the peak ethanol content, and the end of fermentation. The collected fermentation parameters include temperature, pH, dissolved oxygen content, stirring speed, fermentation tank pressure, fermentation broth specific gravity, conductivity, redox potential, carbon dioxide concentration, ammonia nitrogen concentration, total nitrogen content, free amino nitrogen content, water activity, and fermentation broth color. Fermentation state parameters include ethanol content, organic acid content, sugar content, microbial quantity, and CO2 generation rate. Coffee quality parameters include flavor complexity, acidity, sweetness, bitterness, mouthfeel, and aroma intensity, obtained through a combination of sensory evaluation and instrumental analysis.

[0026] Specifically, step S20 includes: establishing time-series models for each fermentation parameter and dynamic change models for each fermentation state parameter based on the entire process data. For the time-series models of the fermentation parameters, time-series analysis methods such as the Autoregressive Moving Average (ARIMA) model are used for modeling; for the dynamic change models of the fermentation state parameters, mathematical modeling methods such as differential equations or difference equations are used to describe their trends over time. The establishment of these models helps to more accurately describe the dynamic characteristics of each parameter during the fermentation process.

[0027] Specifically, step S30 includes: using Bayesian networks and time series analysis to establish a time series model for each fermentation parameter and a dynamic change model for each fermentation state parameter, as well as a correlation mapping between these models and each coffee quality parameter. Bayesian networks can effectively capture the conditional dependencies between variables, while time series analysis can reflect the changing patterns of parameters over time. Through this modeling method, a quantitative relationship between fermentation process parameters and the final coffee quality can be obtained.

[0028] Specifically, step S40 includes repeating steps S10-S30 to obtain multiple sets of full-process data and their corresponding correlation mappings. Based on these correlation mappings, a multi-input multi-output embedded deep neural network model is trained to obtain a first prediction model. This first prediction model can be used to predict coffee quality parameters under different combinations of fermentation parameters and state parameters, and its structure also embeds a mathematical model of fermentation parameter changes.

[0029] Specifically, step S50 includes: first, using data augmentation techniques to expand the multiple sets of full-process data obtained in step S40 to generate more diverse virtual samples; then, employing knowledge distillation techniques to train a smaller, more efficient student model using the first prediction model as the teacher model. Knowledge distillation can effectively transfer knowledge from the teacher model to the student model, improving the predictive performance of the student model.

[0030] Specifically, step S60 includes: transferring the knowledge from the teacher model in step S50 to the student model using knowledge distillation technology to obtain a second prediction model. This second prediction model maintains high prediction accuracy while having lower model complexity and higher computational efficiency, making it easier to deploy in actual coffee production systems.

[0031] Specifically, step S70 includes: constructing an inverse neural network based on the second prediction model. This inverse network is trained using backpropagation and gradient descent, with the goal of establishing a mapping relationship from target coffee quality parameters to initial fermentation parameters. By training this inverse network, a third model can be obtained, used to predict the optimal initial fermentation parameters for a given target quality parameter.

[0032] Specifically, step S80 includes: using preset ideal coffee quality parameters as input, performing reverse calculations through the third model trained in step S70 to obtain the optimal initial fermentation parameters for the secondary coffee fermentation. Step S90 includes: inputting the optimal initial fermentation parameters obtained in step S80 into the fermentation parameter change mathematical model of the first prediction model in step S40 to predict the fermentation parameter values ​​at each sampling time under these optimal parameters, providing a reference for parameter adjustment in the production process.

[0033] A second aspect of the present invention provides a computer-readable storage medium storing program instructions that, when executed in a computer, perform the aforementioned method for optimizing a coffee secondary fermentation process.

[0034] A third aspect of the present invention provides a system for optimizing a coffee secondary fermentation process, wherein the system includes the aforementioned computer-readable storage medium.

[0035] Compared with existing technologies, the beneficial effects of the coffee secondary fermentation process optimization method, medium, and system provided by this invention are:

[0036] 1) Fully utilize comprehensive data from the small-scale secondary fermentation experiment of coffee. Not only were initial fermentation parameters, fermentation parameters at various time points, and state parameters collected, but also multiple quality indicators of the final product were measured. This comprehensive experimental data laid a solid foundation for subsequent analysis and modeling.

[0037] 2) A quantitative correlation model was established between fermentation parameters, fermentation state, and coffee quality. Using techniques such as Bayesian networks and time series analysis, the dynamic mapping relationships between various parameters were accurately captured, providing a basis for process optimization.

[0038] 3) A high-performance quality prediction model was trained using machine learning techniques such as deep neural networks, combined with knowledge distillation methods. This model not only has high prediction accuracy but also low model complexity, making it easy to deploy in actual production systems.

[0039] 4) Based on the prediction model, an inverse neural network was constructed to achieve a reverse mapping from target quality parameters to optimal initial fermentation parameters. This provides strong support for precise control of fermentation process parameters and continuous improvement of product quality.

[0040] 5) The optimized initial fermentation parameters are input into the dynamic change model of fermentation parameters to predict the changes of fermentation parameters at each collection time, providing data support for real-time process adjustment.

[0041] In summary, the data-driven coffee secondary fermentation process optimization method proposed in this invention fully integrates multiple advanced technologies such as experimental data analysis, machine learning, and dynamic modeling, and has the following advantages over existing methods: 1) It can more comprehensively and systematically depict the dynamic characteristics of the fermentation process; 2) It can realize reverse design from target quality to optimal initial parameters; 3) It uses intelligent optimization algorithms to continuously improve the stability and controllability of product quality, solving the problem that parameter adjustments in existing technologies are too empirical and difficult to guarantee the stability of product quality. Attached Figure Description

[0042] Figure 1 A flowchart of the method provided by the present invention;

[0043] Appendix Figure 2 A comparison chart showing the coffee quality parameters before and after optimization;

[0044] Appendix Figure 3 A comparison chart showing the key fermentation parameters before and after optimization;

[0045] Appendix Figure 4 This is a graph showing the trend of key fermentation parameters over time.

[0046] Appendix Figure 5 Radar chart of coffee quality parameters;

[0047] Appendix Figure 6 A bar chart comparing fermentation parameters before and after fermentation;

[0048] Appendix Figure 7 This is a graph showing the changes in key parameters during the fermentation process. Detailed Implementation

[0049] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.

[0050] like Figure 1 The diagram shown is a flowchart of a method for optimizing a coffee secondary fermentation process provided by the present invention. This method includes the following steps:

[0051] S10. Obtain full-process data of small-scale experimental production of coffee secondary fermentation, including initial fermentation parameters, fermentation parameters and fermentation status parameters at each collection time, and coffee quality parameters after the secondary fermentation production is completed.

[0052] S20. Based on the data from the entire process, establish a time series model for each fermentation parameter and a dynamic change model for each fermentation state parameter.

[0053] S30. Using Bayesian networks and time series analysis, establish time series models for each fermentation parameter and dynamic change models for each fermentation state parameter, and establish a correlation mapping between these models and each coffee quality parameter.

[0054] S40. Repeat steps S10-S30 to obtain multiple sets of full-process data and their corresponding association mappings. Based on the multiple sets of association mappings, train a multi-input multi-output embedded deep neural network model to obtain the first prediction model, which is used to predict coffee quality parameters under different combinations of fermentation parameters and state parameters. The first prediction model contains a mathematical model of fermentation parameter changes.

[0055] S50. Utilize data augmentation techniques to expand multiple sets of full-process data and generate more diverse virtual samples to enhance the model's generalization ability; employ knowledge distillation techniques to use the first prediction model as the teacher model to train a smaller and more efficient student model.

[0056] S60. Transfer the knowledge from the teacher model to the student model to obtain the second prediction model;

[0057] S70. Based on the second prediction model, a reverse neural network is constructed. The backpropagation algorithm and gradient descent method are used to train the network to achieve the mapping from the target coffee quality parameters to the initial fermentation parameters, thus obtaining the third model.

[0058] S80. Using preset ideal coffee quality parameters as input, the third model performs reverse calculations to obtain the optimal initial fermentation parameters for the secondary coffee fermentation and output them.

[0059] S90. Input the optimal initial fermentation parameters of coffee secondary fermentation into the mathematical model of fermentation parameter change in the first prediction model to obtain fermentation parameters at multiple sampling times and output them as a reference for adjusting fermentation parameters in the coffee secondary fermentation process.

[0060] The specific implementation methods of the above steps are described in detail below:

[0061] The specific implementation of step S10 is as follows: First, in a small-scale experimental production of coffee secondary fermentation, data samples from the entire process are systematically collected. These data include initial fermentation parameters, fermentation parameters at each collection point, fermentation state parameters, and the quality parameters of the final coffee product. The collection times for these parameters are divided into two types: one is sequential time-based collection, i.e., data is collected every 2 hours; the other is key stage collection, i.e., data is collected at key moments such as the start of fermentation, when the pH value first drops to its lowest point, when the ethanol content reaches its peak, and when fermentation ends. The collected fermentation parameters include temperature, pH value, dissolved oxygen content, stirring speed, fermentation tank pressure, fermentation broth specific gravity, conductivity, redox potential, carbon dioxide concentration, ammonia nitrogen concentration, total nitrogen content, free amino nitrogen content, water activity, and fermentation broth color. Fermentation state parameters include ethanol content, organic acid content, sugar content, microbial quantity, and CO2 generation rate. Coffee quality parameters include flavor complexity, acidity, sweetness, bitterness, mouthfeel, and aroma intensity, obtained through a combination of sensory evaluation and instrumental analysis. This comprehensive data collection lays the foundation for subsequent analysis and modeling.

[0062] The specific implementation of step S20 is as follows: Based on the full-process data obtained in step S10, a time series model for each fermentation parameter and a dynamic change model for each fermentation state parameter are established. For the time series model of the fermentation parameter, time series analysis methods such as the Autoregressive Moving Average (ARIMA) model can be used. For the dynamic change model of the fermentation state parameter, mathematical modeling methods such as differential equations or difference equations can be used to describe its changing trend over time. The establishment of these models helps to more accurately describe the dynamic characteristics of each parameter during the fermentation process.

[0063] The specific implementation of step S30 is as follows: Using Bayesian networks and time series analysis, a time series model of each fermentation parameter and a dynamic change model of each fermentation state parameter are established, along with a correlation mapping between these models and each coffee quality parameter. Bayesian networks can effectively capture the conditional dependencies between variables, while time series analysis can reflect the changing patterns of parameters over time. Through this modeling method, a quantitative relationship between fermentation process parameters and the final coffee quality can be obtained, providing a basis for further optimization.

[0064] The specific implementation of step S40 is as follows: Steps S10-S30 are repeated to obtain multiple sets of full-process data and their corresponding correlation mappings. Based on these correlation mappings, a multi-input multi-output embedded deep neural network model is trained to obtain the first prediction model. This first prediction model can be used to predict coffee quality parameters under different combinations of fermentation parameters and state parameters. The model structure also embeds a mathematical model of fermentation parameter changes, which can better capture the dynamic changes of parameters during the fermentation process.

[0065] The specific implementation of step S50 is as follows: First, data augmentation techniques are used to expand the multiple sets of full-process data obtained in step S40, generating more diverse virtual samples. This enhances the model's generalization ability. Then, knowledge distillation techniques are employed, using the first prediction model as the teacher model to train a smaller, more efficient student model. Knowledge distillation effectively transfers knowledge from the teacher model to the student model, improving the predictive performance of the student model.

[0066] The specific implementation of step S60 is as follows: using knowledge distillation technology, the knowledge from the teacher model in step S50 is transferred to the student model to obtain a second prediction model. This second prediction model maintains high prediction accuracy while having lower model complexity and higher computational efficiency, making it easier to deploy in actual coffee production systems.

[0067] The specific implementation of step S70 is as follows: Based on the second prediction model, an inverse neural network is constructed. This inverse network is trained using the backpropagation algorithm and gradient descent method, with the goal of realizing the mapping relationship from the target coffee quality parameters to the initial fermentation parameters. By training this inverse network, a third model can be obtained, which is used to predict the optimal initial fermentation parameters given the target quality parameters.

[0068] The specific implementation of step S80 is as follows: using preset ideal coffee quality parameters as input, the third model trained in step S70 is used for reverse calculation to obtain the optimal initial fermentation parameters for the secondary coffee fermentation. These optimal initial fermentation parameters can serve as a reference for the actual production process, providing a basis for process adjustment.

[0069] The specific implementation of step S90 is as follows: The optimal initial parameters for secondary coffee fermentation obtained in step S80 are input into the mathematical model of fermentation parameter changes in the first prediction model in step S40. This model can predict the fermentation parameter values ​​at each sampling time under these optimal initial parameters. These predicted fermentation parameter values ​​can provide a reference for parameter adjustment in the actual production process, which helps to achieve more refined process control.

[0070] In summary, this method for optimizing the coffee secondary fermentation process fully utilizes experimental data to establish a correlation model between fermentation parameters, fermentation state, and coffee quality. Through techniques such as training deep neural networks, knowledge distillation, and backpropagation, models for predicting product quality and optimizing initial process parameters were obtained. These models provide strong support for the refined control of the coffee secondary fermentation process, significantly improving the stability and controllability of product quality.

[0071] A second aspect of the present invention provides a computer-readable storage medium storing program instructions that, when executed in a computer, perform the aforementioned method for optimizing a coffee secondary fermentation process.

[0072] A third aspect of the present invention provides a system for optimizing a coffee secondary fermentation process, wherein the system includes the aforementioned computer-readable storage medium.

[0073] Specifically, the principle of this invention is to establish a quantitative correlation model between fermentation parameters, fermentation state, and final product quality by fully utilizing experimental data, and then perform intelligent optimization based on this model. Specifically, this method includes the following key steps:

[0074] First, in a small-scale coffee secondary fermentation experiment, the system collected data samples from the entire process. This data included initial fermentation parameters, fermentation parameters and state parameters at various time points, and multiple quality indicators of the final product. Data collection was conducted using two methods: sequential time-based collection and key stage collection. This approach allowed for both capturing the overall trend of the fermentation process and accurately identifying the parameter states at crucial moments. This comprehensive experimental data laid the foundation for subsequent analysis and modeling.

[0075] Secondly, based on the obtained experimental data, time series models for each fermentation parameter and dynamic change models for each fermentation state parameter were established. For fermentation parameters, time series analysis methods such as ARIMA were used to characterize their changes over time; for fermentation state parameters, mathematical models such as differential equations or difference equations were used to describe their dynamic characteristics. The establishment of these models helps to more accurately express the changing trends of each parameter during fermentation.

[0076] Furthermore, using Bayesian networks and time series analysis, a correlation mapping between fermentation parameters, fermentation state, and final coffee quality was established. Bayesian networks can effectively characterize the conditional dependencies between variables, while time series analysis can reflect the changing patterns of parameters over time. This modeling method yielded a quantitative relationship between fermentation process parameters and final quality, providing a basis for further optimization.

[0077] Subsequently, the steps of data collection and model building were repeated to obtain multiple sets of full-process data and their corresponding correlation mappings. Based on these correlation mappings, a multi-input multi-output embedded deep neural network model was trained as the first prediction model. This model can be used to predict coffee quality under different combinations of fermentation and state parameters. To further improve the model's performance, data augmentation and knowledge distillation techniques were employed to optimize it into a second prediction model.

[0078] Based on the second prediction model, an inverse neural network was constructed. The goal of this inverse network is to realize the mapping relationship from the target coffee quality parameters to the initial fermentation parameters. By training this inverse network, a third model was obtained, which can be used to predict the optimal initial fermentation parameters for a given target quality parameter.

[0079] Finally, using preset ideal coffee quality parameters as input, the optimal initial parameters for secondary coffee fermentation are obtained through inverse calculation using the third model. Simultaneously, these optimal initial parameters are input into the fermentation parameter dynamic change module of the first prediction model to predict the trend of fermentation parameter changes at various data collection points. These optimized initial parameters and dynamic change predictions provide a strong basis for the refined control of the actual production process.

[0080] In summary, the coffee secondary fermentation process optimization method proposed in this invention fully integrates multiple advanced technologies such as experimental data analysis, machine learning, and dynamic modeling. It can systematically characterize the dynamic features of the fermentation process, realize reverse design from target quality to optimal initial parameters, and continuously optimize process parameters, thereby significantly improving the stability and controllability of product quality.

[0081] To better understand and implement this invention, a specific embodiment 1 of the method provided in the first aspect of this invention is provided below. The steps of this embodiment 1 are described in detail as follows: First, in step S10, the entire process data of a small-scale experimental production of coffee secondary fermentation is acquired. This data includes the initial fermentation parameter p0, the fermentation parameter p(t) at each acquisition time, the fermentation state parameter s(t), and the coffee quality parameter q after the secondary fermentation production is completed. The acquisition time is divided into two types: sequential time acquisition and key stage acquisition. Sequential time acquisition involves acquiring data every Δt time interval, which can be represented as ti = t0 + iΔt, i = 0, 1, 2, ..., N. The key stage sampling is performed at the start of fermentation (t0) and when the pH value first drops to its lowest point. When the ethanol content reaches its peak At the end of fermentation (t) end Data is collected at important moments such as [dates to be filled in].

[0082] The collected fermentation parameters p(t) include temperature T(t), pH value pH(t), dissolved oxygen content DO(t), stirring speed ω(t), fermenter pressure P(t), fermentation broth specific gravity ρ(t), conductivity k(t), redox potential ORP(t), carbon dioxide concentration CO2(t), ammonia nitrogen concentration NH3(t), total nitrogen content TN(t), free amino nitrogen content FAN(t), and water activity a. w The data collected included ethanol content (EtOH), organic acid content (acid), sugar content (sugar), microbial count (microbe), and CO2 production rate (CO′2). Coffee quality parameters (q) included flavor complexity, acidity, sweetness, bitterness, mouthfeel, and aroma intensity. This comprehensive data collection laid the foundation for subsequent analysis and modeling.

[0083] In step S20, based on the full-process data obtained in step S10, each fermentation parameter p was established. i The time series model of (t), and the parameters s for each fermentation state. j A dynamic variation model of (t). For the fermentation parameter p... i For time series modeling of (t), the Autoregressive Moving Average (ARIMA) model can be used:

[0084] p i (t)=φ i,1 p i (t-1)+φ i,2 p i (t-2)+...+φ i,p p i (tp)+θ i,1 ∈(t-1)+θ i,2 ∈(t-2)+...+θ i,q ∈(tq)+∈(t);

[0085] Where, φ i,1 ,φ i,2 ,...,φ i,p It is the autoregressive coefficient, θi,1 ,θ i,2 ,...,θ i,q is the moving average coefficient, and ∈(t) is white noise. By fitting the ARIMA model, the changes in fermentation parameters over time can be described relatively accurately.

[0086] For fermentation state parameter s j Modeling the dynamic changes of ethanol content EtOH(t) during fermentation can be achieved using mathematical models such as differential equations or difference equations. Taking the dynamic changes of ethanol content EtOH(t) during fermentation as an example, it can be described by the following differential equation:

[0087]

[0088] Where, k pro It is the rate of ethanol production, k con This represents the ethanol consumption rate. By fitting this differential equation, the dynamic changes in ethanol content over time can be captured. Similarly, other fermentation state parameters can also be modeled using corresponding mathematical models.

[0089] In step S30, Bayesian networks and time series analysis were used to establish the parameters p for each fermentation parameter. i The time series model of (t) shows the parameters s for each fermentation state. j The dynamic variation model of (t) and each coffee quality parameter q k The relationship between variables is mapped. Bayesian networks can characterize the conditional dependencies between variables, and their joint probability distribution can be represented as:

[0090] P(p,s,q)=P(p)P(s|p)P(q|p,s);

[0091] Where P(p) is the prior probability distribution of fermentation parameters, P(s|p) is the conditional probability distribution of fermentation state parameters, and P(q|p,s) is the conditional probability distribution of quality parameters. By learning this Bayesian network model, a quantitative correlation mapping between fermentation parameters, fermentation state, and final coffee quality can be obtained.

[0092] In step S40, steps S10-S30 are repeated to obtain multiple sets of full-process data and their corresponding association mappings. Based on these association mappings, a multi-input multi-output embedded deep neural network model is trained to obtain the first prediction model. The model takes initial fermentation parameters p0 and time t as inputs and outputs predicted fermentation parameters at each data acquisition point. And predicted coffee quality parameters The model structure can be represented as:

[0093]

[0094] Where, f p and f q These are the fermentation parameter prediction model and the quality prediction model, θ p and θ q These are their respective model parameters. This first prediction model It can be used to predict coffee quality under different combinations of fermentation and state parameters.

[0095] In step S50, data augmentation techniques are first used to expand the multiple sets of full-process data obtained in step S40, generating more diverse virtual samples. Data augmentation can generate new samples by randomly perturbing, interpolating, or shifting the original data, thereby enhancing the model's generalization ability. Then, knowledge distillation techniques are used to transform the first prediction model... As a teacher model, it trains a smaller, more efficient student model. The objective function of knowledge distillation can be expressed as:

[0096]

[0097] in, and These are the quality prediction outputs of the teacher model and the student model, respectively. This is the training dataset. By minimizing this loss function, the knowledge from the teacher model can be effectively transferred to the student model.

[0098] In step S60, the teacher model from step S50 is transformed using the aforementioned knowledge distillation technique. Knowledge transfer to student model In the middle, the second prediction model is obtained. This second prediction model maintains high prediction accuracy while having lower model complexity and higher computational efficiency, making it easier to deploy in actual coffee production systems.

[0099] In step S70, based on the second prediction model An inverse neural network was constructed. The goal of this inverse network is to extract the target coffee quality parameter q. * The mapping relationship to the initial fermentation parameter p0. This inverse network can be represented as:

[0100] p0 = f inv (q * ;θ inv );

[0101] Where, f inv It is the inverse mapping function, θ invThese are the parameters of the inverse network. The inverse network is trained using backpropagation and gradient descent to obtain the third model. Used to predict the optimal initial fermentation parameters for a given target quality parameter.

[0102] In step S80, the preset ideal coffee quality parameter q is used. * As input, the third model trained in step S70 is used. By performing reverse calculations, the optimal initial fermentation parameters for the secondary fermentation of coffee can be obtained. These optimal initial fermentation parameters can serve as a reference for the actual production process, providing a basis for process adjustments.

[0103] In step S90, the optimal initial fermentation parameters obtained in step S80 are... Input into the first prediction model in step S40 Mathematical model of fermentation parameter changes f p The model is able to predict the fermentation parameter values ​​at each sampling time point under these optimal initial parameters. These predicted fermentation parameter values ​​can provide a reference for parameter adjustments in actual production processes, helping to achieve more refined process control.

[0104] To further understand and implement this invention, a specific application scenario is provided below as Example 2: A coffee company, in order to further improve the quality control level of its coffee secondary fermentation process, decided to adopt the data-driven coffee secondary fermentation process optimization method proposed in this invention. The company selected a secondary fermentation pilot laboratory in its production base and conducted comprehensive data collection and analysis of the fermentation process.

[0105] First, the company collected data samples from the entire process during a small-scale experimental production of coffee undergoing secondary fermentation. Specifically, this included:

[0106] 1) Initial fermentation parameters p0: Temperature T0 = 40℃, pH value pH0 = 5.2, dissolved oxygen content DO0 = 6.5 mg / L, stirring speed ω0 = 120 rpm, fermenter pressure P0 = 1.2 bar, fermentation broth specific gravity ρ0 = 1.045, conductivity κ0 = 3.2 mS / cm, oxidation-reduction potential ORP0 = 220 mV, carbon dioxide concentration ammonia nitrogen concentration Total nitrogen content TN0 = 0.35 g / L, free amino nitrogen content FAN0 = 0.08 g / L, water activity a w,0 =0.95, Fermentation liquid color color0=brown.

[0107] 2) Fermentation parameters p(t) and fermentation state parameters s(t) collected over time: Data was collected every 2 hours, for a total of 17 time points, i.e., t i =2ih, i = 0, 1, ..., 16. Fermentation parameters include temperature T(t i pH value (t) i Dissolved oxygen content (DO(t)) i ), stirring speed ω(t) i ), fermenter pressure P(t) i ), fermentation broth specific gravity ρ(t) i ), conductivity κ(t) i ), redox potential (ORP(t)) i ), carbon dioxide concentration CO2(t) i ), ammonia nitrogen concentration NH3(t) i ), total nitrogen content TN (t) i ), free amino nitrogen content FAN(t) i ), water activity a w (t i ), fermentation broth color (t) i Fermentation state parameters include ethanol content (EtOH, t); i ), organic acid content (t) i ), sugar content sugar(t i ), Microbial quantity microbe(t) i CO2 generation rate CO2′(t) i These data are shown in Table 1 below:

[0108] Table 1. Data collected

[0109]

[0110] 3) Collection of fermentation parameters and fermentation state parameters at key stages:

[0111] At the start of fermentation: the initial parameters p0 and s0 are the same as described above.

[0112] When the pH value first drops to its lowest point

[0113] When the ethanol content reaches its peak

[0114] At the end of fermentation (t) end =34h):EtOH(t end ) = 2.8%, acid(t) end = 6.5 g / L;

[0115] 4) Coffee quality parameters q after secondary fermentation: flavor complexity = 4.2, acidity = 4.0, sweetness = 3.5, bitterness = 3.8, mouthfeel = 4.1, aroma intensity = 4.3.

[0116] With this comprehensive experimental data, we began to analyze, model, and optimize according to the method of this invention.

[0117] First, based on the fermentation and state parameter data collected over a time series, time-series models and dynamic change models for each parameter were established. Taking temperature T(t) and ethanol content EtOH(t) as examples:

[0118] The time series model of temperature T(t) can be represented by the ARIMA(2,1,1) model:

[0119] T(t)=1.25T(t-1)-0.32T(t-2)+0.15∈(t-1)+∈(t);

[0120] Where ∈(t) represents white noise. This model can describe the temperature variation over time quite well.

[0121] The dynamic change of ethanol content EtOH(t) can be described by the following differential equation:

[0122]

[0123] Where 0.12 represents the ethanol production rate and 0.045 represents the ethanol consumption rate. By fitting this differential equation, the dynamic change characteristics of ethanol content over time were obtained.

[0124] Similarly, time series models and dynamic change models of other fermentation parameters and state parameters were also established.

[0125] Next, using Bayesian networks and time series analysis, a correlation mapping between fermentation parameters, fermentation state, and coffee quality was established. The joint probability distribution of the Bayesian network can be expressed as:

[0126] P(p,s,q)=P(p)P(s|p)P(q|p,s);

[0127] By studying this model, it was found that parameters such as temperature (T), pH, and ethanol content (EtOH) have a significant impact on quality indicators such as flavor complexity and acidity, while the color of the fermentation broth also has a significant effect on aroma intensity. These quantitative relationships provide a basis for subsequent optimization.

[0128] Based on the above modeling results, a multi-input multi-output deep neural network model was trained as the first prediction model. The model takes initial fermentation parameters p0 and time t as inputs and outputs predicted fermentation parameters at each time point. And predicted coffee quality parameters The first prediction model was obtained by training it using the aforementioned experimental data. To further improve model performance, data augmentation and knowledge distillation techniques are employed. As a teacher model, a smaller and more efficient student model was trained. This second prediction model maintains high prediction accuracy while having lower model complexity and higher computational efficiency, making it easier to deploy in real-world production systems. Based on Another inverse neural network was constructed, with the goal of extracting the target quality parameter q. * Derive the optimal initial fermentation parameters The ideal coffee quality parameter q * The input [4.5 4.2 4.0 3.9 4.3 4.5] is fed into this inverse network, and the third model is obtained through training. It can predict the optimal initial fermentation parameters.

[0129] Finally, Input to The fermentation parameter change module predicts the changes in fermentation parameters at each acquisition time, as shown in Table 2:

[0130] Table 2. Changes in Fermentation Parameters

[0131]

[0132] These optimized initial fermentation parameters Predicted fermentation parameters at each time point This provides a strong basis for refined parameter control in actual production processes. Relevant comparisons are attached. Figure 2-7 As shown.

[0133] Appendix Figure 2 The image shows a comparison of coffee quality parameters before and after optimization. The graph clearly shows that the optimized coffee exhibits significant improvements in flavor complexity, acidity, sweetness, mouthfeel, and aroma intensity, while bitterness is appropriately reduced, resulting in a more balanced and harmonious overall flavor.

[0134] Appendix Figure 3The graph shows a comparison of key fermentation parameters before and after optimization. As can be seen from the graph, the optimized fermentation process resulted in a slight increase in temperature, a slight decrease in pH, an increase in dissolved oxygen, a slight increase in pressure, improved conductivity, and a slight increase in CO2 concentration. These adjustments collectively contributed to the improvement in coffee quality.

[0135] Appendix Figure 4 The graph shows the trends of key fermentation parameters over time. As can be seen from the graph, during the optimized fermentation process: temperature (red line) shows a slow upward trend, which is beneficial to the fermentation process; pH value (blue line) gradually decreases over time, indicating the generation of organic acids during fermentation; ethanol content (green line) first increases and then slightly decreases, reflecting the alcoholic fermentation and subsequent conversion process.

[0136] Appendix Figure 5 The radar chart of coffee quality parameters shows the changes in six coffee quality parameters before and after optimization.

[0137] Appendix Figure 6 The bar chart comparing fermentation parameters before and after optimization shows the changes in four key fermentation parameters.

[0138] Appendix Figure 7 The curves showing the changes in key parameters during the fermentation process demonstrate the dynamic changes in temperature, pH, and ethanol content.

[0139] By implementing the coffee secondary fermentation process optimization method proposed in this invention, the company has achieved significant results:

[0140] 1) The product's flavor complexity increased from 4.2 to 4.5, acidity from 4.0 to 4.2, sweetness from 3.5 to 4.0, bitterness from 3.8 to 3.6, mouthfeel from 4.1 to 4.3, and aroma intensity from 4.3 to 4.5. All quality indicators reached ideal levels, resulting in a more harmonious and richer product taste.

[0141] 2) The stability and controllability of process parameters are significantly improved. By modeling the dynamic characteristics of each parameter during fermentation and then combining this with reverse optimization of target quality parameters, parameter adjustments in the production process are more precise and efficient. Batch-to-batch variation in product quality is significantly reduced.

[0142] 3) Production efficiency and energy consumption have been significantly improved. With the help of precise control of process parameters, the fermentation time has been shortened from 36 hours to 34 hours, and the energy consumption per unit product has also been reduced by about 5%.

[0143] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for optimizing a coffee secondary fermentation process, characterized in that, Includes the following steps: S10. Obtain full-process data of small-scale experimental production of coffee secondary fermentation, including initial fermentation parameters, fermentation parameters and fermentation status parameters at each collection time, and coffee quality parameters after the secondary fermentation production is completed. S20. Based on the data from the entire process, establish a time series model for each fermentation parameter and a dynamic change model for each fermentation state parameter. S30. Using Bayesian networks and time series analysis, establish time series models for each fermentation parameter and dynamic change models for each fermentation state parameter, and establish a correlation mapping between these models and each coffee quality parameter. S40. Repeat steps S10-S30 to obtain multiple sets of full-process data and their corresponding association mappings. Based on the multiple sets of association mappings, train a multi-input multi-output embedded deep neural network model to obtain a first prediction model, which is used to predict coffee quality parameters under different combinations of fermentation parameters and state parameters. The first prediction model embeds a mathematical model of fermentation parameter changes. S50. Expand the multiple sets of full-process data using data augmentation technology to generate more diverse virtual samples, thereby enhancing the generalization ability of the model; use knowledge distillation technology to use the first prediction model as the teacher model to train a smaller and more efficient student model. S60. Transfer the knowledge from the teacher model to the student model to obtain the second prediction model; S70. Based on the second prediction model, a reverse neural network is constructed. The backpropagation algorithm and gradient descent method are used to train the network to achieve the mapping from the target coffee quality parameters to the initial fermentation parameters, thus obtaining the third model. S80. Using preset ideal coffee quality parameters as input, the third model performs reverse calculations to obtain the optimal initial fermentation parameters for the secondary coffee fermentation and output them. S90. Input the optimal initial fermentation parameters of coffee secondary fermentation into the mathematical model of fermentation parameter change in the first prediction model to obtain fermentation parameters at multiple sampling times and output them as a reference for adjusting fermentation parameters in the coffee secondary fermentation process.

2. The method for optimizing a coffee secondary fermentation process according to claim 1, characterized in that, The fermentation parameters include adjustable parameters and non-adjustable parameters. The adjustable parameters are specifically temperature, stirring speed, dissolved oxygen content, and fermenter pressure. The non-adjustable parameters are specifically pH value, fermentation broth specific gravity, conductivity, redox potential, carbon dioxide concentration, ammonia nitrogen concentration, total nitrogen content, free amino nitrogen content, water activity, and fermentation broth color.

3. The method for optimizing a coffee secondary fermentation process according to claim 2, characterized in that, The structure of the multi-input multi-output embedded deep neural network model specifically includes a mathematical model of fermentation parameter changes, a branch network for the influence of adjustable parameters on quality, a branch network for the influence of non-adjustable parameters on quality, a branch network for the influence of long-term parameters, a branch network for the influence of short-term parameters, and a fusion network.

4. The method for optimizing a coffee secondary fermentation process according to claim 3, characterized in that, The mathematical model for fermentation parameter changes is used to predict the dynamic changes of each parameter during fermentation. The input is the initial fermentation parameters and time, and the output is the predicted value of the fermentation parameters at each time point.

5. The method for optimizing a coffee secondary fermentation process according to claim 4, characterized in that, The adjustable parameter quality influence branch network is used to simulate the influence of adjustable parameters on coffee quality. The input is the time series data of the adjustable parameters, and the output is the degree of influence of each quality parameter. The structure is a combination of multi-layer convolutional neural network and long short-term memory network.

6. The method for optimizing a coffee secondary fermentation process according to claim 5, characterized in that, The non-adjustable parameter quality influence branch network is used to simulate the influence of non-adjustable parameters on coffee quality. The input is the time series data of the non-adjustable parameters, and the output is the degree of influence of each quality parameter. The structure is a combination of multilayer perceptron and attention mechanism.

7. The method for optimizing a coffee secondary fermentation process according to claim 6, characterized in that, The long-term parameter influence branch network is used to capture the impact of long-term changes in fermentation parameters on quality. The input is long-term data of all fermentation parameters, and the output is the long-term influence factor. The structure is a time series analysis network based on Transformer.

8. The method for optimizing a coffee secondary fermentation process according to claim 7, characterized in that, The short-term parameter influence branch network is used to capture the impact of short-term fluctuations in fermentation parameters on quality. The input is short-time window data of all fermentation parameters, and the output is short-term influence factors. The structure is a recurrent neural network based on gated recurrent units. The fusion network is used to integrate the outputs of each branch network and generate the final quality prediction result. The input is the output of each branch network, and the output is the predicted coffee quality parameters. The structure is a combination of a multi-layer fully connected network and a softmax layer.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program instructions, which, when executed in a computer, are used to perform the coffee secondary fermentation process optimization method according to any one of claims 1-8.

10. A system for optimizing a coffee secondary fermentation process, characterized in that, It includes the computer-readable storage medium of claim 9.

Citation Information

Patent Citations

  • Method for predicting mycelium concentration, ethanol concentration and glucose concentration time series in fuel ethanol fermentation process

    CN115410657A

  • Method for predicting simultaneous saccharification and fermentation of ethanol in lignocellulose raw material by BP-MIV

    CN115910193A