A method and system for predicting the risk evolution of chemical plants based on causal graphs and multi-source big data.
By constructing causal graphs and time-series graph neural networks, and combining them with multi-source big data, the problem of accurately predicting the risk propagation path of chemical plants was solved, which improved the accuracy and timeliness of risk evolution prediction for chemical plants and reduced computational overhead.
Patent Information
- Application Number
- CN202611235649.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-14
- Publication Date
- 2026-11-17
AI Technical Summary
Existing technologies struggle to accurately identify risk propagation paths in chemical plants, and the asynchronous arrival of data from multiple sources leads to inconsistent prediction results and excessive computational load, particularly when the status of safety barriers is uncertain.
By constructing a causal graph and combining multi-source big data, a time-series graph neural network is used to predict the risk evolution path. For security barriers with uncertain states, branches are established for effective and ineffective blocking. Through time-series matching of measured nodes and local correction of late data, the accuracy and timeliness of prediction are improved.
It improves the accuracy and timeliness of risk evolution prediction for chemical plants, reduces computational overhead, provides clear propagation sequence and time basis, and supports the localization of anomaly root causes and the verification of safety barriers.
Smart Images

Figure CN123117771A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of chemical process safety monitoring and intelligent risk prediction technology, and in particular to a method and system for predicting the risk evolution of chemical plants based on causal graphs and multi-source big data. Background Technology
[0002] Petrochemical, fine chemical, and pharmaceutical chemical plants typically feature continuous processes, complex equipment relationships, diverse hazardous media, and highly coupled operating parameters. When process parameters such as temperature, pressure, liquid level, flow rate, or material composition deviate, the abnormal state can propagate tier by tier along material transport relationships, energy transfer relationships, and control loops. If safety barriers such as safety interlocks, emergency shut-offs, pressure relief, fire fighting, and personnel handling fail to effectively block these propagation, it can evolve into leaks, fires, explosions, or poisoning accidents. Therefore, accurately identifying risk propagation paths and predicting the probability and arrival time of risk nodes is crucial for accident prevention and emergency response in chemical plants.
[0003] Existing chemical plants typically collect operational data through distributed control systems, safety instrumented systems, gas detection and alarm systems, and equipment condition monitoring systems. Simultaneously, companies accumulate hazard and operability analysis records, protection layer analysis records, safety assessment reports, accident investigation reports, equipment inspection records, and maintenance records. These data vary in structure, object identification, collection frequency, and time base. Safety assessment data is often in text, table, or flowchart format, while real-time operational data primarily consists of continuous measurement data or discrete event data with equipment tag numbers and timestamps, making it difficult to directly correlate static safety assessment knowledge with real-time operational status.
[0004] Existing technology CN120744408B discloses a method and system for identifying safety production risks based on knowledge graphs. It acquires entity nodes and relational edge data from a knowledge graph, generates node embedding representations using a graph neural network, determines risk patterns through an attention mechanism, generates risk propagation sequences, and updates entity states and dynamic propagation paths based on temporal features. This technology can represent the relationships between equipment, personnel, and environmental factors using knowledge graphs, but it primarily focuses on identifying risk propagation chains from general safety production data. For chemical plants, safety barriers such as safety interlocks, emergency shut-off valves, and pressure relief devices are not ordinary related nodes; their operational states can directly block or allow risk propagation. The aforementioned existing technology does not address the potential inconsistencies between control commands, actual action feedback, and inspection and maintenance status of safety barriers, nor does it establish a barrier state processing mechanism that coordinates with the causal propagation process.
[0005] Existing technology CN115511236B discloses a method and apparatus for dynamic assessment of safety risks in petrochemical processes. It identifies key safety variables and abnormal events in petrochemical processes, analyzes the safety protection layers corresponding to abnormal events, calculates the dynamic occurrence probability based on the initial failure probability of the safety protection layers and historical data, and combines this with the loss due to accidents to calculate the dynamic risk of the petrochemical process. This technology can reflect the change in the failure probability of the safety protection layers with operating conditions, but it mainly outputs the dynamic risk of process safety. It does not further address the problem of predicting the specific evolution paths when multiple abnormal states propagate along the connections between chemical processes, nor does it provide a method for maintaining multiple possible risk paths in parallel and for subsequent verification when the state of the safety protection layers is temporarily uncertain.
[0006] Furthermore, multi-source operational data from chemical plants are typically generated separately by different control systems, monitoring terminals, and management systems. Due to factors such as communication delays, data retransmission, delayed manual inspection record entry, and clock deviations between different systems, some data may arrive only after risk prediction is complete. Directly using late data to overwrite the current node status can easily lead to the mixing of risk paths based on different data versions; recalculating the complete causal graph after each late data reception increases computational load and prolongs early warning response time. Especially in cases of delayed safety barrier action feedback, late data not only affects the status of the safety barrier itself but may also alter the prediction results of multiple downstream risk nodes.
[0007] Therefore, existing technologies still need to address the following issues: how to uniformly map historical safety assessment knowledge and real-time operating data of chemical plants to a computable risk causal structure; how to avoid prematurely fixing the outcome of a single risk propagation when the state of the safety barrier cannot be determined temporarily; and how to locally correct the scope of risk propagation when multi-source data arrives asynchronously and changes the state of historical nodes, thereby improving the accuracy, timeliness, and data consistency of risk evolution prediction for chemical plants. Summary of the Invention
[0008] The technical objective of this invention is to provide a method and system for predicting the risk evolution of chemical plants based on causal graphs and multi-source big data, in order to solve the problems of existing technologies that are difficult to accurately predict risk propagation paths by combining the uncertain state of safety barriers, as well as the inconsistency of prediction results and large amount of redundant calculations caused by delayed operation data.
[0009] Firstly, in order to achieve the above-mentioned objectives, the present invention adopts the following technical solution:
[0010] A method for predicting the risk evolution of chemical plants based on causal graphs and multi-source big data, comprising the following steps:
[0011] S1. Acquire historical safety evaluation data, historical operation event data, and real-time operation data of the chemical plant, and construct a causal graph based on process connection relationships and cause-deviation-barrier-consequence relationships; the causal graph includes cause nodes, deviation nodes, safety barrier nodes, and consequence nodes, and the causal edges have propagation time windows, with safety barrier nodes set on the causal edges they block;
[0012] S2 maps real-time operational data to a cause-effect graph, determines the barrier status based on the control commands, action feedback, and inspection and maintenance records of the safety barrier; establishes a blocking effectiveness hypothesis branch and a failure passage hypothesis branch for safety barriers with uncertain status, and registers the status version.
[0013] S3 uses historical event data to train a time-series graph neural network constrained by a causal graph, so that node information is transmitted only along causal edges that satisfy the propagation window and are not blocked; each hypothesis branch is input into the time-series graph neural network to obtain candidate risk evolution paths, node occurrence probabilities and expected arrival times;
[0014] S4, match the state and occurrence time of the subsequently measured nodes with the node activation order and propagation window predicted by each hypothesis branch; delete the hypothesis branch with a lower matching degree only when the temporal matching evidence difference between the hypothesis branches reaches the preset requirement, otherwise retain each hypothesis branch;
[0015] S5. When running data with a timestamp earlier than the current processed event time and which causes a change in the state of historical nodes is received, the earliest changed node and its successor subgraph are determined, the successor subgraph is reverted to the state version before the time corresponding to the running data, the subsequent running data is replayed in chronological order, and the candidate risk evolution path generated based on the old state version is discarded.
[0016] S6, output the risk evolution prediction results based on the candidate risk evolution paths retained under the current effective state version.
[0017] As a further improvement, in step S1, the historical safety evaluation data includes hazard and operability analysis records, protection layer analysis records, accident investigation records, and associated process flow data; the historical operating event data includes process measurement records, alarm records, safety interlock records, and equipment failure records; and the real-time operating data includes data with equipment tag numbers and timestamps output by the distributed control system, safety instrumented system, and gas detection alarm system.
[0018] As a further improvement, in step S1, the propagation window is determined in the following way:
[0019] Extract upstream and downstream events corresponding to the same causal edge from historical event data to form event pairs;
[0020] Propagation time samples are generated based on the time difference of the occurrence of the event pairs, and propagation time samples generated during the period when the security barrier is in an effective blocking state are deleted;
[0021] The lower and upper limits of the propagation window are determined based on the time difference distribution of the remaining propagation time samples, and the propagation window is updated after a new running event is confirmed.
[0022] As a further improvement, in step S1, the historical operating event data of different chemical plants are standardized, including:
[0023] Extract the equipment type corresponding to the equipment tag number, the role of the equipment in the process flow, and the status of the materials being processed;
[0024] Generate standard object identifiers based on the equipment type, its role in the process flow, and the state of the materials being processed;
[0025] Operational events with the same standard object identifier in different chemical plants are converted into similar event samples, while the mapping relationship between equipment tag numbers and standard object identifiers is preserved.
[0026] As a further improvement, step S1 involves constructing a causal graph, including:
[0027] Using a causal relationship extraction model, causal items, deviation items, safety barrier items, and consequence items are identified from historical safety assessment data to form candidate causal chains;
[0028] The propagation direction of candidate causal chains is verified by utilizing the material flow direction, energy transfer direction, and control loop connection relationships of chemical plants;
[0029] Delete candidate causal chains that conflict with the propagation direction and process connection relationship, and establish nodes and causal edges based on the retained candidate causal chains;
[0030] Insert a security barrier node between the upstream and downstream nodes that it can block.
[0031] As a further improvement, in step S2:
[0032] When the action feedback is consistent with the control command, the action feedback is within the allowable response time, the test validity period has not expired, and there is no barrier bypass record, the safety barrier is determined to be in an effective blocking state.
[0033] When a safety barrier is bypassed, fails to receive corresponding action feedback after the allowable response time, or the test result indicates that the safety barrier has failed, the safety barrier will be determined to be in a failed passage state.
[0034] When action feedback is missing, the validity period of the inspection expires, or the barrier status corresponding to different data sources conflicts with each other, the security barrier will be determined as an uncertain state.
[0035] The state version is associated with at least the security barrier state, the deadline of the data on which the state is based, and the corresponding hypothesis branch.
[0036] As a further improvement, in step S3: the temporal graph neural network includes a node state encoding layer, a time encoding layer, a controlled message passing layer, and a prediction output layer;
[0037] The node state encoding layer is used to encode process measurement status, alarm status, and safety barrier status; the time encoding layer is used to encode the occurrence time and duration of node status; the controlled message transmission layer is used to control node information transmission based on the propagation window of the causal edge and the safety barrier status; the prediction output layer is used to output the node occurrence probability, expected arrival time, and predecessor node.
[0038] During training, network parameters are adjusted based on node state prediction error, estimated arrival time error, degree of causal order violation, and degree of security barrier error traversal.
[0039] As a further improvement, in step S4:
[0040] When subsequent measured nodes occur in the predicted node activation order within the corresponding propagation time window, add temporal matching evidence for the corresponding hypothesis branch;
[0041] If subsequent measured nodes do not occur within the corresponding propagation time window, occur in a sequence inconsistent with the predicted node activation sequence, or exhibit node states that are not predicted by the hypothetical branch, the temporal matching evidence of the corresponding hypothetical branch is reduced.
[0042] The temporal matching evidence of the blocking valid hypothesis branch and the invalid passable hypothesis branch is compared, and the hypothesis branch with lower temporal matching evidence is deleted when the difference between the two reaches a preset branch convergence threshold.
[0043] As a further improvement, in step S5, determining the successor subgraph includes:
[0044] Starting from the earliest changed node, traverse the subsequent nodes along the direction of propagation of the causal edge;
[0045] When a security barrier node in an effective blocking state is encountered, stop traversing along the causal edge corresponding to that security barrier node.
[0046] The nodes, causal edges, and safety barrier nodes obtained through traversal are determined as successor subgraphs.
[0047] Only the state rollback, running data replay, and candidate risk evolution path update are performed on the successor subgraph, while the state of nodes outside the successor subgraph remains unchanged.
[0048] As a further improvement, the method also includes counterfactual verification of the retained candidate risk evolution paths:
[0049] Set the initial deviation node of the candidate risk evolution path to the normal state and re-predict to obtain the first prediction result;
[0050] Set the safety barrier nodes in the candidate risk evolution path to an effective blocking state and re-predict to obtain a second prediction result;
[0051] Based on the changes in consequence node risk between the original prediction results and the first and second prediction results, the degree of influence of the initial deviation node and the safety barrier node on the candidate risk evolution path is determined.
[0052] As a further improvement, the risk evolution prediction results include the node order on the candidate risk evolution path, the probability of node occurrence, the expected arrival time, the corresponding hypothesis branch, the key security barrier, and the prediction confidence level;
[0053] When the probability of the occurrence of a consequence node reaches the preset warning condition or the expected arrival time is less than the preset handling time, a risk warning information containing the initiating cause node, key safety barriers and their current status is generated.
[0054] Secondly, the present invention also provides a risk evolution prediction system for chemical plants based on causal graphs and multi-source big data. This system is used to implement the method described above, including:
[0055] The data processing module is used to acquire historical safety assessment data, historical operating event data, and real-time operating data of the chemical plant.
[0056] The causal graph construction module is used to construct a causal graph with a propagation time window based on process connection relationships and cause-deviation-barrier-effect relationships, and to set safety barrier nodes on the causal edges they block;
[0057] The status branch module is used to determine the status of the safety barrier based on the control commands, action feedback and inspection and maintenance records of the safety barrier. For safety barriers with uncertain status, it establishes a blocking effective hypothesis branch and a failure passability hypothesis branch, and registers the status version.
[0058] The evolution prediction module is used to run a time-series graph neural network constrained by causal graphs to obtain the candidate risk evolution path, node occurrence probability and expected arrival time corresponding to each hypothesis branch;
[0059] The evidence convergence module is used to perform time-series matching between subsequent measured nodes and the prediction results of each hypothesis branch, and to determine whether to retain or delete the corresponding hypothesis branch based on the time-series matching evidence.
[0060] The incremental correction module is used to determine the earliest changed node and its successor subgraph when it receives runtime data that changes the state of a historical node, perform state rollback and runtime data replay on the successor subgraph, and abolish the candidate risk evolution path generated based on the old state version.
[0061] The prediction output module is used to output the risk evolution prediction results based on the candidate risk evolution paths retained under the current effective state version.
[0062] As a further improvement, the system also includes a version storage module, which is used for:
[0063] Store the security barrier status, hypothetical branches, data cutoff time, and node status snapshots corresponding to each state version;
[0064] Establish the correlation between state versions and candidate risk evolution paths;
[0065] After the incremental correction module generates a new state version, the candidate risk evolution path associated with the rolled-back state version and passing through the successor subgraph is marked as failed.
[0066] Thirdly, the present invention also provides an electronic device, including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, it implements the method described above.
[0067] Fourthly, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described thereon.
[0068] This invention integrates historical safety assessment data, historical operational event data, and real-time operational data to construct a causal graph containing propagation windows and safety barrier nodes. It then utilizes a time-series graph neural network constrained by the causal graph to predict risk evolution paths, node occurrence probabilities, and estimated arrival times. For safety barriers with uncertain states, it establishes branches based on the effective blocking hypothesis and the failure-passage hypothesis, respectively. Time-series matching is performed using the states and occurrence times of subsequent measured nodes, allowing prediction results to gradually converge with observational evidence. This avoids missing true risk paths or generating false risk paths due to premature determination of safety barrier states. When late operational data that changes the state of historical nodes is received, only the successor subgraph of the earliest changed node is subjected to state version rollback, data replay, and path update, while keeping the states of other nodes unchanged. This avoids redundant calculations of the entire causal graph and the mixing of predicted paths corresponding to old and new state versions. Therefore, this invention improves the accuracy, timeliness, and data consistency of risk evolution prediction for chemical plants, reduces prediction computational overhead, and provides technical support with clear propagation order and time basis for anomaly root cause localization, safety barrier verification, and accident early warning and handling. Attached Figure Description
[0069] Figure 1 This is a schematic diagram of the overall process of a risk evolution prediction method for chemical plants based on causal graphs and multi-source big data according to the present invention.
[0070] Figure 2 This is a schematic diagram of the structure of a chemical plant risk evolution prediction system based on causal graphs and multi-source big data according to the present invention.
[0071] Figure 3 This is a schematic diagram of the causal graph between the cause node, deviation node, safety barrier node and consequence node in an embodiment of the present invention.
[0072] Figure 4 This is a schematic diagram of a time-series graph neural network structure constrained by a causal graph in an embodiment of the present invention.
[0073] Figure 5 This is a schematic diagram illustrating the establishment of two hypothesis branches for a security barrier with uncertain state in an embodiment of the present invention and the branch convergence based on temporal matching evidence.
[0074] Figure 6 This is a schematic diagram illustrating the subgraph rollback, data replay, and old path abandonment after late-running data is triggered in an embodiment of the present invention.
[0075] Figure 7 This is a schematic diagram of the semi-physical experimental platform for chemical equipment used in this invention.
[0076] Figure 8This diagram illustrates how multi-source data, predicted risk probability, and the state of the safety barrier change over time when cooling capacity decreases and a safety barrier is triggered.
[0077] Figure 9 This diagram illustrates the generation, evidence accumulation, and branch convergence process of effective blocking branches and failed penetration branches when the state of the safety barrier is uncertain.
[0078] Figure 10 This diagram illustrates the process of triggering historical version rollback for late data, identifying affected subgraphs, and replaying events.
[0079] Figure 11 This is a comparison chart of the present invention and different comparative examples in terms of risk path identification accuracy, arrival time error, and false alarm rate.
[0080] Figure 12 This is a comparison chart of the number of nodes processed and the computation time between partial rollback and full graph recalculation in this invention. Detailed Implementation
[0081] The present invention will be further described below with reference to the accompanying drawings and embodiments. It should be understood that the embodiments are used to illustrate the technical solutions of the present invention, and not to limit the scope of protection of the present invention. Equivalent substitutions made by those skilled in the art for data interfaces, network layers, model parameters, or device types without departing from the concept of the present invention can all be used to implement the present invention.
[0082] I. Terminology Explanation
[0083] 1. Historical security assessment data
[0084] Historical safety assessment data refers to data used to describe the hazards, causes of anomalies, safety barriers, and consequences of accidents in chemical plants. This includes hazard and operability analysis records, protection layer analysis records, safety assessment reports, accident investigation records, and process flow data associated with the above information. Historical safety assessment data can be in the form of structured tables, text, piping and instrumentation diagrams, control logic diagrams, or fault trees.
[0085] 2. Historical event data
[0086] Historical operational event data refers to data with event timestamps generated during the past operation of chemical plants, including process measurement records, alarm records, safety interlock records, equipment failure records, safety barrier action records, and inspection and maintenance records. Historical operational event data is used to determine the temporal patterns of risk propagation and to train a time-series graph neural network.
[0087] 3. Real-time running data
[0088] Real-time operational data refers to the data continuously generated during the operation of the current chemical plant, including temperature, pressure, liquid level, flow rate, valve opening, equipment start / stop status, alarm status, safety interlock commands, actuator action feedback, and gas detection data. Real-time operational data is mapped to nodes in the causal graph using equipment tag numbers and timestamps.
[0089] 4. Cause-and-effect diagram
[0090] A cause-and-effect graph is a directed graph structure used to represent the generation and propagation of chemical risks. It includes cause nodes, deviation nodes, safety barrier nodes, and consequence nodes. Cause nodes represent equipment failure, operational abnormalities, material abnormalities, or external disturbances; deviation nodes represent process deviations such as high temperature, high pressure, low flow rate, or abnormal liquid level; safety barrier nodes represent safety interlocks, emergency shutdowns, emergency cooling, pressure relief, fire fighting, or manual handling measures; and consequence nodes represent consequences such as runaway reactions, overpressure, leaks, fires, explosions, or personnel exposure.
[0091] 5. Transmission Window
[0092] The propagation window refers to the time range within which a downstream node may be affected and change its state after an upstream node's state changes. The propagation window includes a lower and upper limit, used to avoid mistakenly assuming a risk propagation relationship between two nodes simply because they exhibit anomalies sequentially over a relatively long period.
[0093] 6. Safety barrier status
[0094] The status of a safety barrier includes an effective blocking status, a disabled passage status, and an uncertain status. An effective blocking status indicates that the safety barrier has completed the predetermined action according to the control instructions and is able to block the propagation of the corresponding risk; a disabled passage status indicates that the safety barrier has not acted, acted inadequately, been bypassed, or has been confirmed as disabled after inspection; an uncertain status indicates that the effectiveness of the safety barrier cannot be uniquely determined temporarily due to missing feedback, data conflicts, expired inspection records, or communication delays.
[0095] 7. Assumption Branch
[0096] The hypothesis branches are graph states that can be independently reasoned about in response to uncertain security barriers. The blocking validity hypothesis branch temporarily treats the security barrier as capable of blocking risk propagation, while the failure passability hypothesis branch temporarily treats the security barrier as a path through which the risk can pass. Each hypothesis branch generates candidate risk evolution paths until subsequent experimental data is sufficient to support one of the hypothesis branches.
[0097] 8. Status Version
[0098] A state version is a version record that associates the causal graph state, hypothesis branches, safety barrier states, and candidate risk evolution paths at a specific data cutoff time. Each candidate risk evolution path carries a state version identifier at the time of its generation, thereby preventing paths generated based on different data states from being mixed up.
[0099] 9. Late running data
[0100] Late execution data refers to data whose event time is earlier than the currently processed event time, but is only received by the system after the current prediction is completed. Late execution data can originate from communication retransmission, offline detection record entry, actuator feedback delay, or clock deviation between different acquisition systems.
[0101] 10. Successor Subgraph
[0102] The successor subgraph is a local graph structure that may be affected by late-arriving data, obtained by traversing along the propagation direction of causal edges starting from the earliest changed node. When a safety barrier node in an effective blocking state is encountered, traversal along the causal edge corresponding to that safety barrier node stops.
[0103] II. System Overall Structure
[0104] like Figure 2 As shown, the chemical plant risk evolution prediction system of the present invention includes a data processing module, a causal graph construction module, a state branching module, an evolution prediction module, an evidence convergence module, an incremental correction module, a version storage module, and a prediction output module.
[0105] The data processing module connects to the historical safety evaluation database, the historical operation database, and the real-time data interface. The real-time data interface can use OPCUA, industrial Ethernet, ModbusTCP, or a message queue interface to acquire data from the distributed control system, safety instrumented system, gas detection and alarm system, and equipment status monitoring terminal.
[0106] The causal graph construction module is used to combine causal knowledge from historical safety assessment data with the process connectivity relationships of the target chemical plant to construct a causal graph. Figure 3 The causal graph shown. Figure 3 In this model, low cooling water flow is considered the causal node, high reaction temperature is considered the deviation node, feed shut-off interlock and emergency cooling valve are considered safety barrier nodes, and reaction runaway and reactor overpressure are considered consequence nodes. Safety barrier nodes are located on the causal edges they can block, rather than as ordinary related nodes equivalent to other nodes.
[0107] The status branch module determines the status of the safety barrier based on its control commands, action feedback, and inspection and maintenance records. For safety barriers with uncertain status, two hypothetical branches are established, and the corresponding status versions are registered in the version storage module.
[0108] The evolution prediction module runs as follows Figure 4 The temporal graph neural network shown is constrained by the causal edge propagation direction, propagation window, and safety barrier state, and outputs candidate risk evolution paths, node occurrence probabilities, expected arrival times, and predecessor nodes.
[0109] The evidence convergence module is based on Figure 5 As shown, subsequent measured nodes are matched with the prediction results of different hypothesis branches to accumulate time-series matching evidence. When the evidence difference between two hypothesis branches reaches the branch convergence threshold, the hypothesis branch with the lower matching degree is deleted.
[0110] Incremental correction module according to Figure 6 The method shown handles late-arriving data. This module identifies the earliest changed node and its successor subgraph, performs state rollback and data replay only on the successor subgraph, and keeps the state of nodes outside the successor subgraph unchanged.
[0111] The version storage module is used to save the graph state snapshot, hypothesis branches, data cutoff time, prediction path, and model output. The prediction output module outputs risk paths, consequence node probabilities, estimated arrival times, key safety barriers, and early warning information based on the current valid state version.
[0112] III. Data Structure
[0113] In one possible implementation, the causal graph is stored using a node table, a causal edge table, a security barrier table, a state version table, and a prediction path table.
[0114] The node table should include at least the node identifier, node type, standard object identifier, associated device tag number, current status, status occurrence time, data quality flag, and status version identifier.
[0115] The causal edge table should include at least the upstream node identifier, the downstream node identifier, the causal relationship type, the lower limit of the propagation window, the upper limit of the propagation window, and the associated security barrier identifier.
[0116] The safety barrier table should include at least the safety barrier identifier, control command tag number, action feedback tag number, allowable response time, inspection validity period, bypass status, and current barrier status.
[0117] The status version table includes at least the status version identifier, parent version identifier, data expiration time, hypothetical branch identifier, security barrier status set, and node status snapshot address.
[0118] The predicted path table should include at least the path identifier, status version identifier, node sequence, node occurrence probability, estimated arrival time, and path validity status.
[0119] The data structure described above allows for explicit associations between security barrier states, hypothesis branches, and prediction paths through state versions. When late-running data alters historical states, the affected state versions and prediction paths can be retrieved directly without having to search through all historical data again.
[0120] IV. Specific Implementation of the Method
[0121] S1, Data Acquisition and Causal Graph Construction
[0122] like Figure 1 As shown, the first step is to acquire historical safety evaluation data, historical operating event data, and real-time operating data of the chemical plant.
[0123] For equipment tag numbers of different devices, the equipment type, its role in the process flow, and the state of the processed materials are extracted to form a standard object identifier. For example, "R-101" in device A and "REA-01" in device B can both be mapped to "liquid phase exothermic reactor"; "TV-101" and "XV-206" can both be mapped to "reactor emergency cooling actuator" when they are responsible for the emergency cooling medium initiation function. The standard object identifier is used to share historical event samples across devices, but the correspondence between the standard object identifier and the actual equipment tag number is still maintained on the target device.
[0124] For continuous measurement data, resampling is performed at a preset sampling period. This embodiment uses a 1-second sampling period. Data with a missing time of no more than 5 seconds is filled using a forward hold method, and a missing data flag is set; when the missing time exceeds 5 seconds, values are not directly filled, but the corresponding node is marked as insufficient data. For discrete events, the event occurrence time, system reception time, and event source are retained.
[0125] Continuous variables are standardized according to the training set statistics:
[0126] ;
[0127] in, This represents the standardized value of the i-th measurement variable at time t; Represents the original measurement value; This represents the mean of the i-th variable in the training set; This represents the standard deviation of the i-th variable in the training set; To prevent the stability coefficient from being zero, this embodiment uses 0.000001. The validation set, test set, and real-time running data are all obtained from the training set. and To avoid data leakage.
[0128] Cause, deviation, safety barrier, and consequence items are extracted from hazard and operability analysis records, protection layer analysis records, and accident investigation records. The causal relationship extraction model can employ an encoder model fine-tuned with chemical safety text annotation data. Inputs are the cause, deviation, existing protective measures, and consequence fields from the analysis records; outputs are candidate cause-deviation-barrier-consequence chains.
[0129] In this embodiment, 1200 historical security evaluation records were manually verified and labeled, with 840 records used as the training set, 180 as the validation set, and 180 as the test set. The relation extraction model uses a 12-layer text encoder with a hidden layer dimension of 768, a maximum input length of 256 words, a learning rate of 0.00002, a batch size of 16, and 10 training rounds. The optimal model is selected using the F1 score of the validation set relations. Candidate causal chains with a relation confidence score below 0.75 are not directly written into the formal causal graph but are instead sent to the manual review queue.
[0130] After obtaining candidate causal chains, they are verified using the material flow direction, energy transfer direction, and control loop connections of the target device. For example, if a candidate causal chain indicates that a change in downstream pressure causes an abnormal upstream flow without a feedback path, and there is no backflow, pressure control, or energy coupling relationship in the pipeline and instrumentation process, then the candidate causal chain is marked as a conflict relationship. Relationships that are verified to be invalid are not included in the causal graph.
[0131] like Figure 3 As shown, safety barrier nodes are inserted on the causal edges they can block. For example, low cooling water flow can cause a rise in reaction temperature, which can lead to a runaway reaction; an emergency cooling valve can block the propagation of "reaction temperature rise - reaction runaway," therefore, the emergency cooling valve node is placed on the corresponding causal edge. Feed shut-off interlocks can reduce the continued entry of reactants, and are therefore placed at the corresponding blocking positions for "abnormal feed flow - reaction temperature rise" or "reaction temperature rise - reaction runaway."
[0132] The propagation window is determined based on the time difference between historical event pairs. For a causal edge e, the occurrence time difference between upstream and downstream events is extracted from historical event data to form a time difference sample set. Invalid propagation samples generated during the period when the security barrier is in an effective blocking state are deleted, and the propagation window is determined using the 5th and 95th quantiles of the remaining samples.
[0133] ;
[0134] in, This represents the propagation window of the causal edge e; This represents the time difference sample between the upstream and downstream events corresponding to the causal edge e; Indicates the 5th percentile; This represents the 95th percentile.
[0135] When there are fewer than 20 valid time difference samples, the propagation window is not determined directly by the sample quantiles. Instead, the initial propagation window is determined based on the process dynamic simulation results, equipment response time, or confirmed historical accident times. After a new event is confirmed, the propagation window is updated using the most recent 200 valid event samples to reduce the impact of changes in equipment operating conditions.
[0136] S2, Security Barrier Status Assessment and Hypothesis Branch Establishment
[0137] Determining the status of a safety barrier is a crucial aspect of this invention. Judging the effectiveness of a safety barrier solely based on action commands issued by the control system may incorrectly truncate risk paths when the actuator jams or communication is interrupted; judging solely based on action feedback may prematurely declare the barrier ineffective when feedback is delayed. Therefore, this invention simultaneously utilizes control commands, action feedback, inspection and maintenance records, and bypass status.
[0138] Taking the emergency cooling valve as an example, when the safety instrument system issues an opening command at time t, the valve is fully opened and feedback is generated within the allowable response time, the most recent functional test is within the validity period, and there is no bypass record, the emergency cooling valve is determined to be in an effective blocking state.
[0139] The emergency cooling valve is identified as in a failed access state when the valve is bypassed, fails to receive opening feedback after the allowable response time has expired, the action feedback is contrary to the command, or the most recent functional test indicates that the valve has failed.
[0140] When feedback is temporarily missing but the allowable response time has not yet expired, when feedback from multiple acquisition systems conflicts with each other, when the validity period of the functional test expires, or when the quality of the action feedback data is insufficient, the emergency cooling valve will be determined to be in an uncertain state.
[0141] In this embodiment, the allowable response time for the emergency feed shut-off valve is 3 seconds, the allowable response time for the emergency cooling valve is 5 seconds, and the allowable response time for the vent valve is 4 seconds. These parameters are determined based on actuator stroke tests; different devices may use actual test values.
[0142] like Figure 5 As shown, when the emergency cooling valve is in an uncertain state, the state branching module copies the current graph state, forming a blocking valid hypothesis branch and a failure passable hypothesis branch respectively. During copying, it is not necessary to copy all historical data; only a shared parent version and the barrier state increments that have changed relative to the parent version need to be established.
[0143] A state version can be represented as a combination of "parent version identifier, branch identifier, data cutoff time, and state increment". The blocking valid hypothesis branch sets the emergency cooling valve to the blocking valid state, while the failure passable hypothesis branch sets the emergency cooling valve to the failure passable state. The two hypothesis branches are input into the time-series graph neural network, generating independent candidate risk evolution paths.
[0144] When multiple uncertain safety barriers exist simultaneously, theoretically, multiple sets of combined branches may be formed. To limit computational load, this embodiment sorts the safety barriers according to the upper limit of the consequence node risk along the path in which the safety barrier is located, and only establishes explicit combined branches for the top 3 uncertain safety barriers; the remaining safety barriers are represented using probabilistic state vectors. The maximum number of branches is set to 8. When the number of branches exceeds 8, the 8 branches with the highest cumulative temporal matching evidence and the largest difference in consequence node risk are retained. This branch limitation is a computational resource control method and does not change the basic concept of this invention for parallel prediction of uncertain barriers.
[0145] S3, Structure, Training, and Prediction of Temporal Graph Neural Networks
[0146] like Figure 4 As shown, the temporal graph neural network used in this embodiment includes a node state encoding layer, a time encoding layer, a controlled message passing layer, a node occurrence probability output layer, an estimated arrival time output layer, and a predecessor node output layer.
[0147] 1. Model Input
[0148] The input features of each node at a sampling time include: standardized process measurement value, first-order change of measurement value, second-order change of measurement value, alarm status, alarm duration, safety barrier status, data missing marker, data source confidence level, and node type code.
[0149] The security barrier status is represented by three-dimensional one-hot encoding, indicating effective blocking, unblocked passage, and uncertain states. In specific assumption branches, uncertain states are replaced by the effective blocking state or unblocked passage state assumed by that branch.
[0150] The data source confidence score is used to indicate the reliability of the data. In this embodiment, the confidence score for safety instrumented system data is 1.00, the confidence score for distributed control system data is 0.95, the confidence score for gas detection alarm system data is 0.90, the confidence score for independent equipment status monitoring terminal data is 0.85, and the confidence score for manually entered inspection record data is 0.70. The confidence score is only used for model input and evidence accumulation and is not used to replace the safety barrier status judgment rules.
[0151] The input features of causal edge include causal relationship type, lower limit of propagation window, upper limit of propagation window, status of associated security barrier, and historical propagation frequency.
[0152] 2. Node State Coding Layer
[0153] The original feature dimension of the nodes was set to 12, and then encoded into a 64-dimensional node hidden vector through two layers of fully connected networks. The first layer had 128 neurons, the second layer had 64 neurons, the activation function was a modified linear unit, and the inter-layer dropout rate was 0.15.
[0154] The temporal coding layer encodes the occurrence time, duration, and time difference between adjacent events of a node state into a 16-dimensional temporal vector, which is then concatenated with the 64-dimensional node hidden vector and projected back into the 64-dimensional vector.
[0155] 3. Controlled Message Passing Layer
[0156] This embodiment employs a three-layer controlled message passing system, with four attention heads per layer, each outputting a 16-dimensional feature. Whether a message is allowed to propagate along a causal edge is determined jointly by the propagation window and the state of the security barrier.
[0157] For a causal edge e, its propagation gating value is expressed as:
[0158] ;
[0159] in, Let e represent the propagation gating value of the causal edge e at time t; This represents the time difference between the most recent state change of the upstream node and time t. This represents the propagation window of the causal edge e.
[0160] In the branch with the effective blocking hypothesis, the corresponding causal side gating value after the security barrier is 0; in the branch with the failure passage hypothesis, as long as the time difference meets the propagation window, the corresponding gating value can be 1.
[0161] The aggregated message received by node v in layer l is represented as follows:
[0162] ;
[0163] in, This represents the aggregated message received by node v at layer l and time t; Represents the set of upstream neighbor nodes of node v; This represents the causal edge propagation gate value from node u to node v; This represents the attention weights of the l-th layer; This represents the message transformation matrix of the l-th layer; This indicates the hidden state of the upstream node u in the previous layer.
[0164] The node update unit employs a gated recurrent unit, combining the current node encoding and the aggregated message to obtain a new hidden node state. This structure allows the model to learn propagation patterns in historical event data while preventing it from arbitrarily crossing connections that do not exist in the causal graph or existing security barriers.
[0165] 4. Output layer
[0166] The node occurrence probability output layer uses the Sigmoid function to output the probability of each node experiencing anomalies within the future prediction time range. The estimated arrival time output layer uses non-negative regression to predict the remaining arrival time of nodes from the current moment. The predecessor node output layer scores the causal edges that are allowed to enter the target node and selects the upstream nodes with higher scores to form candidate risk evolution paths.
[0167] In this embodiment, the probability threshold for node occurrence is set to 0.50. For consequence nodes, if the probability of occurrence is not less than 0.70, a risk warning is triggered; if the probability of occurrence is less than 0.70 but the expected arrival time is less than the preset handling time, a concern prompt is output. The specific threshold can be set according to the risk level of the device.
[0168] 5. Training dataset
[0169] In this embodiment, 2400 event sequences with a length of 300 seconds are established, including 720 normal and slight disturbance sequences, 420 cooling capacity reduction sequences, 360 feeding abnormality sequences, 300 reflux interruption sequences, 240 actuator failure sequences, 180 sensor drift sequences, and 180 communication delay and data retransmission sequences.
[0170] Each sequence is sampled at a 1-second interval. Process measurement data is generated using a hardware-in-the-loop simulation platform, and safety interlock actions, valve feedback, and communication delays are written as discrete events. The training, validation, and test sets are divided into batches, containing 1680, 360, and 360 sequences respectively. The same fault batch and its perturbation variants are included in only one subset of data to prevent similar sequences from being included in both the training and test sets simultaneously.
[0171] Node labels are generated based on a confirmed event chain. If a node experiences an anomaly within 120 seconds after the current moment, its occurrence label is 1, and the actual arrival time is recorded; otherwise, the occurrence label is 0. Predecessor node labels are determined based on a confirmed risk evolution chain.
[0172] 6. Loss function and training parameters
[0173] The total loss of the model is:
[0174] ;
[0175] in, This represents the total loss of the model; This indicates that a node experiences a probability loss. Indicates the expected arrival time loss; Indicates loss due to violation of causal order; This indicates the loss caused by the incorrect crossing of the safety barrier; , , and These represent the weights of the corresponding loss terms.
[0176] In this embodiment, Take 1.00, Take 0.50, Take 0.20, The value is set to 0.30. The node occurrence probability loss uses focus loss, the hard sample adjustment coefficient is set to 2.00, and the positive sample weight is set to 0.75; the expected arrival time loss uses Huber loss; the causal order violation loss is used to penalize the case where the expected arrival time of the downstream node is earlier than that of the upstream node and does not conform to the propagation time window; the security barrier error crossing loss is used to penalize the case where risk information crosses the effective security barrier.
[0177] The optimizer used is AdamW, with an initial learning rate of 0.001, a weight decay coefficient of 0.0001, a batch size of 8, and a maximum training epoch of 120. Training is stopped early if the total loss on the validation set does not decrease for 12 consecutive epochs. The learning rate decays to 0.50 of its original value if the validation set loss does not decrease for 5 consecutive epochs, with a minimum learning rate of 0.00001. After model training, the model structure and parameters are fixed for real-time inference; when the cumulative number of newly confirmed event sequences reaches 200, the model can be retrained or incrementally fine-tuned.
[0178] S4, the temporal evidence of the two-hypothesis branch converges.
[0179] Figure 5 The evidence convergence process of the dual-hypothesis branches is further illustrated. For the same uncertain security barrier, the blocking validity hypothesis branch typically predicts that risk propagation will stop or significantly decrease at the security barrier, while the failure passage hypothesis branch predicts that downstream deviation nodes and consequence nodes will occur sequentially within the corresponding propagation window.
[0180] The system continuously receives the status and event times of subsequent measured nodes. When a measured node occurs within the propagation window predicted by the corresponding hypothesis branch, and the node activation order is consistent with the prediction result, the temporal matching evidence of that hypothesis branch is increased; when the propagation window has ended but the predicted node has not occurred, the node order is reversed, or an abnormal node that was not predicted by that branch appears, the temporal matching evidence of that hypothesis branch is decreased; when data is missing and insufficient for judgment, neither evidence is increased nor decreased.
[0181] The cumulative evidence for the b-th hypothesis branch after the k-th evidence update can be represented as:
[0182] ;
[0183] in, This represents the cumulative temporal matching evidence for the b-th hypothesis branch after the k-th update; This represents the historical evidence retention coefficient, which is set to 0.90 in this embodiment. This represents the number of measured events obtained during the k-th update; This represents the confidence level of the data source for the i-th measured event; This represents the matching value between the i-th measured event and the b-th hypothesis branch. It is 1 when there is a match, -1 when there is no match, and 0 when there is insufficient information.
[0184] The branch convergence threshold is set to 3.00. When the difference in cumulative evidence between two hypothesis branches reaches 3.00, the hypothesis branch with lower evidence is deleted; when the evidence difference does not reach 3.00, both hypothesis branches are retained and their prediction results are output separately. Therefore, the system will not immediately determine that the safety barrier is invalid due to a short-term lack of action feedback, nor will it directly determine that the safety barrier is effective simply because a control command has been issued.
[0185] For example, the emergency cooling valve opening command has been issued, but valve position feedback has not yet arrived. The blocking valid hypothesis branch predicts that the reaction temperature will stop rising and begin to fall within 20 to 45 seconds; the failure pass hypothesis branch predicts that the reaction temperature will continue to rise and trigger a high pressure alarm in the reactor within 30 to 70 seconds. When the subsequently measured temperature begins to fall, the blocking valid hypothesis branch gains more evidence; when the subsequent temperature continues to rise and the high pressure alarm occurs, the failure pass hypothesis branch gains more evidence.
[0186] S5, delayed execution data-driven local backoff of the successor subgraph
[0187] Figure 6 The process for handling delayed data is illustrated. The system maintains the time and state version of currently processed events while processing real-time data. A snapshot of the node state is saved every 10 seconds, and the snapshot is retained for 1 hour. The snapshot period and retention time can be adjusted based on the device's dynamic response speed and storage resources.
[0188] When data with an event time earlier than the currently processed event time is received, the system first determines whether the data has changed the historical node state. For example, if the system receives feedback that the emergency cooling valve is fully open at 116 seconds when the current processing time is 135 seconds, and the valve was previously recorded as being in an uncertain state at 116 seconds, then the late data will change the historical state to an effective blocking state, requiring a local correction; if the late data is consistent with the existing state, only supplementary evidence is recorded, and no rollback is needed.
[0189] After identifying the earliest changed node, traverse the successor nodes along the causal edges starting from that node. When a security barrier node in the current state version is in a blocked state, stop traversing along the corresponding causal edge. The traversed nodes, causal edges, and related security barriers together form the successor subgraph.
[0190] Select the most recent state snapshot before the late data event time, and revert nodes within the successor subgraph to the state of that snapshot; nodes outside the successor subgraph are not reverted. Then, read the running data associated with the successor subgraph after the late data event time, sort it by event time, and re-enter it into the state judgment module and evolution prediction module.
[0191] After replay, a new state version is generated. The new state version records the parent version, late data identifier, rollback time, set of affected nodes, and replay data range. Candidate risk evolution paths that have passed through the successor subgraph under the old state version are retrieved and marked as invalid; candidate paths that have not passed through the successor subgraph remain valid.
[0192] This mechanism avoids recalculating the complete causal graph after late data arrives. For example, if the causal graph contains 186 nodes, but a change in the state of an emergency cooling valve only affects 31 downstream nodes, then only these 31 nodes and their associated edges need to be backtracked and replayed.
[0193] When the event time of late data is earlier than the earliest saved snapshot, the following exception handling methods can be adopted: read the persistent event log of the corresponding time period to reconstruct the affected subgraph; if the persistent event log is incomplete, mark the relevant prediction results as insufficient data and do not overwrite the current valid version with unverified data.
[0194] S6, Output Results and Counterfactual Verification
[0195] The system outputs candidate risk evolution paths, node occurrence probabilities, estimated arrival times, corresponding hypothesis branches, key security barriers, and prediction confidence levels based on the current valid state version.
[0196] For a candidate path, counterfactual verification can be performed on the initial deviation node and the safety barrier node separately. The initial deviation node is set to a normal state and re-predicted, or the safety barrier node is set to an effective blocking state and re-predicted, and the changes in risk of the consequence node before and after the intervention are compared.
[0197] The degree of counterfactual impact is expressed as follows:
[0198] ;
[0199] in, This indicates the degree of risk impact resulting from intervening in the j-th node; This indicates the probability of the occurrence of the target consequence node before intervention; This represents the probability of the target consequence node occurring after performing a preset intervention on the j-th node.
[0200] When the probability of the consequence node decreases significantly after the initial deviation node returns to normal, it indicates that the deviation node made a significant contribution to the current risk path. When the probability of the consequence node decreases significantly after the safety barrier regains its blocking effect, it indicates that the safety barrier is a key barrier in blocking the current risk path. Counterfactual verification is used to provide a basis for risk management and does not directly issue control commands to physical devices.
[0201] V. Examples and Comparative Examples
[0202] Example 1: Semi-physical Experimental Platform for Chemical Plant
[0203] like Figure 7 As shown, this embodiment uses a 500L jacketed stirred reactor semi-physical experimental platform to verify the present invention. The experimental platform includes a reactor simulation unit 701, a heating unit 702, a cooling circulation unit 703, a feeding execution unit 704, a pressure relief execution unit 705, a DCS control unit 706, a SIS safety instrumented unit 707, an edge data acquisition unit 708, a fault injection unit 709, and a risk evolution prediction server 710.
[0204] The effective working volume of the reactor simulation unit 701 is set to 350L, and the stirring speed is set to 120r / min. A safe medium composed of water and propylene glycol is used as the experimental medium, and the exothermic chemical reaction process is simulated by changes in electric heating power. To avoid actual runaway of hazardous materials, temperature and cooling flow rate are based on real sensor data, while the reaction exothermic rate and pressure changes are calculated by a real-time mechanism model and input to the DCS control unit 706 via standard industrial signals. This creates a semi-physical experimental environment combining physical equipment, an industrial control system, and a real-time process model.
[0205] The rated power of the heating unit 702 is 18kW; the normal flow rate range of the cooling circulation unit 703 is 5.5~6.5m³.3 / h, the emergency cooling flow rate ranges from 8.0 to 9.0 m³ / h. 3 / h; the feed actuator 704 uses an electric regulating valve with position feedback; the pressure relief actuator 705 uses a solenoid valve and a valve position feedback device. The platform's temperature data sampling period is 1s, and the temperature measurement error is no greater than ±0.2℃; the pressure analog signal range is 0~0.6MPa, and the signal conversion error is no greater than 0.5% of the full scale; the flow measurement error is no greater than 1% of the full scale.
[0206] In this embodiment, the normal reaction temperature range is set to 82–88°C, the high temperature alarm value is 100°C, and the very high temperature limit is 105°C; the normal reaction pressure range is 0.25–0.32 MPa, the high pressure alarm value is 0.40 MPa, and the very high pressure limit is 0.48 MPa.
[0207] The SIS Safety Instrumented Unit 707 is equipped with the following safety barriers:
[0208] 1. When the reaction temperature reaches 105℃, a feed cut-off command is issued, with a designed response time of no more than 3 seconds;
[0209] 2. When the reaction temperature reaches 105℃ or the temperature rise rate exceeds 0.8℃ / s, an emergency cooling command shall be issued, with a designed response time of no more than 5s;
[0210] 3. When the reaction pressure reaches 0.48MPa, an emergency pressure relief command is issued, with a designed response time of no more than 4 seconds.
[0211] The fault injection unit 709 can inject faults such as decreased cooling flow, stuck feed valve, safety barrier malfunction, sensor drift, communication delay, data out-of-order, and lost feedback data. All fault injection operations have independent timestamps, serving as a reference for subsequent evaluation of the actual occurrence time of risk events and the actual state of safety barriers.
[0212] (I) Construction of causal graph
[0213] Based on the HAZOP analysis results of the reactor, the SIS causal matrix, equipment connection relationships, and historical alarm records, a causal graph of the chemical plant was constructed, containing 186 nodes, 294 directed causal edges, and 27 safety barrier nodes.
[0214] Nodes must include at least:
[0215] 1) Issues caused by insufficient cooling flow, excessive feeding, and ineffective mixing;
[0216] 2) Deviation points such as temperature rise, abnormal temperature rise rate, and pressure rise;
[0217] 3) Cut off safety barrier points such as feeding, emergency cooling, and emergency depressurization;
[0218] 4) High temperature alarm, high pressure alarm, and consequences of uncontrolled reaction.
[0219] Each directed causal edge has a propagation time window. For example, the propagation time window from insufficient cooling flow to temperature rise is set to 8–35 s; the propagation time window from temperature rise to pressure rise is set to 10–42 s; and the propagation time window from high temperature to reaction runaway is set to 12–38 s. The propagation time windows are determined based on the 5th and 95th percentiles of the time difference between upstream and downstream events in historical samples.
[0220] When a safety barrier is located between two risk nodes, the risk propagation edge is not directly deleted. Instead, a safety barrier node is inserted on the corresponding risk propagation edge, and the command status, action feedback status, process response status, and maintenance status of the safety barrier are recorded.
[0221] (II) Model Structure and Training Parameters
[0222] This embodiment uses a graph-constrained temporal neural network to predict the risk evolution path. The original input features of each risk node have a dimension of 12, including measured value, rate of change, moving average, moving standard deviation, alarm status, data quality indicators, and timestamp bias. The original features are sequentially passed through two multilayer perceptrons with dimensions of 128 and 64, respectively, to obtain a 64-dimensional node state vector.
[0223] The temporal encoding dimension is set to 16 and then converted to 64 dimensions through linear mapping; the message passing layer is set to 3 layers, with 4 attention heads per layer, and each attention head has a dimension of 16; the dropout rate is set to 0.15; and the node state update uses a gated recurrent unit.
[0224] By node To the node The first transmission Layer messages are represented as:
[0225] ;
[0226] in, For the first Layer nodes To the node The message being delivered; For causal side-gating coefficients; Attention weights; This is a message mapping matrix; For nodes The state vector; It is a causal edge feature; Encode the time interval; This indicates feature splicing.
[0227] The causal side gating coefficient is set to 1 only when the event time difference falls within the corresponding propagation time window and the corresponding security barrier is not determined to be an effective block; otherwise, it is set to 0. When the security barrier status is uncertain, an effective blocking branch and a failure penetration branch are established separately, and independent version numbers are assigned to the two branches.
[0228] The model was trained and validated using 2400 time-series samples, each 300 seconds long. These included 720 samples of normal operation, 420 samples of cooling anomalies, 360 samples of feeding anomalies, 300 samples of reflux anomalies, 240 samples of actuator anomalies, 180 samples of sensor drift, and 180 samples of communication delays or out-of-order sequences. The training, validation, and test sets were partitioned in a 1680:360:360 ratio. Samples derived from the same original experimental sequence were assigned to only the same dataset to avoid data leakage.
[0229] The training loss function is:
[0230] ;
[0231] in, This represents the total loss of the model; Classify losses according to risk paths; Loss due to the time it takes for a risk event to arrive; This is due to the loss of causal order consistency. Identify losses for the safety barrier branch.
[0232] Risk path classification uses focus loss with a focus parameter of 2 and a positive sample weight of 0.75. The model uses the AdamW optimizer with an initial learning rate of 0.001, a weight decay coefficient of 0.0001, a batch size of 8, and a maximum training epoch of 120. Training stops when the validation set loss does not decrease for 12 consecutive epochs; if it does not decrease for 5 consecutive epochs, the learning rate is reduced to 0.5 times the original value, with a minimum learning rate of 0.00001.
[0233] Example 2: Emergency cooling is effective but action feedback is delayed.
[0234] like Figure 8 As shown, 60 seconds after the start of the test, the normal cooling flow rate was reduced from 6.2 m³ / h to 1.1 m³ / h via the fault injection unit 709. The reaction temperature then continued to rise. 108 seconds after the start of the test, the SIS safety instrumented unit 707 issued an emergency cooling command.
[0235] The emergency cooling valve activated at 112s, and the cooling flow rate exceeded 7.5 m³ / h at 113s, indicating that the emergency cooling was effective. Due to a manually set communication delay, the feedback from the fully open valve (timestamp 116s) did not reach the risk evolution prediction server 710 until 131s.
[0236] During the period of 108–131 seconds, the system failed to simultaneously obtain complete action feedback and maintenance status, therefore the emergency cooling barrier was identified as an uncertain state, and the following was established:
[0237] 1) Effectively block branches This indicates that the emergency cooling barrier has successfully stopped the temperature from rising further.
[0238] 2) Failure Penetration Branch This indicates that the emergency cooling barrier failed to stop the spread of risk.
[0239] The evidence scores for both branches are updated according to the following formula:
[0240] ;
[0241] in, For branches In the Evidence score for each evaluation period; 0.9 is the historical evidence retention coefficient; For the first The credibility coefficient of each data source; For the first Each data source to the branch Support value; The number of data sources participating in the evaluation.
[0242] The confidence coefficients for SIS action feedback, DCS process data, independent flow meters, equipment status monitoring, and manual verification were set to 1.00, 0.95, 0.90, 0.85, and 0.70, respectively. A support value of 1 was assigned when the data matched the branch prediction, -1 when they did not, and 0 when there was insufficient evidence. When the difference in evidence scores between two branches reached 3 for two consecutive evaluation periods, the branch with the higher score was retained, and the branch with the lower score was removed.
[0243] Figure 9 The convergence process of the two branches is shown. The main experimental data are shown in Table 1.
[0244] Table 1. Branching evolution data under effective emergency cooling conditions.
[0245]
[0246] After receiving a delayed feedback with a timestamp of 116 seconds at 131 seconds, the system determined that the data was earlier than the time of the currently processed event. The system restored the state from the most recent historical snapshot at 110 seconds, identified the emergency cooling safety barrier as the earliest node to change, and performed event replay only on that node and its descendant subgraphs.
[0247] The results show that the emergency cooling barrier successfully limited the maximum temperature to 106.7℃, preventing the subsequent high-pressure alarm from being triggered. This invention retains the failure penetration branch during periods of insufficient evidence, avoiding the oversight of potential risks due to prematurely concluding the safety barrier is effective; and it can prune the failure branch after sufficient evidence is obtained, reducing resource consumption caused by continuous multi-branch calculations.
[0248] Example 3: Emergency cooling valve jamming leads to risk penetration
[0249] In this embodiment, after the emergency cooling command is issued, the position of the emergency cooling valve is restricted to 15% to simulate a valve jamming failure. The SIS safety instrument unit issues an emergency cooling command at 110 seconds, but the cooling flow rate only increases from 1.3 m³ / h to 2.0 m³ / h, which does not reach the flow rate required for effective cooling.
[0250] The system first establishes an effective blocking branch and a failure penetration branch. As valve position feedback, cooling flow rate, and temperature rise rate data arrive sequentially, the evidence score of the failure penetration branch continuously increases. The system determines the safety barrier failure within 121 seconds and outputs the following risk evolution path:
[0251] Decreased cooling capacity → Abnormal temperature rise rate → High reaction temperature → Emergency cooling failure → Increased pressure → High pressure → Uncontrolled reaction.
[0252] This embodiment uses a semi-physical real-time model to output the risk consequences, without implementing a dangerous runaway within the actual reactor. The predicted results and reference event times are shown in Table 2.
[0253] Table 2 Event arrival time in the case of safety barrier failure
[0254]
[0255] In this embodiment, the failure penetration branch becomes a retained branch at 121s, 25s earlier than the actual occurrence time of the high-temperature event and 38s earlier than the actual occurrence time of the high-pressure event. Therefore, the system can output the risk path and estimated arrival time before the consequence node is actually activated, providing operators with time margin to take measures such as stopping the machine, cutting off the heat source, or manually activating the backup cooling system.
[0256] Example 4: Sensor data disorder and historical state restoration
[0257] like Figure 10As shown, in 100 sets of communication delay test sequences, temperature, flow rate, valve position, and SIS action feedback data were randomly selected and set with a transmission delay of 5–20 seconds. When late data arrives, if its event time is earlier than the currently processed event time, the system performs the following processing:
[0258] 1. Identify the earliest risk node where a state change occurs based on late arrival data;
[0259] 2. Find the descendant nodes of the given node along the directed edges of the causal graph;
[0260] 3. Stop expanding when encountering a safety barrier that has been confirmed as an effective barrier;
[0261] 4. Restore the most recent historical version prior to the time of the late data event;
[0262] 5. Replay late data and subsequent data in chronological order of events;
[0263] 6. Make the risk paths generated by the old version invalid and release the risk paths of the new version.
[0264] The results of partial rollback and full recalculation are shown in Table 3.
[0265] Table 3 Results of Partial Rollback and Full Map Recalculation
[0266]
[0267] like Figure 12 As shown, the average number of nodes processed during partial rollback is approximately 16.7% of that of full graph recalculation, and the average processing time is reduced by approximately 85.3%, while maintaining consistency between risk paths and predicted arrival times.
[0268] This demonstrates that the present invention does not merely overwrite and update late data, but rather uses causal graphs to determine the actual affected range and combines version snapshots to perform local historical repair, thereby reducing online computation latency while maintaining the correctness of the calculation results.
[0269] Comparative Example 1: General Temporal Graph Neural Network without Causal Constraints
[0270] Comparative Example 1 uses the same node features, training samples, and network layers as Example 1, but does not use causal direction constraints between cause nodes, deviation nodes, safety barrier nodes, and consequence nodes, nor does it set a causal propagation time window. Any statistically correlated adjacent nodes can pass messages.
[0271] This method can easily combine alarms that occur simultaneously but have no direct causal relationship into risky paths. For example, when temperature fluctuations and pressure sensor drift occur simultaneously, the model may incorrectly output a path of "temperature rises → pressure rises," leading to an increased false alarm rate.
[0272] Comparative Example 2: Setting the safety barrier to a single, definitive state
[0273] Comparative Example 2 retains the causal graph and propagation time window, but the safety barrier can only be set to either an effective or ineffective state. When the safety barrier action feedback has not yet arrived, its state is determined directly according to the current process response, without generating effective blocking branches or ineffective penetration branches.
[0274] In tests with delayed action feedback, this method is prone to prematurely recognizing emergency cooling as effective, thereby removing the risk path of failure penetration; or it may misjudge the safety barrier as failed due to noise from a single sensor, generating unnecessary high-level alarms.
[0275] Comparative Example 3: Late data directly overwrites the current state.
[0276] Comparative Example 3, upon receiving late data, directly overwrites the current node state with the late data, without restoring the historical version or replaying events that have already been processed after the late data.
[0277] While this method has a short processing time, it may result in node states with inconsistent time sequences. For example, after the system has generated a downstream state based on "valve closed," it may overwrite the barrier node with a belated "valve open" feedback, but fail to revoke the risk path generated based on the old state. This could lead to the same risk path containing contradictory safety barrier states simultaneously.
[0278] Comparative Example 4: Late data triggers full-map recalculation
[0279] Comparative Example 4 uses the same historical version and event replay mechanism as this invention, but recalculates all 186 nodes each time late data is received. This method can obtain prediction results that are basically consistent with those of this invention, but the online processing time is significantly increased.
[0280] VI. Overall Test Results
[0281] The invention and its comparative examples were evaluated using 360 independent test sequences. Each model was trained using 5 different random seeds, and the values in Table 4 are the mean and standard deviation of the experimental results.
[0282] The mean absolute error of arrival time of risk events is calculated using the following formula:
[0283] ;
[0284] in, The mean absolute error of arrival time; The number of risk events that were correctly identified; For the first The predicted arrival time of a risk event; For the first Reference arrival time for each risk event.
[0285] Table 4. Overall Results of the Invention and Comparative Examples
[0286]
[0287] Depend on Figure 11 As shown in Table 4, compared to Comparative Example 1 without causal constraints, the complete path accuracy of the present invention increased from 71.1% to 88.4%, the mean absolute error of arrival time decreased from 15.9s to 6.8s, and the false alarm rate decreased from 12.7% to 4.6%. These results demonstrate that the causal propagation direction and propagation time window can exclude statistically correlated paths that do not satisfy the physical propagation relationship.
[0288] Compared to Comparative Example 2, which sets the safety barrier to a single, definitive state, the present invention improves the complete path accuracy by 8.2 percentage points and reduces the false alarm rate by 4.3 percentage points. This result demonstrates that retaining effective blocking branches and failed penetration branches during periods of missing or delayed action feedback can reduce missed and false alarms caused by premature determination of the safety barrier state.
[0289] Compared to Comparative Example 3, where late data directly overwrites the current state, the version consistency rate of this invention is increased from 64% to 100%. This result demonstrates that rollback based on historical versions and replay performed according to event time can eliminate historical state contradictions caused by out-of-order data.
[0290] The present invention achieves the same prediction accuracy as Comparative Example 4, but the average rollback time is reduced from 286ms to 42ms. This demonstrates that determining the rollback range based on the earliest changed node and its descendant subgraphs can reduce computational load without compromising the consistency of prediction results.
[0291] VII. Experimental Conclusions
[0292] The above semi-physical test results show that the present invention, by coordinating causal graph constraints, bi-branch deduction of security barriers, convergence of late-arriving evidence, and rollback of local versions of late-arriving data, can achieve the following technical effects:
[0293] 1. Restrict risk information to propagate only along directed edges that conform to the causal direction and propagation time window, thereby reducing false risk paths caused by alarm co-occurrence and sensor correlation;
[0294] 2. During periods of uncertainty regarding the status of the security barrier, both effective blocking paths and failed penetration paths should be retained simultaneously to avoid prematurely cutting off high-risk paths due to missing feedback or communication delays.
[0295] 3. Converge branches based on subsequent process responses, action feedback, and equipment status evidence to improve the accuracy of identifying safety barrier status and complete risk paths;
[0296] 4. When late data changes the historical state, only the earliest changed node and its affected subgraph are restored to keep the prediction results consistent with the recalculation of the entire graph and reduce online repair time;
[0297] 5. Simultaneously output the risk evolution path, probability of occurrence, and estimated arrival time, providing interpretable time-based information for early warning, interlocking measures, and emergency decision-making in chemical plants.
[0298] The foregoing description of embodiments of the present invention, through which those skilled in the art are able to implement or use the present invention, will be readily apparent to those skilled in the art. Various modifications to these embodiments will be readily apparent to those skilled in the art. The general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novelty disclosed herein.
[0299] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0300] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0301] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0302] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0303] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0304] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, like read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0305] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
Claims
1. A method for predicting the risk evolution of chemical plants based on causal graphs and multi-source big data, characterized in that, The method includes the following steps: S1. Acquire historical safety evaluation data, historical operation event data, and real-time operation data of the chemical plant, and construct a causal graph based on process connection relationships and cause-deviation-barrier-consequence relationships; the causal graph includes cause nodes, deviation nodes, safety barrier nodes, and consequence nodes, and the causal edges have propagation time windows, with safety barrier nodes set on the causal edges they block; S2 maps real-time operational data to a cause-effect graph, determines the barrier status based on the control commands, action feedback, and inspection and maintenance records of the safety barrier; establishes a blocking effectiveness hypothesis branch and a failure passage hypothesis branch for safety barriers with uncertain status, and registers the status version. S3 uses historical event data to train a time-series graph neural network constrained by a causal graph, so that node information is transmitted only along causal edges that satisfy the propagation window and are not blocked; each hypothesis branch is input into the time-series graph neural network to obtain candidate risk evolution paths, node occurrence probabilities and expected arrival times; S4, match the state and occurrence time of the subsequently measured nodes with the node activation order and propagation window predicted by each hypothesis branch; delete the hypothesis branch with a lower matching degree only when the temporal matching evidence difference between the hypothesis branches reaches the preset requirement, otherwise retain each hypothesis branch; S5. When running data with a timestamp earlier than the current processed event time and which causes a change in the state of historical nodes is received, the earliest changed node and its successor subgraph are determined, the successor subgraph is reverted to the state version before the time corresponding to the running data, the subsequent running data is replayed in chronological order, and the candidate risk evolution path generated based on the old state version is discarded. S6, output the risk evolution prediction results based on the candidate risk evolution paths retained under the current effective state version.
2. The method for predicting the risk evolution of chemical plants according to claim 1, characterized in that, In step S1, the historical safety evaluation data includes hazard and operability analysis records, protection layer analysis records, accident investigation records, and associated process flow data; the historical operating event data includes process measurement records, alarm records, safety interlock records, and equipment failure records; the real-time operating data includes data with equipment tag numbers and timestamps output by the distributed control system, safety instrumented system, and gas detection alarm system. And / or, in step S1, the propagation window is determined in the following way: Extract upstream and downstream events corresponding to the same causal edge from historical event data to form event pairs; Propagation time samples are generated based on the time difference of the occurrence of the event pairs, and propagation time samples generated during the period when the security barrier is in an effective blocking state are deleted; The lower and upper limits of the propagation window are determined based on the time difference distribution of the remaining propagation time samples, and the propagation window is updated after a new running event is confirmed.
3. The method for predicting the risk evolution of chemical plants according to claim 1, characterized in that, In step S1, the historical operating event data of different chemical plants are standardized, including: Extract the equipment type corresponding to the equipment tag number, the role of the equipment in the process flow, and the status of the materials being processed; Generate standard object identifiers based on the equipment type, its role in the process flow, and the state of the materials being processed; Operational events with the same standard object identifier in different chemical plants are converted into similar event samples, while preserving the mapping relationship between equipment tag numbers and standard object identifiers; And / or, in step S1, constructing a causal graph includes: Using a causal relationship extraction model, causal items, deviation items, safety barrier items, and consequence items are identified from historical safety assessment data to form candidate causal chains; The propagation direction of candidate causal chains is verified by utilizing the material flow direction, energy transfer direction, and control loop connection relationships of chemical plants; Delete candidate causal chains that conflict with the propagation direction and process connection relationship, and establish nodes and causal edges based on the retained candidate causal chains; Insert a security barrier node between the upstream and downstream nodes that it can block.
4. The method for predicting the risk evolution of chemical plants according to claim 1, characterized in that, In step S2: When the action feedback is consistent with the control command, the action feedback is within the allowable response time, the test validity period has not expired, and there is no barrier bypass record, the safety barrier is determined to be in an effective blocking state. When a safety barrier is bypassed, fails to receive corresponding action feedback after the allowable response time, or the test result indicates that the safety barrier has failed, the safety barrier will be determined to be in a failed passage state. When action feedback is missing, the validity period of the inspection expires, or the barrier status corresponding to different data sources conflicts with each other, the security barrier will be determined as an uncertain state. The state version is associated at least with the security barrier state, the cutoff time of the data on which the state is based, and the corresponding assumption branch; And / or, in step S3: the temporal graph neural network includes a node state encoding layer, a time encoding layer, a controlled message passing layer, and a prediction output layer; The node status encoding layer is used to encode process measurement status, alarm status, and safety barrier status; the time encoding layer is used to encode the occurrence time and duration of node status. The controlled message passing layer is used to control node information transmission based on the propagation window of the causal edge and the state of the security barrier; the prediction output layer is used to output the probability of node occurrence, the expected arrival time, and the predecessor node. During training, network parameters are adjusted based on node state prediction error, estimated arrival time error, degree of causal order violation, and degree of security barrier error traversal.
5. The method for predicting the risk evolution of chemical plants according to claim 1, characterized in that, In step S4: When subsequent measured nodes occur in the predicted node activation order within the corresponding propagation time window, add temporal matching evidence for the corresponding hypothesis branch; If subsequent measured nodes do not occur within the corresponding propagation time window, occur in a sequence inconsistent with the predicted node activation sequence, or exhibit node states that are not predicted by the hypothetical branch, the temporal matching evidence of the corresponding hypothetical branch is reduced. Compare the temporal matching evidence of the blocking valid hypothesis branch and the invalid passable hypothesis branch, and delete the hypothesis branch with lower temporal matching evidence when the difference between the two reaches a preset branch convergence threshold; And / or, in step S5, determining the successor subgraph includes: Starting from the earliest changed node, traverse the subsequent nodes along the direction of propagation of the causal edge; When a security barrier node in an effective blocking state is encountered, stop traversing along the causal edge corresponding to that security barrier node. The nodes, causal edges, and safety barrier nodes obtained through traversal are determined as successor subgraphs. Only the state rollback, running data replay, and candidate risk evolution path update are performed on the successor subgraph, while the state of nodes outside the successor subgraph remains unchanged.
6. The method for predicting the risk evolution of chemical plants according to claim 1, characterized in that, The method also includes counterfactual verification of the retained candidate risk evolution paths: Set the initial deviation node of the candidate risk evolution path to the normal state and re-predict to obtain the first prediction result; Set the safety barrier nodes in the candidate risk evolution path to an effective blocking state and re-predict to obtain a second prediction result; Based on the changes in consequence node risk between the original prediction results and the first and second prediction results, the degree of influence of the initial deviation node and the safety barrier node on the candidate risk evolution path is determined. And / or, the risk evolution prediction results include the node order on the candidate risk evolution path, the probability of node occurrence, the expected arrival time, the corresponding hypothesis branch, the key security barrier, and the prediction confidence level; When the probability of the occurrence of a consequence node reaches the preset warning condition or the expected arrival time is less than the preset handling time, a risk warning information containing the initiating cause node, key safety barriers and their current status is generated.
7. A risk evolution prediction system for chemical plants based on causal graphs and multi-source big data, characterized in that, The system is used to implement the method according to any one of claims 1-6, comprising: The data processing module is used to acquire historical safety assessment data, historical operating event data, and real-time operating data of the chemical plant. The causal graph construction module is used to construct a causal graph with a propagation time window based on process connection relationships and cause-deviation-barrier-effect relationships, and to set safety barrier nodes on the causal edges they block; The status branch module is used to determine the status of the safety barrier based on the control commands, action feedback and inspection and maintenance records of the safety barrier. For safety barriers with uncertain status, it establishes a blocking effective hypothesis branch and a failure passage hypothesis branch, and registers the status version. The evolution prediction module is used to run a time-series graph neural network constrained by causal graphs to obtain the candidate risk evolution path, node occurrence probability and expected arrival time corresponding to each hypothesis branch; The evidence convergence module is used to perform time-series matching between subsequent measured nodes and the prediction results of each hypothesis branch, and to determine whether to retain or delete the corresponding hypothesis branch based on the time-series matching evidence. The incremental correction module is used to determine the earliest changed node and its successor subgraph when it receives runtime data that changes the state of a historical node, perform state rollback and runtime data replay on the successor subgraph, and abolish the candidate risk evolution path generated based on the old state version. The prediction output module is used to output risk evolution prediction results based on the candidate risk evolution paths retained under the current effective state version.
8. The chemical plant risk evolution prediction system according to claim 7, characterized in that, The system also includes a version storage module, which is used for: Store the security barrier status, hypothetical branches, data cutoff time, and node status snapshots corresponding to each state version; Establish the correlation between state versions and candidate risk evolution paths; After the incremental correction module generates a new state version, the candidate risk evolution path associated with the rolled-back state version and passing through the successor subgraph is marked as failed.
9. An electronic device, characterized in that, The method includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, it implements the method according to any one of claims 1 to 6.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1 to 6.
Citation Information
Patent Citations
Methods and apparatus for dynamic assessment of safety risks in petrochemical processes
CN115511236B
Safety production risk identification method and system based on knowledge graph
CN120744408B
