A knowledge graph-based fermentation tank operation parameter self-adaptive optimization method
By using a knowledge graph-based approach, multi-source heterogeneous knowledge of the fermentation process is dynamically integrated. Graph attention causal strategy networks and counterfactual reasoning security calibration are employed to solve the problems of knowledge isolation and decision-making disconnect in the optimization of the fermentation process, thereby improving the interpretability and security of adaptive optimization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HEGU TIANFU (CHONGQING) INTELLIGENT EQUIPMENT CO LTD
- Filing Date
- 2026-02-10
- Publication Date
- 2026-06-05
AI Technical Summary
Existing methods for optimizing fermentation processes fail to systematically integrate heterogeneous knowledge from multiple sources and lack online adaptive capabilities, resulting in overly rigid parameter optimization or getting bogged down in black-box exploration, making it difficult to achieve truly meaningful online adaptive optimization.
We employ a knowledge graph-based approach, combining dynamic causal graph construction and online learning with graph attention causal strategy networks and counterfactual reasoning security calibration, to achieve the fusion and optimization of multi-source heterogeneous knowledge for decision-making.
It improves the interpretability and security of the optimization process, enhances the system's adaptability to changes in operating conditions, achieves deep integration of knowledge and data, and improves the sample efficiency and execution security of parameter adjustment strategies.
Smart Images

