Chemical safety decision method and system based on causal reasoning
By constructing a structured causal graph template for chemical process mechanisms and a multi-step prompting engineering-guided generative model, combined with counterfactual validity scoring and three-dimensional uncertainty quantification, the problem of poor logical interpretability in chemical safety schemes is solved, achieving causal logical consistency and reliability in safety decisions, and is applicable to various chemical processes and R&D stages.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHAMBROAD CHEM IND RES INST CO LTD
- Filing Date
- 2026-03-11
- Publication Date
- 2026-06-19
AI Technical Summary
Existing technologies lack constraints from chemical process mechanisms in the formulation and evaluation of chemical safety plans, resulting in poor interpretability of decision-making logic, easy generation of unreliable risk inferences, and difficulty in meeting the professional needs of chemical R&D safety management.
We construct a structured causal graph template based on chemical process mechanisms, employ a multi-step prompting engineering-guided generative model for directed reasoning, and combine counterfactual validity scoring and a three-dimensional uncertainty quantification mechanism to enhance the logical consistency and interpretability of the reasoning process.
It achieves causal consistency and interpretability in chemical safety decision-making, ensures that the generated safety solutions have reliable risk control capabilities, supports traceability and auditing, reduces safety hazards caused by uncertainty, and is applicable to different chemical process types and R&D stages.
Smart Images

