Chemical production safety accident prediction method and system
By constructing a dynamic causal knowledge graph and counterfactual reasoning, the problems of insufficient data fusion and unclear prediction results in the prediction of chemical production safety accidents have been solved, achieving high-precision, interpretable safety accident prediction and effective intervention, thereby improving the safety of chemical production.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANDONG SHENGLONG SAFETY TECH CO LTD
- Filing Date
- 2026-01-14
- Publication Date
- 2026-05-01
AI Technical Summary
Existing chemical production safety accident prediction technologies suffer from problems such as insufficient fusion of multi-source heterogeneous data, misleading decision-making through correlation analysis, lack of interpretability of prediction results, and disconnect between prediction and intervention. These issues result in blind spots in safety perception, high false alarm rates, unclear prediction results, and an inability to provide effective intervention suggestions.
By collecting real-time process parameters, video frame sequences, and electronic inspection texts from the chemical production system, a process state tensor is constructed and spatial features and risk semantic features are extracted. A dynamic causal knowledge graph is constructed using a causal discovery algorithm. Combined with a cross-attention mechanism and a graph convolutional neural network, the abnormal transmission process is simulated, and counterfactual reasoning is performed to generate the optimal intervention operation sequence.
It achieves high-precision collaborative perception across the entire chemical production process, significantly reduces false alarm rates, improves prediction robustness and interpretability, provides clear risk evolution paths and effective intervention suggestions, and enhances the ability to defend against major accidents.
Smart Images