Figure CN122154864A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent control and optimization technology for fermentation processes in industrial biotechnology, and in particular to an adaptive optimization method for fermenter operating parameters based on knowledge graphs. Background Technology
[0002] In industrial fermentation processes, precise control and dynamic optimization of operating parameters are crucial for improving product yield, ensuring production stability, and achieving energy conservation and emission reduction. Traditional parameter optimization methods primarily rely on offline optimization based on experimental design and response surface models. This method establishes statistical models through numerous repetitive experiments to find the static optimal operating point. While mature and reliable, these methods cannot adapt to the dynamic characteristics of the fermentation process and batch-to-batch variations, lacking online adaptive capabilities. With the development of automation and sensing technologies, rule-based expert systems and proportional-integral-derivative (PID) control are widely used to maintain the stability of key parameters. However, these methods depend on the completeness and accuracy of prior knowledge, making them difficult to handle complex nonlinear processes and multivariate coupling problems.
[0003] In recent years, data-driven approaches have brought new ideas to the optimization of fermentation processes. Machine learning techniques, such as neural networks and support vector machines, have been used to construct black-box or gray-box models between process variables and key performance indicators, and coupled with optimization algorithms to find optimal parameters.
[0004] A common limitation of existing technologies lies in their failure to systematically integrate and utilize the rich prior knowledge inherent in the fermentation process, including theoretical insights from mechanistic models, statistical regularities from historical data, and empirical rules from domain experts. This multi-source, heterogeneous knowledge often exists in isolated, static forms, unable to be dynamically and organically invoked and verified during the optimization decision-making process. This leads to existing optimization methods either relying too heavily on rigid, fixed rules and lacking flexibility, or getting bogged down in data-driven, black-box exploration, lacking security and interpretability guarantees, making it difficult to achieve truly online adaptive optimization.
[0005] Therefore, how to provide an adaptive optimization method for fermenter operating parameters based on knowledge graphs is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0006] This invention presents a knowledge graph-based adaptive optimization method for fermenter operating parameters. Addressing the shortcomings of existing technologies in the systematic integration and dynamic utilization of multi-source heterogeneous knowledge from the fermentation process, it proposes a closed-loop technical solution involving dynamic causal graph construction and online learning, task-related causal subgraph extraction, graph attention causal policy network decision-making, counterfactual reasoning for security calibration, and collaborative updating of the knowledge graph and policy network. This invention offers advantages such as improved interpretability and security of the optimization process, enhanced system adaptability to changes in operating conditions, and deep integration of domain knowledge and data-driven approaches.
[0007] An adaptive optimization method for fermenter operating parameters based on knowledge graphs according to an embodiment of the present invention includes the following steps: S1: Integrate historical fermentation data and use causal discovery algorithms to construct an initial knowledge graph representing the causal relationships between process variables; S2: Real-time acquisition of multi-source sensor data during the fermentation process; monitoring of changes in causal effects between variables through time-series causal analysis; execution of active perturbation experiments within a safe range when significant changes are detected; and dynamic updating of causal edges and weights in the initial knowledge graph based on system response data. S3: Based on the identification results and optimization objectives of the current fermentation stage, extract the task-related subgraph containing key causal paths from the updated knowledge graph, and use a graph neural network to encode the subgraph to generate node feature vectors; S4: Input the node feature vector into the graph attention causal policy network. This network structure is coupled with the subgraph topology. It aggregates information along the causal path through the graph attention mechanism and outputs the probability distribution of the adjustment action of controllable operating parameters. S5: Construct a counterfactual reasoning model based on the current knowledge graph, deduce the expected results of candidate actions in the probability distribution of adjustment actions, and select the final action to be executed based on safety and performance evaluation criteria; S6: Perform the final action to adjust the fermenter operating parameters and collect system status feedback data and performance index data after a preset time; S7: Use feedback data to synchronously verify and correct the knowledge graph and update the parameters of the policy network, completing a single optimization loop.
[0008] Optionally, S1 specifically includes: S1.1: Collect time-series data of operating parameters, state variables, and performance indicators from historical fermentation data; S1.2: Preprocess all collected time-series data. The preprocessing steps include missing value imputation, outlier removal, and standardization. S1.3: Based on the preprocessed time series data, a constraint-based causal discovery algorithm is used to test conditional independence, and time series information is used to exclude reverse causal relationships, and an initial dependency graph structure representing the unconditional dependency relationship between variables is constructed. S1.4: Based on the initial dependency graph structure, a scoring-based causal discovery algorithm is adopted. By searching and optimizing the predefined graph structure scoring function, the causal direction of the edges in the initial dependency graph is determined, forming a directed causal graph. S1.5: For each edge in the directed causal graph, calculate the causal weights that characterize the strength of the influence of the cause variable on the outcome variable by fitting a structural equation model between the two variables connected by the edge. S1.6: The directed causal graph with causal direction and causal weight, along with the definitions of all process variables and metadata information, is stored in a graph structure data format to construct the initial knowledge graph.
[0009] Optionally, S2 specifically includes: S2.1: The set and measured values of temperature, pH value, stirring speed, aeration rate, and dissolved oxygen concentration are collected in real time through the fermenter control system to form a real-time data stream; S2.2: Synchronize the real-time data stream and extract data in a fixed time window to form the current observation time series segment; S2.3: Perform time-series causal analysis on the process variables in the current observation time segment and calculate the causal effect measure between variables; S2.4: Compare the calculated causal effect measure with the benchmark measure established based on historical data. When the change exceeds the preset threshold, it is determined that a significant change in causal effect has been detected, and the corresponding variable pair is marked as a candidate causal pair to be verified. S2.5: For each candidate causal pair to be verified, design and execute an active perturbation experiment within the process safety operating range. The experiment includes applying a setpoint adjustment to the causal variable with limited amplitude and duration within a single control cycle. S2.6: During the active perturbation experiment, collect and record the response time series data of the causal and outcome variables; S2.7: Based on the recorded response time-series data, update the weight and direction information of the corresponding causal edges in the knowledge graph.
[0010] Optionally, S3 specifically includes: S3.1: Based on cell concentration, substrate concentration, product concentration and dissolved oxygen concentration data, a classification model is used to identify the current fermentation stage; S3.2: Based on the current fermentation stage, select the optimization target for the current stage from the preset mapping table; S3.3: Using the node representing the current optimization goal in the knowledge graph as the endpoint and all controllable operating parameter nodes as the starting point, use a graph search algorithm to find all directed paths from the starting point to the endpoint; S3.4: Calculate the path strength of each directed path, and select paths with strength greater than a preset threshold to form a set of key causal paths; S3.5: Extract all nodes and connecting edges from the key causal path set to form a task-related subgraph; S3.6: Input the adjacency matrix and node feature matrix of the task-related subgraph into the graph neural network encoder. The node feature matrix consists of the real-time value of the variable corresponding to the node, historical features, and type encoding. S3.7: The graph neural network encoder aggregates information through multi-layer graph convolution operations and outputs an updated node feature matrix, in which the row vectors are the node feature vectors.
[0011] Optionally, S4 specifically includes: S4.1: Construct a multi-layer graph attention causal strategy network, with the number of layers matching the node hierarchy depth of the task-related subgraph; S4.2: Use the adjacency matrix of the task-related subgraph as the fixed graph structure input of the network. The adjacency matrix reflects the causal connection relationship between nodes in the subgraph. S4.3: Use the node feature vectors as input features for the first layer of the network; S4.4: In the graph attention calculation unit of each layer of the network, for each target node in the subgraph, the attention coefficient between the target node and all its causal neighbor nodes is calculated. The attention coefficient is obtained by linear transformation and nonlinear activation of the target node features and the neighbor node features. S4.5: Normalize the attention coefficients calculated for each target node to obtain the normalized attention weights of the target node to its neighboring nodes; S4.6: Use the normalized attention weights to perform a weighted summation of the features of neighboring nodes, and then combine it with the features of the target node itself to perform a linear transformation and activation, so as to obtain the updated feature vector of the target node in the next layer. S4.7: Input the feature vector output from the last layer of the network into the fully connected output layer, and generate an adjustment action probability distribution for each controllable operating parameter node through the activation function.
[0012] Optionally, S5 specifically includes: S5.1: Construct a structural causal model based on the current knowledge graph. This model maps graph variables to nodes and causal edges to structural equations. S5.2: Select the top K actions with the highest probability values from the adjustment action probability distribution as the candidate action set; S5.3: For each candidate action, it is treated as an intervention in the corresponding operating parameter node in the structural causal model, and the expected changes in downstream state variables and performance indicators are deduced. S5.4: Based on the simulation results, calculate the expected performance score and safety risk score for each candidate action; S5.5: If the safety risk score is lower than the preset threshold, select the candidate action with the highest expected performance score as the first action to be executed; S5.6: If no candidate action meets the safety threshold, a set of conservative actions with smaller adjustment ranges will be generated as a new candidate set based on process experience; S5.7: Repeat the deduction and evaluation of the new candidate set, and select the action that meets the safety requirements and has the best performance as the final action to be executed.
[0013] Optionally, S6 specifically includes: S6.1: The final execution action is parsed into specific adjustment instructions for one or more controllable operating parameters. The adjustment instructions include parameter identifier, target setpoint or setpoint change amount, and execution priority. S6.2: After sorting the parsed adjustment instructions according to their execution priority, send them sequentially to the distributed control system execution module at the bottom of the fermenter; S6.3: After the execution module receives the adjustment command, it converts the target setpoint or the change in setpoint into an analog signal or a digital signal through the controller output module, and drives the corresponding actuator to perform the operation. S6.4: After the actuator completes the parameter adjustment action, start the timer to start calculating the feedback waiting time. The length of the feedback waiting time is preset according to the process response time constant of the adjusted parameter. S6.5: After the feedback waiting time is reached, real-time measured values of all operating parameters, real-time measured values of all state variables, and real-time values of key performance indicators obtained through the online analyzer are collected synchronously through the sensor network. S6.6: Perform data verification on all collected real-time measurements and real-time values. Data verification includes range checking, mutation detection and consistency verification. Invalid data points are removed and data quality markers are recorded. S6.7: After the valid measurement values and valid values that have been verified by data are aligned with the timestamps, they are stored as a complete system status feedback data record. This record includes the baseline status before the adjustment action is executed, the final status after the action is executed, and all intermediate status data points recorded during the adjustment process.
[0014] Optionally, S7 specifically includes: Using the system state feedback data and performance index data, the true causal effect and performance gain of the final executed action are calculated; based on the calculation results, the weights of the corresponding causal edges in the knowledge graph are verified and corrected; simultaneously, using the system state feedback data, performance index data, and calculated gains as training samples, the parameters of the graph attention causal policy network are updated using the policy gradient algorithm.
[0015] The beneficial effects of this invention are: (1) By constructing and dynamically updating the causal knowledge graph, this invention realizes the systematic integration and structured representation of multi-source heterogeneous knowledge such as fermentation process mechanism, expert experience and historical data, effectively improving the availability and traceability of knowledge in the optimization decision-making process, and enhancing the system's ability to understand and express the internal causal mechanism of the process.
[0016] (2) This invention achieves safe and interpretable sequential decision-making under explicit causal constraints by coupling the graph attention causal strategy network of the causal graph topology with the counterfactual reasoning safety calibration mechanism, which significantly improves the sample efficiency and execution safety of the parameter adjustment strategy, and shows better adaptive optimization robustness in the industrial fermentation scenario with high uncertainty and strong nonlinearity.
[0017] (3) In terms of online adaptive optimization of the fermentation process, this invention effectively solves the problems of static isolation of knowledge and disconnect between decision-making and learning processes in the prior art through the collaborative iterative update mechanism of knowledge graph and policy network. It breaks through the limitations of fixed rules or pure data-driven models in terms of flexibility, security and interpretability, realizes the deep integration and co-evolution of knowledge-driven and data-driven in closed-loop control, and effectively improves the overall level of intelligent control of industrial biological processes. Attached Figure Description
[0018] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a schematic diagram of the process for an adaptive optimization method for fermenter operating parameters based on knowledge graphs, as proposed in this invention.
[0019] Figure 2 This is a schematic diagram of the architecture of the causal knowledge graph and graph attention causal strategy network coupled and interacting as proposed in this invention. Detailed Implementation
[0020] Combination Figures 1-2 The present invention will be described in further detail below. These accompanying drawings are simplified schematic diagrams, illustrating only the basic structure of the invention and showing the main components relevant to the invention. Figure 1 and Figure 2 The present invention provides an adaptive optimization method for fermenter operating parameters based on knowledge graphs, comprising the following steps: S1: Integrate historical fermentation data and use causal discovery algorithms to construct an initial knowledge graph representing the causal relationships between process variables; S2: Real-time acquisition of multi-source sensor data during the fermentation process; monitoring of changes in causal effects between variables through time-series causal analysis; execution of active perturbation experiments within a safe range when significant changes are detected; and dynamic updating of causal edges and weights in the initial knowledge graph based on system response data. S3: Based on the identification results and optimization objectives of the current fermentation stage, extract the task-related subgraph containing key causal paths from the updated knowledge graph, and use a graph neural network to encode the subgraph to generate node feature vectors; S4: Input the node feature vector into the graph attention causal policy network. This network structure is coupled with the subgraph topology. It aggregates information along the causal path through the graph attention mechanism and outputs the probability distribution of the adjustment action of controllable operating parameters. S5: Construct a counterfactual reasoning model based on the current knowledge graph, deduce the expected results of candidate actions in the probability distribution of adjustment actions, and select the final action to be executed based on safety and performance evaluation criteria; S6: Perform the final action to adjust the fermenter operating parameters and collect system status feedback data and performance index data after a preset time; S7: Use feedback data to synchronously verify and correct the knowledge graph and update the parameters of the policy network, completing a single optimization loop.
[0021] In this embodiment, S1 specifically includes: S1.1: Collect time-series data of operating parameters, state variables, and performance indicators from historical fermentation data; S1.2: Preprocess all collected time-series data. The preprocessing steps include missing value imputation, outlier removal, and standardization. S1.3: Based on the preprocessed time series data, a constraint-based causal discovery algorithm is used to test conditional independence, and time series information is used to exclude reverse causal relationships, and an initial dependency graph structure representing the unconditional dependency relationship between variables is constructed. S1.4: Based on the initial dependency graph structure, a scoring-based causal discovery algorithm is adopted. By searching and optimizing the predefined graph structure scoring function, the causal direction of the edges in the initial dependency graph is determined, forming a directed causal graph. S1.5: For each edge in the directed causal graph, calculate the causal weights that characterize the strength of the influence of the cause variable on the outcome variable by fitting a structural equation model between the two variables connected by the edge. S1.6: The directed causal graph with causal direction and causal weight, along with the definitions of all process variables and metadata information, is stored in a graph structure data format to construct the initial knowledge graph.
[0022] In this embodiment, S2 specifically includes: S2.1: The set and measured values of temperature, pH value, stirring speed, aeration rate, and dissolved oxygen concentration are collected in real time through the fermenter control system to form a real-time data stream; S2.2: Synchronize the real-time data stream and extract data in a fixed time window to form the current observation time series segment; S2.3: Perform time-series causal analysis on the process variables in the current observation time segment and calculate the causal effect measure between variables; S2.4: Compare the calculated causal effect measure with the benchmark measure established based on historical data. When the change exceeds the preset threshold, it is determined that a significant change in causal effect has been detected, and the corresponding variable pair is marked as a candidate causal pair to be verified. S2.5: For each candidate causal pair to be verified, design and execute an active perturbation experiment within the process safety operating range. The experiment includes applying a setpoint adjustment to the causal variable with limited amplitude and duration within a single control cycle. S2.6: During the active perturbation experiment, collect and record the response time series data of the causal and outcome variables; S2.7: Based on the recorded response time-series data, update the weight and direction information of the corresponding causal edges in the knowledge graph.
[0023] In this embodiment, S3 specifically includes: S3.1: Based on cell concentration, substrate concentration, product concentration and dissolved oxygen concentration data, a classification model is used to identify the current fermentation stage; S3.2: Based on the current fermentation stage, select the optimization target for the current stage from the preset mapping table; S3.3: Using the node representing the current optimization goal in the knowledge graph as the endpoint and all controllable operating parameter nodes as the starting point, use a graph search algorithm to find all directed paths from the starting point to the endpoint; S3.4: Calculate the path strength of each directed path, and select paths with strength greater than a preset threshold to form a set of key causal paths; S3.5: Extract all nodes and connecting edges from the key causal path set to form a task-related subgraph; S3.6: Input the adjacency matrix and node feature matrix of the task-related subgraph into the graph neural network encoder. The node feature matrix consists of the real-time value of the variable corresponding to the node, historical features, and type encoding. S3.7: The graph neural network encoder aggregates information through multi-layer graph convolution operations and outputs an updated node feature matrix, in which the row vectors are the node feature vectors.
[0024] In this embodiment, S4 specifically includes: S4.1: Construct a multi-layer graph attention causal strategy network, with the number of layers matching the node hierarchy depth of the task-related subgraph; S4.2: Use the adjacency matrix of the task-related subgraph as the fixed graph structure input of the network. The adjacency matrix reflects the causal connection relationship between nodes in the subgraph. S4.3: Use the node feature vectors as input features for the first layer of the network; S4.4: In the graph attention calculation unit of each layer of the network, for each target node in the subgraph, the attention coefficient between the target node and all its causal neighbor nodes is calculated. The attention coefficient is obtained by linear transformation and nonlinear activation of the target node features and the neighbor node features. S4.5: Normalize the attention coefficients calculated for each target node to obtain the normalized attention weights of the target node to its neighboring nodes; S4.6: Use the normalized attention weights to perform a weighted summation of the features of neighboring nodes, and then combine it with the features of the target node itself to perform a linear transformation and activation, so as to obtain the updated feature vector of the target node in the next layer. S4.7: Input the feature vector output from the last layer of the network into the fully connected output layer, and generate an adjustment action probability distribution for each controllable operating parameter node through the activation function.
[0025] In this embodiment, S5 specifically includes: S5.1: Construct a structural causal model based on the current knowledge graph. This model maps graph variables to nodes and causal edges to structural equations. S5.2: Select the top K actions with the highest probability values from the adjustment action probability distribution as the candidate action set; S5.3: For each candidate action, it is treated as an intervention in the corresponding operating parameter node in the structural causal model, and the expected changes in downstream state variables and performance indicators are deduced. S5.4: Based on the simulation results, calculate the expected performance score and safety risk score for each candidate action; S5.5: If the safety risk score is lower than the preset threshold, select the candidate action with the highest expected performance score as the first action to be executed; S5.6: If no candidate action meets the safety threshold, a set of conservative actions with smaller adjustment ranges will be generated as a new candidate set based on process experience; S5.7: Repeat the deduction and evaluation of the new candidate set, and select the action that meets the safety requirements and has the best performance as the final action to be executed.
[0026] In this embodiment, S6 specifically includes: S6.1: The final execution action is parsed into specific adjustment instructions for one or more controllable operating parameters. The adjustment instructions include parameter identifier, target setpoint or setpoint change amount, and execution priority. S6.2: After sorting the parsed adjustment instructions according to their execution priority, send them sequentially to the distributed control system execution module at the bottom of the fermenter; S6.3: After the execution module receives the adjustment command, it converts the target setpoint or the change in setpoint into an analog signal or a digital signal through the controller output module, and drives the corresponding actuator to perform the operation. S6.4: After the actuator completes the parameter adjustment action, start the timer to start calculating the feedback waiting time. The length of the feedback waiting time is preset according to the process response time constant of the adjusted parameter. S6.5: After the feedback waiting time is reached, real-time measured values of all operating parameters, real-time measured values of all state variables, and real-time values of key performance indicators obtained through the online analyzer are collected synchronously through the sensor network. S6.6: Perform data verification on all collected real-time measurements and real-time values. Data verification includes range checking, mutation detection and consistency verification. Invalid data points are removed and data quality markers are recorded. S6.7: After the valid measurement values and valid values that have been verified by data are aligned with the timestamps, they are stored as a complete system status feedback data record. This record includes the baseline status before the adjustment action is executed, the final status after the action is executed, and all intermediate status data points recorded during the adjustment process.
[0027] In this embodiment, S7 specifically includes: Using the system state feedback data and performance index data, the true causal effect and performance gain of the final executed action are calculated; based on the calculation results, the weights of the corresponding causal edges in the knowledge graph are verified and corrected; simultaneously, using the system state feedback data, performance index data, and calculated gains as training samples, the parameters of the graph attention causal policy network are updated using the policy gradient algorithm.
[0028] Example 1: To verify the feasibility of this invention in practice, we selected an industrial-scale antibiotic fermentation process as the application background. This process is characterized by high nonlinearity, multivariate coupling, and batch-to-batch fluctuations. Its core objective is to maximize the product yield while ensuring process safety. In real-world scenarios, the fermenter's operating parameters, such as temperature, pH, dissolved oxygen concentration, and feed rate, need to be dynamically adjusted according to the cell growth state. Traditional control strategies rely on feedforward-feedback control based on fixed rules or optimization settings based on static models, which are difficult to adapt to the dynamic changes in cell metabolic state, often resulting in large fluctuations in product yield and poor batch stability. Especially when facing batch differences in raw materials or environmental disturbances, traditional methods often react lagily or make inappropriate adjustments, causing losses in production efficiency.
[0029] To address the aforementioned problems, this invention aims to achieve adaptive optimization of operating parameters by integrating causal knowledge with reinforcement learning. The specific implementation process is detailed below.
[0030] Historical data from the past two hundred successful batches of this fermentation process were collected, including time-series data on temperature, pH, stirring speed, aeration rate, dissolved oxygen concentration, cell concentration, substrate concentration, and product concentration. This data was processed using a hybrid causal discovery algorithm based on constraints and scoring. The algorithm constructs an undirected dependency graph between variables through conditional independence tests, eliminates reverse causality by combining time-series constraints, determines the causal direction by optimizing the graph structure scoring function, and assigns an initial weight to each causal edge. This results in the construction of an initial knowledge graph containing eight core variables and their causal relationships. This graph is stored in a resource description framework format and explicitly records twenty-two key causal relationships, such as increasing stirring speed leading to an increase in dissolved oxygen concentration.
[0031] After the fermenter starts up and enters the logarithmic growth phase, the system begins real-time optimization. The distributed control system collects setpoints and measured values of all operating parameters, as well as key state variables, every second. The system extracts real-time data in ten-minute time windows to form observation segments and uses an improved time-series Granger causality test method to calculate the causal effect measure between variables. At a certain point, the system detects that the causal effect measure of "aeration rate on dissolved oxygen concentration" has decreased by 37 percent compared to the historical baseline, exceeding the preset 20 percent change threshold. Therefore, this variable pair is marked as a candidate causal pair to be verified.
[0032] The system then initiated a safety perturbation experiment. Based on the process safety operating procedures, it was determined that the aeration setpoint would be increased by 5% within a safe range during the next 30-second control cycle. The system executed this perturbation and recorded the response curves of aeration and dissolved oxygen concentration at high frequency. The dynamic causal effect strength calculated based on the response data was 0.68, while the corresponding weight recorded in the knowledge graph was 0.92. Since the difference exceeded the 10% update threshold, the system updated the weight of this causal edge to 0.68. This update reflects the actual situation that the effect of aeration on dissolved oxygen increase has diminished due to the increased cell density in the current fermentation stage.
[0033] Next, based on the online monitoring of cell growth rate and substrate consumption rate, the system determines that it is currently in the early stage of the stable phase, where product synthesis is at its most vigorous. The optimization objective is set to maximize the product accumulation within the next two hours. The system uses the "product concentration" node in the knowledge graph as the endpoint and traces back all causal paths pointing to it. It calculates and selects the five key causal paths with the highest path strength. These paths involve five controllable parameters, including temperature, pH, and feed rate. All nodes and edges on these paths are extracted to form a task-related causal subgraph containing thirteen nodes and seventeen edges.
[0034] A two-layer graph neural network encoder is used to encode the subgraph. The encoder takes into input the adjacency matrix and node feature matrix of the subgraph. The node features include the real-time normalized values of each variable, the mean and variance over the past hour, and the node type encoding. After graph convolution, the encoder outputs an updated feature vector for each node, which integrates the node's own state and its structured neighborhood information in the causal network.
[0035] The feature vectors of these nodes are input into a three-layer graph attention causal policy network. The inter-layer connection structure of this network is strictly aligned with the topology of the causal subgraph, ensuring that information flows along the causal direction. In the first layer, the network calculates the attention weight between each node and its causal parent node. For example, for the "product concentration" node, it mainly focuses on the two parent nodes "cell concentration" and "specific growth rate", and the calculated attention weights are 0.62 and 0.38, respectively. After three layers of such information aggregation and transformation, the network's final output layer generates a probability distribution of adjustment actions for each of the five controllable parameters. For example, for "feeding rate", the output probabilities are: increase by 3% (probability 0.55), maintain (probability 0.30), and decrease by 2% (probability 0.15).
[0036] Before executing the action with the highest probability (increasing the feed rate by 3%), the system initiates a counterfactual reasoning safety calibration. Based on the structural causal model constructed from the current knowledge graph, the system not only infers the expected result after executing this action, but also simultaneously infers the consequences of two alternative actions: "maintaining the feed rate" and "increasing the feed rate by 1%". The inference results show that although the preferred action is expected to increase product accumulation by 5.2%, it will lead to a 15% increase in the risk of substrate residue exceeding the limit. The action of "increasing the feed rate by 1%" is expected to increase product accumulation by 3.8%, and the risk of substrate residue only increases by 5%. Based on the preset decision function with safety as the primary condition, the system ultimately selects "increasing the feed rate by 1%" as the final action to be executed.
[0037] This action was executed via a control system. The system waited forty minutes (a preset feedback waiting time covering the main dynamic response process of the operation) before collecting all variable data. Actual feedback data showed that after adjusting the feed rate, the product concentration increased by a cumulative 3.5%, the substrate residual concentration remained within a safe range, and the dissolved oxygen concentration remained stable.
[0038] The complete data generated from this interaction—including the state before the action, the action performed, the state after the action, and the calculated immediate reward—was stored as an experience sample. The reward value was calculated by weighting three factors: product accumulation improvement, process fluctuation penalty, and safety constraint penalty; in this case, it was +0.72. The system then randomly sampled a batch of data containing one hundred samples from the experience pool and updated the parameters of the policy network using a proximal policy optimization algorithm with causal importance sampling. Simultaneously, the data from this interaction was also used to validate the knowledge graph: the observed causal effect strength of "feeding rate on product concentration" highly matched the graph's recorded values, requiring no weight updates but reinforcing the credibility of the relationship.
[0039] To systematically evaluate the effectiveness of this invention, we conducted a comparative experiment on the same fermenter with ten consecutive batches. Five batches used the method of this invention, while the other five batches were optimized and controlled using an existing expert system based on fixed rules. We recorded the key performance indicators for each batch during the stabilization period, and the specific data comparison is shown in the table below.
[0040] Table 1: Comparison of the fermentation performance of the method of the present invention with that of the original expert system under continuous batch control Analysis of the data in the table above shows that the target metabolite concentration fluctuation coefficients of the five batches (batches 1-5) using the method of this invention remained stable at a high level (1.82-1.90 g / L / h), with an average of 1.86 g / L / h, and the batch-to-batch fluctuations were small. The product concentration fluctuation coefficients were significantly lower (3.5%-4.5%), indicating more stable process control. The average conversion rate of key substrates reached 92.8%, higher than the 88.2% of the control group, demonstrating superior raw material utilization efficiency. In terms of process stability, the average deviation (root mean square error) of dissolved oxygen concentration control under the method of this invention was 0.076, far lower than the 0.152 of the original expert system, indicating a significant improvement in the control accuracy of key state variables. Furthermore, batch 7 using the original expert system triggered an unplanned shutdown due to pH control misalignment, while the method of this invention achieved zero unplanned shutdowns in all batches, fully demonstrating that its safety calibration mechanism based on counterfactual reasoning can effectively prevent high-risk operations and ensure production continuity and safety. In summary, this invention, through the dynamic construction and utilization of causal knowledge graphs and combined with causal reinforcement of safety decision-making, has achieved adaptive optimization of operating parameters in actual industrial fermentation scenarios, and has achieved significant and reproducible positive effects in improving production efficiency, stabilizing product quality, and ensuring production safety.
Claims
1. A knowledge graph-based adaptive optimization method for fermenter operating parameters, characterized in that, Includes the following steps: S1: Integrate historical fermentation data and use causal discovery algorithms to construct an initial knowledge graph representing the causal relationships between process variables; S2: Real-time acquisition of multi-source sensor data during the fermentation process; monitoring of changes in causal effects between variables through time-series causal analysis; execution of active perturbation experiments within a safe range when significant changes are detected; and dynamic updating of causal edges and weights in the initial knowledge graph based on system response data. S3: Based on the identification results and optimization objectives of the current fermentation stage, extract the task-related subgraph containing key causal paths from the updated knowledge graph, and use a graph neural network to encode the subgraph to generate node feature vectors; S4: Input the node feature vector into the graph attention causal policy network. This network structure is coupled with the subgraph topology. It aggregates information along the causal path through the graph attention mechanism and outputs the probability distribution of the adjustment action of controllable operating parameters. S5: Construct a counterfactual reasoning model based on the current knowledge graph, deduce the expected results of candidate actions in the probability distribution of adjustment actions, and select the final action to be executed based on safety and performance evaluation criteria; S6: Perform the final action to adjust the fermenter operating parameters and collect system status feedback data and performance index data after a preset time; S7: Use feedback data to synchronously verify and correct the knowledge graph and update the parameters of the policy network, completing a single optimization loop.
2. The adaptive optimization method for fermenter operating parameters based on knowledge graphs according to claim 1, characterized in that, S1 specifically includes: S1.1: Collect time-series data of operating parameters, state variables, and performance indicators from historical fermentation data; S1.2: Preprocess all collected time-series data. The preprocessing steps include missing value imputation, outlier removal, and standardization. S1.3: Based on the preprocessed time series data, a constraint-based causal discovery algorithm is used to test conditional independence, and time series information is used to exclude reverse causal relationships, and an initial dependency graph structure representing the unconditional dependency relationship between variables is constructed. S1.4: Based on the initial dependency graph structure, a scoring-based causal discovery algorithm is adopted. By searching and optimizing the predefined graph structure scoring function, the causal direction of the edges in the initial dependency graph is determined, forming a directed causal graph. S1.5: For each edge in the directed causal graph, calculate the causal weights that characterize the strength of the influence of the cause variable on the outcome variable by fitting a structural equation model between the two variables connected by the edge. S1.6: The directed causal graph with causal direction and causal weight, along with the definitions of all process variables and metadata information, is stored in a graph structure data format to construct the initial knowledge graph.
3. The adaptive optimization method for fermenter operating parameters based on knowledge graphs according to claim 1, characterized in that, S2 specifically includes: S2.1: The set and measured values of temperature, pH, stirring speed, aeration rate, and dissolved oxygen concentration are collected in real time through the fermenter control system to form a real-time data stream; S2.2: Synchronize the real-time data stream and extract data in a fixed time window to form the current observation time series segment; S2.3: Perform time-series causal analysis on the process variables in the current observation time segment and calculate the causal effect measure between variables; S2.4: Compare the calculated causal effect measure with the benchmark measure established based on historical data. When the change exceeds the preset threshold, it is determined that a significant change in causal effect has been detected, and the corresponding variable pair is marked as a candidate causal pair to be verified. S2.5: For each candidate causal pair to be verified, design and execute an active perturbation experiment within the process safety operating range. The experiment includes applying a setpoint adjustment to the causal variable with limited amplitude and duration within a single control cycle. S2.6: During the active perturbation experiment, collect and record the response time series data of the causal and outcome variables; S2.7: Based on the recorded response time-series data, update the weight and direction information of the corresponding causal edges in the knowledge graph.
4. The adaptive optimization method for fermenter operating parameters based on knowledge graphs according to claim 1, characterized in that, S3 specifically includes: S3.1: Based on cell concentration, substrate concentration, product concentration and dissolved oxygen concentration data, a classification model is used to identify the current fermentation stage; S3.2: Based on the current fermentation stage, select the optimization target for the current stage from the preset mapping table; S3.3: Using the node representing the current optimization goal in the knowledge graph as the endpoint and all controllable operating parameter nodes as the starting point, use a graph search algorithm to find all directed paths from the starting point to the endpoint; S3.4: Calculate the path strength of each directed path, and select paths with strength greater than a preset threshold to form a set of key causal paths; S3.5: Extract all nodes and connecting edges from the key causal path set to form a task-related subgraph; S3.6: Input the adjacency matrix and node feature matrix of the task-related subgraph into the graph neural network encoder. The node feature matrix consists of the real-time value of the variable corresponding to the node, historical features, and type encoding. S3.7: The graph neural network encoder aggregates information through multi-layer graph convolution operations and outputs an updated node feature matrix, in which the row vectors are the node feature vectors.
5. The adaptive optimization method for fermenter operating parameters based on knowledge graphs according to claim 1, characterized in that, S4 specifically includes: S4.1: Construct a multi-layer graph attention causal strategy network, with the number of layers matching the node hierarchy depth of the task-related subgraph; S4.2: Use the adjacency matrix of the task-related subgraph as the fixed graph structure input of the network. The adjacency matrix reflects the causal connection relationship between nodes in the subgraph. S4.3: Use the node feature vectors as input features for the first layer of the network; S4.4: In the graph attention calculation unit of each layer of the network, for each target node in the subgraph, the attention coefficient between the target node and all its causal neighbor nodes is calculated. The attention coefficient is obtained by linear transformation and nonlinear activation of the target node features and the neighbor node features. S4.5: Normalize the attention coefficients calculated for each target node to obtain the normalized attention weights of the target node to its neighboring nodes; S4.6: Use the normalized attention weights to perform a weighted summation of the features of neighboring nodes, and then combine it with the features of the target node itself to perform a linear transformation and activation, so as to obtain the updated feature vector of the target node in the next layer. S4.7: Input the feature vector output from the last layer of the network into the fully connected output layer, and generate an adjustment action probability distribution for each controllable operating parameter node through the activation function.
6. The adaptive optimization method for fermenter operating parameters based on knowledge graphs according to claim 1, characterized in that, S5 specifically includes: S5.1: Construct a structural causal model based on the current knowledge graph. This model maps graph variables to nodes and causal edges to structural equations. S5.2: Select the top K actions with the highest probability values from the adjustment action probability distribution as the candidate action set; S5.3: For each candidate action, it is treated as an intervention in the corresponding operating parameter node in the structural causal model, and the expected changes in downstream state variables and performance indicators are deduced. S5.4: Based on the simulation results, calculate the expected performance score and safety risk score for each candidate action; S5.5: If the safety risk score is lower than the preset threshold, select the candidate action with the highest expected performance score as the first action to be executed; S5.6: If no candidate action meets the safety threshold, a set of conservative actions with smaller adjustment ranges will be generated as a new candidate set based on process experience; S5.7: Repeat the deduction and evaluation of the new candidate set, and select the action that meets the safety requirements and has the best performance as the final action to be executed.
7. The adaptive optimization method for fermenter operating parameters based on knowledge graphs according to claim 1, characterized in that, S6 specifically includes: S6.1: The final execution action is parsed into specific adjustment instructions for one or more controllable operating parameters. The adjustment instructions include parameter identifier, target setpoint or setpoint change amount, and execution priority. S6.2: After sorting the parsed adjustment instructions according to their execution priority, send them sequentially to the distributed control system execution module at the bottom of the fermenter; S6.3: After the execution module receives the adjustment command, it converts the target setpoint or the change in setpoint into an analog signal or a digital signal through the controller output module, and drives the corresponding actuator to perform the operation. S6.4: After the actuator completes the parameter adjustment action, start the timer to start calculating the feedback waiting time. The length of the feedback waiting time is preset according to the process response time constant of the adjusted parameter. S6.5: After the feedback waiting time is reached, real-time measured values of all operating parameters, real-time measured values of all state variables, and real-time values of key performance indicators obtained through the online analyzer are collected synchronously through the sensor network. S6.6: Perform data verification on all collected real-time measurements and real-time values. Data verification includes range checking, mutation detection and consistency verification. Invalid data points are removed and data quality markers are recorded. S6.7: After the valid measurement values and valid values that have been verified by data are aligned with the timestamps, they are stored as a complete system status feedback data record. This record includes the baseline status before the adjustment action is executed, the final status after the action is executed, and all intermediate status data points recorded during the adjustment process.
8. The adaptive optimization method for fermenter operating parameters based on knowledge graphs according to claim 1, characterized in that, Specifically, S7 includes: Using the system state feedback data and performance index data, the true causal effect and performance gain of the final executed action are calculated; based on the calculation results, the weights of the corresponding causal edges in the knowledge graph are verified and corrected; simultaneously, using the system state feedback data, performance index data, and calculated gains as training samples, the parameters of the graph attention causal policy network are updated using the policy gradient algorithm.