Prediction method of amino acid nitrogen in soy sauce fermentation process based on long short-term memory network
Through the method based on long and short-term memory network, a multi-parameter model of the soy sauce fermentation process is constructed to predict the nitrogen content of amino acids, which solves the problems of insufficient data collection and incomplete information analysis in Cantonese soy sauce production, and realizes real-time control of the soy sauce production process and Improvement of product quality.
Patent Information
- Application Number
- CN202210402187.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-15
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2042-04-15
AI Technical Summary
There are problems such as insufficient data collection, incomplete information correlation mining and analysis in the production process of Cantonese high-salt dilute fermentation soy sauce, which leads to the inability to achieve scientific output control and flavor optimization, affecting the international market competitiveness of the products.
Using a method based on long and short-term memory network, a multi-parameter correlation dynamic model is constructed by monitoring the natural oil fermentation indicators and temperature indicators during the fermentation process, predicting the amino acid nitrogen content of soy sauce, and establishing the correlation between the annual soy sauce fermentation production process and amino acid nitrogen. Model.
Real-time control of the soy sauce production process is achieved, the cost of raw material conversion is reduced, the entire production process is optimized, and the quality of the product and the competitiveness of the international market is improved.
Smart Images

Figure CN114841416B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method for predicting amino acid nitrogen in a soy sauce fermentation process based on a long short-term memory network, which is used for predicting the final output of industrial products. Background Art
[0002] Cantonese high-salt dilute fermented soy sauce uses soybeans and wheat as raw materials, and is naturally fermented under the sun and at night, extracting large microorganisms from the natural environment. They interact together and ultimately give the sauce a complex and complete enzyme system. Therefore, traditional Cantonese soy sauce has an excellent special flavor and is deeply loved by consumers at home and abroad. Cantonese soy sauce adopts the production process of natural fermentation in the sun and night dew, covering multiple and complex processes, and most of them are traditional production equipment. The degree of automation and refinement is not high, and it needs to rely on the operating experience of employees. Its inability to produce quantitatively causes key quality indicators to fluctuate with seasonal changes. Especially in the three aspects of steaming, koji making, and fermentation, the development of Cantonese soy sauce is limited by the inability to scientifically collect data and analyze problems.
[0003] In addition, there are information islands between each device and stand-alone system, and the existing data is scattered and cannot be fully identified and analyzed. At the same time, the capabilities of existing technicians vary, and different technicians come to different conclusions due to differences in brewing knowledge, experience, and vision. Therefore, when the actual production of soy sauce with very good flavor or a particularly high yield rate is actually produced, different replication path inferences are often drawn based on incomplete process parameters, making the real effective process buried in various interference routes, and the direction and progress of the optimization work also fluctuate.
[0004] In summary, there is an urgent need to study the problems of insufficient data collection of Cantonese high-salt dilute fermented soy sauce sources, incomplete information correlation mining and analysis display, improve the real-time nature of production process data and the efficient sharing of global information, establish Cantonese soy sauce production equipment data that is more in line with the seasons / times in Guangdong Province, centrally collect new models, big data analysis and visual intelligent display, stably produce Cantonese soy sauce with unique flavor and health characteristics, and enhance the international market competitiveness of products.
[0005] The prediction of amino acid nitrogen content is a key task in the soy sauce production process. The measurement of soy sauce flavor can be regarded as the prediction of amino acid nitrogen content, which plays an important role in discovering defects in the production process, reducing the cost of raw material conversion, optimizing the entire production process, and achieving sustainable high-quality production. In order to achieve real-time control of the Cantonese high-salt dilute fermented soy sauce process and reduce the impact of environmental factors on product quality and output, it is necessary to collect real-time data parameters, material quality, environmental conditions and product quality from multiple sources such as equipment to establish a process parameter control model. In recent years, with the rise of deep learning and the improvement of computer computing power, the construction of yield-related models through industrial data has also received widespread attention. Due to the large amount of multivariate time series data formed in the industrial data collection stage, many researchers began to use time series analysis models to learn the intrinsic relationship between process parameters and yield. By mining and analyzing these data, the changing trend of production indicators is obtained, thereby quantitatively describing the corresponding output. Summary of the invention
[0006] The purpose of the present invention is to provide a method for predicting amino acid nitrogen in a soy sauce fermentation process based on a long short-term memory network, establish a multi-parameter correlation dynamic model for Cantonese soy sauce production based on a deep learning method, predict the amino acid nitrogen of soy sauce according to the process parameters and multiple indicators controlled by the fermentation process, and construct a correlation model between the soy sauce fermentation production process and amino acid nitrogen throughout the year.
[0007] A method for predicting amino acid nitrogen in a soy sauce fermentation process based on a long short-term memory network, the method comprising the steps of:
[0008] S1. Monitoring and collecting the natural oil fermentation indexes on days A, B, and C after feeding in N fermentation tanks, as well as the temperature indexes on days D to E after feeding, wherein the natural oil fermentation indexes include total acid, amino acid nitrogen, salt, and pH value, and the temperature indexes include the daily maximum temperature and the daily minimum temperature, wherein A, B, C, D, E, and N are all positive integers;
[0009] S2, obtaining a natural oil fermentation index time series including the number of samples, the number of days after feeding, and the natural oil fermentation index corresponding to the number of days after feeding, and a temperature index time series including the number of samples, the number of days after feeding, and the temperature index corresponding to the number of days after feeding, wherein the natural oil fermentation index time series and the temperature index time series are both represented by three-dimensional matrices, and the two three-dimensional matrices are used for model input of a neural network;
[0010] S3, inputting the natural oil fermentation index time series into a long short-term memory neural network to obtain a first two-dimensional feature vector as an output;
[0011] S4, inputting the temperature index time series into another long short-term memory neural network after passing through an initialized linear layer and a trainable activation function to obtain a second two-dimensional feature vector as an output;
[0012] S5. Concatenate the first two-dimensional feature vector and the second two-dimensional feature vector to obtain a fused feature vector, concatenate and fuse the fused feature vector with the total nitrogen and moisture indexes of the raw soybean to obtain a third two-dimensional feature vector, reduce the dimension of the third two-dimensional feature vector through a fully connected layer of a neural network, and output the predicted amino acid nitrogen content of the soy sauce.
[0013] The present invention also has the following preferred embodiments:
[0014] In step S2, the natural oil fermentation index time series and the temperature index time series are preprocessed as follows before being input into the neural network:
[0015] The preprocessing adopts InstanceNorm regularization.
[0016]
[0017] Where y is the output value of the input sample x after the InstanceNorm regularization, E[x] is the mean of the input sample x, Var[x] is the standard deviation of the input sample x, γ and β are two learnable parameter vectors in the sample regularization, and learning is performed after the initial values of γ and β are given in the neural network, ε = 10 -5 , ε is to ensure numerical stability, the denominator It will not approach or reach 0.
[0018] The model of the present invention adopts R 2 _adjusted loss for training:
[0019]
[0020] In the formula, P is the number of variables in the model, n is the number of samples, n = N, in, TSS is the inherent variance of the response variable before the analysis is performed, that is, the raw amino acid nitrogen data y i The mean of the original amino acid nitrogen data of n inputs RSS is the residual sum of squares, i.e. the predicted amino acid nitrogen data. The mean of the original amino acid nitrogen data of n inputs In step S5, total nitrogen and moisture are indicators of raw soybeans, which play a role in supplementing the initial state information of the two eigenvectors. However, adding a variable at random may not necessarily improve the model fit. The present invention uses R 2 The _adjusted loss penalizes the added non-significant variables so that the model can automatically eliminate variables that have little or no effect on the soy sauce production process.
[0021] The initialized linear layer in step S4 of the present invention is a linear layer initialized by the Kaiming normal distribution.
[0022] The activation function in step S4 of the present invention is a Swish activation function:
[0023] F(x)=x*sigmoid(βx),
[0024] In the formula, the input sample x is the temperature indicator time series, sigmoid is the sigmoid function, and β is the trainable parameter of the Swish activation function.
[0025] The long short-term memory neural network of the present invention is bidirectional and can process the natural oil fermentation index time series obtained in step S2 from two opposite directions, so as to better allow the neural network to learn the dependence of the index on the number of days, so that the extracted deep features can better retain the hidden information of the index. The long short-term memory neural network includes a forget gate, an update gate, and an output gate. The previous input information is incremented and discarded through the forget gate, the update gate, and the output gate. The forget gate controls whether the corresponding information of the previous unit is discarded in the current layer. The update gate fuses the past unit state information, the hidden information inside the old unit, and the new input data. The output gate obtains the output value of the current unit and the hidden state value passed to the next unit.
[0026] As a feasible implementation mode: in step S1, A=15, B=45, C=90, D=15, F is the total number of days of soy sauce fermentation - 1, F=179, N=16.
[0027] The present invention has the following beneficial effects:
[0028] The present invention establishes a multi-parameter correlation dynamic model for Cantonese soy sauce production based on a deep learning method, and predicts the amino acid nitrogen of the soy sauce according to the process parameters and multiple indicators controlled during the soy sauce fermentation process. The present invention can reduce the raw material conversion cost and optimize the entire production process, which plays an important role in achieving sustainable high-quality production. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1It is a flow chart of a method for predicting amino acid nitrogen in a soy sauce fermentation process based on a long short-term memory network of the present invention;
[0030] Figure 2 yes Figure 1 The neural network framework diagram of the amino acid nitrogen prediction method in the soy sauce fermentation process based on long short-term memory network. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without creative work, as long as they are changed within the spirit and scope of the present invention defined and determined by the attached claims, belong to the scope of protection of the present invention. It should be understood that the specific embodiments described are only used to explain the present application and are not used to limit the present application.
[0032] like Figure 1 and Figure 2 As shown, the amino acid nitrogen prediction method in the soy sauce fermentation process based on the long short-term memory network of this embodiment is shown.
[0033] Step 1: The fermentation of Cantonese soy sauce requires 180 days of sun exposure and night dew. Therefore, according to the detection rules of soy sauce production indicators, N fermentation tanks after the fermentation stage are sampled and tested at feeding times of 15 days, 45 days, and 90 days. The natural oil fermentation indicators of N fermentation tanks on the 15th, 45th, and 90th days after feeding are monitored and collected. The natural oil fermentation indicators include total acid: unit g / 100mL, amino acid nitrogen: unit g / 100mL, salt: unit g / 100mL and pH value. The sampling of these interval days represents the trend of the fermentation degree. The interaction of these four natural oil indicators with the change of fermentation days is automatically learned through the long short-term memory neural network. At the same time, the temperature indicators of each fermentation tank from the 15th to the 179th day after feeding are collected. The temperature indicators include the daily minimum temperature: unit ℃, and the daily maximum temperature: unit ℃.
[0034] Step 2: Obtain a natural oil fermentation index time series including the number of samples, the number of days after feeding, and the natural oil fermentation index corresponding to the number of days after feeding, and a temperature index time series including the number of samples, the number of days after feeding, and the temperature index corresponding to the number of days after feeding. The natural oil fermentation index time series and the temperature index time series are both represented by three-dimensional matrices, and the two three-dimensional matrices are used for the model input of the neural network.
[0035] The specific process is as follows: from step 1, the natural oil fermentation index and temperature index of each fermentation tank from feeding to output are obtained, each fermentation tank is taken as a sample, and the number of samples obtained from all fermentation tanks is n=N. The time series length of the four natural oil fermentation indexes on the 15th day, 45th day, and 90th day is 3, and the natural oil fermentation index of the sample is recorded through a three-dimensional matrix of N×3×4; the time series length of the temperature index from the 15th day to the 179th day is 165, and the temperature index of the sample is recorded through a three-dimensional matrix of N×165×2.
[0036] Since the natural oil fermentation index and the temperature index are collected at different time points, the time series lengths of the two characteristic indexes are different, so the two time series need to be preprocessed separately. The preprocessing uses InstanceNorm regularization to normalize the index values on each time series of a single sample. This regularization can make the prediction result of each sample only depend on the instance of the sample, accelerate the convergence of the model, and ensure the independence of each feeding sample. Specifically:
[0037]
[0038] y is the output value of the input sample x after InstanceNorm regularization.
[0039] E[x] is the mean of the input sample x, Var[x] is the standard deviation of the input sample x, γ and β are two parameter vectors that can be learned in sample regularization, ε = 10 -5 The mean and standard deviation are calculated separately for each dimension. For example, for the natural oil fermentation index time series N×3×4, the N and 3 dimensions are retained, and the mean and standard deviation of the four natural oil fermentation indicators per day are calculated only within a single dimension. The formula is:
[0040]
[0041]
[0042] Similarly, InstanceNorm regularization is used to preprocess the temperature index time series.
[0043] Step 3: Based on the preprocessing results of the fermentation data in step 2, two sequences of different dimensions are obtained. The steps before the two sequences are input into the long short-term memory network with different weight parameters are different. For the natural oil fermentation index time series, it is directly input into a long short-term memory neural network to obtain the first two-dimensional feature vector N×4 of the output; and for the temperature index time series, it first needs to pass through the linear layer initialized by the Kaiming normal distribution. The Kaiming normal distribution initialization is an initialization method for weights, which ensures that the input temperature index time series are all in the same order of magnitude, and the order of magnitude is unchanged. This method is used to initialize the weights of the linear layer, and then the Swish activation function is used to activate after this linear layer. This activation function has a lower boundary, which can produce a stronger regularization effect and is easier to train. Specifically:
[0044] F(x)=x*sigmoid(βx),
[0045] In the formula, the input sample x is the temperature indicator time series, sigmoid is the sigmoid function, and β is the trainable parameter of the Swish activation function.
[0046] Then, the temperature index time series is input into another long short-term memory neural network to obtain the output second two-dimensional feature vector N×2, the first two-dimensional feature vector N×4 and the second two-dimensional feature vector N×2 for subsequent output of the final prediction result.
[0047] The long short-term memory neural network is bidirectional, such as Figure 2 As shown, it adopts the classic LSTM model processing, which can make the previous and next information of the long sequence have the learnability of association, so it can process the natural oil fermentation index time series and the temperature index time series obtained in step 2 from two opposite directions, and learn the time relationship of the index's dependence on the days before and after, so that the extracted deep features can better retain the implicit information of the index.
[0048] The long short-term memory neural network uses the internal gate structure, including the forget gate, update gate, and output gate, to increment and discard the previous input information. Among them, the forget gate controls whether the corresponding information of the previous unit is discarded in the current layer. If the hidden state at time t is h t , then the forget gate can be expressed as:
[0049] f t =σ(W f *[h t-1 , x t ]+b f ),
[0050] In the formula, f t is the output value after the forget gate, xt is the input value, σ is the sigmoid function, W f is the weight of the forget gate neuron, b f is the bias value of the neuron.
[0051] It first connects the hidden state of the previous moment and uses the sigmoid activation function to get a number between 0 and 1, where 0 means discarding everything and 1 means keeping everything.
[0052] The update gate combines the past cell state information, the old hidden information inside the cell, and the new input data, which can be expressed as:
[0053] i t =σ(W i *[h t-1 , x t ]+b i );
[0054] In the formula, i t is the output value after the update gate, x t is the input value, σ is the sigmoid function, W i is the weight of the updated gate neuron, b i is the bias value of the neuron.
[0055] The output gate can obtain the output value of the current unit and the hidden state value passed to the next unit. The hidden state contains relevant information of the previous input. The output value of the current unit can be expressed as:
[0056] o t =σ(W o *[h t-1 , x t ]+b o ),
[0057] In the formula, o t is the output value after the output gate, x t is the input value, σ is the sigmoid function, W o is the weight of the output gate neuron, b o is the bias value of the neuron.
[0058] The hidden state of the next unit can be expressed as:
[0059] h t =o t *tanh(C t ),
[0060] Among them, C t Indicates the unit state at the current moment. In the present invention, the long short-term memory neural network is implemented through the Pytorch framework.
[0061] Step 4: Based on the first two-dimensional feature vector and the second two-dimensional feature vector output by the neural network in step 3, the second dimension is concatenated and fused to form a single long feature vector, namely, the fused feature vector N×6. In order to combine the quality information of the raw soybeans and form a coherent prediction of the production line, soybean indicators are concatenated in the second dimension based on the concatenated feature vectors, including total nitrogen: unit g / 100mL, moisture: unit %, such as Figure 2 As shown, the third two-dimensional feature vector N×8 is finally formed. The final concatenated third two-dimensional feature vector is reduced in dimension through the fully connected layer to output the predicted amino acid nitrogen content of the fermented soy sauce. Each node of the fully connected layer is connected to all nodes of the previous layer to combine the features extracted previously. All its outputs are connected to all inputs of this layer, that is, each input will affect the output of all neurons, that is, N×8 data is output after passing through this fully connected layer N×1, where the dimension N corresponds to the sample and 1 corresponds to amino acid nitrogen. Here, the input dimension of the fully connected layer is 8 and the output dimension is 1.
[0062] The model uses R 2 _adjusted loss for training.
[0063]
[0064] Where p is the number of variables in the model, which is 165×2 (single sample temperature index time series) + 3×4 (single sample natural oil fermentation index time series) + 2 = 344 in this embodiment, n is the number of samples, which is set to 16 in this embodiment, R 2 Specifically:
[0065]
[0066] RSS is the residual sum of squares, which is the variance that cannot be explained by the model, specifically the predicted amino acid nitrogen data The mean of the original amino acid nitrogen data of n inputs TSS is the variance inherent in the response variable before the analysis is performed, that is, the input raw amino acid nitrogen data y i The mean of the original amino acid nitrogen data of n inputs The sum of the squares of the differences.
[0067] The formulas for RSS and TSS are as follows:
[0068]
[0069]
[0070] The present invention is described according to the flowchart and / or block diagram of the method, device (system) and computer program product of the embodiment of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, and the combination of the process and / or block in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor-generated machine of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device so that the processor of the computer or other computer executes the instructions. The programmable data processing device can generate a device for use, which is a device that implements the functions specified in one or more processes in the flowchart and / or one or more blocks in the block diagram.
[0071] The present invention obtains a natural oil fermentation index time series and a temperature index time series by collecting natural oil fermentation index and temperature index in the soy sauce fermentation production process, and inputs them into a long short-term memory network to learn the interactive relationship of various dynamic indicators in the soy sauce fermentation production, so as to predict amino acid nitrogen and construct a correlation model between the annual soy sauce fermentation production process and amino acid nitrogen. In this embodiment, natural oil fermentation indexes on the 15th, 45th and 90th days after feeding and temperature indexes on the 15th to 179th days after feeding are collected, and samples are constructed for model input, which belongs to a preferred embodiment of the present invention for obtaining a better amino acid nitrogen prediction result. In other embodiments, natural oil fermentation indexes and temperature indexes at other intervals can also be collected to construct natural oil fermentation index time series and temperature index time series for model input.
[0072] The above are only preferred embodiments of the present invention. However, the protection scope of the present invention is not limited thereto; therefore, any person skilled in the art who is familiar with the technical field within the scope of the present invention shall be protected by the protection scope of the present invention according to the equivalent replacement or change of the technical solution and the inventive concept of the present invention.
Claims
1. A method for predicting amino acid nitrogen in soy sauce fermentation process based on long short-term memory network, characterized in that: The method comprises the steps of: S1. Monitoring and collecting the natural oil fermentation indexes on days A, B, and C after feeding in N fermentation tanks, as well as the temperature indexes on days D to E after feeding, wherein the natural oil fermentation indexes include total acid, amino acid nitrogen, salt, and pH value, and the temperature indexes include the daily maximum temperature and the daily minimum temperature, wherein A, B, C, D, E, and N are all positive integers; S2, obtaining a natural oil fermentation index time series including the number of samples, the number of days after feeding, and the natural oil fermentation index corresponding to the number of days after feeding, and a temperature index time series including the number of samples, the number of days after feeding, and the temperature index corresponding to the number of days after feeding, wherein the natural oil fermentation index time series and the temperature index time series are both represented by three-dimensional matrices, and the two three-dimensional matrices are used for model input of a neural network, The natural oil fermentation index time series and the temperature index time series are preprocessed as follows before being input into the neural network: The preprocessing adopts InstanceNorm regularization. Where y is the output value of the input sample x after InstanceNorm regularization. E[x] is the mean of the input sample x, Var[x] is the standard deviation of the input sample x, γ and β are two parameter vectors that can be learned in sample regularization, ε = 10 -5 ; S3, inputting the natural oil fermentation index time series into a long short-term memory neural network to obtain a first two-dimensional feature vector as an output; S4, inputting the temperature index time series into another long short-term memory neural network after passing through an initialized linear layer and a trainable activation function to obtain a second two-dimensional feature vector as an output; S5, performing feature splicing on the first two-dimensional feature vector and the second two-dimensional feature vector to obtain a fused feature vector, splicing and fusing the fused feature vector with the total nitrogen and moisture indexes of the raw soybean to obtain a third two-dimensional feature vector, and reducing the dimension of the third two-dimensional feature vector through a fully connected layer of a neural network to output the predicted amino acid nitrogen content of soy sauce; The model uses R 2 _adjusted loss for training: In the formula, P is the number of variables in the model, n is the number of samples, n = N, in, TSS is the inherent variance of the response variable before the analysis is performed, that is, the input raw amino acid nitrogen data y i The mean of the original amino acid nitrogen data of n inputs RSS is the residual sum of squares, i.e. the predicted amino acid nitrogen data. The mean of the original amino acid nitrogen data of n inputs The sum of the squares of the differences.
2. The method for predicting amino acid nitrogen in soy sauce fermentation process based on long short-term memory network according to claim 1, characterized in that: The initialized linear layer in step S4 is a linear layer initialized by the Kaiming normal distribution.
3. The method for predicting amino acid nitrogen in soy sauce fermentation process based on long short-term memory network according to claim 2, characterized in that: The activation function in step S4 is the Swish activation function: F(x)=x*sigmoid(βx), In the formula, the input sample x is the temperature indicator time series, sigmoid is the sigmoid function, and β is the trainable parameter of the Swish activation function.
4. The method for predicting amino acid nitrogen in soy sauce fermentation process based on long short-term memory network according to any one of claims 1 to 3, characterized in that: The long short-term memory neural network includes a forget gate, an update gate, and an output gate. The forget gate, the update gate, and the output gate are used to increment and discard previous input information. The forget gate controls whether the corresponding information of the previous unit is discarded in the current layer. The update gate integrates past unit state information, hidden information inside the old unit, and new input data. The output gate obtains the output value of the current unit and the hidden state value passed to the next unit.
5. The method for predicting amino acid nitrogen in soy sauce fermentation process based on long short-term memory network according to claim 4, characterized in that: A=15, B=45, C=90, D=15, F is the total number of days of soy sauce fermentation - 1, F=179, N=16.
Citation Information
Patent Citations
Photovoltaic power generation power prediction method making use of long short-term memory network
CN108280551A
Convolutional neural network based multi-point regression forecasting model for traffic flow forecasting
WO2020024319A1