Figure CN121961229A_ABST
Abstract
Description
A method and system for predicting safety accidents in chemical production Technical Field
[0001] This invention relates to the fields of artificial intelligence and industrial internet security technology, specifically to a method and system for predicting safety accidents in chemical production. Background Technology
[0002] Chemical production processes are characterized by high temperature, high pressure, and flammability / explosiveness, making the safety of production systems a top priority in the industrial sector. Currently, safety monitoring in chemical enterprises mainly relies on static threshold alarms set by distributed control systems (DCS). However, existing accident prediction technologies still face significant challenges in practical applications: insufficient fusion of multi-source heterogeneous data: existing safety predictions largely depend on time-series process parameters such as pressure and temperature, neglecting information on personnel violations, equipment anomalies, and potential hazards contained in plant video surveillance and inspection reports. The lack of an effective cross-modal feature alignment mechanism results in "blind spots" in safety perception.
[0003] Correlation analysis can mislead decision-making: Traditional data-driven AI models primarily rely on correlations for fitting, lacking a deep understanding of chemical production mechanisms. In complex process feedback loops, models can easily mistake incidental correlations for causal relationships, resulting in numerous false positives and false negatives.
[0004] The prediction results lack interpretability: existing black-box models often only provide a risk score and cannot clearly show how an accident evolves and propagates along the process topology. When faced with high-risk alerts, operators find it difficult to understand the logical chain of events that led to the accident.
[0005] A disconnect between prediction and intervention: Existing prediction systems mostly remain at the "early warning" stage, unable to answer the question of "whether taking specific actions can mitigate the risk." Due to a lack of counterfactual reasoning capabilities, the systems cannot provide operators with emergency intervention recommendations supported by causal evidence. Summary of the Invention
[0006] To achieve the above objectives, the present invention provides the following technical solution: The present invention provides a method for predicting safety accidents in chemical production, comprising the following steps: S1. Real-time process parameter time-series signals are collected through the distributed control system (DCS) of the chemical production system, and video frame sequences and electronic inspection text records of the plant monitoring system are retrieved simultaneously; time-frequency domain features are extracted from the process parameter time-series signals to construct a process state tensor, and spatial features of personnel violations and apparent features of equipment operation in the video frame sequences are extracted using a convolutional neural network, and the text records are converted into risk semantic feature vectors using a pre-trained language model; S2. Based on the pipeline connection relationships in the process flow diagram (P&ID) and the hazard propagation logic in the HAZOP report, a topological connection matrix composed of process variable nodes is predefined; the topological connection matrix is used as a constraint condition, and a causal discovery algorithm is used to perform structural learning in the historical production database to construct a dynamic causal knowledge graph covering disturbance sources, intermediate variables, sensitive parameters, and failure points, and the edge weights between nodes in the dynamic causal knowledge graph are calculated in real time; S3. Using preset equipment... The tag association table maps the spatial features, apparent features, and risk semantic features extracted in step S1 to the corresponding process variable nodes in the dynamic causal knowledge graph. A cross-attention mechanism is used, with the process state tensor as the query vector, to perform temporal resampling and alignment of the spatial features, apparent features, and risk semantic features, generating a fusion modal feature mapping map representing the global operating state of the system. In step S4, the fusion modal feature mapping map is input into a graph convolutional neural network. Combined with the edge weights in the dynamic causal knowledge graph, the transmission process of abnormal disturbances on the process topology path is simulated. The activation probability of the target accident node within a preset prediction time window is calculated, and the accident risk level and predicted evolutionary path chain are output. In step S5, for the evolutionary path chain output in step S4, controllable operational variables are selected as intervention nodes in the dynamic causal knowledge graph. Counterfactual reasoning simulation is performed using a structural causal model. The change in the activation probability of the accident node before and after changing the parameter values of the intervention node is compared. The optimal intervention operation sequence that can reduce the accident probability to below the safety threshold is selected and output.
[0007] Further, in step S1, the original time-series signal acquired by the DCS is framed and denoised using a sliding window and wavelet transform, and time-frequency domain features including mean, standard deviation, skewness, kurtosis, and frequency band energy distribution are extracted to construct a process state tensor; semantic features of unsafe behaviors such as personnel not wearing safety protective equipment or illegal hot work in video frames are identified using target detection algorithms and human key point detection, and equipment operation appearance features including pipeline leakage and splashing shapes and smoke plumes are extracted using a mask segmentation algorithm; named entity recognition is performed on the inspection text using a pre-trained model in the field of chemical safety, extracting semantic entities including risk equipment tag numbers, abnormal phenomenon descriptions, and risk severity, and risk weights are assigned to the semantic entities based on an attention mechanism to generate risk semantic feature vectors; time synchronization is performed on the acquisition terminals of each system based on a globally unified clock server, and timestamp marking and completion alignment are performed based on the sampling period of the DCS process parameters according to the sampling frequency differences of each modality data.
[0008] Further, in step S2, the physical connection logic in the P&ID graph and the hazard propagation orientation relationship in the HAZOP report are transformed into an initial causal adjacency matrix as a priori mask constraint for causal structure search. Using a scoring-based structure learning algorithm or a constraint-based causal discovery algorithm, the historical production database is traversed and optimized under the priori mask constraint to eliminate pseudo-correlated edges that conflict with the physical mechanism, thus determining a directed acyclic graph (DAG) composed of process variables. Node attributes in the DAG are defined, including source nodes representing disturbance inputs, intermediate variable nodes representing process transmission, sensitive parameter nodes representing key early warning indicators, and failure point nodes representing accident states. A conditional probability distribution model between nodes is established, and operating condition identification coefficients are introduced. Based on the operating condition switching instructions of the current production operation (start-up, shutdown, or steady-state operation), the transmission probability weights of each edge connection in the DAG are dynamically adjusted to complete the real-time construction of a dynamic causal knowledge graph.
[0009] Further, in step S3, an index mapping table based on the chemical equipment tag number is established, and the spatial features, apparent features, and risk semantic features extracted in step S1 are mounted to the corresponding equipment nodes and process variable nodes in the dynamic causal knowledge graph according to the physical attribution relationship; based on the sampling frequency of the process state tensor, linear interpolation or zero-order hold is used to resample and align the video features with high sampling frequency and the semantic features with variable sampling frequency, and construct a multimodal feature flow under a unified time reference.
[0010] Further, in step S3, the correlation weights between the process state tensor and the video features and semantic features are calculated through a cross-attention mechanism. The correlation weights are used to weight and enhance the multimodal feature stream to suppress visual and textual noise that is inconsistent with the process operation logic. The multimodal features after weight enhancement are compressed in dimension and reorganized through an autoencoder network to generate a fusion modal feature map that is highly coupled in the temporal and spatial domains and represents the global operating state of the system.
[0011] Further, in step S4, the fused modal feature map is deconstructed into time-varying state feature vectors of each node in the dynamic causal knowledge graph, and the spatiotemporal graph convolutional network is used to capture the spatial correlation and temporal dependence of the time-varying state feature vectors in the graph topology. According to the causal logic from the source node to the failure point defined in the dynamic causal knowledge graph, the energy propagation of abnormal disturbances along the directed acyclic graph path is simulated through a message passing mechanism, and the transient evolution increment of each node under the influence of neighboring abnormal nodes is calculated. Based on the transient evolution increment, the activation probability of each sensitive parameter node and failure point node within the preset prediction window is calculated using the classification output layer, and the accident risk level is divided according to the probability value. Using maximum likelihood estimation or path search algorithm, the node sequence with activation probability exceeding the preset threshold and logical continuity is selected from the dynamic causal knowledge graph to generate an accident evolution path chain containing the inducing node, key evolution node, and final failure node.
[0012] Further, in step S5, variable nodes with controlled attributes are extracted from the accident evolution path chain as intervention candidate sets, and the do-operator in the structural causal model is used to perform simulated interventions of different intensities on each node in the intervention candidate set. Based on the dynamic causal knowledge graph, the counterfactual probability distribution of the target accident node after the simulated intervention is calculated. By comparing the expected probability difference before and after the intervention, the intervention effect of each intervention node on reducing accident risk is quantified. With the goal of maximizing the intervention effect and minimizing the amplitude of process state fluctuations, a heuristic search algorithm is used to screen the optimal intervention node and its corresponding adjustment target value from the intervention candidate set. According to the temporal logic in the dynamic causal knowledge graph, the collaborative execution order between the optimal intervention nodes is determined, and an optimal intervention operation sequence containing operation bit number, adjustment time point and adjustment amplitude is generated and pushed to the interactive terminal synchronously with the accident evolution path chain.
[0013] A chemical production safety accident prediction system includes: a multimodal perception module for collecting time-series signals of process parameters from a distributed control system (DCS), video frame sequences from a monitoring system, and electronic inspection text records; extracting features from the time-series signals to construct a process state tensor, extracting spatial and apparent features from the video frame sequences, and converting the text records into risk semantic feature vectors; a causal graph construction module for predefining a topological connection matrix based on the process flow diagram (P&ID) and HAZOP report, and using this as a constraint to perform structure learning in a historical production database using a causal discovery algorithm to construct a causal knowledge graph covering disturbance sources, intermediate variables, sensitive parameters, and failure points, and calculating the edge weights between nodes in the causal knowledge graph; and a feature alignment and fusion module for associating equipment tag numbers. The table maps the extracted modal features to the corresponding nodes of the causal knowledge graph, and uses a cross-attention mechanism to perform temporal resampling and alignment of each modal feature to generate a fusion modal feature mapping map representing the global operating state of the system; the path evolution prediction module is used to input the fusion modal feature mapping map into a graph convolutional neural network, combine the edge weights in the causal knowledge graph to simulate the transmission process of abnormal disturbances on the process topology path, and output the accident risk level and the predicted evolution path chain according to the activation probability of the target accident node in the prediction window; the intervention decision module is used to select controllable operational variables as intervention nodes from the evolution path chain, use a structural causal model to perform counterfactual reasoning simulation, and select the optimal intervention operation sequence by comparing the change in the activation probability of the accident node before and after the intervention and output it.
[0014] A computing device includes: a memory for storing computer instructions; and a processor for executing the computer instructions stored in the memory to implement the steps of a chemical production safety accident prediction method as described in any one of claims 1 to 7.
[0015] A computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of a chemical production safety accident prediction method as described in any one of claims 1 to 7.
[0016] The beneficial effects of the technical solution provided by this invention, compared with known public technologies, are as follows: This invention effectively eliminates the perceptual isolation between traditional process parameters, visual images, and inspection text through cross-modal spatiotemporal feature alignment and fusion technology, achieving high-precision collaborative perception across the entire chemical production scenario; the dynamic causal knowledge graph constructed based on chemical mechanisms and data dual-drive significantly suppresses spurious causal interference in traditional correlation analysis through mechanism verification, greatly reducing the system's false alarm rate and enhancing prediction robustness under complex operating conditions; the structured deduction of risk evolution paths using spatiotemporal graph convolutional networks gives the prediction results clear physical logic interpretability, assisting operators in quickly identifying risk triggers; in particular, the introduction of a counterfactual reasoning mechanism based on the do-operator enables virtual intervention simulation and multi-objective strategy optimization for potential risks, filling the technical gap in existing safety monitoring systems regarding "closed-loop intervention decision" recommendations, significantly improving the proactive defense capability and early warning lead time for major accidents while ensuring stable process operation. Attached Figure Description
[0017] Figure 1 is a flowchart of the method of the present invention; Figure 2 is a system architecture diagram of the present invention; Figure 3 is a schematic diagram of accident prediction based on graph path evolution of the present invention; Figure 4 is a comparison diagram of the experimental effects of the present invention compared with the traditional DCS alarm system; Figure 5 is a flowchart of the defense decision-making process based on counterfactual reasoning of the present invention. Detailed Implementation
[0018] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0019] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but includes other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0020] The present invention will be further described in detail below with reference to the accompanying drawings: Example: As shown in the figure, S1, real-time process parameter time-series signals are collected through the distributed control system (DCS) of the chemical production system, and video frame sequences and electronic inspection text records of the plant monitoring system are retrieved simultaneously; time-frequency domain features are extracted from the process parameter time-series signals to construct a process state tensor, and convolutional neural networks are used to extract the spatial features of personnel violations and the apparent features of equipment operation in the video frame sequences, and a pre-trained language model is used to convert the text records into risk semantic feature vectors.
[0021] The specific implementation process is as follows: 1. Configuration of multimodal data sources In this embodiment, the hydrogenation reactor of a chemical enterprise is taken as the monitoring object. In step S1, the system first establishes three parallel data flow channels: Process data flow: connected to the distributed control system (DCS) through the Modbus TCP protocol to obtain the top pressure of the hydrogenation reactor (tag R-101), the temperature of three internal temperature measuring points, the feed flow rate and the hydrogen replenishment flow rate in real time.
[0022] Visual data stream: The explosion-proof high-definition camera within the device area is retrieved via the RTSP protocol at a frame rate of 25fps and a resolution of 1920×1080.
[0023] Text data stream: Access the electronic operation and maintenance system to extract the inspection APP input records and shift handover logs of the shift team on the same day.
[0024] 2. Noise Reduction and Feature Extraction System for Process Timing Signals: After receiving the temperature signal from R-101, the system encounters random white noise due to electromagnetic interference. This embodiment employs the following processing methods: Preprocessing: A sliding window algorithm is used to extract a signal segment with a length of 600 sampling points, with a window step size of 30 sampling points. The pressure signal is then decomposed into three levels using the Db4 wavelet basis function, and the high-frequency noise coefficient is removed before signal reconstruction.
[0025] Feature Construction: Calculate the mean, variance, and skewness of the processed signal. For example, when a sudden change in the skewness of the pressure signal is detected, it is identified as an asymmetric fluctuation in the internal pressure of the reactor. Feature Tensor Construction: Arrange the extracted statistical features in chronological order of acquisition time, and combine the statistical features from different time steps to construct a process state tensor with dimensions of [missing information]. ,in The number of feature dimensions. For a time step of 3, the system performs refined extraction of visual features. Given the complex lighting and background conditions at chemical plant sites, the system performs the following operations: Personnel behavior recognition: An improved YOLO algorithm is used to detect personnel targets on the reactor platform in real time. The system identifies the position of personnel's hands using a key point detection algorithm. If a person operates manual valve V-102 without a "work permit," the semantic feature of "violation of regulations" is extracted.
[0026] Equipment status identification: For the flange connection of the hydrogenation reactor, the MaskR-CNN algorithm is used for real-time segmentation. By comparing with the background model, the system identifies the small steam plume features (representing minor leaks) appearing at the flange edge and extracts their pixel area and diffusion velocity as appearance features.
[0027] 4. Semantic vectorization system for text records retrieves inspection records: "At 10:15, a slight oil leak was observed at the shaft seal of the R-101 circulating pump, accompanied by an abnormal metallic friction sound." Entity extraction: Using a BERT-based named entity recognition model in the chemical safety field, the entities were identified as: "R-101 circulating pump" (tag number), "oil leak" (abnormal phenomenon), and "metallic friction sound" (fault symptom).
[0028] Vectorization: The above entities are mapped to a 128-dimensional risk semantic feature vector, in which "abnormal friction sound" is given a high weight to reflect the risk of mechanical failure.
[0029] 5. Global Clock Synchronization and Alignment: To solve the problem of asynchronous data, this embodiment adopts the following alignment logic: using the 1Hz sampling frequency of the DCS system as the reference axis.
[0030] For the video stream (25fps), the timestamp matching method is used to select the image features of the frame closest to the DCS sampling time within one second.
[0031] For text data, a zero-order hold logic is adopted, which means that the semantic feature vector remains valid on the time axis until the next inspection record is generated, thereby ensuring that the multimodal fusion in step S3 has a unified time reference.
[0032] S2. Based on the pipeline connection relationships in the process flow diagram P&ID and the hazard propagation logic in the HAZOP report, a topology connection matrix composed of process variable nodes is predefined; the topology connection matrix is used as a constraint condition, and a causal discovery algorithm is used to perform structural learning in the historical production database to construct a dynamic causal knowledge graph covering disturbance sources, intermediate variables, sensitive parameters and failure points, and the edge weights between nodes in the dynamic causal knowledge graph are calculated in real time.
[0033] The specific implementation process is as follows: 1. Matrix transformation of the prior mechanism First, the P&ID drawings of the hydrogenation reactor (R-101) are digitally analyzed: Physical topology extraction: Based on the pipeline connection relationship, the physical transmission path of "hydrogen feed valve (V-101) - feed flow (F-101) - reactor pressure (P-101) - reactor temperature (T-101)" is determined.
[0034] HAZOP logical constraints: Referring to the risk item "Excessive feed rate leads to a surge in exothermic reaction" in the HAZOP report, the system pre-defines a directed edge constraint from the "flow node" to the "temperature node".
[0035] Prior mask generation: Mapping the relationships between nodes to an initial adjacency matrix. Its dimensions are For node pairs that are not physically connected or do not have information transmission relationships in terms of technology, the corresponding element in the adjacency matrix is set to 0 so as to block the connection path between the node pairs during subsequent model training or search.
[0036] 2. A data-driven causal structure learning system utilizes steady-state and outlier data from historical production databases for in-depth data mining: It employs a constraint-based PC algorithm (PCAlgorithm). When performing conditional independence tests (CITest), the algorithm only... Within the allowed range, potential causal edges are searched. If the causal direction calculated by the data is opposite to the physical flow direction of P&ID (e.g., the data mistakenly believes that the temperature rise caused the upstream valve to open), the system forcibly corrects the direction through the mechanism verification module to ensure that the generated graph conforms to the second law of thermodynamics, and finally outputs a directed acyclic graph covering 50 core variable nodes.
[0037] 3. The expert-level definition of node attributes enables the graph to have reasoning ability. The system semantically empowers the nodes in the DAG: Source node: defined as an external input variable, such as the pressure of the hydrogen supply main pipe and the current of the feed oil pump.
[0038] Intermediate variable nodes: defined as process transfer variables, such as heat exchanger outlet temperature and catalyst bed pressure drop.
[0039] Sensitive parameter nodes: defined as key reference numbers that characterize the safety status, such as the reactor center temperature T-101A / B / C.
[0040] Failure point: Defined as the critical state of an accident, such as "high-voltage interlocking trigger" or "rupture disc rupture".
[0041] 4. Dynamic weight correction triggered by operating conditions Considering the differences in causal logic under the three operating conditions of "start-up, shutdown, and steady state" in chemical production, this embodiment performs the following dynamic adjustments: Operating condition identification: The system monitors the "production mode" instruction bit number in the DCS in real time.
[0042] Probability weight update: During steady-state operation, the system sets the transmission probability of "feed flow rate - temperature" to 0.1 (indicating that the automatic control system is effective and the correlation is low); during the start-up phase (heating and pressurization period), the system automatically increases the transmission probability of this side to 0.8.
[0043] Real-time update mechanism: The Bayesian Updating algorithm is adopted to fine-tune the conditional probability distribution (CPD) between points based on the real-time data generated every hour, so as to ensure that the causal map is synchronized with the physical state of the current device, such as the aging degree and catalyst activity.
[0044] S3. Using a preset equipment tag number association table, map the spatial features, apparent features, and risk semantic features extracted in step S1 to the corresponding process variable nodes in the dynamic causal knowledge graph; using a cross-attention mechanism, with the process state tensor as the query vector, perform temporal resampling and alignment of the spatial features, apparent features, and risk semantic features to generate a fusion modal feature mapping graph representing the global operating state of the system.
[0045] The specific implementation process is as follows: 1. The system uses a preset chemical equipment tag number association table to uniformly classify the various features extracted in step S1 in the spatial dimension. The specific process is as follows: Visual feature positioning: Establish the mapping relationship between the coordinate system of the monitoring video screen and the topological tag number of the plant P&ID. For example, when S1 identifies the presence of a "smoke plume" feature at the flange connection of the hydrogenation reactor (R-101), the system automatically attaches the visual feature vector to the corresponding "R-101 external sealing node" in the causal knowledge graph according to the preset spatial index.
[0046] Semantic feature localization: The equipment tag number (P-101B) identified by named entity recognition for the "abnormal vibration at the mechanical seal of the bottom circulation pump of the reactor" entered in the inspection text is automatically associated with the "power equipment status node" in the map, thereby eliminating the isolation of unstructured data in spatial representation.
[0047] 2. To address the asynchronous nature of DCS sampling frequency (typically 1Hz), video sampling frequency (typically 25 frames / second), and text generation, the following alignment logic is adopted: Time reference axis definition: based on the global sampling clock of the distributed control system DCS.
[0048] Timing signal processing: Maintain the original frequency of DCS process parameters.
[0049] High-frequency visual signal down-conversion: Perform time-dimensional pooling on the visual feature vectors of 25 frames within 1 second, extract the maximum feature value within that second, and make it correspond one-to-one with the DCS sampling time.
[0050] Low-frequency / asynchronous text signal upsampling: For asynchronous text such as inspection records, the zero-order hold algorithm is used to continuously map the risk semantic feature vector generated in the previous moment to the time slice of the current and subsequent moments until a new text record is received.
[0051] 3. Deep fusion of aligned multimodal feature streams is performed using a cross-attention network. The core logic is to use information from one modality to verify or enhance the credibility of another modality: process-driven visual verification: when visual features identify a suspected "leak," the system uses the process state tensor (such as pressure, liquid level) as the query and the visual feature as the key.
[0052] Conflict suppression strategy: If the process status shows that the internal pressure of R-101 is extremely stable and there are no signs of flow depressurization, the cross-attention mechanism will automatically reduce the attention weight of the visual features at that moment (e.g., to below $0.1$) and judge it as on-site light and shadow interference.
[0053] Multimodal mutual reinforcement: If the semantic record shows "equipment aging", the visual feature captures "minor leakage", and the process feature shows "temperature fluctuation", the system will automatically increase the correlation weight of the three to generate a fusion feature with strong causal attributes.
[0054] S4. The system concatenates the attention-weighted temporal, visual, and semantic features along the channel dimension and compresses them using a three-layer autoencoder structure, ultimately generating a fusion modality feature map representing the system's global operational state. This map not only includes numerical physical indicators but also qualitative risk representations of the on-site environment, providing an input tensor with complete spatial topological properties for the graph convolutional evolution prediction in step S4.
[0055] The specific implementation process is as follows: 1. First, the fusion modal feature mapping map output by S3 is restored to each node of the causal knowledge graph. Taking the hydrogenation reaction system as an example, the system deconstructs the high-dimensional tensor into: input node features: including the opening signal of the hydrogen feed control valve (V-101) and the manually bypassed operation status of the valve recognized by vision.
[0056] Process end node characteristics: including the time-series change rate of pressure P-101 and temperature T-101 inside the reactor (R-101).
[0057] Environmental end node characteristics: including the semantic risk value of "abnormal noise from the bearing of cooling water pump P-102" reported in the inspection record.
[0058] 2. The system uses a spatiotemporal graph convolutional network (ST-GCN) to process the above node features.
[0059] To accurately simulate the spatiotemporal propagation process of abnormal disturbances (such as pressure pulsations and flow surges) along the process topology path, the system uses the following node state update operator for calculation: in, and They represent the first time. Second and third In each evolutionary iteration, the fused characteristic state vector of each process node (such as reactor temperature, pressure, valve opening) in the causal graph; This represents the directed causal adjacency matrix constructed in step S2, based on P&ID and data-driven generation. The degree matrix represents the causal graph. This represents the preset learnable weight matrix. This represents a non-linear activation function.
[0060] The simulation process follows this logic: Spatial domain propagation: The system calculates the spatial correlation between nodes based on the directed acyclic graph structure constructed by S2. When an abnormal surge in traffic occurs at node V-101, ST-GCN transmits this "disturbance energy" along the causal edges to the downstream pressure node P-101 through a message passing mechanism.
[0061] Time-domain dependence: The model captures the slope of the abnormal signal's change over time. If the T-101 temperature node shows an exponential increase over five consecutive sampling periods, the disturbance is determined to have the energy to continue evolving.
[0062] 3. The system calculates the activation probability of the target accident node (e.g., high-voltage interlocking alarm) through a preset logic gate function (Sigmoid): the system sets three risk thresholds (0.3, 0.6, 0.9).
[0063] Assuming the current fluctuation of the feed valve is X, the system automatically calculates the probability that this disturbance, after being transmitted through the graph path, will cause the R-101 pressure to exceed the interlock value. If the calculated activation probability is 0.85, the system immediately defines the current risk level as "high risk".
[0064] 4. The system uses maximum likelihood estimation to screen out the most likely risk transmission paths from complex causal networks and generate structured reports.
[0065] The output path chain in this embodiment is: [Inducement: Manual bypass activation of V-101] → [Process: Hydrogen-oil ratio imbalance in R-101] → [Key point: Increased exothermic reaction (T-101 surge)] → [Risk point: Pressure exceedance (P-101 anomaly)] → [Endpoint: High-pressure release chain trigger]. This chain not only provides the probability of the accident, but also clearly defines how the accident gradually evolves from a visually perceptible behavior (manual operation) to process indicator failure (pressure exceedance), providing a logical basis for precise intervention in step S5. S5, based on the evolution path chain output in step S4, selects controllable operational variables as intervention nodes in the dynamic causal knowledge graph, uses a structural causal model for counterfactual reasoning simulation, compares the change in the activation probability of the accident node before and after changing the parameter values of the intervention node, and selects the optimal intervention operation sequence that can reduce the accident probability below the safety threshold and outputs it.
[0066] The specific implementation process is as follows: 1. Based on the accident evolution path chain identified in step S4 (e.g., from "flow anomaly" to "pressure cascading"), the system first determines a set of controllable intervention candidates. The system locks the feed valve of the hydrogenation reactor. and cooling water regulating valve As a key intervention node .
[0067] 2. The system doesn't just make decisions based on the current state; it uses counterfactual reasoning to simulate the consequences of "if the current automatic logic isn't executed, but manual intervention is used instead." To quantify the effects of different operating schemes, the system introduces a core counterfactual probability formula. When the simulation moves the feed valve... Forced adjustment to target opening degree At that time, the accident node The risk change (overpressure risk) is calculated as follows: in, This indicates the multimodal observation data currently being collected. If the operation variable is... Forced adjustment to target value Accident Node The counterfactual probability distribution that still occurs, Representing the budget, Represents the real-time operating condition context tensor.
[0068] 3. By comparing the intervention effect sizes of multiple options, i.e. To find the path that most significantly reduces risk.
[0069] Scenario simulation application: Alternative solution A: Only close the feed valve System simulation yielded... However, this could lead to significant fluctuations in downstream processes.
[0070] Alternative Option B (Optimal): A synergistic approach of "slightly reducing the feed rate + significantly increasing the cooling water flow." The system uses a multi-objective optimization function to calculate the optimal intervention sequence. , in, This indicates the cost of the operation's impact on the system's steady state. and A coefficient used to balance the weights of safety and production.
[0071] 4. Finally, the system converts the calculation results into specific scheduling instructions. For example, the terminal interface will display: "[Counterfactual simulation conclusion]: If the status quo is maintained, the probability of an accident is 85%; if plan B is executed, the probability of an accident can be reduced to 12%. [Execution suggestion]: Please adjust the V-101 valve position to 35% within 20 seconds and simultaneously increase the frequency of the circulating pump P-102 to 45Hz."
[0072] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions will not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for predicting safety accidents in chemical production, characterized in that, Includes the following steps: S1. Real-time process parameter time-series signals are acquired through the distributed control system (DCS) of the chemical production system, and video frame sequences and electronic inspection text records are retrieved simultaneously from the plant monitoring system; time-frequency domain features are extracted from the process parameter time-series signals to construct a process state tensor; convolutional neural networks are used to extract spatial features of personnel violations and apparent features of equipment operation from the video frame sequences; and a pre-trained language model is used to convert the text records into risk semantic feature vectors; S2. Based on the pipe connection relationships in the process flow diagram (P&ID) and the hazard propagation logic in the HAZOP report, a topology connection matrix composed of process variable nodes is predefined; the topology connection matrix is used as... Constraints are applied, and a causal discovery algorithm is used to perform structural learning in a historical production database to construct a dynamic causal knowledge graph covering disturbance sources, intermediate variables, sensitive parameters, and failure points. The edge weights between nodes in the dynamic causal knowledge graph are calculated in real time. S3: Using a preset equipment tag number association table, the spatial features, apparent features, and risk semantic features extracted in step S1 are mapped to the corresponding process variable nodes in the dynamic causal knowledge graph. A cross-attention mechanism is adopted, using the process state tensor as the query vector, to perform temporal resampling and alignment of the spatial features, apparent features, and risk semantic features to generate a fusion modal feature mapping graph representing the global operating state of the system. S4. Input the fused modal feature map into the graph convolutional neural network, combine it with the edge weights in the dynamic causal knowledge graph to simulate the transmission process of abnormal disturbances on the process topology path, and output the accident risk level and the predicted evolution path chain by calculating the activation probability of the target accident node within the preset prediction time window; S5. For the evolution path chain output in step S4, select controllable operational variables as intervention nodes in the dynamic causal knowledge graph, use the structural causal model to perform counterfactual reasoning simulation, compare the change in the activation probability of the accident node before and after changing the parameter value of the intervention node, screen out the optimal intervention operation sequence that can reduce the accident probability to below the safety threshold and output it.
2. The method for predicting safety accidents in chemical production according to claim 1, characterized in that, In step S1, the original time-series signal acquired by DCS is framed and denoised using sliding window and wavelet transform, and time-frequency domain features including mean, standard deviation, skewness, kurtosis and frequency band energy distribution are extracted to construct the process state tensor; the semantic features of unsafe behaviors such as personnel not wearing safety protective equipment or illegal hot work in the video frame are identified by target detection algorithm and human key point detection, and the appearance features of equipment operation, including pipe leakage and splash shape and smoke plume, are extracted using mask segmentation algorithm. A pre-trained model in the field of chemical safety is used to perform named entity recognition on inspection texts, extract semantic entities containing risk equipment tag numbers, descriptions of abnormal phenomena and risk severity, and risk weights are assigned to the semantic entities based on an attention mechanism to generate risk semantic feature vectors. The system synchronizes the time of the acquisition terminals of each system based on a globally unified clock server, and performs timestamp marking and completion alignment based on the sampling period of the DCS process parameters according to the difference in the sampling frequency of each modal data.
3. The method for predicting safety accidents in chemical production according to claim 2, characterized in that, In step S2, the physical connection logic in the P&ID graph and the hazard propagation orientation relationship in the HAZOP report are transformed into an initial causal adjacency matrix, which serves as a priori mask constraint for causal structure search. Using a scoring-based structure learning algorithm or a constraint-based causal discovery algorithm, the historical production database is traversed and optimized under the priori mask constraint to eliminate pseudo-correlated edges that conflict with the physical mechanism, thus determining a directed acyclic graph (DAG) composed of process variables. Node attributes in the DAG are defined, including source nodes representing disturbance inputs, intermediate variable nodes representing process transmission, sensitive parameter nodes representing key early warning indicators, and failure point nodes representing accident states. A conditional probability distribution model between nodes is established, and operating condition identification coefficients are introduced. Based on the operating condition switching instructions when the current production operation is in the start-up, shutdown, or steady-state operation phase, the transmission probability weights of each edge connection in the DAG are dynamically adjusted, completing the real-time construction of a dynamic causal knowledge graph.
4. The method for predicting safety accidents in chemical production according to claim 3, characterized in that, In step S3, an index mapping table based on the chemical equipment tag number is established. The spatial features, apparent features, and risk semantic features extracted in step S1 are attached to the corresponding equipment nodes and process variable nodes in the dynamic causal knowledge graph according to the physical attribution relationship. Based on the sampling frequency of the process state tensor, linear interpolation or zero-order hold is used to resample and align the video features with high sampling frequency and the semantic features with variable sampling frequency to construct a multimodal feature flow under a unified time reference.
5. The method for predicting safety accidents in chemical production according to claim 4, characterized in that, In step S3, the correlation weights between the process state tensor and the video features and semantic features are calculated through a cross-attention mechanism. The correlation weights are used to weight and enhance the multimodal feature stream, suppressing visual and textual noise that is inconsistent with the process operation logic. The weighted multimodal features are then compressed in dimension and reorganized through an autoencoder network to generate a fusion modal feature map that is highly coupled in the temporal and spatial domains and represents the global operating state of the system.
6. The method for predicting safety accidents in chemical production according to claim 5, characterized in that, In step S4, the fused modal feature map is deconstructed into time-varying state feature vectors of each node in the dynamic causal knowledge graph, and the spatiotemporal graph convolutional network is used to capture the spatial correlation and temporal dependence of the time-varying state feature vectors in the graph topology. According to the causal logic from the source node to the failure point defined in the dynamic causal knowledge graph, the energy propagation of abnormal disturbances along the directed acyclic graph path is simulated through a message passing mechanism, and the transient evolution increment of each node under the influence of neighboring abnormal nodes is calculated. Based on the transient evolution increment, the activation probability of each sensitive parameter node and failure point node within the preset prediction window is calculated using the classification output layer, and the accident risk level is divided according to the probability value. Using maximum likelihood estimation or path search algorithms, a sequence of nodes with activation probabilities exceeding a preset threshold and logical continuity is selected from the dynamic causal knowledge graph to generate an accident evolution path chain containing causal nodes, key evolution nodes, and final failure nodes.
7. The method for predicting safety accidents in chemical production according to claim 6, characterized in that, In step S5, variable nodes with controlled attributes are extracted from the accident evolution path chain as intervention candidate sets, and the do-operator in the structural causal model is used to perform simulated interventions of different intensities on each node in the intervention candidate set. Based on the dynamic causal knowledge graph, the counterfactual probability distribution of the target accident node after the simulated intervention is calculated. By comparing the expected probability difference before and after the intervention, the intervention effect of each intervention node on reducing accident risk is quantified. With the goal of maximizing the intervention effect and minimizing the amplitude of process state fluctuations, a heuristic search algorithm is used to screen the optimal intervention node and its corresponding adjustment target value from the intervention candidate set. According to the temporal logic in the dynamic causal knowledge graph, the collaborative execution order between the optimal intervention nodes is determined, and an optimal intervention operation sequence containing operation bit number, adjustment time point and adjustment amplitude is generated and pushed to the interactive terminal synchronously with the accident evolution path chain.
8. A chemical production safety accident prediction system, comprising a chemical production safety accident prediction method according to any one of claims 1-7, characterized in that, The system includes: a multimodal perception module: used to collect process parameter timing signals from the distributed control system (DCS), video frame sequences from the monitoring system, and electronic inspection text records; to extract features from the timing signals to construct a process state tensor, extract spatial and apparent features from the video frame sequences, and convert the text records into risk semantic feature vectors; a causal graph construction module: used to predefine a topological connection matrix based on the process flow diagram (P&ID) and HAZOP report, and use this as a constraint to perform structure learning in the historical production database using a causal discovery algorithm to construct a causal knowledge graph covering disturbance sources, intermediate variables, sensitive parameters, and failure points, and calculate the edge weights between nodes in the causal knowledge graph; and a feature alignment and fusion module: used to use the equipment tag number association table to align and fuse the extracted parameters. Modal features are mapped to the corresponding nodes of the causal knowledge graph, and a cross-attention mechanism is used to perform temporal resampling and alignment of each modal feature to generate a fused modal feature mapping map representing the global operating state of the system; Path evolution prediction module: used to input the fused modal feature mapping map into a graph convolutional neural network, combine the edge weights in the causal knowledge graph to simulate the transmission process of abnormal disturbances on the process topology path, and output the accident risk level and the predicted evolution path chain according to the activation probability of the target accident node in the prediction window; Intervention decision module: used to select controllable operational variables as intervention nodes from the evolution path chain, use a structural causal model to perform counterfactual reasoning simulation, and select the optimal intervention operation sequence by comparing the change in the activation probability of the accident node before and after intervention and output it.
9. A computing device, characterized in that, include: Memory, used to store computer instructions; A processor is configured to execute computer instructions stored in the memory to implement the steps of a chemical production safety accident prediction method as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing computer instructions thereon, characterized in that, When the computer instructions are executed by the processor, they implement the steps of a chemical production safety accident prediction method as described in any one of claims 1 to 7.