A biological fermentation physicochemical parameter simulation generation method based on a generative adversarial network
Patent Information
- Application Number
- CN202311849225.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-28
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2043-12-28
AI Technical Summary
但是受传感器精度影响,以及发酵过程异常带来的数据突变影响,现有技术采集的发酵理化参数存在数据缺失和噪声
[0054]1生成数据质量高,所有时刻数据完整且准确;
Smart Images

Figure CN117789843B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of physicochemical parameter simulation generation for biological fermentation processes, and particularly to a multi-parameter simulation generation method for biological fermentation processes based on deep generative adversarial networks. Background Technology
[0002] Biological fermentation is a complex biochemical process in which yeast, saccharifying enzymes, and other agents metabolize starch and sugar raw materials to produce alcohol and various flavor compounds. Accurate monitoring and real-time control of fermentation process parameters are crucial for improving the quality and yield of fermented products.
[0003] Traditional physicochemical analysis methods, such as densitometers and chromatography, for offline detection of fermentation products cannot achieve real-time monitoring of the fermentation process. In recent years, the industry has developed online fermentation detection technologies and equipment, such as online alcohol meters and acidity meters, which can automatically collect fermentation broth samples at set time intervals and continuously measure multiple physicochemical indicators. However, due to limitations in sensor accuracy and data mutations caused by fermentation process anomalies, existing technologies result in missing and noisy data in the acquired fermentation physicochemical parameters. These incomplete and abnormal data have a significant negative impact on the accuracy of constructing bio-fermentation process models.
[0004] Simple imputation methods such as mean imputation and linear interpolation do not consider temporal relationships and cannot handle complex data anomalies. Previous methods using autoencoders to generate data can repair single-dimensional gaps, but cannot guarantee the inherent dependencies between different dimensions of data. Generative Adversarial Networks (GANs) proposed in recent years for image enhancement utilize competition between the generator and discriminator to predict and generate high-quality data, but their generated results lack temporal correlation. The ConvLSTM model, combining convolutional neural networks and recurrent neural networks, can effectively learn the temporal characteristics of spatiotemporal data.
[0005] Therefore, designing a model that can accurately learn the temporal characteristics of physicochemical parameters in bio-fermentation and generate high-quality multidimensional simulation data is of great significance for training high-quality bio-fermentation models. To solve the above problems, this invention provides a method for simulating and generating physicochemical parameters for bio-fermentation based on generative adversarial networks. Summary of the Invention
[0006] The purpose of this invention is to provide a method for simulating and generating physicochemical parameters of biological fermentation based on generative adversarial networks, which can simulate and generate highly realistic biological fermentation data with strong temporal correlation, spatial correlation and correlation between different parameters.
[0007] To achieve the above objectives, the present invention adopts the following technical solution: a method for simulating and generating physicochemical parameters of biological fermentation based on generative adversarial networks, the method comprising:
[0008] Step 1: Obtain multiple sets of physicochemical parameters during the bio-fermentation process. For example, in the fermentation process of baijiu (Chinese liquor), these include C parameters such as alcohol content, moisture content, starch content, acidity, reducing sugar content, and total lipid content. Integrate the time-series data of each parameter into a two-dimensional matrix with a time length of T and a size of M×N. Collect data on all bio-fermentation processes in the target area, and statistically analyze the data collected at each sampling time interval to obtain the C fermentation parameter data at time t.
[0009] Step 2: Perform integrity checks on each of the two-dimensional matrices of various parameters to determine whether there are missing or outlier values; if so, use the inverse distance weighting method combined with the remaining data in the matrix to complete the incomplete data;
[0010] Furthermore, the inverse distance weighted method is as follows:
[0011] First, calculate the Euclidean distance between each element in the matrix and the missing element in either row or column. The closer the distance, the greater the weight. Then, construct a weight matrix w, where w ij This represents the weight value of the element in the i-th row and j-th column; for missing elements, the weighted average of the values of the other elements is calculated by multiplying them by their corresponding weights to obtain the value of the missing element;
[0012] Finally, repeat the above steps until all missing elements in the matrix are filled in.
[0013] The formula for calculating the weight matrix w is:
[0014]
[0015] In the formula, w ij Let x be the weight of the element in the i-th row and j-th column. i and y i Let x be the coordinate value of the element. j and y j The coordinates of the missing element.
[0016] Step 3: Map the two-dimensional matrices of each parameter to a uniform numerical range, and then stack and compress them into a three-dimensional feature matrix of size C×M×N, which is used as the input of the generative adversarial network;
[0017] Step 4: Construct a generative adversarial network, which includes a generator G and a discriminator D connected in series. Both the generator and the discriminator adopt the SCA-ConvLSTM model.
[0018] The generator G receives real data samples z from the previous few time steps as input and produces an output G(z), which is marked as 0 in the model; the real samples X real Marked as 1; Discriminator D receives actual fermentation data sample X.real The output of D is the probability of determining whether a sample belongs to the true data distribution, and the sample G(z) generated by the generated part G.
[0019] First, the discriminator D is trained. Its core task is to accurately distinguish between real and generated samples. To achieve this, its loss function simultaneously evaluates its accuracy in identifying both real and generated data. Since the discriminator needs to make a binary judgment between real and fake samples, its loss function will be the sum of these two evaluations of recognition ability. The loss function of discriminator D is as follows:
[0020] Loss D =E[log(D) θ (X real ))]+E[log(1-D θ (G(z)))]
[0021] Where E[·] is the expectation, θ is the parameter set of the discriminator D, and the gradient ascent algorithm is used to optimize the parameter θ;
[0022] Then, the generator G is trained: using the previous time step data z as input, the generator G outputs the result G(z); at this time, the network parameters of the discriminator D remain unchanged, so that the generated sample G(z) can effectively mislead the discriminator D; the training objective is to make G(z) be considered as real as possible in the discriminator's evaluation; during the training of the generator network, it is hoped that the output of the discriminator D will be... As close to 1 as possible, aiming to minimize Loss function between 1 and 1:
[0023]
[0024] Where E[·] represents the expectation, Let γ be the parameter set for generating network G, where γ represents the ratio of the mean squared error loss to the adversarial loss during network training. Represents the actual data X real With generator output The mean square error between them; these parameters are optimized and adjusted using gradient descent.
[0025] The goal of this process is to make the output from the generator... Gradually approximating the actual sample data X real This allows the generative model G to generate data similar to real samples, thereby deceiving the discriminative model D and making it unable to distinguish between real and fake data.
[0026] Furthermore, the specific process of the SCA-ConvLSTM model is as follows:
[0027] Building upon the LSTM architecture, SCA-ConvLSTM replaces traditional fully connected layers with convolutional layers, and the model's input x... t Compared to the state h at the previous moment t Combined and processed through convolutional layers, the input x is used as the input to the channel attention module; the model's input x t The feature is segmented along the parameter C dimension into C 1×M×N single-channel features. Each single-channel feature is used as the input to a gated single-channel feature extraction module. Then, the outputs of each single channel after feature extraction are merged as the output of the gated single-channel feature extraction module. The output of the channel attention module is O. ECA The output O of the gated single-channel feature extraction module GSC After activation by the Sigmoid function, the two modules are merged. The Sigmoid function can adaptively adjust the merging ratio between the two modules, making the features more reasonably integrated.
[0028] Then it is fed into the spatial attention module, i.e., the input is Sigmoid(O ECA )+Sigmoid(O GSC Finally, the output O of the spatial attention module is... SA The remaining LSTM modules are fed into the LSTM module to complete further calculations;
[0029] Furthermore, the specific process of the channel attention module is as follows:
[0030] First, the input 3D feature matrix of size C×M×N is subjected to global average pooling to average the spatial features. This compresses the 2D features of size M×N in each channel into a single real number, i.e., the feature map is adjusted from C×M×N to C×1×1. Then, a one-dimensional convolution operation is performed. The convolution kernel size k is determined by the number of input channels and the hyperparameters b and γ, and the calculation formula is as follows:
[0031]
[0032] Where γ = 2, b = 1, and c is the number of channels, effective cross-channel interaction can be achieved by performing one-dimensional convolution operations to extract the correlation between channels;
[0033] After performing a one-dimensional convolution operation, the output is used to obtain the weights between channels through a sigmoid gating mechanism. Finally, the channel weights are multiplied by the input feature tensor to achieve channel attention feature calibration, resulting in an output of size C×M×N. ECA ;
[0034] Furthermore, the specific process of the spatial attention module is as follows:
[0035] First, for an O(log n) with an input size of C×M×NECA Average pooling and max pooling are performed, and the outputs of average pooling and max pooling are concatenated along the channel dimension to obtain a feature map of size 2×M×N. Then, a two-dimensional convolutional layer with a kernel size of 3 or 7 is used to fuse channel information, with 2 input channels and 1 output channel. The convolutional result is then normalized to the spatial weights of the feature map using the Sigmoid function, and the Sigmoid output is the spatial attention feature map of size 1×M×N. Finally, the spatial attention feature map is multiplied by the input feature tensor x to achieve spatial attention feature calibration, resulting in an O(n) feature map of size C×M×N. SA ;
[0036] Furthermore, the specific process of the gated single-channel feature extraction module is as follows:
[0037] Input an O array of size C×M×N SA Each channel is divided into four paths. The first path performs a 1×1 convolution operation, followed by sigmoid activation and a dot product with itself. The second path performs two 3×3 convolution operations, followed by sigmoid activation and a dot product with itself. The third path performs one 5×5 convolution operation and one 3×3 convolution operation, followed by sigmoid activation and a dot product with itself. The fourth path performs max pooling, followed by a 1×1 convolution operation, then sigmoid activation and a dot product with itself. Finally, the features from the four paths are summed to obtain the final feature O. GSC ;
[0038] Furthermore, the LSTM module performs the following calculations sequentially:
[0039] f t =Sigmoid(Conv(x) t ;ω xf )+Conv(h t-1 ;ω ht )+b t )
[0040] i t =Sigmoid(Conv(x) t ;ω xi )+Conv(h t-1 ;ω hi )+b i )
[0041] o t =Sigmoid(Conv(x) t ;ω xo )+Conv(h t-1 ;ω ho )+b o )
[0042] g t =Tanh(Conv(x) t ;ω xg )+Conv(h t-1 ;ω hg )+b g )
[0043] c t =f t ⊙c t-1 +i t ⊙g t
[0044] h t =o t ⊙Tanh(c t )
[0045] Where, x t For the LSTM part of the SCA-ConvLSTM module, x is the input element for the corresponding computation process, and x t =O SA ;
[0046] ω xf ω hf ω xi ω hi ω xo ω ho ω xg ω hg b represents the weights corresponding to the convolutional layers in the convolution calculation process. f b i b o b g c is the bias coefficient of the neural network. t-1 with h t-1 This represents the state value of the model at the previous moment in the computation process.
[0047] Finally, c t and h t The SCA-ConvLSTM model is trained using the data obtained in step 3, and the trained SCA-ConvLSTM model is used for data generation and discrimination.
[0048] Furthermore, after generating new data, it is fused with the inverse distance weighted completion data according to a ratio α, where α∈[0,1]; the incomplete or abnormal data is further optimized by selecting the optimal value of α through multiple rounds of training; the specific data fusion operation process is as follows:
[0049] The generated data is represented as matrix A with dimensions C×M×N, and the data with inverse distance weighted completion is represented as matrix B with dimensions C×M×N. First, the weights α are initialized, where α represents the weight ratio of the generated data. Then, each element in matrices A and B is traversed to calculate the new data matrix C after fusion.
[0050] C ij =α×A ij +(1-α)×B ij
[0051] In the formula, C ij A ij and B ij Let i and j represent the elements in the i-th row and j-th column of matrices C, A, and B, respectively.
[0052] Finally, the α value is continuously adjusted, and the α value with the highest quality generated data is selected, thereby training higher quality data.
[0053] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0054] 1. The generated data is of high quality, with complete and accurate data at all times;
[0055] 2. Enhance the learning of relationships between time, space, and different parameters, and ensure reasonable and smooth data changes;
[0056] 3. By utilizing the gating mechanism, the model can automatically adjust the fusion ratio between modules, making feature fusion more effective;
[0057] 4. By integrating generated data and real data, the results are closer to the actual fermentation situation;
[0058] 5. Provides high-quality samples for digital monitoring and quality prediction modeling of fermentation processes.
[0059] In summary, this invention can generate high-quality bio-fermentation data, providing important support for the precise monitoring and management of the fermentation process. Attached Figure Description
[0060] Figure 1 This is a flowchart of the bio-fermentation data generation process of the present invention.
[0061] Figure 2 This is a model diagram of the channel attention module of the present invention.
[0062] Figure 3 This is a model diagram of the spatial attention module of the present invention.
[0063] Figure 4 This is a diagram of the gated multi-scale feature extraction model of the present invention.
[0064] Figure 5This is a diagram of the SCA-ConvLSTM model of the present invention.
[0065] Figure 6 This is a block diagram of the generative adversarial network of the present invention.
[0066] Figure 7 This is the data trend of starch content parameters generated based on time trajectory in this invention.
[0067] Figure 8 This is the data trend of the reducing sugar content parameter generated by the present invention based on the time trajectory.
[0068] Figure 9 This is the data trend of the alcohol content parameter generated by the present invention based on the time trajectory.
[0069] Figure 10 This is the data trend of the moisture content parameter generated by the present invention based on the time trajectory.
[0070] Figure 11 This is the data trend of the acidity content parameter generated by the present invention based on the time trajectory.
[0071] Figure 12 This is the data trend of the total lipid content parameter generated by the present invention based on the time trajectory. Specific Implementation
[0072] This invention patent application was funded by the Sichuan Provincial Science and Technology Program.
[0073] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments:
[0074] Step 1: Acquire spatiotemporal data of multiple parameters during the bio-fermentation process. An online monitoring device was installed in the fermentation workshop of a liquor production enterprise. It can automatically collect sample data from all fermentation tanks in the workshop every 15 minutes. The device detects six parameters, including alcohol content, moisture content, starch content, acidity, reducing sugar content, and total lipid content. The monitoring device worked continuously for 60 days, thus obtaining data at 1440 time points for each parameter within 60 days.
[0075] Step 2: Preprocess the data by integrating the time-series data of the six parameters collected over 60 days into two-dimensional matrices with a time length of 1440 and a size of 30×30; then perform the following processing step by step:
[0076] Step 2.1: Check the integrity of each parameter matrix and find that the data for alcohol content at a certain position at a certain time is missing, and the data for moisture content at a certain position at a certain time is abnormal.
[0077] Step 2.2: Use inverse distance weighted interpolation to fill in missing data and correct outliers. The specific steps of inverse distance weighted interpolation are as follows:
[0078] First, calculate the Euclidean distance between each element in the matrix and the row (or column) of the missing element. The closer the distance, the greater the weight. Then, construct the weight matrix w, where w ij This represents the weight value of the element in the i-th row and j-th column. For missing elements, the weighted average of the values of the other elements multiplied by their corresponding weights is used to obtain the value of the missing element.
[0079] Finally, repeat the above steps until all missing elements in the matrix are filled in.
[0080] The formula for calculating the weight matrix w is:
[0081]
[0082] In the formula, w ij Let x be the weight of the element in the i-th row and j-th column. i and y i Let x be the coordinate value of the element. j and y j The coordinates of the missing element.
[0083] Step 2.3: Map all the completed matrices to a uniform numerical range and superimpose them in the third dimension to obtain a three-dimensional data matrix of size 6×30×30 at a certain time. After further processing the data at all times, a four-dimensional matrix of 1440×6×30×30 is obtained as the input of the generative adversarial network model.
[0084] Step 3: Construct a generative adversarial network model, in which both the generator and discriminator modules use the Spatial Channel Attention-ConvLSTM (SCA-ConvLSTM) model to extract temporal and spatial feature information. The SCA-ConvLSTM model includes: channel attention module, spatial attention module, and gated single-channel feature extraction module.
[0085] Step 3.1: The specific process of the channel attention module is as follows:
[0086] First, the input time series data is globally averaged and pooled to average the spatial features, compressing the two-dimensional features (30×30) of each channel into a single real number, i.e., adjusting the feature map from 6×30×30 to 6×1×1. Then, a one-dimensional convolution operation is performed. The kernel size k is determined by the number of input channels and the hyperparameters b and γ, calculated using the following formula:
[0087]
[0088] Where γ = 2, b = 1, and c is the number of channels. One-dimensional convolution operations effectively enable cross-channel interaction and extract correlations between channels. The output of the one-dimensional convolution operation is then subjected to a Sigmoid gating mechanism to obtain the weights for each channel. Finally, the channel weights are multiplied by the input feature tensor to achieve channel attention feature calibration, yielding the output O. ECA .
[0089] Step 3.2: The specific process of the spatial attention module is as follows:
[0090] First, the input feature tensor x is subjected to average pooling and max pooling. The outputs of average pooling and max pooling are concatenated along the channel dimension to obtain a feature map of size 2×30×30. Then, a two-dimensional convolutional layer with kernel size 3 or 7 is used to fuse channel information, with 2 input channels and 1 output channel. The convolutional result is then normalized to the spatial weights of the feature map using the Sigmoid function; the Sigmoid output is the spatial attention feature map, with a size of 1×30×30. Finally, the spatial attention feature map is multiplied by the input feature tensor x to achieve spatial attention feature calibration, yielding the output O. SA .
[0091] Step 3.3: The specific process of the gated single-channel feature extraction module is as follows:
[0092] First, the input features are processed in parallel using 1×1, 3×3, and 5×5 convolutions, followed by a max-pooling 1×1 convolution, resulting in four feature branches with different spatial scales. Then, each feature branch is activated using a sigmoid function and multiplied by itself to implement a gating mechanism. Finally, the four gated features are summed to obtain the final feature O. GSC .
[0093] Step 3.4: The specific process of the SCA-ConvLSTM module is as follows:
[0094] Building upon the LSTM architecture, SCA-ConvLSTM replaces traditional fully connected layers with convolutional layers, and the model's input x... t Compared to the state h at the previous moment t Combined and processed through convolutional layers, the input x is used as the input to the channel attention module; the model's input x t The feature is segmented along the parameter C dimension into six 1×30×30 single-channel features. Each single-channel feature is used as the input to a gated single-channel feature extraction module. Then, the outputs of each single channel after feature extraction are merged as the output of the gated single-channel feature extraction module. The output O of the channel attention module is then used as the input to the gated single-channel feature extraction module. ECA The output O of the gated single-channel feature extraction module GSCAfter activation by the Sigmoid function, the features are merged. The Sigmoid function can adaptively adjust the merging ratio between the two modules, resulting in a more reasonable feature fusion. The merged features are then fed into the spatial attention module, where the input is Sigmoid(O). ECA )+Sigmoid(O GSC Finally, the output O of the spatial attention module is... SA The remaining LSTM modules are fed in to complete further calculations.
[0095] The LSTM part of the SCA-ConvLSTM module performs the following calculations sequentially:
[0096] f t =Sigmoid(Conv(x) t ;ω xf )+Conv(h t-1 ;ω ht )+b t )
[0097] i t =Sigmoid(Conv(x) t ;ω xi )+Conv(h t-1 ;ω hi )+b i )
[0098] o t =Sigmoid(Conv(x) t ;ω xo )+Conv(h t-1 ;ω ho )+b o )
[0099] g t =Tanh(Conv(x) t ;ω xg )+Conv(h t-1 ;ω hg )+b g )
[0100] c t =f t ⊙c t-1 +i t ⊙g t
[0101] h t =o t ⊙Tanh(c t )
[0102] Where, x tFor the LSTM part of the SCA-ConvLSTM module, x is the input element for the corresponding computation process, and x t =O SA .
[0103] ω xf ω hf ω xi ω hi ω xo ω ho ω xg ω hg b represents the weights corresponding to the convolutional layers in the convolution calculation process. f b i b o b g c is the bias coefficient of the neural network. t-1 with h t-1 This represents the state value of the model at the previous moment in the computation process.
[0104] Finally, c t and h t The SCA-ConvLSTM model is trained using the data obtained in step 3, and the trained SCA-ConvLSTM model is used for data generation and discrimination.
[0105] Step 3.5: The specific process of the SCA-ConvLSTM model based on generative adversarial networks is as follows:
[0106] A generative adversarial network (GAN) SCA-ConvLSTM model is used as the data generation model. This model is trained using the data from step 3 and involves two main components: a generator and a discriminator. For simplicity, we will use G to represent the generator and D to represent the discriminator. The generator G, based on the SCA-ConvLSTM model, receives the real data samples z from the first 10 time steps as input and produces the output G(z), which is marked as 0 in the model. Real sample X real Marked as 1. Discriminator D, also based on the SCA-ConvLSTM model, receives actual fermentation data samples X. real The output of D is the probability of determining whether a sample belongs to the true data distribution, and the sample G(z) generated by the generating part G.
[0107] First, the discriminator D is trained, its core task being to accurately distinguish between real and generated samples. To this end, its loss function is designed to simultaneously evaluate its accuracy in recognizing both real and generated data. Since the discriminator needs to make a binary judgment between real and fake samples, its loss function will be the sum of these two evaluations of recognition ability, thus defining the loss function of discriminator D:
[0108] Loss D =E[log(D) θ (X real ))]+E[log(1-D θ (G(z)))]
[0109] Where E[·] is the expectation, θ is the parameter set of the discriminator D, and the gradient ascent algorithm is used to optimize the parameter θ.
[0110] Then, the generator G is trained: using the previous time step data z as input, the generator G outputs the result G(z). At this time, the network parameters of the discriminator D remain unchanged, hoping that the generated sample G(z) can effectively mislead the discriminator D. The training objective is to make G(z) be considered as realistic as possible in the discriminator's evaluation. During the training of the generator network, it is hoped that the output of the discriminator D will be... As close to 1 as possible, aiming to minimize Loss function between 1 and 1:
[0111]
[0112] Where E[·] represents the expectation, Let γ be the parameter set for generating network G, where γ represents the ratio of the mean squared error loss to the adversarial loss during network training. Represents the actual data X real With generator output The mean square error between these parameters can be optimized using gradient descent.
[0113] The goal of this process is to make the output from the generator... Gradually approximating the actual sample data X real This allows the generative model G to generate data similar to real samples, thereby deceiving the discriminative model D and making it unable to distinguish between real and fake data.
[0114] Step 4: Train the data generation model, initialize model parameters, and perform 100 rounds of model training. In each iteration, train the discriminator to distinguish between real and generated data, and train the generator to produce the real data distribution. Observe that the quality of generated data improves when the discriminator loss and generator loss reach Nash equilibrium, and save the current generator parameters.
[0115] Step 5: Generate fermentation data using the trained model. Then, merge the generated data matrix with the completed real data matrix proportionally to further optimize incomplete or anomalous data. Select the optimal value of α through multiple rounds of training. Specifically, represent the generated data as matrix A with dimensions 6×30×30, and represent the inverse distance-weighted completed data as matrix B, also with dimensions 6×30×30. First, initialize the weights α, α∈[0,1] where α represents the weight ratio of the generated data. Then, iterate through each element in matrices A and B to calculate the new merged data matrix C:
[0116] C ij =α×A ij +(1-α)×B ij
[0117] In the formula, C ij A ij and B ij Let represent the elements in the i-th row and j-th column of matrices C, A, and B, respectively.
[0118] Finally, the α value is continuously adjusted, and the α value with the highest quality generated data is selected, thereby training higher quality data.
[0119] Step 6: Model Evaluation
[0120] Comparing the statistical characteristics of generated data and real data, the results show that the generated data can well reflect the temporal variation trend of the fermentation process and the dependence between parameters, thus improving the data quality of the digital monitoring model for the fermentation process.
Claims
1. A method for simulating and generating physicochemical parameters of biological fermentation based on generative adversarial networks, the method comprising: Step 1: Obtain multiple sets of physicochemical parameters during the bio-fermentation process, and integrate the time-series data of each parameter into a time-length sequence. A two-dimensional matrix of size . Collect data on all bio-fermentation processes in the target area, and statistically analyze the data collected at each sampling time interval to obtain... time Fermentation parameter data; Step 2: Perform integrity checks on each parameter two-dimensional matrix to determine if there are missing or outlier values; if so, use the inverse distance weighting method in combination with the remaining data in the matrix to fill in the missing or outlier values and obtain new data; Step 3: Map the two-dimensional matrices of each parameter to a uniform numerical range, then stack and compress them into a single matrix of size [size missing]. The three-dimensional feature matrix is used as the input to the generative adversarial network; Step 4: Construct a generative adversarial network, which includes generators connected in series. and discriminator Both the generator and discriminator use the SCA-ConvLSTM model; generator G Receive real data samples from the previous few moments z As input, and produce output. In the model, it is marked as 0; real samples Marked as 1; Discriminator D Receive actual fermentation data samples and the generation part G The generated samples , D The output is the probability of determining whether a sample belongs to the true data distribution; First, the discriminator... D The core task of training is to accurately distinguish between real samples and generated samples. Discriminator D Loss function: ; in, For the expectation, For discriminator D The parameter set is used to optimize the parameters using the gradient ascent algorithm. ; Then train the generator. G Using the preceding time-series data z as input, the generator... G Output At this time, the discriminator D The network parameters remain unchanged to produce the desired samples. It can effectively mislead the discriminator D The training goal is to make In the discriminator's evaluation, it should be considered as realistic as possible; during the training of the generative network, it is hoped that the discriminator will... D Output As close to 1 as possible, aiming to minimize Loss function between 1 and 1: ; in, For the expectation, To generate networks G The parameter set, This represents the ratio of the effects of mean squared error loss and adversarial loss during network training. Representing real data With generator output The mean square error between them; these parameters are optimized and adjusted using gradient descent. The specific process of the SCA-ConvLSTM model is as follows: Building upon the LSTM architecture, SCA-ConvLSTM replaces traditional fully connected layers with convolutional layers, and the model's input... The state of the previous moment Combined and processed through convolutional layers, the input is used as the input to the channel attention module; this input is then used to model input. Along parameters C Divide into dimensions, into C indivual The single-channel features are extracted and each single-channel feature is used as the input to the gated single-channel feature extraction module. Then, the outputs of each single channel after feature extraction are combined as the output of the gated single-channel feature extraction module. The output of the channel attention module is then used as the input to the gated single-channel feature extraction module. and the output of the gated single-channel feature extraction module ,go through Merge after function activation. The function can adaptively adjust the merging ratio between two modules, resulting in a more reasonable fusion of features; Then it is fed into the spatial attention module, i.e., the input is Finally, the output of the spatial attention module is... The remaining LSTM modules are fed in to complete further calculations.
2. The method for simulating and generating physicochemical parameters of biological fermentation based on generative adversarial networks as described in claim 1, characterized in that, The inverse distance weighting method in step 2 is as follows: First, calculate the Euclidean distance between each element in the matrix and the missing element in either row or column. The closer the distance, the greater the weight. Then, construct a weight matrix. ,in Indicates the first Line 1 The weight values of column elements; for missing elements, the weighted average is calculated by multiplying the values of other elements by their corresponding weights to obtain the value of the missing element; Finally, repeat the above steps until all missing elements in the matrix are filled in. Among them, the weight matrix The calculation formula is: ; In the formula, For the first Line 1 Column element weights and The coordinates of this element. and The coordinates of the missing element.
3. The method for simulating and generating physicochemical parameters of bio-fermentation based on generative adversarial networks as described in claim 1 or 2, characterized in that, After generating new data, it is proportional to the data completed using inverse distance weighted imputation. Integration Further optimize incomplete or abnormal data, and select data through multiple rounds of training. The optimal value; the specific calculation process for data fusion is as follows: The generated data is represented as a matrix. A , dimension The data with inverse distance weighted completion is represented as a matrix. B The dimension is also First, initialize the weights. ,in The matrix is then traversed to represent the weight ratio of the generated data. A and B For each element in the matrix, calculate the new data matrix after fusion. C ; ; In the formula, , and Represent matrices respectively C, A, B The first in i Line 1 j Column elements; Finally, continuous adjustments were made. Value, select the highest quality generated data. This allows us to train higher-quality data.
4. The method for simulating and generating physicochemical parameters of biological fermentation based on generative adversarial networks as described in claim 1, characterized in that, The specific process of the channel attention module is as follows: First, let the input size be... The three-dimensional feature matrix is subjected to global average pooling, and the spatial features are averaged as a whole, with the size of each channel being [value missing]. The two-dimensional features are compressed into a single real number, that is, the feature map is reduced from... Adjust to Then perform a one-dimensional convolution operation, with the convolution kernel size... Based on the number of input channels and hyperparameters 、 The decision is made, and the calculation formula is as follows: ; in, , , Number of channels; The output after performing a one-dimensional convolution operation is then... The gating mechanism obtains the weights between channels, and finally multiplies each channel weight by the input feature tensor to achieve channel attention feature calibration, resulting in an output of size [value missing]. of .
5. The method for simulating and generating physicochemical parameters of biological fermentation based on generative adversarial networks as described in claim 1, characterized in that, The specific process of the spatial attention module is as follows: First, for an input size of of Perform average pooling and max pooling, then concatenate the average pooling output and max pooling output along the channel dimension to obtain a value of... The feature map is then processed; then, a two-dimensional convolutional layer with a kernel size of 3 or 7 is used to fuse channel information, with 2 input channels and 1 output channel; the convolutional result is then processed... The function normalizes the spatial weights of the feature map. The output is a spatial attention feature map, with a size of [size missing]. Finally, the spatial attention feature map is multiplied by the input feature tensor to achieve spatial attention feature calibration, resulting in an output of size [value missing]. of .
6. The method for simulating and generating physicochemical parameters of biological fermentation based on generative adversarial networks as described in claim 1, characterized in that, The specific process of the gated single-channel feature extraction module is as follows: The input size is of Each channel is divided into 4 paths, the first path executes... Convolution operation, then perform... After activation, it is multiplied by itself; the second path performs two convolution operations, and then... After activation, it is multiplied by itself; the third path is executed once in sequence. Convolution operation, once Convolution operation, then perform... After activation, it is multiplied by itself; After the fourth path performs max pooling, it executes... Convolution operation, then perform... After activation, multiply by itself; finally, add the four features together to obtain the final feature. .
7. The method for simulating and generating physicochemical parameters of biological fermentation based on generative adversarial networks as described in claim 1, characterized in that, The LSTM module performs the following calculations sequentially: ; in, These are the input elements for the corresponding computation process of the LSTM part in the SCA-ConvLSTM module, and ; These are the weights corresponding to the convolutional layers in the convolution calculation process. The bias coefficient of the neural network. and This represents the state value of the model at the previous moment in the computation process. Finally and The SCA-ConvLSTM model is trained using the data obtained in step 3, and the trained SCA-ConvLSTM model is used for data generation and discrimination.
Citation Information
Patent Citations
Fermentation process soft measurement method based on topological guide time convolutional network
CN115458069A
Multi-mode generative adversarial neural network modeling method and device for multi-dimensional sequence data
CN116306832A