A method for detecting and diagnosing faults in a lactobacillus plantarum fermentation process based on asgae
By constructing a fermentation process fault detection model based on the ASGAE method, and utilizing the GAT neural network and reconstruction error index, the accuracy problem of fault diagnosis in batch fermentation process was solved, and efficient fault detection and location were achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JIANGNAN UNIV
- Filing Date
- 2023-12-27
- Publication Date
- 2026-06-23
AI Technical Summary
Existing experience-based models struggle to accurately diagnose faults during batch fermentation and fail to effectively handle material variations between batches and dynamic changes in variables within batches, leading to reduced effectiveness of the detection models.
An ASGAE-based approach is adopted, which constructs the nodes and edges of a graph, uses a GAT neural network to build an encoder and decoder, and uses the reconstruction error as a fault detection metric to train the model and perform online detection.
It achieves high-precision fault detection and location in batch fermentation process, reduces false detection rate, and improves the fault detection accuracy and stability of the model.
Smart Images

Figure CN117854633B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for fault detection and diagnosis in the fermentation process of Lactobacillus plantarum based on ASGAE (Attention-based Stacked Graph Auto-Encoder), belonging to the field of data-driven fault detection technology. Background Technology
[0002] Batch fermentation is a common fermentation process in biopharmaceutical and food production. It involves a single-stage process in a fermenter, including sterilization, inoculation, and fermentation, followed by a single discharge of the fermentation broth. Throughout the fermentation process, aside from continuous aeration and exhaust of fermentation gases, and pH adjustment, there is no exchange of substances between the system and the external environment. Due to the dynamic effects of time and batch-specific variations, the quality of batch fermentation is typically unstable, and the fermentation duration is difficult to control.
[0003] Traditional experience-based models are time-consuming to develop and often fail to effectively diagnose faults. These models are prone to producing erroneous diagnostic results or failing to accurately determine the magnitude of faults. Therefore, establishing effective fault detection and diagnosis models is crucial for batch fermentation processes.
[0004] To address these issues, new methods and technologies are needed, such as data-driven approaches or machine learning algorithms, to build more accurate and efficient fault detection and diagnosis models. These models can analyze real-time data to quickly and accurately detect potential problems during fermentation and provide corresponding solutions. Through these methods, the stability and production efficiency of batch fermentation processes can be improved, ensuring that product quality meets expectations. Summary of the Invention
[0005] To address the technical problem that existing data-driven detection methods applied to the fault detection and diagnosis of Lactobacillus plantarum fermentation processes suffer from reduced effectiveness of the established detection models due to the failure to consider the fluctuations in material changes between batches and the dynamic changes in variables within batches during the production process, this invention provides an ASGAE-based fault detection and diagnosis method for the Lactobacillus plantarum fermentation process.
[0006] In a first aspect, the present invention provides a method for fault detection and diagnosis in the fermentation process of *Lactobacillus plantarum* based on ASGAE, comprising the following steps:
[0007] Step 1: Establish a fermentation detection model for *Lactobacillus plantarum*: Collect process data of normal fermentation of *Lactobacillus plantarum*, and preprocess it to obtain standardized data. Construct a graph using each sample of the standardized data as a node to obtain the model input. Establish an ASGAE network model based on the model input, and select the reconstruction error of the samples. As a fault detection indicator, the ASGAE network model is trained until... convergence;
[0008] Step 2: Perform fault diagnosis on the fermentation process of Lactobacillus plantarum based on the detection model established in Step 1;
[0009] Step 3: Based on the detection model established in Step 1 and the fault diagnosis in Step 2, conduct online detection of the Lactobacillus plantarum fermentation process.
[0010] In one embodiment of the present invention, the establishment of the Lactobacillus plantarum fermentation detection model in step 1 specifically includes the following steps:
[0011] Step 101: Collect process data of normal fermentation of Lactobacillus plantarum, wherein the process data is three-dimensional data. There are a total of There are 10 fermentation batches, and each fermentation batch contains 100 fermentation batches. There are sampling times, and each sampling time contains... One sampling variable;
[0012] Step 102: Preprocess the data obtained in step 101 by performing Z-score standardization to obtain standardized data;
[0013] Step 103: Obtain model input: Obtain the standardized data from step 102. Each sample in Construct the graph as nodes; then... A two-dimensional sliding window is constructed; the size of the sliding window is determined by calculating the correlation of samples in the time and batch dimensions. The plane where the sliding window is located is The sliding window first slides along the time direction, reaching... K After the boundary, move one unit forward in the batch dimension and continue sliding along the time dimension; obtain the sequence. ,in, For the time dimension of correlation length, For batch-level correlation, The number of process variables; For each sample, an edge is added between the corresponding nodes in the graph, where the edge value is the Euclidean distance between the samples; the graph construction is now complete, and the model input is the standardized data. and the diagram of the structure;
[0014] Step 104: Establish the ASGAE network model; the overall structure of the ASGAE network model includes an encoder and a decoder; the encoder consists of two neural network layers, where the first layer is a GAT neural network layer with a number of neurons. J The second layer is also a GAT neural network layer, with fewer neurons than the previous layer. Its output dimension is the same as the latent space, and this layer outputs the result of the original sample in the latent space. The decoder has a two-layer structure; its first layer is a GAT neural network layer, with the input dimension being the same as the latent space and the output dimension being smaller than... J The second layer is also a GAT neural network layer, with the input dimension being the same as the output dimension of the first layer, and the output dimension being... J, This layer restores the dimensionality-reduced information to its original dimensions; each GAT neural network layer consists of a GAT neural network and a fully connected layer, with the same input and output dimensions.
[0015] Step 105: Determine the fault detection indicators; select the reconstruction error of the sample. As a fault detection indicator, the specific calculation method is as follows:
[0016]
[0017] in, It is a norm 2. For the sample The number of variables in For the model to sample The result obtained after reconstruction;
[0018] Step 106: Train the ASGAE network model until... convergence.
[0019] In one embodiment of the present invention, the standardization process in step 102 includes:
[0020] First, the three-dimensional data Expand into two-dimensional data Each row represents a sample, and then the data is standardized according to the following formula:
[0021]
[0022] in, For the first i The j-th variable at each sampling time, The value is the standardized value; For variables j The mean, For variables jThe variance; where After standardization, the two-dimensional data is then... Restored to 3D data .
[0023] In one embodiment of the present invention, step 104 of establishing the ASGAE network model specifically includes the following steps:
[0024] Step 1041: The standardized sample data obtained in steps 102 and 103... The first layer of the constructed graph input encoder, the GAT neural network, is used to obtain the data updated by the attention mechanism. , The dimension is smaller than J ;
[0025] Step 1042, The second layer of the GAT neural network is input to the encoder, and the output is the result in the latent space after the original sample data has been encoded by the encoder. , The dimension is smaller than ;
[0026] Step 1043, obtain the The input is fed into the first layer of the GAT neural network in the decoder, and After decoding, the result is , Dimensions and Same, then The input is fed into the second layer of the decoder for decoding, resulting in the decoded and reconstructed sample data. , Dimensions and They are the same, both are J .
[0027] In one embodiment of the present invention, the fault diagnosis in step 2 specifically includes the following steps:
[0028] Step 201: Collect real-time fermentation process data of Lactobacillus plantarum , Indicates the number of the current fermentation batch. Sampling Data for each sampled variable;
[0029] Step 202: The real-time fermentation process data collected in step 201 is standardized using step 102, and the input sequence is obtained according to step 103. ;
[0030] Step 203: Design two vectors, where the vector represents the direction of the fault variable. The magnitude vector of the fault The initial values of the two vectors are set to 0;
[0031] Step 204: Freeze the parameters of the neural network in the ASGAE network model of Step 1;
[0032] Step 205: Input sequence and Add them together, Input it into the ASGAE network model of step 1 to obtain Statistical measure;
[0033] Step 206: When a fault occurs, the statistic exceeds the control limit. This is addressed by optimizing the two vectors. Fault diagnosis is achieved through backpropagation of parameters. When the statistic of the diagnosed sample is less than the control limit, it means that the fault diagnosis of the current diagnosed sample is completed.
[0034] In one embodiment of the present invention, the online detection in step 3 specifically includes the following steps:
[0035] Step 301: Collect real-time fermentation process data of Lactobacillus plantarum. , Indicates the number of the current fermentation batch. Sampling Sample data for each sampling variable;
[0036] Step 302: The real-time fermentation data collected in step 301 is standardized using step 102, and the input sequence is obtained according to step 103. ;
[0037] Step 303: Based on the detection model in Step 1, calculate the number of the current fermentation batch. k Fermentation data collected at specific times of ;
[0038] Step 304, Judgment If the control limit is exceeded, an alarm is triggered, and then the fault diagnosis is performed according to step 2 to find the fault variable; otherwise, it is normal.
[0039] Step 305: If the fermentation batch is complete, terminate the detection; otherwise, collect data for the next moment, return to step 301, and continue the process detection.
[0040] In one embodiment of the present invention, the control limit calculation in step 105 is determined by a kernel density estimation method.
[0041] Secondly, the present invention provides an application of the ASGAE-based method for fault detection and diagnosis in the fermentation process of Lactobacillus plantarum in detecting the fermentation process of Lactobacillus plantarum.
[0042] Thirdly, the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the ASGAE-based method for fault detection and diagnosis of Lactobacillus plantarum fermentation process.
[0043] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method for fault detection and diagnosis of the fermentation process of *Lactobacillus plantarum* based on ASGAE.
[0044] The beneficial effects achieved by this invention are as follows:
[0045] This invention provides a fault detection and diagnosis method for the fermentation process of *Lactobacillus plantarum* based on ASGAE, which solves the problems of nonlinearity and dynamic characteristics in the fermentation process of *Lactobacillus plantarum*, and addresses the issue that existing diagnostic methods cannot accurately measure the magnitude of faults and locate fault variables. The fault detection effect reaches a high level. Compared with other fault detection methods, the fault diagnosis effect of this invention is improved, and the fault location is more accurate. The method provided by this invention significantly reduces the false detection rate of the model, improves the model's fault detection accuracy, effectively identifies fault variables, and promptly eliminates faults. Attached Figure Description
[0046] Figure 1 This is a schematic diagram of the overall process of the ASGAE-based method for fault detection and diagnosis in the fermentation process of Lactobacillus plantarum provided by the present invention.
[0047] Figure 2 This is a structural diagram of the ASGAE network model of the present invention;
[0048] Figure 3 This is a two-dimensional sliding window diagram illustrating the data of this invention;
[0049] Figure 4 This is a schematic diagram of the fault diagnosis process of the present invention;
[0050] Figure 5 This is the diagnostic diagram for fault 1 in Embodiment 2 of the present invention;
[0051] Figure 6 This is the diagnostic diagram for fault 2 in Embodiment 2 of the present invention. Detailed Implementation
[0052] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0053] Example 1
[0054] like Figure 1-4 As shown, this invention provides a method for fault detection and diagnosis in the fermentation process of *Lactobacillus plantarum* based on ASGAE, comprising the following steps:
[0055] Step 1: Establish a fermentation detection model for *Lactobacillus plantarum*: Collect process data of normal fermentation of *Lactobacillus plantarum*, and preprocess it to obtain standardized data. Construct a graph using each sample of the standardized data as a node to obtain the model input. Establish an ASGAE network model based on the model input, and select the reconstruction error of the samples. As a fault detection indicator, the ASGAE network model is trained until... convergence;
[0056] Step 2: Perform fault diagnosis on the fermentation process of Lactobacillus plantarum based on the detection model established in Step 1;
[0057] Step 3: Based on the detection model established in Step 1 and the fault diagnosis in Step 2, conduct online detection of the Lactobacillus plantarum fermentation process.
[0058] Optionally, the establishment of the Lactobacillus plantarum fermentation detection model in step 1 specifically includes the following steps:
[0059] Step 101: Collect process data of normal fermentation of Lactobacillus plantarum, wherein the process data is three-dimensional data. There are a total of There are 10 fermentation batches, and each fermentation batch contains 100 fermentation batches. There are sampling times, and each sampling time contains... One sampling variable;
[0060] Step 102: Preprocess the data obtained in step 101 by performing Z-score standardization to obtain standardized data;
[0061] Furthermore, the standardization process in step 102 includes:
[0062] First, the three-dimensional data Expand into two-dimensional data Each row represents a sample, and then the data is standardized according to the following formula:
[0063]
[0064] in, For the first i The j-th variable at each sampling time, The value is the standardized value; For variables j The mean, For variables j The variance; where After standardization, the two-dimensional data is then... Restored to 3D data .
[0065] Step 103: Obtain model input: Obtain the standardized data from step 102. Each sample in Construct the graph as nodes; then... A two-dimensional sliding window is constructed; the size of the sliding window is determined by calculating the correlation of samples in the time and batch dimensions. The plane where the sliding window is located is The sliding window first slides along the time direction, reaching... K After the boundary, move one unit forward in the batch dimension and continue sliding along the time dimension; obtain the sequence. ,in, For the time dimension of correlation length, For batch-level correlation, The number of process variables; For each sample, an edge is added between the corresponding nodes in the graph, where the edge value is the Euclidean distance between the samples; the graph construction is now complete, and the model input is the standardized data. and the diagram of the structure;
[0066] Step 104: Establish the ASGAE network model, where GAT (Graph Attention Network) is a component of the encoder and decoder of the ASGAE network model. Therefore, this invention mainly optimizes the ASGAE network model by focusing on the encoder and decoder structure; the overall structure of the ASGAE network model includes an encoder and a decoder; the encoder consists of two neural network layers, where the first layer is a GAT neural network layer with a number of neurons. J The second layer is also a GAT neural network layer, with fewer neurons than the previous layer. Its output dimension is the same as the latent space, and this second layer outputs the result of the original sample in the latent space. The decoder has a two-layer structure; its first layer is a GAT neural network layer, with the input dimension being the same as the latent space, and the output dimension being smaller than... JThe second layer is also a GAT neural network layer, with the input dimension being the same as the output dimension of the first layer, and the output dimension being... J, This layer restores the dimensionality-reduced information to its original dimensions; each GAT neural network layer consists of a GAT neural network and a fully connected layer, with the same input and output dimensions.
[0067] Specifically, establishing the ASGAE network model in step 104 includes the following steps:
[0068] Step 1041: The standardized sample data obtained in steps 102 and 103... The first layer of the constructed graph input encoder, the GAT neural network, is used to obtain the data updated by the attention mechanism. , The dimension is smaller than J ;
[0069] Step 1042, The second layer of the GAT neural network is input to the encoder, and the output is the result in the latent space after the original sample data has been encoded by the encoder. , The dimension is smaller than ;
[0070] Step 1043, obtain the The input is fed into the first layer of the GAT neural network in the decoder, and After decoding, the result is , Dimensions and Same, then The input is fed into the second layer of the decoder for decoding, resulting in the decoded and reconstructed sample data. , Dimensions and They are the same, both are J .
[0071] Step 105: Determine the fault detection indicators; select the reconstruction error of the sample. As a fault detection indicator, the specific calculation method is as follows:
[0072]
[0073] in, It is a norm 2. For the sample The number of variables in For the model to sample The results obtained after reconstruction; the control limits were determined by the kernel density (KDE) estimation method.
[0074] Step 106: Train the ASGAE network model until... convergence.
[0075] Optionally, the fault diagnosis in step 2 specifically includes the following steps:
[0076] Step 201: Collect real-time fermentation process data of Lactobacillus plantarum , Indicates the number of the current fermentation batch. Sampling Data for each sampled variable;
[0077] Step 202: The real-time fermentation process data collected in step 201 is standardized using step 102, and the input sequence is obtained according to step 103. ;
[0078] Step 203: Design two vectors, where the vector represents the direction of the fault variable. The magnitude vector of the fault The initial values of the two vectors are set to 0;
[0079] Step 204: Freeze the parameters of the neural network in the ASGAE network model of Step 1;
[0080] Step 205: Input sequence and Add them together, Input it into the ASGAE network model of step 1 to obtain Statistical measure;
[0081] Step 206: When a fault occurs, the statistic exceeds the control limit. This is addressed by optimizing the two vectors. Fault diagnosis is achieved through backpropagation of parameters. When the statistic of the diagnosed sample is less than the control limit, it means that the fault diagnosis of the current diagnosed sample is completed.
[0082] Optionally, the online detection in step 3 specifically includes the following steps:
[0083] Step 301: Collect real-time fermentation process data of Lactobacillus plantarum. , Indicates the number of the current fermentation batch. Sampling Sample data for each sampling variable;
[0084] Step 302: The real-time fermentation data collected in step 301 is standardized using step 102, and the input sequence is obtained according to step 103. ;
[0085] Step 303: Based on the detection model in Step 1, calculate the number of the current fermentation batch. k Fermentation data collected at specific times of ;
[0086] Step 304, Judgment If the control limit is exceeded, an alarm is triggered, and then the fault diagnosis is performed according to step 2 to find the fault variable; otherwise, it is normal.
[0087] Step 305: If the fermentation batch is complete, terminate the detection; otherwise, collect data for the next moment, return to step 301, and continue the process detection.
[0088] Optionally, the present invention also provides an application of the ASGAE-based method for fault detection and diagnosis of Lactobacillus plantarum fermentation process in detecting Lactobacillus plantarum fermentation process.
[0089] Example 2
[0090] This embodiment provides the method of Example 1 above for verification using actual lactic acid bacteria fermentation process data. The strain selected for the actual fermentation process is *Lactobacillus plantarum* strain number HuNHHMYL (Lactobacillus species of the genus *Lactobacillus* in the family Lactobacillusaceae), provided by the Biotechnology Center of the School of Food Science and Technology, Jiangnan University. MARS medium was selected for the fermentation process, and a bioreactor from Dibier Company was selected as the fermentation equipment, model T&j-Atype. The inoculation rate for each batch was 4%, the fermentation time was 8 hours, and feeding was carried out after 2 hours of fermentation. The culture environment was based on the literature on lactic acid bacteria fermentation (Zhang Guangmin, Wang Wei, Bao Huifang, et al. High-density fermentation of *Lactobacillus plantarum* Lp-2 [J]. China Biotechnology Journal, 2009, 29(6):68-73.), with a fermentation temperature of 37℃ and a pH of 6.0. A total of 27 batches were fermented, 22 batches of normal data were used for model training, 3 batches of normal data were used for model verification, and 2 batches of abnormal data were used as faults. The sampling interval was 1 min, and a total of 7 sampling variables were used, as shown in Table 1 below.
[0091] Table 1. Variables in the fermentation process of Lactobacillus plantarum
[0092]
[0093] like Figure 1 As shown, this embodiment includes an offline modeling stage and an online detection stage. The specific implementation steps are as follows:
[0094] A. Offline modeling stage:
[0095] (1) The collected batch fermentation process data is a three-dimensional array. The three directions are the batch direction. I The number is 27, and the direction of the sampling variables is... J The quantity is 7, and the fermentation time direction is... K The total number of data sets is 480, of which 22 batches of normal production process data were used for model training, 3 batches were used for model validation, and 2 batches were used for fault data.
[0096] (2) Training data from 22 batches of normal production processes Standardization processing is required.
[0097]
[0098] in For the first i The sampling time of the first sampling moment j One variable, The value is the standardized value; For variables j The mean, For variables j The variance; where .
[0099] (3) Obtain the input sequence, such as Figure 3 As shown, a three-dimensional sliding window process is performed, and the correlation of the collected data is obtained through a grid search method. The size of the three-dimensional sliding window is designed based on the correlation of the collected data. 10 represents time-related dimensions, 6 represents batch-related dimensions, and 7 represents process variable dimensions.
[0100] (4) Set the model parameters. During training, the number of model iterations is set to 800, and the model learning rate is set to 0.002. The Adam optimizer is used to optimize the parameters. The number of layers in the ASGAE network encoder is set to 10-6-4, and the number of layers in the decoder is set to 4-6-10. The specific structure of the ASGAE network model is as follows: Figure 2 As shown.
[0101] (5) Determine the fault detection index. Here, the reconstruction error of the sample is selected. As a fault detection indicator, the specific calculation method is as follows:
[0102]
[0103] in, It is a norm 2. For the sample The number of variables in the control limits is determined using the kernel density estimation (KDE) method.
[0104] (6) Calculate the control limits based on historical data, with a confidence limit set at 0.99. The control limits are calculated using the kernel density (KDE) estimation method.
[0105] (7) Design fault diagnosis methods, such as Figure 4 As shown. Fault diagnosis is implemented in the residual space. First, the parameters of the ASGAE network model are frozen. Then, a zero matrix of the same size as the model input is designed, i.e., two vectors are designed, where the vector representing the direction of the fault variable is... The magnitude vector of the fault The initial values of the two vectors are set to 0, and the input sequence is... and Add them together, Input into the ASGAE network model to obtain The statistics.
[0106] B. Online detection phase:
[0107] (8) The collected lactic acid fermentation data were collected on the first day. The seven variables sampled are standardized according to the mean and variance in step (2), and the input sequence is obtained according to step (3). .
[0108] (9) Calculate the sample .
[0109] (10) Judgment If the detected quantity exceeds the control limit, it indicates a fault has occurred during the current batch production process, triggering an alarm. Fault diagnosis is then performed, which involves optimizing the two vectors. The parameters are used to diagnose faults through backpropagation of the model. When the statistic is less than the control limit, the fault variable is identified. The fault identification results in this embodiment are shown in Table 2. If the current detection quantity does not exceed the control limit, the sampling data continues at the next time step. The fermentation process detection of Lactobacillus plantarum continues from step (7).
[0110] Table 2 Fault Types
[0111]
[0112] Fault 1 is a univariate fault, and the diagnostic method can detect that the fault variable is temperature. Fault 2 shows that the fault variables are temperature and pH. Figure 5 and 6As shown, the amplitude of the diagnostic results for the two faults mentioned above is close to that of the actual faults.
[0113] Comparative Example 1:
[0114] Comparison Experiment of LSTM-AE and ASGAE Methods
[0115] The fermentation process of *Lactobacillus plantarum* was monitored using the method of Example 2, the difference being that LSTM-AE modeling was used. The fault data detection results are shown in Table 3, demonstrating that the method proposed in this invention has higher fault detection accuracy. Furthermore, in terms of fault diagnosis, the method proposed in this invention exhibits better fault diagnosis performance.
[0116] Table 3 Fault Detection Results
[0117]
[0118] This invention provides a fault diagnosis and detection method for batch fermentation of *Lactobacillus plantarum* based on ASGAE, comprising two stages: offline modeling and online detection. The offline modeling stage involves standardizing and preprocessing the collected batch fermentation process data from normal production; establishing an ASGAE network model and constructing fault detection parameters; calculating control limits; and designing a fault diagnosis module. The online detection stage includes standardizing the online collected data, determining the operating status of the fermentation process, and promptly diagnosing the source of faults when they occur. This invention effectively handles the nonlinear and two-dimensional dynamic characteristics of batch fermentation processes, achieving real-time online fault detection.
[0119] Furthermore, the present invention also provides a computer device, which may include a processor, a memory, a network interface, and a database connected via a system bus. The processor of the computer device provides computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it causes the processor to perform the steps of the ASGAE-based fault detection and diagnosis method for the fermentation process of *Lactobacillus plantarum* as described in any of the above embodiments.
[0120] The working process, working details and technical effects of the computer equipment provided in this embodiment can be found in the embodiment above regarding the method for fault detection and diagnosis of Lactobacillus plantarum fermentation process based on ASGAE, and will not be repeated here.
[0121] Furthermore, the present invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the ASGAE-based fault detection and diagnosis method for the fermentation process of *Lactobacillus plantarum* as described in any of the above embodiments. The computer-readable storage medium refers to a data storage medium, which may include, but is not limited to, floppy disks, optical disks, hard disks, flash memory, USB flash drives, and / or memory sticks, etc. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
[0122] The working process, working details and technical effects of the computer-readable storage medium provided in this embodiment can be found in the embodiment above regarding the method for fault detection and diagnosis of Lactobacillus plantarum fermentation process based on ASGAE, and will not be repeated here.
[0123] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM).
[0124] Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for fault detection and diagnosis in the fermentation process of *Lactobacillus plantarum* based on ASGAE, characterized in that, Includes the following steps: Step 1: Establish a fermentation detection model for *Lactobacillus plantarum*: Collect process data of normal fermentation of *Lactobacillus plantarum*, and preprocess it to obtain standardized data. Construct a graph using each sample of the standardized data as a node to obtain the model input. Establish an ASGAE network model based on the model input, and select the reconstruction error of the samples. As a fault detection indicator, the ASGAE network model is trained until... convergence; Step 2: Perform fault diagnosis on the fermentation process of Lactobacillus plantarum based on the detection model established in Step 1; Step 3: Conduct online detection of the Lactobacillus plantarum fermentation process based on the detection model established in Step 1 and the fault diagnosis in Step 2; The establishment of the Lactobacillus plantarum fermentation detection model in step 1 specifically includes the following steps: Step 101: Collect process data of normal fermentation of Lactobacillus plantarum, wherein the process data is three-dimensional data. There are a total of There are 10 fermentation batches, and each fermentation batch contains 100 fermentation batches. There are 10 sampling times, and each sampling time contains 100 sampling times. One sampling variable; Step 102: Preprocess the data obtained in step 101 by performing Z-score standardization to obtain standardized data; Step 103: Obtain model input: Obtain the standardized data from step 102. Each sample in Construct the graph as nodes; then... A two-dimensional sliding window is constructed; the size of the sliding window is determined by calculating the correlation of samples in the time and batch dimensions. The plane where the sliding window is located is The sliding window first slides along the time direction, reaching... K After the boundary, move one unit forward in the batch dimension and continue sliding along the time dimension; obtain the sequence. ,in, For the time dimension of correlation length, For batch-level correlation, The number of process variables; For each sample, an edge is added between the corresponding nodes in the graph, where the edge value is the Euclidean distance between the samples; the graph construction is now complete, and the model input is the standardized data. And the diagram of the structure; Step 104: Establish the ASGAE network model; the overall structure of the ASGAE network model includes an encoder and a decoder; the encoder consists of two neural network layers, where the first layer is a GAT neural network layer with a number of neurons. J The second layer is also a GAT neural network layer, with fewer neurons than the previous layer. Its output dimension is the same as the latent space, and this layer outputs the result of the original sample in the latent space. The decoder has a two-layer structure; its first layer is a GAT neural network layer, with the input dimension being the same as the latent space and the output dimension being smaller than... J The second layer is also a GAT neural network layer, with the input dimension being the same as the output dimension of the first layer, and the output dimension being... J, This layer restores the dimensionality-reduced information to its original dimensions; each GAT neural network layer consists of a GAT neural network and a fully connected layer, with the same input and output dimensions. Step 105: Determine the fault detection indicators; select the reconstruction error of the sample. As a fault detection indicator, the specific calculation method is as follows: in, It is a 2-norm. For the sample The number of variables in For the model to sample The result obtained after reconstruction; Step 106: Train the ASGAE network model until... convergence; The standardization process in step 102 includes: First, the three-dimensional data Expand into two-dimensional data Each row represents a sample, and then the data is standardized according to the following formula: in, For the first i The j-th variable at each sampling time, The value is the standardized value; For variables j The mean, For variables j The variance; where After standardization, the two-dimensional data Restored to 3D data .
2. The method for fault detection and diagnosis in the fermentation process of *Lactobacillus plantarum* based on ASGAE according to claim 1, characterized in that, The establishment of the ASGAE network model in step 104 specifically includes the following steps: Step 1041: The standardized sample data obtained in steps 102 and 103... The first layer of the constructed graph input encoder, the GAT neural network, is used to obtain the data updated by the attention mechanism. , The dimension is smaller than J ; Step 1042, The second layer of the GAT neural network is input to the encoder, and the output is the result in the latent space after the original sample data has been encoded by the encoder. , The dimension is smaller than ; Step 1043, obtain the The input is fed into the first layer of the GAT neural network in the decoder, and After decoding, the result is obtained , Dimensions and Same, then The input is fed into the second layer of the decoder for decoding, resulting in the decoded and reconstructed sample data. , Dimensions and They are the same, both are J .
3. The method for fault detection and diagnosis in the fermentation process of *Lactobacillus plantarum* based on ASGAE, as described in claim 2, is characterized in that... The fault diagnosis in step 2 specifically includes the following steps: Step 201: Collect real-time fermentation process data of Lactobacillus plantarum , Indicates the number of the current fermentation batch. Sampling Data for each sampled variable; Step 202: The real-time fermentation process data collected in step 201 is standardized using step 102, and the input sequence is obtained according to step 103. ; Step 203: Design two vectors, where the vector represents the direction of the fault variable. The magnitude vector of the fault The initial values of the two vectors are set to 0; Step 204: Freeze the parameters of the neural network in the ASGAE network model of Step 1; Step 205: Input sequence and Add them together, Input it into the ASGAE network model of step 1 to obtain Statistical measure; Step 206: When a fault occurs, the statistic exceeds the control limit. This is addressed by optimizing the two vectors. Fault diagnosis is achieved through backpropagation of parameters. When the statistic of the diagnosed sample is less than the control limit, it means that the fault diagnosis of the current diagnosed sample is completed.
4. The method for fault detection and diagnosis in the fermentation process of *Lactobacillus plantarum* based on ASGAE according to claim 3, characterized in that, The online detection in step 3 specifically includes the following steps: Step 301: Collect real-time fermentation process data of Lactobacillus plantarum. , Indicates the number of the current fermentation batch. Sampling Sample data for each sampling variable; Step 302: The real-time fermentation data collected in step 301 is standardized using step 102, and the input sequence is obtained according to step 103. ; Step 303: Based on the detection model in Step 1, calculate the number of the current fermentation batch. k Fermentation data collected at specific times of ; Step 304, Judgment If the control limit is exceeded, an alarm is triggered, and then the fault diagnosis is performed according to step 2 to find the fault variable; otherwise, it is normal. Step 305: If the fermentation batch is complete, terminate the detection; otherwise, collect data for the next moment, return to step 301, and continue the process detection.
5. The method for fault detection and diagnosis in the fermentation process of *Lactobacillus plantarum* based on ASGAE according to claim 1, characterized in that, The control limit calculation in step 105 is determined by the kernel density estimation method.
6. The application of the ASGAE-based method for fault detection and diagnosis in the fermentation process of Lactobacillus plantarum according to any one of claims 1-5 in the detection of Lactobacillus plantarum fermentation process.
7. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method for fault detection and diagnosis of Lactobacillus plantarum fermentation process based on ASGAE as described in any one of claims 1-5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the ASGAE-based method for fault detection and diagnosis of Lactobacillus plantarum fermentation process as described in any one of claims 1-5.