Figure CN122245518A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a chemical safety decision-making method and system based on causal reasoning, belonging to the interdisciplinary field of chemical safety and artificial intelligence. Background Technology
[0002] In chemical research and development, reactants are complex, process conditions are tightly coupled, and accident chains are long and have serious consequences, often evolving from a series of causal events. To reduce accident risks, strict safety management is required at each stage of chemical research and development.
[0003] Traditional safety production management relies on expert experience and rule-based matching mechanisms, making it difficult to balance efficiency and quality in the development and evaluation of safety plans. Generative AI technology offers a new solution, but its "unexplainability" and "illusion" issues pose challenges in the highly demanding field of safety. CN121056234A constructs a hierarchical hybrid probabilistic safety twin model, but relies solely on general safety data and general state characteristics, failing to support core needs such as material hazard analysis. CN120197943A utilizes generative AI for chemical change risk management, but it is essentially data-driven pattern recognition, resulting in a black-box decision-making process that lacks structured modeling of the causal chain of chemical accidents and verification of the effectiveness of safety measures. CN118657241A proposes process parameter recommendations based on counterfactual explanations, but its explanations are limited to the statistical correlation level, lacking structured causal reasoning based on reaction mechanisms, and the counterfactual sample generation process is untraceable and unauditable. CN120373475B constructs a generative adversarial network for safety event simulation, but its generation-verification loop remains a black box that cannot trace the decision-making path, and it lacks quantification of the uncertainty of the simulation results.
[0004] Existing technologies lack industry-specific constraints and verifications when developing and evaluating safety solutions, resulting in poor logical interpretability and the potential for unreliable risk inferences, making it difficult to meet the specialized needs of safety management in chemical research and development. Summary of the Invention
[0005] To address the problem that existing technologies lack constraints and verification based on chemical process mechanisms when constructing chemical safety solutions, resulting in poor interpretability of decision-making logic and the potential for unreliable risk inferences, this invention, based on a multi-source chemical knowledge base, enhances the logical consistency and interpretability of the reasoning process by constructing a structured causal graph template based on chemical process mechanisms and employing a multi-step prompting engineering-guided generative model for directed reasoning. Furthermore, it enhances the effectiveness and credibility verification of the solution measures by introducing counterfactual validity scoring and establishing a three-dimensional uncertainty quantification mechanism. Combined with full-process management, this approach avoids the risks of "logical jumps" or "black box decision-making" that generative artificial intelligence is prone to.
[0006] This invention provides a chemical safety decision-making method based on causal reasoning, comprising the following steps S1 to S5.
[0007] Step S1: Construct a structured cause-effect graph template based on chemical process mechanisms.
[0008] For the chemical process type of the project to be analyzed (such as nitration, hydrogenation, polymerization, distillation, etc.), a structured cause-effect graph template is constructed based on the chemical process mechanism, including initial deviation nodes, intermediate event nodes, amplification factor nodes, accident nodes, and critical control points. Initial deviations represent the initial causes of the accident, including temperature deviations, stirring failures, abnormal feeding, and material ratio deviations; intermediate events represent key events or states that accumulate or amplify the accident causes, including runaway reaction rates, heat accumulation, side reaction initiation, and localized overheating; amplification factors represent factors that further amplify the accident causes, including incompatible equipment materials, insufficient heat transfer efficiency, and pressure accumulation; accidents include explosions, splashes, container ruptures, and toxic gas leaks; and critical control points represent effective means to block the accident's development path, including temperature control, feed rate control, and equipment material selection.
[0009] The construction of the cause-effect graph template includes data preprocessing, semantic parsing and annotation, node extraction, and node association modeling.
[0010] 1) Data Preprocessing: Based on enterprise or industry accident data, MSDS data, experimental data, corrosion data, and legal and regulatory standards, chemical process mechanism data is obtained. Accident data is used to extract fields describing the accident process, causes, and consequences. Property and process data are extracted from MSDS, corrosion, and experimental data. Prohibitory clauses and risk control requirements are extracted from legal and regulatory standards. The extracted data is then cleaned to remove duplicate, invalid, and erroneous information, forming a training set. 2) Semantic Parsing and Labeling: A natural language processing (NLP) model is used to perform semantic analysis and entity recognition on the preprocessed training data. Key entities representing biases, events, and consequences are extracted, and these entities are categorized and labeled as "initial bias," "intermediate event," "amplifying factor," and "accident." The labeled entities serve as nodes for constructing causal graph templates, forming the labeled dataset. In practice, the NLP model can be a pre-trained language model, such as BERT or its variants. 3) Node Extraction: Nodes in the labeled dataset are extracted and classified using a node classification model. Then, duplicate nodes are removed and merged to obtain a node set. Specifically, a Convolutional Neural Network (CNN) can be used as the node classification model, and an attention mechanism can be introduced to enhance its ability to capture and integrate key features. 4) Node Association Modeling: A Bayesian network is used to construct the association relationships and probabilities between nodes. Then, statistical frequency and causal logic constraints are used to filter out invalid associations, resulting in causal logic rules. Here, the association probability between nodes represents the strength of the association; statistical frequency refers to the probability that two nodes co-occur in an accident case; causal logic constraints refer to constraint rules based on the chemical process mechanism; and filtering out invalid associations refers to eliminating association relationships between nodes that do not satisfy the causal logic constraints.
[0011] For special processes such as sparse accident case data and non-standardized process parameters, a combination of manual guidance and tool assistance is used to construct causal logic rules. In this process, process experts define the logical sequence of core nodes, and the system automatically completes the related details.
[0012] The cause-effect graph template uses a structured data format to represent causal logic rules, supporting matching and fusion between nodes from different data sources. In practice, the structured data format can be JSON.
[0013] Step S2: Based on the causal graph template, the causal chain is inferred and candidate solutions are generated through a multi-step prompting engineering-guided generative model.
[0014] Design a multi-step reasoning framework that embeds step-by-step reasoning instructions into the prompt text. Use the structured cause-effect graph template generated in step S1 as the prompt context input to the generative model, requiring the model to complete the following sequentially: 1) Identify initial deviations based on the process specifications in the context; 2) Based on the rules of causal logic, reason about the intermediate events and amplifying factors that may be triggered by the initial deviation; 3) Based on intermediate events, infer the possible accident types and key control points; 4) Generate control measures that conform to the chemical process mechanism for each critical control point; 5) Output the complete causal chain, explaining the association mechanism between measures and nodes.
[0015] The node information in the causal chain is generated by integrating multi-source chemical knowledge bases. The nodes have standardized codes, supporting cross-data source matching and integration, ensuring the professionalism and compliance of the generated content.
[0016] The node standardization coding rules are as follows: 1) The initial deviation node code adopts the format "C-DEV-XXX", where "C" represents "Cause", "DEV" represents "Deviation", and "XXX" is a three-digit serial number. It is grouped and numbered according to the process type. For example, the nitration process starts from C-DEV-001 and the hydrogenation process starts from C-DEV-101. The process type can be indicated by a suffix, such as "(Temperature Deviation - Nitration)" as a semantic description. 2) The intermediate event node code adopts the format "C-EVT-XXX", where "C" represents "Cause", "EVT" represents "Event", and "XXX" is a three-digit serial number. It is grouped and numbered according to the process type. For example, the nitration process starts from C-EVT-001. An optional suffix can be used to indicate the association between the event type and the process, such as "(Heat accumulation - nitration)" as a semantic description. 3) The amplification factor node code adopts the format "C-AMP-XXX", where "C" represents "Cause", "AMP" represents "Amplification", and "XXX" is a three-digit serial number. It is grouped and numbered according to the process type. For example, the nitration process starts from C-AMP-001. The optional suffix indicates the influence dimension and process association, such as "(Incompatible equipment materials)" as a semantic description. 4) Accident node codes adopt the format “C-ACC-XXX”, where “C” represents “Cause”, “ACC” represents “Accident”, and “XXX” is a three-digit serial number. They are grouped and numbered according to process type. For example, the nitration process starts from C-ACC-001. An optional suffix can be used to indicate the association between the accident consequences and the process, such as “(Explosion-Nitrification)” as a semantic description.
[0017] Based on the causal chains and control measures corresponding to the key control points of the causal graph template, candidate solutions are generated by integrating information from a multi-source chemical engineering knowledge base.
[0018] Step S3: Based on the counterfactual reasoning model, compare the evolution of the accident path under the two scenarios of taking measures and not taking measures, quantify the probability of the control measures blocking the accident path, and generate a counterfactual effectiveness score.
[0019] The counterfactual reasoning model is based on a constrained system dynamics simulation method, simulating two scenarios respectively.
[0020] Scenario 1: When control measures are taken, is the accident path blocked at critical nodes?
[0021] Scenario 2: When no control measures are taken, does the accident fully evolve to the accident node?
[0022] In practice, the system dynamics simulation method uses the Semenov model (the thermal explosion theory model, proposed by the Soviet scientist Semenov) to simulate processes such as heat release rate, heat accumulation, and pressure rise.
[0023] The Counterfactual Effectiveness Score (CES) is defined as the probability that an accident path will be blocked after taking action, and is calculated using the following formula: in, p i Represents the probability of each accident path occurring, satisfying , s i This represents the probability that control measures will be effective for each accident path. N This represents the number of possible paths.
[0024] Counterfactual validity score p ces The value range is 0~1. p ces =0 indicates that the measure is completely ineffective. p ces =1 means 100% blocking of the accident path.
[0025] get p ces After the values are obtained, the candidate solutions are subjected to Top-k screening and secondary screening.
[0026] Top-k filtering: by p ces The values are sorted from high to low, and the top k are retained as candidate solutions. The k value is calculated based on three core dimensions: process risk level, generative model confidence, and historical solution reuse rate. ,in: α Process risk level coefficient (values are high risk = 3, medium risk = 2, low risk = 1). β′ Model confidence inverse mapping coefficients ( β′ = 1- β , β (This refers to the confidence level of the generative model). γ′ Historical scheme reuse rate inverse mapping coefficient ( γ′ = 1- γ , γ (This refers to the reuse rate of historical solutions). w 1 , w 2 , w 3 These are weighting coefficients, and the sum of the three is 1; k 0 The number of units generated is a preset baseline, and the value is an integer greater than or equal to 2.
[0027] In practice, the value can be... k 0 =2,w 1 =0.3, w 2 =0.4, w 3 =0.3.
[0028] Generative model confidence β Calculated using the Monte Carlo Dropout method (a method used in deep learning to estimate model prediction uncertainty); historical scheme reuse rate γ It is the proportion of archived safety schemes that are the same as or highly similar to the current process type, and that have ≥80% similarity to the current scheme in terms of key control measures, causal chain structure, and accident type.
[0029] Secondary screening: A further screening process is conducted based on the candidate solutions' compliance, cost-effectiveness, and feasibility, eliminating solutions with insufficient compliance, excessively high costs, or those that cannot be implemented. Compliance represents the degree of compliance with laws and regulations; cost-effectiveness represents the implementation cost of the solution; and feasibility represents the availability of existing equipment or facilities.
[0030] 1) Compliance: The initial maximum score is 100 points. After scoring, the score is retained if the final score is ≥80 points, and removed if it is below 80 points.
[0031] Scoring rules: Violating one core regulation will result in a deduction of 30 points. The regulatory information is sourced from a multi-source chemical knowledge base. 20 points will be deducted for each non-compliance with an industry standard. Industry standard information is from a multi-source chemical knowledge base. 10 points will be deducted for each conflict with internal management regulations. Management regulations information is sourced from a multi-source chemical knowledge base. 15 points will be deducted for each missing mandatory compliance document. In practice, the specific compliance documents are stipulated by relevant management regulations.
[0032] 2) Economic efficiency: The implementation cost is ≤ 120% of the enterprise's upper limit for safety investment in similar processes. In specific implementation, a simplified judgment can be adopted: small and medium-sized projects ≤ 500,000 yuan, medium and large projects ≤ 2 million yuan, and those exceeding the threshold are directly eliminated.
[0033] 3) Feasibility: The maximum score is 100 points. If the final score is ≥70 points, it will be retained; if it is below 70 points, it will be removed.
[0034] Scoring rules: 60 points for direct support from existing equipment, 30 points for simple modification (modification period ≤ 10 days), and 0 points for replacement of core equipment. No additional training required: 40 points; Simple training required (training period ≤ 3 days): 10 points; Specialized training required (training period > 7 days): 0 points. Those with a total score below 70 will be eliminated.
[0035] The sorting and filtering rules yield a list of security solutions, including each solution. p ces Value, recommendation level (high / medium / low) and reasons for selection.
[0036] Step S4: Construct a three-dimensional uncertainty quantification mechanism that integrates data uncertainty, model uncertainty, and inference uncertainty, dynamically set confidence thresholds according to the R&D stage, and trigger the expert review process.
[0037] Three-dimensional uncertainty quantification mechanisms include: 1) Data uncertainty: depends on the quality of the training data and is assessed based on the number of samples and the completeness of information for the process or materials in the training set; 2) Model uncertainty: depends on the model confidence level, which is obtained by calculating the confidence level of the generative model using the Monte Carlo Dropout method; 3) Inference uncertainty: depends on the completeness of the causal chain of reasoning, and is obtained based on the score of the logical completeness of the causal chain.
[0038] Overall confidence level C total The calculation formula is as follows, which is a weighted average of the three uncertainties mentioned above: C total = w d ×C d + w m ×C m + w r ×C r Among them, C d C is the confidence score for the data. m C is the model confidence score. m This represents the confidence score for inference, with a value ranging from 0 to 1. w d w m w r These are the weight coefficients corresponding to the data confidence score, model confidence score, and inference confidence score, respectively, and w d + w m + w r = 1, in specific implementation, the value can be w d =0.4, w m =0.4, w r =0.2.
[0039] The overall confidence threshold is dynamically set. In specific implementation, it is set according to the R&D stage of the safety solution: 0.6 for the pilot-scale test stage, 0.7 for the pilot-scale amplification stage, and 0.8 for the intermediate-scale amplification stage.
[0040] When the overall confidence level is below the threshold, an expert review process is triggered, and review prompts are output based on the data calculated from the overall confidence level. After expert review, the security plan content is revised according to the expert review comments. If the overall confidence level reaches or exceeds the threshold, no expert review is required.
[0041] Step S5: Integrate the execution results and process information of steps S1 to S4 above to generate a complete security solution.
[0042] Integrating the process and result information generated from steps S1 to S4 above, arranging the content according to themes, and combining relevant project information, the final output security solution includes: 1) A causal chain where nodes already contain risk labeling information; 2) Implementation steps and parameter requirements for optimal control measures; 3) Counterfactual validity scoring and evaluation criteria; 4) Explanation of uncertainty indicators and confidence levels; 5) The decision-making evidence chain that references information from multiple chemical knowledge bases. In specific implementation, the information referenced from multiple chemical knowledge bases includes enterprise or industry accident data, MSDS data, experimental data, corrosion data, and laws, regulations and standards. 6) An early warning and reminder mechanism that is linked to the project management process.
[0043] In practice, the output security solution is displayed on the system page and can also be exported as a document in formats such as pdf, doc, docx, and wps.
[0044] To realize the chemical safety decision-making method based on causal reasoning of this invention, a chemical safety decision-making system based on causal reasoning is implemented based on generative artificial intelligence technology. The system includes five components: a structured causal graph template construction module, a candidate solution generation module, a counterfactual validity scoring module, a three-dimensional uncertainty quantification module, and a full-process integrated management module. The descriptions of each module are as follows: The structured cause-effect graph template construction module B01 connects to a multi-source chemical knowledge base. Using information from the multi-source chemical knowledge base, it extracts initial deviation nodes, intermediate event nodes, amplifying factor nodes, accident nodes, and key control points to generate causal logic rules and generate a structured cause-effect graph template. The candidate solution generation module B02 is connected to the B01 module and the multi-source chemical knowledge base. Based on the structured cause-effect graph template, it infers the cause-effect chain through a multi-step prompting engineering-guided generative model, and generates candidate solutions based on the key control points contained in the cause-effect graph template. The counterfactual validity scoring module B03, connected to module B02 and the multi-source chemical knowledge base, is used to simulate the evolution of accident paths under two scenarios: with control measures and without control measures, using a constrained system dynamics simulation method. It outputs a counterfactual validity score and performs Top-k screening and secondary screening on candidate solutions. The three-dimensional uncertainty quantification module B04 is connected to the B03 module and the multi-source chemical knowledge base. It is used to comprehensively calculate data uncertainty, model uncertainty and reasoning uncertainty, and generate the overall confidence level of the safety scheme. When the confidence level is lower than the judgment threshold, the expert review process is automatically triggered. The end-to-end integrated management module B05 connects to modules B01, B02, B03, and B04. Based on the sequential execution of modules B01-B04, it integrates the necessary information processed and output by the connected modules to output a complete security solution.
[0045] The system integrates with relevant R&D project management, scientific research management, and experimental management systems through standard interfaces to enable the exchange of project information and security plan information. This allows the generation and review of security plans to be embedded into the project management process, forming a closed loop of security management.
[0046] Compared to existing technologies, this invention, based on a multi-source chemical engineering knowledge base, enhances the logical consistency and interpretability of the generated safety solutions by constructing structured cause-effect graph templates according to chemical process mechanisms and employing a multi-step prompting engineering-guided generative model for directed reasoning. Furthermore, it enhances the effectiveness and credibility of the generated safety solutions by introducing counterfactual validity scoring and establishing a three-dimensional uncertainty quantification mechanism. Specific effects include: Ensure the consistency of causal logic in decision-making: Based on chemical process mechanism information provided by a multi-source chemical knowledge base, the generative model is guided to reason along a clear causal chain through causal graph templates and multi-step prompting engineering, avoiding "logical jumps" and "black box decision-making", making the generation process of safety solutions explainable and traceable; To verify the effectiveness of safety measures: introduce a counterfactual reasoning model to quantitatively evaluate the effectiveness of measures in blocking accident paths, ensure that the generated measures have reliable risk prevention and control capabilities, support traceability and auditing, and meet the management requirements of the chemical industry for traceable and auditable safety plans; Reduce safety risks caused by uncertainty: Through a multi-dimensional uncertainty quantification mechanism, trigger the expert review process, balance automation efficiency and decision reliability, and take into account the R&D scenarios of new processes or special materials. Applicability and scalability: It supports the generation of safety solutions for different chemical process types (nitration, hydrogenation, polymerization, etc.) and different R&D stages (small-scale experiment, small-scale scale-up, pilot-scale scale-up), and has scalability. Attached Figure Description
[0047] Figure 1 This is a flowchart illustrating the chemical safety decision-making method based on causal reasoning of the present invention.
[0048] Figure 2 This is a flowchart illustrating the chemical safety decision-making method based on causal reasoning, which includes sub-processes, according to the present invention.
[0049] Figure 3 This is a schematic diagram of the functional modules of the chemical safety decision-making system based on causal reasoning of the present invention. Detailed Implementation
[0050] To make the objectives, technical solutions, and advantages of this application clearer, specific embodiments of this application will be described in further detail below with reference to the accompanying drawings. It is understood that the specific embodiments described herein are merely for explaining this application and not for limiting it. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. It should also be noted that, for ease of description, only the parts relevant to this application are shown in the accompanying drawings, not all of them. Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe operations (or steps) as sequential processes, many of these operations can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but may also have additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0051] Combination Figures 1 to 3 The specific embodiments of the present invention will be described in detail below.
[0052] Example 1: Development of a toluene-based single-stage nitration process in a small-scale experimental phase.
[0053] This embodiment takes a toluene nitration process development project in a pilot-scale experiment of a certain enterprise as an example to explain in detail the complete execution process of the method and system of the present invention in a real chemical research and development scenario, covering the entire process from the construction of the cause-effect graph to the final auditable and safe solution output.
[0054] Step S1: Construct a structured cause-effect graph template based on chemical process mechanisms.
[0055] 1) Data Acquisition and Preprocessing Based on the basic information of the R&D project to be analyzed, the system retrieved accident reports of 12 typical cases from the accident database. It also retrieved physical property data for key materials such as toluene, nitric acid, and sulfuric acid, including thermal stability, oxidizing properties, and corrosiveness, from MSDS data and experimental data. In accordance with the provisions of the "Guidelines for the Automation Transformation of the nitration Process in Chemical Enterprises (Trial Implementation)," which stipulate that "a reaction safety risk assessment of the entire nitration process should be completed as required, thermal stability tests should be conducted on raw materials, intermediate products, and finished products, and safety risk assessments should be conducted on unit operations such as distillation, drying, and storage," corrosion rate data for 304 stainless steel and 316L stainless steel at different concentrations and temperatures were retrieved from the corrosion data. All raw data was cleaned, and incomplete or duplicate information was removed to form a training set.
[0056] 2) Semantic parsing and entity annotation The BERT model was used to perform entity recognition and relationship analysis on accident report information and physical property data in the training set. The system automatically labeled 120 key entities as nodes that can be used to construct causal graph templates, forming a labeled dataset.
[0057] 3) Node extraction A node classification model using a CNN+attention mechanism is trained based on a labeled dataset. The model's input consists of text fragments and contextual features, and its output is the probability of node categories. The system automatically extracts nodes such as "temperature deviation," "excessive feeding rate," "heat accumulation," "start of secondary nitration reaction," and "explosion," and calculates cosine similarity using a semantic similarity algorithm. Synonymous expressions such as "temperature exceeds limit" and "temperature deviates from set value" are merged to form a nitration process node set.
[0058] 4) Node association modeling By using Bayesian network modeling, the strength of causal associations among nodes in the nitration process node set is quantified to obtain the association relationships and probabilities between nodes; Statistical frequency calculation: In the 12 accidents, "temperature deviation" and "heat accumulation" co-occurred 11 times, with a statistical frequency of 91.7%. Causal logic rule generation: Combining the statistical frequency of node co-occurrence in 12 typical accident cases with the constraints of chemical process mechanisms to filter out invalid associations. Based on the core chemical process mechanism of the strongly exothermic nitration reaction, the sequence and triggering conditions between nodes are clarified. "Heat accumulation" is set as an intermediate event node, which must occur after initial deviation nodes such as "temperature deviation" and "excessive feeding rate" to prevent logical reversal. "Explosion" is set as the final accident node, which must be driven by either "pressure accumulation" or "thermal runaway" to eliminate unreasonable logic that a single deviation or amplification factor directly causes an explosion. At the same time, paths with no direct causal relationship, such as "stirring failure → material corrosion", are automatically eliminated (stirring failure mainly affects the uniformity of material mixing and causes local heat accumulation, but is not directly related to material corrosion, which is mainly caused by the mismatch between the medium characteristics and the equipment material).
[0059] 5) Special process supplement In this project, "phased feeding" is a novel control strategy with sparse case studies. The system initiates a manually guided process where process experts input the causal sequence of core nodes: "excessive feeding rate → increased exothermic rate → heat accumulation → explosion," and mark the trigger condition for "excessive feeding rate" as "feeding rate > 60g / h," with data sourced from internal pilot-scale experiments. Based on the input "nitration reaction" process type, the system automatically matches a preset nitration reaction accident cause-effect diagram template, completing nodes that amplify factors such as "insufficient cooling system efficiency" and "equipment material not corrosion resistant."
[0060] The final result is a structured cause-effect graph template, stored in JSON format, which supports cross-system calls.
[0061] The cause-and-effect diagram template includes: Initial deviation points: temperature deviation, excessive feeding rate, material ratio deviation; Intermediate event nodes: increase in exothermic rate, heat accumulation, and initiation of secondary nitration reaction; Key contributing factors: Equipment materials are not corrosion-resistant, and the cooling system is inefficient. Accident milestones: Explosion, toxic gas leak; Key control points: temperature control, feeding rate control, and equipment material selection.
[0062] Step S2: Based on the causal graph template, the causal chain is inferred and candidate solutions are generated through a multi-step prompting engineering-guided generative model.
[0063] 1) Prompt for project text construction Input the cause-effect graph template into the generative model in JSON format, retrieve process parameters and physical property data from a multi-source chemical knowledge base, including reaction temperature T=70℃, feed rate 60g / h, and material ratio of 1:4.1, and generate prompt text by fusing the data.
[0064] JSON { Project Information: { Title: "Research and Development of a First-Stage Nitration Process for Toluene" "Stage": "Small-scale experiment", Risk Level: High Process parameters: {"Reaction temperature": 70℃", "Feeding rate": 60g / h", "Material ratio": 1:4.1"} }, Cause-and-effect diagram template: { "Initial Deviation Nodes": ["Temperature Deviation", "Feeding Rate Too Fast", "Material Proportion Deviation"], "Intermediate event nodes": ["Increase in exothermic rate", "Heat accumulation", "Initiation of secondary nitration reaction"], "Magnified Factors": ["Equipment material is not corrosion resistant", "Cooling system efficiency is insufficient"], "Accident Milestones": ["Explosion", "Toxic Gas Leak"], Key Control Points: [Temperature Control, Feeding Rate Control, Equipment Material Selection] }, "Reasoning Requirements": [ "Identify the initial deviations in the process", "Inferring intermediate events and amplifying factors along the causal chain", "Predicting possible accident types", "Generate control measures for each critical control point", Output the complete causal chain. ] } The above is an example of generating text in JSON format.
[0065] 2) Generative model inference Under the guidance of the aforementioned prompting engineering, the Qwen3-30B generative model obtains causal chains based on node combination and logical constraint decomposition and combination reasoning. The core rules are as follows: (1) Initial deviation node: 3 independent options (temperature deviation / feeding rate too fast / material ratio deviation); (2) Intermediate event nodes: fixed progressive chain (increase in exothermic rate → heat accumulation → initiation of secondary nitration reaction), no branches; (3) Amplify the factor node: 2 independent options (equipment material is not corrosion resistant / cooling system efficiency is insufficient) can be added / not added / superimposed to obtain 4 combinations (none + material only + cooling only + two factors); (4) Accident Node: 2 independent options (explosion / toxic gas leak); (5) Logical constraints: Amplifying factors act on intermediate event stages without changing the basic chain structure.
[0066] Based on the calculation of core node combinations, the number of causal chains is calculated as follows: initial deviation nodes × intermediate event nodes × amplifying factor node combinations × accident nodes = 3 × 1 × 4 × 2 = 24 chains. Among them, there are 6 causal chains without amplifying factors, 12 causal chains with a single amplifying factor, and 6 superimposed causal chains with two amplifying factors.
[0067] Taking the initial deviation as temperature deviation as an example, the reasoning process of a single causal chain is as follows: The "temperature deviation" was identified as the initial deviation. The intermediate event node can be deduced as "increased exothermic rate → heat accumulation → initiation of secondary nitration reaction"; The predicted type of accident is "explosion"; Production control measures: three-level temperature interlock, staged feeding, and 316L stainless steel containers; Output the complete causal chain, citing experimental data showing that the maximum exothermic rate of the nitration reaction at 70℃ is 231.12 kJ / h as supporting evidence.
[0068] 3) Candidate solution generation The causal chains corresponding to the key control points of the cause-effect graph template and their control measures serve as the baseline information for scheme generation. The generative model uses this information to generate candidate safety schemes. In this embodiment, three schemes are generated based on "temperature control", "feeding rate control", and "equipment material selection".
[0069] Option 1 Cause and effect chain: Too fast feeding rate → Increased heat release rate → Heat accumulation → Explosion.
[0070] Key risks: excessively fast feeding rate and heat accumulation.
[0071] Control measures: a) Increase the cooling system area from 20㎡ to 30㎡; b) Optimize the stirring rate from 60r / min to 80r / min; c) Manually check the temperature data every 30 minutes.
[0072] Measures and mechanisms: Increasing the cooling area can improve heat dissipation efficiency and alleviate heat accumulation; increasing the stirring rate can ensure uniform mixing of materials and avoid local overheating; manual inspection can help monitor risks.
[0073] Compliance basis: Requirements for feeding and reaction processes in the "Guidelines for the Automation Transformation of Nitration Process in Chemical Enterprises (Trial)".
[0074] Option 2 Cause-and-effect chain: Temperature deviation → Increased rate of heat release → Heat accumulation → Initiation of secondary nitration reaction → Explosion.
[0075] Key risks: heat accumulation, initiation of secondary nitration reaction.
[0076] Control measures: a) Three-level temperature interlock is set during the feeding stage, with thresholds of 73℃ (early warning), 75℃ (speed reduction), and 77℃ (shutdown); b) A staged feeding method is adopted, dividing the single feeding amount into 3 times, with an interval of 20 minutes between each time; c) The reaction vessel is made of 316L stainless steel.
[0077] Measures and mechanisms: The three-level temperature interlock can monitor temperature changes in real time and trigger intervention in the early stage of heat accumulation; the phased feeding can reduce the heat release rate per unit time and avoid heat accumulation; 316L stainless steel is resistant to corrosion by nitrated materials (refer to corrosion database: the corrosion rate of 316L stainless steel at 100% material concentration and 70℃ is <0.1mm / a).
[0078] Compliance basis: Safety control requirements of the "Guidelines for the Automation Transformation of Nitration Process in Chemical Enterprises (Trial)"; safety requirements of Hazard and Operability Study (HAZOP) report and Layer of Protection Analysis (LOPA) report.
[0079] Option 3 Cause and effect chain: Temperature deviation → Increased heat release rate → Heat accumulation → Insufficient cooling system efficiency + Equipment material not corrosion resistant → Secondary nitration reaction starts → Explosion.
[0080] Key risks: heat buildup, equipment materials not resistant to corrosion.
[0081] Control measures: a) Replace the agitator material from ordinary carbon steel to 316L stainless steel; b) Strengthen manual inspections, increasing the inspection frequency to once every 15 minutes, focusing on checking the agitator's operating status and equipment corrosion; c) Equip inspection personnel with portable corrosion detectors to simultaneously record equipment surface temperature and corrosion rate data.
[0082] Measures and mechanisms: 316L stainless steel has excellent resistance to corrosion by nitrifying media and high temperature resistance, which can prevent equipment corrosion and cracking under heat accumulation and prevent the risk from amplifying; high-frequency manual inspection combined with corrosion detection can promptly detect potential equipment corrosion hazards and abnormal operation of agitators, intervene in advance to prevent the chain risks caused by heat accumulation, and make up for the potential monitoring blind spots after material optimization.
[0083] Compliance basis: Equipment protection and risk monitoring requirements of the "Guidelines for the Automation Transformation of the Nitration Process in Chemical Enterprises (Trial)".
[0084] Step S3: Based on the counterfactual reasoning model, simulate the evolution of the accident path for candidate solutions, calculate the counterfactual validity score, and perform Top-k screening and secondary screening.
[0085] 1) Counterfactual simulation execution The system calls the system dynamics simulation engine based on the Semenov model to calculate the counterfactual validity score of the candidate schemes generated in step S2.
[0086] Option 1 Scenario 1 measures: increase cooling area + increase stirring rate + manual inspection. The simulation results show that heat accumulation will still occur in some scenarios (such as when the cooling system fails), and the accident path is not completely blocked.
[0087] Scenario 2: No action was taken: The accident path evolved completely to the explosion.
[0088] Option 2 Scenario 1 measures: three-level temperature interlock + phased feeding + 316L stainless steel material. The simulation results show that the accident path was blocked in the "heat release rate increase → heat accumulation" stage, and no explosion occurred.
[0089] Scenario 2: No action was taken: Under the original process parameters, the accident path evolved completely to the explosion.
[0090] Option 3 Scenario 1 measures taken: replace the 316L stainless steel agitator + 15-minute high-frequency inspection + corrosion detection. The simulation results showed that there was still slight heat accumulation in some extreme scenarios, but the equipment did not corrode or crack, and the accident path was blocked and did not evolve into an explosion.
[0091] Scenario 2 No measures were taken: The agitator was still made of ordinary carbon steel and no inspection was strengthened. The simulation results showed that the equipment corroded rapidly under the heat accumulation state, the agitator operated abnormally, the accident path evolved completely to the explosion, and the equipment rupture exacerbated the accident consequences.
[0092] 2) Calculate the counterfactual validity score Calculation scheme 1 p ces=0.75, which means that the probability of the proposed measures blocking the accident path is 75%.
[0093] Calculation scheme 2 p ces =0.93, which means that the probability of the proposed measures blocking the accident path is 93%.
[0094] Calculation scheme 3 p ces =0.40, which means that the probability of the proposed measures blocking the accident path is 40%.
[0095] Taking Option 2 as an example, p ces The calculation process is as follows: Based on causal chains, high-probability core paths covering initial deviations, intermediate events, amplifying factors, and accident nodes are extracted to ensure that the sum of the probabilities of each path is 1.
[0096] (1) Identify the accident path and probability in the causal chain: Path 1: Temperature deviation → Increased heat release rate → Heat accumulation → Insufficient cooling system efficiency → Explosion. The probability of this path occurring is... p 1 =50%; Path 2: Overly rapid feed rate → Initiation of secondary nitration reaction → Leakage of toxic gas. Probability of this path occurring. p 2 =30%; Path 3: Temperature deviation → Equipment material not corrosion resistant → Toxic gas leakage. This path occurs... p 3 =20%.
[0097] (2) For each path, identify the probability of the control measures taking effect: Path 1: The three-level temperature interlock fully covers the deviation range, and the anti-corrosion material improves equipment stability, resulting in complete path blockage. The probability of this path control measure working is... s 1 =100%; Path 2: Excessive feed rate → Toxic gas leakage; staged feed rate matching requirements; secondary nitration reaction is inhibited. The probability of control measures working in this path is low. s 2 =90%; Path 3: Temperature deviation → Material problem → Toxic gas leak. Temperature interlock is effective, but the material is only suitable for general operating conditions. What is the probability that control measures will work under this path? s 3 =80%.
[0098] (3) Calculate the CES value: The counterfactual validity score is 0.93.
[0099] 3) Solution selection Top-k filtering: For the three candidate solutions output in step S2, based on each solution... p ces The values are retained in the top-k order.
[0100] Calculate the value of k: Nitrification reactions carry the risk of explosion and are considered high-risk experiments. α =3; Generative model confidence scores are calculated using Monte Carlo Dropout. β =0.82, Model Confidence Back-Mapping Coefficient β′ =1-0.82=0.18; If there are 20 similar security schemes in the archived security schemes, and 19 of them have a similarity of ≥0.8 with the current scheme, then the historical scheme reuse rate γ = 19 / 20 = 95%, and the historical scheme reuse rate is the inverse mapping coefficient. γ′ =1-0.95=0.05; Parameter taking k 0 =2, w 1 =0.3, w 2 =0.4, w 3 =0.3;
[0101] Therefore, we select the Top-2, i.e., retain them. p ces Two candidate solutions with larger values, and solution 2 ( p ces =0.93) is better than scheme 1 ( p ces =0.75).
[0102] Secondary screening: Calculate the secondary screening scores for Scheme 1 and Scheme 2 respectively.
[0103] Option 1: Compliance score 100 points; Due to the need to modify the cooling system, the implementation cost is high, but does not exceed 500,000 yuan, so the economic efficiency is qualified; Due to the system modification and the fact that the reliability of manual inspection is greatly affected by human factors, simple training is required, so the operability score is 30+10=40 points. The total score for this item is less than 70 points, so it is eliminated.
[0104] Option 2: Compliance score 100 points; Implementation cost is moderate, not exceeding 500,000 yuan, economic efficiency is qualified; Existing equipment directly supports safety measures, simple training is required, operability score 60+10=70 points, qualified.
[0105] The counterfactual validity scores and screening results of the candidate solutions are shown in Table 1.
[0106] Table 1. Counterfactual validity score and screening results of candidate solutions
[0107] Step S4: Construct a three-dimensional uncertainty quantification mechanism, calculate the overall confidence level of the security scheme, and trigger the expert review process by judging the threshold.
[0108] 1) Calculate the confidence level of the scheme Data uncertainty: The training set has 12 process samples (sufficient), and the experimental data is sufficient. C d =0.9; Model uncertainty: Calculating the confidence C of the generative model using Monte Carlo Dropout m =0.82; Uncertainty in reasoning: causal chain logic is complete, C r =0.9; Take w d =0.4, w m =0.4, w r =0.2.
[0109] Overall confidence level: C total = w d ×C d + w m ×C m + w r ×C r = 0.4×0.9 + 0.4×0.82 + 0.2×0.9 = 0.828 The overall confidence score for Option 2 is 0.828.
[0110] 2) Expert review triggers judgment The confidence threshold for expert review during the pilot-scale experiment was 0.7. The uncertainty score of Scheme 2 was 0.828, which is greater than 0.7, so no expert review was required.
[0111] Step S5: Integrate the execution results and process information from steps S1 to S4 to output a complete security solution.
[0112] 1) Report compilation and output Match the output template from the pilot test phase, integrate the necessary information from the entire process and output of steps S1 to S4, and generate the following final safety scheme.
[0113] Project Name: Development of a One-Stage Nitration Process for Toluene Research and development stage: pilot-scale experimentation stage Risk level: High risk I. Causal Chain Temperature deviation → Increased rate of heat release → Heat accumulation → Initiation of secondary nitration reaction → Explosion (Key risks: Heat accumulation, initiation of secondary nitration reaction) II. Optimal Control Measures 1. Feeding control: A staged feeding method is adopted, dividing the single feeding amount of 50g into 3 feedings of 16.7g each, with an interval of 20min; 2. Temperature control: Three-level temperature interlock is set, with an early warning threshold of 73℃ (triggering audible and visual warning), a speed reduction threshold of 75℃ (feeding rate drops to 20g / h), and a shutdown threshold of 77℃ (immediately stopping feeding and starting emergency cooling). 3. Equipment selection: The reaction vessel is made of 316L stainless steel to avoid leakage caused by material corrosion.
[0114] III. Counterfactual validity assessment p ces =0.93, Evaluation basis: Through simulation verification, the probability of the proposed solution blocking the accident path is 93%. At a reaction temperature of 70℃ and an initial feeding rate of 50g / h, it can effectively cut off the core path of "increased exothermic rate → heat accumulation".
[0115] IV. Uncertainty Indicators Confidence level: 0.828, which is within the acceptable range.
[0116] Note: The training data is sufficient, the MSDS data, experimental data and erosion data are complete, the model inference logic is consistent, and the results are highly reliable.
[0117] V. Chain of Evidence for Decision-Making 1. Citation of experimental data: The exothermic rate of toluene under the experimental conditions of the project is 231.12 kJ / h, which serves as supporting evidence (Source: Experimental Database). 2. Corrosion data cited: The corrosion rate of 316L stainless steel at 100% toluene concentration and 70℃ is <0.1mm / a (Source: Corrosion Database); 3. Referenced laws, regulations and standards: Complies with the general principles of the "Guidelines for the Full-Process Automation Transformation of Nitration Process in Chemical Enterprises (Trial Implementation)": Automation transformation should meet the basic safety control requirements put forward in the "Notice on Announcing the First Batch of Key Supervised Hazardous Chemical Processes Catalogue" (Anjian Zongguan San
[2009] No. 116) and the "Guiding Opinions on Strengthening the Management of Chemical Safety Instrument Systems" (Anjian Zongguan San
[2014] No. 116); and implement safety measures for HAZOP and LOPA reports.
[0118] VI. Follow-up Task Reminder Safety evaluation task: Mid-term safety review during the pilot-scale experiment phase.
[0119] Expiry date: [Date] (A reminder will be sent one week before the expiry date).
[0120] Task requirements: Verify the effectiveness of the temperature interlock device and the implementation effect of phased feeding.
[0121] 2) System integration and information sharing It integrates with the project management system through a standard interface, synchronizing basic project information (project number, project name, process description, person in charge, R&D stage) from the project management system, and saving the output security plan to the historical audit record database to support subsequent traceability and auditing.
[0122] Example 2: Hydrogenation reaction of novel catalyst in small-scale experimental stage.
[0123] This embodiment represents a novel process with sparse sample sizes, verifying the applicability of the present invention in scenarios with insufficient sample size.
[0124] Step S1: Construct a structured cause-effect graph template based on chemical process mechanisms.
[0125] Process experts manually defined two core accident chains based on the high activity of the new catalyst. The system automatically completed the attribute classification and data source of each node, performed node association modeling, eliminated invalid associations, and generated a structured cause-effect graph template that fits the project scenario.
[0126] Step S2: Based on the causal graph template, the causal chain is inferred and candidate solutions are generated through a multi-step prompting engineering-guided generative model.
[0127] By integrating the MSDS physical property data of the novel catalyst, the only two small-scale experimental records, and the chemical process mechanism of the hydrogenation reaction, the model is gradually guided to generate a causal chain through multi-step prompting engineering, extracting key control nodes such as catalyst feed amount and polymerization rate, and generating candidate solutions.
[0128] Step S3: Based on the counterfactual reasoning model, simulate the evolution of the accident path for candidate solutions, calculate the counterfactual validity score, and perform Top-k screening and secondary screening.
[0129] To adapt to scenarios with insufficient small-scale experimental data, a counterfactual simulation method is used to compare the differences between scenarios with and without control measures, calculate the counterfactual effectiveness score of each candidate scheme, and select the optimal candidate scheme with strong prevention and control targeting and suitable for small-scale experiments.
[0130] Step S4: Construct a three-dimensional uncertainty quantification mechanism, calculate the overall confidence level of the security scheme, and trigger the expert review process by judging the threshold.
[0131] Due to insufficient training sample size and high data uncertainty, the overall confidence level calculated by the confidence level model is 0.41, which is lower than the confidence level threshold of 0.7 for expert review during the pilot-scale experiment. The system automatically triggers the expert review process, generates review prompts, and guides experts to review the rationality of the causal chain, the accuracy of node labeling, and the pertinence of control measures.
[0132] Step S5: Integrate the execution results and process information from steps S1 to S4 to output a complete security solution.
[0133] By integrating the cause-effect diagram templates, cause-effect chains, counterfactual validity scores, confidence levels, and expert review opinions generated by the system, the details of control measures are optimized, and the final safety plan adapted to the pilot-scale experimental stage is output. Simultaneously, the entire process of data archiving is completed, realizing closed-loop management of the entire process of plan generation, screening, review, and output.
[0134] This embodiment verifies the applicability of the present invention in novel process scenarios with sparse cases, effectively addresses the uncertainty caused by insufficient samples, ensures the accuracy of the scheme through expert review, and takes into account the operability of small-scale experiments, thus verifying the reliability and interpretability of the present invention.
[0135] Example 3: Configuration and operation of a chemical safety decision-making system based on causal reasoning.
[0136] This embodiment takes the "New Polyolefin Polymerization Process R&D Project" (small-scale scale-up stage) of a chemical research institute as the background, and describes in detail the typical deployment and operation configuration of the chemical safety decision-making system based on causal reasoning of the present invention. It focuses on demonstrating the system implementation method of each functional module, the data flow relationship between modules, the configuration of technical parameters and the actual operation effect, and verifies the feasibility and engineering feasibility of the system in the real scenario of chemical R&D.
[0137] I. System Overall Architecture and Module Configuration This system adopts a microservice + modular component architecture, is deployed on an enterprise private cloud, and enables communication between modules through an API gateway, supporting high-concurrency and scalable industrial-grade applications. The overall system configuration is shown in Table 2.
[0138] Table 2 System Configuration Table
[0139] II. Module Function Implementation and Operation Process 1. Module B01: Structured Cause-Effect Graph Template Construction Module.
[0140] Data access and preprocessing: The system uses the ETL tool Kettle to extract data from multiple databases related to the multi-source chemical knowledge base, including accident databases, MSDS databases, experimental databases, corrosion databases, and legal and regulatory standard databases. After data cleaning, the data is saved to the system database as a training set.
[0141] Semantic parsing and annotation: The fine-tuned BERT-Base-Chinese model is used to perform semantic analysis and entity recognition on the accident data in the training set database, which is then used as the annotation dataset.
[0142] Node extraction: Using labeled datasets, a CNN+attention model is trained using PyTorch (an open-source deep learning framework for machine learning and deep learning) to extract and classify nodes.
[0143] Node association modeling: Bayesian networks are constructed using the Pgmpy library (a Python-based causal and probabilistic modeling library) to output the association relationships and probabilities between nodes, such as the probability of "temperature deviation → heat accumulation".
[0144] Template output: Generates a JSON format cause-effect graph template that supports cross-system matching.
[0145] Results: Successfully constructed the "aggregation reaction" cause-effect graph template, including initial deviation nodes, intermediate event nodes, amplifying factor nodes, accident nodes, and critical control points.
[0146] 2. Module B02: Candidate solution generation module.
[0147] Prompt Template Design: The system pre-sets step-by-step prompt templates for multiple processes (nitration, hydrogenation, polymerization, etc.). Each type of template corresponds to a set of step-by-step reasoning instructions, such as "Identify deviation → Deduce path → Predict accident → Generate measures → Explain mechanism".
[0148] Context injection: The JSON template output by B01 is merged with the project process parameters (reaction temperature, pressure, catalyst feed rate), and the causal chain is inferred based on structured hints to generate candidate solutions.
[0149] Model call: Call the Qwen3-30B basic model, set temperature=0.7, top-p=0.9.
[0150] Compliance verification: During the generation process, the system automatically calls the regulatory standard library to perform keyword matching to ensure that the measures comply with regulations.
[0151] Execution result: Output a set of candidate solutions.
[0152] 3. Module B03: Counterfactual validity scoring module.
[0153] Simulation engine configuration: The Semenov thermodynamic model simulation framework is built using a Python environment, and SciPy (an open-source Python algorithm library and mathematical toolkit) is integrated to solve differential equations and simulate heat release rate, heat accumulation, and pressure rise process.
[0154] Scene comparison: Scenario 1 Measures: Activate pressure interlock, staged feeding, and increase cooling water flow; No action was taken in scenario 2: the original parameters were maintained.
[0155] Simulation execution: Run the simulation, count the number of complete evolutions of the accident path, and calculate the CES value.
[0156] Safety scheme screening: Top-k screening and secondary screening were conducted on the safety schemes, among which scheme 1, pressure interlock + segmented feeding, was recommended as high.
[0157] 4. Module B04: Three-dimensional uncertainty quantification module.
[0158] First, calculate the data uncertainty, model uncertainty, and inference uncertainty based on the existing data, and then calculate the overall confidence level.
[0159] A threshold judgment is made on the confidence score to trigger expert review.
[0160] Experts reviewed the generated security plan, modified its content, and uploaded it to the system.
[0161] 5. Module B05: Full-process integrated management module.
[0162] The system integrates automatically generated content with content submitted by experts. In case of conflict, the expert opinion prevails, and a security solution is generated.
[0163] The security plan includes: Causal chains and visual representations of causal chain effects; Optimal measures implementation steps (including parameter thresholds and operation procedures); CES values and simulation results; Uncertainty indicators; Decision-making evidence chain: Citing MSDS data, experimental data, corrosion data, and regulatory standard data; Warning Reminder: Send a reminder to the R&D project management system regarding the safety review task during the pilot-scale production phase of the novel polyolefin polymerization process R&D project. The reminder will be sent automatically 5 days before the deadline.
[0164] The system integrates with the R&D project management system through a RESTful standard interface to achieve information exchange, including: (1) The chemical safety decision-making system obtains basic project information from the R&D project management system, and links the safety plan with the basic project information; (2) The chemical safety decision-making system outputs a complete safety plan to the R&D project management system, archives it to the project document library, and supports the traceability of historical audit records; (3) Based on the preset reminder cycle, the chemical safety decision system sends safety warning information to the R&D project management system.
[0165] Relevant personnel in the R&D project management process can view, approve, and execute security plans generated by the system within the R&D project management system.
[0166] III. System Operation Performance and Advantage Verification The actual application results of this system are as follows: the solution generation time is less than 10 minutes per project; the accuracy rate of solution content is ≥95%; and the effectiveness verification rate of measures is 100%.
[0167] Compared to traditional manual, simple rule-based systems, this system significantly improves the efficiency of scheme generation while maintaining high accuracy. Compared to systems based on generative model technology, it ensures comprehensive verification of safety measures based on chemical process mechanisms while rapidly generating schemes.
[0168] This embodiment fully verifies the technological advancement and engineering feasibility of the system in terms of modular design, multi-source data fusion, intelligent reasoning, and full-process integrated management, and has a solid foundation for comprehensive application in chemical research and development scenarios.
Claims
1. A chemical safety decision-making method based on causal reasoning, characterized in that, include: Step S1: Construct a structured cause-effect graph template based on the chemical process mechanism. The cause-effect graph template includes initial deviation nodes, intermediate event nodes, amplifying factor nodes, accident nodes, and critical control points. Step S2: Based on the cause-effect graph template, infer the cause-effect chain and generate candidate solutions through a multi-step prompting engineering-guided generative model; Step S3: Based on the counterfactual reasoning model, for the candidate solutions, simulate the evolution of the accident path under two scenarios: taking measures and not taking measures, calculate the counterfactual effectiveness score, and perform Top-k screening and secondary screening based on the counterfactual effectiveness score; Step S4: Construct a three-dimensional uncertainty quantification mechanism that integrates data uncertainty, model uncertainty, and inference uncertainty; calculate the overall confidence level of the security solution; and trigger the expert review process by judging the threshold. Step S5: Integrate the execution results and process information of steps S1 to S4 to output a complete security solution.
2. The chemical safety decision-making method based on causal reasoning according to claim 1, characterized in that, Step S1, which involves constructing a structured cause-effect graph template based on chemical process mechanisms, includes: Based on the chemical process mechanism, data preprocessing, semantic parsing and annotation, and node extraction are performed. The relationships and probabilities between nodes are constructed through Bayesian networks. Invalid associations are filtered by combining statistical frequency and causal logic constraints, and causal logic rules are constructed.
3. The chemical safety decision-making method based on causal reasoning according to claim 2, characterized in that, The chemical process-based mechanism includes: The information on the chemical process mechanism comes from a multi-source chemical knowledge base consisting of enterprise or industry accident data, MSDS data, experimental data, corrosion data, and legal and regulatory standards.
4. The chemical safety decision-making method based on causal reasoning according to claim 1, characterized in that, Step S2, which infers the causal chain based on the causal graph template using a multi-step prompting engineering-guided generative model, includes: The prompt text embeds step-by-step reasoning instructions to guide the generative model to identify initial deviations, reason about the intermediate events and amplifying factors that may be triggered by the initial deviations, reason about the accident types that may be caused by the intermediate events, and generate control measures for key control points.
5. The chemical safety decision-making method based on causal reasoning according to claim 1, characterized in that, Step S3, which calculates the counterfactual validity score, includes: Based on constrained system dynamics simulation, the counterfactual validity score p ces Defined as the probability of an accident path being blocked after measures are taken, calculated using the following formula: ,in, p i Represents the probability of each accident path occurring, satisfying , s i This represents the probability that control measures will be effective for each accident path. N This represents the number of possible paths.
6. The chemical safety decision-making method based on causal reasoning according to claim 5, characterized in that, The constrained system dynamics simulation includes: The Semenov model was used for system dynamics simulation.
7. The chemical safety decision-making method based on causal reasoning according to claim 1, characterized in that, Step S3, which performs Top-k screening based on the counterfactual validity score, includes: The candidate solutions are ranked from highest to lowest counterfactual validity score, and the top k are retained. k is calculated based on a weighted coefficient that combines the process risk level, model confidence, and historical solution reuse rate. in α This refers to the process risk level coefficient. β′ These are the inverse mapping coefficients of the model confidence. γ′ This is the inverse mapping coefficient for the reuse rate of historical schemes; w 1 , w 2 , w 3 These are weighting coefficients, and the sum of the three is 1; k 0 The number of units generated is a preset baseline, and the value is an integer greater than or equal to 2.
8. The chemical safety decision-making method based on causal reasoning according to claim 1, characterized in that, Step S4, which constructs a three-dimensional uncertainty quantification mechanism that integrates data uncertainty, model uncertainty, and inference uncertainty, includes: Data uncertainty is obtained based on the sample size and information integrity assessment of the process or materials in the training set; model uncertainty is obtained based on the confidence level of the model calculated using Monte Carlo Dropout; and inference uncertainty is obtained based on the logical integrity score of the causal chain. The overall confidence level is obtained by weighted summation of the three.
9. The chemical safety decision-making method based on causal reasoning according to claim 1, characterized in that, The complete security solution output in step S5 includes: The output includes causal chains, implementation steps of optimal control measures, counterfactual effectiveness scores and evaluation criteria, uncertainty indicators, decision evidence chains, and security solutions with early warnings and alerts related to project management processes.
10. A chemical safety decision-making system based on causal reasoning, used to execute the chemical safety decision-making method based on causal reasoning as described in any one of claims 1 to 9, characterized in that, include: The structured cause-effect graph template construction module (B01) is connected to the multi-source chemical knowledge base and is used to perform node extraction and association modeling, and output a structured cause-effect graph template as the execution unit of step S1. The candidate solution generation module (B02) is connected to the (B01) module and the multi-source chemical knowledge base. It is used to infer the causal chain based on the causal graph template and generate candidate solutions, serving as the execution unit for step S2. The counterfactual validity scoring module (B03) is connected to the (B02) module and the multi-source chemical knowledge base. It is used to simulate scenarios using the system dynamics simulation model, compare the accident evolution results, output the counterfactual validity score, and screen candidate solutions. It serves as the execution unit for step S3. The three-dimensional uncertainty quantification module (B04) is connected to the (B03) module and the multi-source chemical knowledge base. It is used to generate an overall confidence level for the safety scheme and combine it with a threshold judgment to trigger the expert review process, serving as the execution unit for step S4. The end-to-end integrated management module (B05) is connected to modules (B01), (B02), (B03), and (B04) to integrate the necessary information processed and output by the connected modules, output a complete security solution, and serve as the execution unit for step S5.