Chemical production safety management method based on big data
By using digital twin device models and directed intention hypergraph closures, process objective gaps in chemical production are identified, and blocking actions are generated. This solves the problem of process objective gaps caused by operational actions in chemical production without alarms, and improves the effectiveness of risk identification and management.
Patent Information
- Application Number
- CN202611421965.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-14
- Publication Date
- 2026-11-27
AI Technical Summary
Existing technologies are insufficient to identify process objective gaps arising from operational actions in chemical production without alarms, violations, or shutdowns, which may lead to the continued release of subsequent production actions that conflict with the gap.
By employing a big data-based chemical safety production management method, digital twin device models and directed intention hypergraph closures are used to identify process objective gaps and generate subsequent production actions to block conflicting processes.
By generating closed and prohibited paths through action edges, the risk of subsequent conflicting actions being allowed is reduced, the granularity of risk tracking is enhanced, the identification of intermediate risks is improved, and production progress is directly constrained.
Smart Images

Figure FT_1
Abstract
Description
Technical Field
[0001] This invention relates to the field of chemical safety production data processing technology, and more specifically, to a chemical safety production management method based on big data. Background Technology
[0002] Safety management in continuous chemical production is usually based on DCS parameter monitoring, SIS interlock protection, electronic operating procedures, work order approval and shift handover records. By monitoring temperature, pressure, liquid level, valve position, pump status, alarm confirmation records and operation signature records, it is possible to determine whether there are parameter overruns, interlock triggers, missing steps or unapproved operations in the production process. In fine chemical production sites where multiple reactors are connected in series, solvent switching, nitrogen purging, pressure relief and venting, tank switching and reflux path adjustment are intertwined, edge control nodes need to combine real-time data acquisition and digital twin device models to determine whether subsequent feeding, heating, pressurization, material transfer or personnel entry can continue without interrupting the production cycle. However, in this scenario, individual actions such as valve opening, pump starting, tank switching, pressure relief, and purging usually conform to the operating procedures, and the field parameters may not immediately trigger alarms. The real risk lies in the fact that the action has changed the boundaries of pipelines, equipment or media, while the process objective that the action should have achieved has not been completed. For example, purging has not reached the end detection point for confirmation, pressure relief has not formed a pressure drop record, the original tank reflux path has not been exited after tank switching, and the residual passage of the original pump outlet has not been eliminated after pump switching. This causes the system record to show "step executed", but the field still retains an unclosed process state. Therefore, the existing management methods that rely on parameter overruns, interlock triggers, and step signatures are insufficient to identify process objective gaps caused by operational actions when there are no alarms, violations, or shutdowns, and may continue to allow subsequent production actions that conflict with the gaps. Therefore, how to identify process objective gaps caused by on-site operational actions based on real-time chemical production data and digital twin device models, and how to block conflicting subsequent production actions based on the process objective gaps, has become the technical problem to be solved in this application. Summary of the Invention
[0003] To overcome the aforementioned deficiencies of the prior art, embodiments of the present invention provide a chemical safety production management method based on big data. This method connects real-time chemical production actions to a digital twin constraint graph and identifies process objective gaps based on directed intention hypergraph closure and partial order sequence dynamic programming with prohibited interruptions, thereby solving the problems mentioned in the background art.
[0004] To achieve the above objectives, the present invention provides the following technical solution: a chemical safety production management method based on big data, comprising: S1. Based on the digital twin device model, read the production nodes, process connection relationships and production order, write the production nodes as graph nodes, write the process connection relationships and production order as directed constraint edges, and output the digital twin constraint graph. S2. Read the on-site actions and action times from the real-time data of chemical production, generate action edges in the digital twin constraint graph based on the on-site actions, and merge the on-site actions, action times and action edges to generate on-site action records; S3. For the on-site action record, read the action edge and action time, perform the directed intention hypergraph closure operation with the action edge as the hyperedge root, generate the destination closed path, the prohibited early path and the confirmed arrival path, and merge the destination closed path, the prohibited early path, the confirmed arrival path, the action edge and the action time to generate the operation intention record. S4. Read the operation intent record and the on-site action record whose action time is later than the operation intent record, perform partial order sequence dynamic programming with prohibition interruption, rewrite the target closed path as a state bit to be cleared, rewrite the prohibited early path as an interruption state bit, and rewrite the state bit to be cleared and the interruption state bit according to the action time, and output the intent state table. S5. Extract the uncleared pending status bits and the hit interrupted status bits from the intent status table, generate process objective gap records, and lock the gap nodes and gap graph edges in the digital twin constraint graph based on the process objective gap records, generate blocking actions and recovery actions, and output the chemical safety production management results.
[0005] In a preferred embodiment, S1 includes: S1-1. Read the production objects and production step numbers in the digital twin device model, merge the production objects with the same device identifier and participating in the same production step into production nodes, write the production step number into the production node, and output the production node table. S1-2. Read the process connection relationship based on the production node table. The process connection relationship consists of the connection start point, the connection end point and the connection direction. Write the production node to which the connection start point belongs as the start production node, write the production node to which the connection end point belongs as the end production node, and generate directed constraint edges from the start production node to the end production node according to the connection direction. Output the process edge table. S1-3. Read the production sequence according to the production step number in the production node table. The production sequence consists of the current production step number, the next production step number, and the sequence direction. Write the production node to which the current production step number belongs as the starting production node, and write the production node to which the next production step number belongs as the ending production node. Generate directed constraint edges from the starting production node to the ending production node according to the sequence direction. Merge the directed constraint edges in the process edge table and the directed constraint edges generated by the production sequence, and output the digital twin constraint graph.
[0006] In a preferred embodiment, S2 includes: S2-1. Read the control instruction line and status sampling line from the real-time data of chemical production. The control instruction line contains the instruction object identifier, instruction value and instruction time. The status sampling line contains the sampling object identifier, status value and sampling time. Sort them according to the instruction time and sampling time respectively, and output the real-time row table. S2-2. For control command lines, read the state sampling behavior that is the same as the command object identifier, the sampling time is earlier than the command time and the last in the sorting from the real-time line table as the previous state line, and read the state sampling behavior that is the same as the command object identifier, the sampling time is later than the command time and the first in the sorting as the next state line. Subtract the state value of the previous state line from the state value of the next state line to generate the action difference, and output the action difference table.
[0007] In a preferred embodiment, S2 further includes: S2-3. Write the control instruction line with a non-zero action difference as the field action, write the instruction time as the action time, and write the instruction object identifier, instruction value and action difference into the field action, and output the field action table. S2-4. Based on the digital twin constraint graph reading device identifier and the instruction object identifier, the production node is written as the target production node. When the action difference is positive, the directed constraint edge with the starting production node as the target production node is written as the outgoing action edge. When the action difference is negative, the directed constraint edge with the ending production node as the target production node is written as the reclaimed action edge. The on-site action, action time, outgoing action edge or reclaimed action edge are merged to generate the on-site action record.
[0008] In a preferred embodiment, S3 further includes: S3-1. Read the action edge and action time in the on-site action record, write the action edge as the source action edge, write the starting point production node of the source action edge as the intention starting point, write the ending point production node of the source action edge as the intention ending point, and attach the pending repayment mark to the source action edge to generate the intention root record. S3-2. Perform a directed intent hypergraph closure operation based on the intent root record. The source action edge is the hyperedge root, the path extending from the intent endpoint along the direction of the directed constraint edge is the destination branch, the path extending from the intent starting point along the opposite direction of the directed constraint edge is the exit branch, and the path from the destination branch and the exit branch to the production node containing the confirmation value is the confirmation branch. The confirmation value consists of the detection value or the acceptance value. The detection value consists of the detection quantity, the detection time, and the detection node. The acceptance value consists of the acceptance status bit, the acceptance time, and the acceptance node. The acceptance status bit is 0 or 1. Expand according to the round until the number of newly added directed constraint edges in this round is zero, and output the intent hyperedge table.
[0009] In a preferred embodiment, S3 further includes: S3-3. For the case where the same directed constraint edge in the intention super edge table enters multiple branches at the same time, calculate the branch distance value and the order and reverse value. The branch distance value is the number of edges traversed from the source action edge to the directed constraint edge. The order and reverse value is the number of times the production step number of the subsequent directed constraint edge in the branch is less than the production step number of the preceding directed constraint edge. Sort the sum of the branch distance value and the order and reverse value in ascending order and take the first sorted branch as the edge belonging branch. Output the branch belonging table. S3-4. Based on the branch attribution table, write the destination branch as the destination closed path, the exit branch as the prohibited early path, and the confirmation branch as the confirmed arrival path. Then, merge the destination closed path, the prohibited early path, the confirmed arrival path, the source action edge, and the action time to generate an operation intent record.
[0010] In a preferred embodiment, S4 includes: S4-1. Read the target closed path, prohibited early path and action time from the operation intent record, and extract the record line whose action time is later than the operation intent record from the on-site action record, and generate the subsequent on-site action sequence in ascending order of action time; S4-2. Based on the destination closed path and the prohibited early path, establish the initial row of the partial order sequence dynamic programming with the prohibition interruption. Write the directed constraint edges in the destination closed path as the state bit to be cleared and assign it a value of 1, and write the directed constraint edges in the prohibited early path as the interruption state bit and assign it a value of 0.
[0011] In a preferred embodiment, S4 further includes: S4-3. Dynamic programming with partial order sequence of prohibition interruption is dynamically planned according to the subsequent on-site action sequence. The action edge is read line by line. When the action edge hits the directed constraint edge to which the state bit to be cleared belongs, the state bit to be cleared is changed from 1 to 0. When the action edge hits the directed constraint edge to which the interruption state bit belongs, the interruption state bit is changed from 0 to 1. Dynamic programming is generated and recursively implemented. S4-4. The dynamic programming is recursively processed in ascending order of action time, retaining the last result. The pending state bits, interrupted state bits and action time in the last result are merged, and the intention state table is output.
[0012] In a preferred embodiment, S5 includes: S5-1. Read the last bit of the intention status table, extract the pending status bits with a value of 1 to generate an uncleared bit table, extract the interrupt status bits with a value of 1 to generate a hit interrupt bit table, and generate a gap trigger record when both the uncleared bit table and the hit interrupt bit table are not empty. S5-2. Based on the gap trigger record, read the operation intention record, determine the directed constraint edge to which the uncleared bit table belongs as an unclosed edge, determine the directed constraint edge to which the hit interrupt bit table belongs as an early action edge, and generate the process purpose gap record based on the unclosed edge, the early action edge and the action time.
[0013] In a preferred embodiment, S5 further includes: S5-3. Based on the process objective gap record, lock the gap graph edge in the digital twin constraint graph. The gap graph edge consists of unclosed edges and early action edges. After deduplicating the starting production node and ending production node of the gap graph edge, the gap node is generated. S5-4. Generate blocking actions based on advance action edges, generate recovery actions based on unclosed edges and their confirmed arrival paths, and merge process objective gap records, gap nodes, gap diagram edges, blocking actions, and recovery actions to output the chemical safety production management results.
[0014] The technical effects and advantages of this invention are as follows: By generating closed and prohibited paths for the destination through action edges, we can identify the state where an action has occurred but the destination is not closed, thereby reducing the risk of subsequent conflicting actions being allowed. The field actions are generated by the difference between the states before and after the command, and a digital twin constraint diagram is attached to reduce the deviation caused by judging the field state based solely on the command record; By generating three types of paths—purpose, exit, and confirmation—through directed intention hypergraph closure, individual actions are associated with subsequent confirmation requirements, thereby enhancing the granularity of risk tracking. By dynamically planning the recursive state bits of the partial sequence with a prohibition interrupt, the closure progress and early hit are judged simultaneously in the action timing, thus improving the identification of intermediate risks. By locating unclosed edges and edges that have been activated prematurely through gap nodes and gap diagram edges, blocking and recovery actions are generated, so that management results directly constrain production progress. Attached Figure Description
[0015] Figure 1 This is a flowchart of the method steps of the present invention. Detailed Implementation
[0016] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0017] Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] Refer to the instruction manual appendix Figure 1The present invention provides a big data-based chemical safety production management method, comprising: S1. Based on the digital twin device model, read the production nodes, process connection relationships and production order, write the production nodes as graph nodes, write the process connection relationships and production order as directed constraint edges, and output the digital twin constraint graph. In this embodiment, the digital twin device model is first organized into nodes and edges participating in the production process, and then the production step number forms the production sequence, so that subsequent on-site actions can be assigned to specific production nodes and directed constraint edges. The production object is used to carry the device identifier and production step number, the process connection relationship is used to express the flow direction of materials, energy or control actions, and the production sequence is used to express the direction of production step advancement. The three together form a digital twin constraint graph, providing a graph structure foundation for subsequent action edge generation, intention super-edge closure, and gap identification. This implementation process includes the following steps: In S1-1, the production objects participating in the chemical production process are first read from the digital twin device model. These production objects include reactors, metering tanks, pumps, valves, pipeline segments, heat exchangers, detection points, and venting branches, all recorded in the model. Each production object carries at least a device identifier and a production step number. The device identifier is taken from the device tag number, equipment tag number, valve tag number, pump tag number, instrument tag number, or pipeline tag number. The production step number is taken from the step sequence number in the electronic operating procedures or batch production plan. The read production objects are grouped according to their device identifier and production step number. Production objects with the same device identifier and participating in the same production step are grouped together, and a production node number is formed by concatenating the device identifier and production step number. Each group generates one production node, and the production step number is saved to the production node, allowing the same device to form different production nodes in different production steps. A production node table is output. If multiple production objects exist under the same device identifier but have different production step numbers, multiple production nodes are generated for each. If a production object lacks a production step number, it does not participate in the production node table generation and is entered into the model for record entry. In S1-2, the process connection relationships in the digital twin device model are read based on the production node table. The process connection relationships come from the pipeline connection table, material flow table, valve and pump connection table, or control loop connection table. The minimum field consists of the connection start point, connection end point, and connection direction. The connection start point and connection end point are both expressed using the device identifier of the production object. The connection direction is taken as the material flow direction, pressure transmission direction, control action direction, or valve and pump drive direction. The production node to which the connection start point belongs is read as the start production node, and the production node to which the connection end point belongs is read as the end production node. When both the start and end production nodes exist in the production node table, a directed constraint edge is generated from the start production node to the end production node according to the connection direction, and the edge category is marked as a process edge. If the connection start point or connection end point does not fall into the production node table, the process connection relationship does not generate a directed constraint edge and is retained in the missing connection record. If multiple edges are generated for the same connection start point, connection end point, and connection direction, one process edge is retained according to the edge category and production step number, and the process edge table is output. In S1-3, the production sequence is read according to the production step number in the production node table. The production sequence consists of the current production step number, the next production step number, and the sequence direction. Both the current production step number and the next production step number are taken from the production step numbers in the production node table. The sequence direction points from the side with the smaller step number value to the side with the larger step number value. For production nodes with adjacent production step numbers under the same device identifier, the production node to which the current production step number belongs is taken as the starting production node, and the production node to which the next production step number belongs is taken as the ending production node. Directed constraint edges are generated from the starting production node to the ending production node according to the sequence direction, and the edge category is marked as a sequence edge. If multiple production nodes have the same production step number, no sequence edge is generated within this group. If there are skipped numbers in the production step number, a sequence edge is generated from two adjacent production step numbers after sorting, and the step number values are not required to differ by 1. Finally, the process edges in the process edge table are merged with the sequence edges generated by the production sequence to form a digital twin constraint graph containing graph nodes, directed constraint edges, edge categories, and production step numbers. Through the above processing, the devices, pipelines, control relationships, and production steps in the digital twin device model are transformed into a graph structure that can participate in calculations. Production nodes are used to indicate the location of production steps, directed constraint edges are used to indicate the process propagation direction and step advancement direction, and edge categories are used to distinguish subsequent path expansion and sequence determination. In practical applications: taking reactor R101, feed valve V101, metering tank T101, and tail end detection point A101 as an example, the digital twin device model reads that R101 participates in step 3, T... 101 participates in step 2, and A101 participates in step 4. The system generates production nodes with production step numbers respectively. When the material flow table records that T101 enters R101 through V101, a process edge is generated pointing from the T101 production node to the R101 production node. When R101 enters the tail detection step 4 after step 3, a sequence edge is generated pointing from the R101 production node to the A101 production node. This ensures that subsequent valve opening, replacement, feeding, or detection actions can all fall on specific nodes and edges in the digital twin constraint diagram.
[0019] S2. Read the on-site actions and action times from the real-time data of chemical production, generate action edges in the digital twin constraint graph based on the on-site actions, and merge the on-site actions, action times and action edges to generate on-site action records; In this embodiment, real-time chemical production data is first organized into control command lines and state sampling lines. Then, the action difference is calculated by the state changes of the same object before and after the command time, so that the on-site actions are not obtained by manual annotation, but are jointly generated by the commands and sampling data. The command object identifier and the sampling object identifier are both encoded using the device identifier in the digital twin device model. The state value is expressed using numerical fields. The action difference is used to determine whether the action influence is sent out or retrieved along the digital twin constraint graph, thereby generating the on-site action record required for the subsequent directed intention hypergraph closure. This implementation process includes the following steps: In S2-1, control command lines and status sampling lines are read from real-time chemical production data. Control command lines come from DCS control records, PLC command records, or electronic operation procedure execution records, while status sampling lines come from field instruments, valve position feedback, pump operation feedback, or control system status feedback. Control command lines must contain at least the command object identifier, command value, and command time; status sampling lines must contain at least the sampling object identifier, status value, and sampling time. Both command object identifiers and sampling object identifiers are first converted to device identifiers in the digital twin device model using a device identifier encoding table. Records that fail to convert are entered into the encoding supplementary record and do not participate in the current action calculation. Status values are obtained by taking numerical fields according to object type: 0 or 1 for switch-type objects, opening value for valve-type objects, operating status position or operating frequency for pump-type objects, and sampled quantity value for instrument-type objects. Only the status sampling line for the same status quantity is read for the same command object identifier. Control command lines are arranged in ascending order of command time, and status sampling lines are arranged in ascending order of sampling time. When multiple records exist at the same time, they are arranged in ascending order of record reception sequence number, and a real-time row table is output. In S2-2, for each control instruction line in the real-time line table, first read its instruction object identifier and instruction time, then filter the records in the status sampling line whose sampling object identifier is the same as the instruction object identifier; in the filtering results, records whose sampling time is earlier than the instruction time are arranged in ascending order of sampling time, and the last one in the sort is taken as the previous state line; records whose sampling time is later than the instruction time are arranged in ascending order of sampling time, and the first one in the sort is taken as the next state line; if the previous state line is missing, no action difference is generated for the control instruction line; if the next state line is missing, the control instruction line enters the line to be supplemented, and participates in the calculation after the subsequent status sampling line enters the real-time line table; after obtaining the previous state line and the next state line, read the status value of the previous state line and the status value of the next state line, subtract the status value of the previous state line from the status value of the next state line to generate the action difference, and form the action difference table by combining the instruction object identifier, instruction time, previous state line, next state line and action difference; In S2-3, the control instruction line and action difference value in the action difference table are read. When the action difference value is zero, it means that the state value before and after the instruction time has not changed, and no field action is generated. When the action difference value is not zero, the control instruction line is generated into a field action, and the instruction time is generated into the action time. The field action retains at least the instruction object identifier, instruction value, and action difference value, so that subsequent steps can obtain the action object, action direction, and action intensity from the same record. Among them, a positive action difference value indicates that the object state is enhanced, turned on, started, or increased, and a negative action difference value indicates that the object state is weakened, turned off, stopped, or decreased. After the field action is generated from the control instruction line with a non-zero action difference value, a field action table is formed. Each row in the field action table maintains the same instruction time and the same instruction object identifier as a control instruction line in the action difference table. In S2-4, the production node whose identifier matches the instruction object identifier in the field action is identified by the digital twin constraint graph reading device, and this production node is taken as the target production node. If the action difference is positive, the directed constraint edge with the starting production node as the target production node is read in the digital twin constraint graph, and an outgoing action edge is generated to express the propagation of the action effect from the target production node to the subsequent process path or production sequence. If the action difference is negative, the directed constraint edge with the ending production node as the target production node is read, and a retraction action edge is generated to express the withdrawal or termination of the action effect from the path entering the target production node. If the target production node does not exist, the field action is entered into the unattached action record. If multiple outgoing action edges or retraction action edges are obtained for the same target production node, multiple field action records are generated respectively. Finally, the field action, action time, outgoing action edge or retraction action edge are merged to generate a field action record. Through the above processing, control commands are no longer directly regarded as on-site actions. Instead, they are first verified by the difference between the state values before and after the command time, and then the direction of the action difference is used to determine whether the command falls into the outward action edge or the retracted action edge in the digital twin constraint diagram. This reduces the deviation caused by inferring changes in on-site state based solely on command records and provides a source of action edges for subsequent recording of operational intentions. In practical applications: When the feed valve V101 receives the valve opening command at 10:00:00, the control command line records the command object identifier V101, the command value 1, and the command time 10:00. 00; In the state sampling row, the state value of V101 is 0 at 09:59:58 and 1 at 10:00:02. The action difference value of 1 is obtained by subtracting the state value of the previous state row from the state value of the later state row. The system generates the field action and takes 10:00:00 as the action time. In the digital twin constraint diagram, there is a directed constraint edge pointing to the production node of reactor R101 where the device identifier V101 is located. When the action difference value is positive, an external action edge is generated, and finally a field action record containing valve opening action, action time and external action edge is formed.
[0020] S3. For the on-site action record, read the action edge and action time, perform the directed intention hypergraph closure operation with the action edge as the hyperedge root, generate the destination closed path, the prohibited early path and the confirmed arrival path, and merge the destination closed path, the prohibited early path, the confirmed arrival path, the action edge and the action time to generate the operation intention record. In this embodiment, the action edges in the field action record are first transformed into source action edges that can trigger process objective tracking. Then, purpose branches, exit branches, and confirmation branches are generated with the source action edges as roots. This ensures that a field action that has occurred not only represents a change in equipment status but also the subsequent process objective, preceding exit requirements, and confirmation requirements derived from the action. The purpose branch is used to find the path that the action affects the continued progress of the process, the exit branch is used to find the preceding path that needs to be eliminated or recovered after the action occurs, and the confirmation branch is used to find the detection or acceptance nodes that can prove that the process objective has been achieved. This implementation process includes the following steps: In S3-1, the action edges and action times are read from the on-site action records. The action edges are formed by outgoing action edges or reclaimed action edges, and inherit the start point production node, end point production node, and edge direction of the directed constraint edges in the digital twin constraint graph. The read action edges are used to generate source action edges, the start point production node of the source action edges is used to generate intention start points, and the end point production node of the source action edges is used to generate intention end points. A pending repayment mark is added to the source action edges. The pending repayment mark indicates that the source action edge has been triggered by an on-site action, but the destination closed path led by the source action edge has not been cleared by subsequent on-site actions. The intention root record includes at least the source action edge, intention start point, intention end point, action time, and pending repayment mark, serving as the starting record for subsequent directed intention hypergraph closure operations. In S3-2, a directed intent hypergraph closure operation is performed based on the intent root record. The source action edge is used as the hyperedge root, and an intent hyperedge table is established, including the hyperedge root, branch type, branch round, branch edge, branch start point, and branch end point. Starting from the intent end point, the process extends round by round along the process edge direction in the digital twin constraint graph to obtain the target branch. Starting from the intent start point, the process extends round by round along the reverse direction of the process edge in the digital twin constraint graph to obtain the exit branch. In each round of adding production nodes in the target branch and exit branch, production nodes containing confirmation values are retrieved. If a new production node does not carry a confirmation value, the process continues from the new production node along the process edge direction. Continue expanding to the first production node containing a confirmation value, and generate a confirmation branch for that path segment. The confirmation value consists of either a detection value or a receipt value. The detection value consists of the detection quantity, detection time, and detection node, with the detection node represented by the device identifier of the production node. The receipt value consists of the receipt status bit, receipt time, and receipt node, with the receipt node represented by the device identifier of the production node, and the receipt status bit being 0 or 1. Before each round of expansion, record the branch edges that have already entered the intention super-edge table. If a branch edge obtained in this round already exists in the same branch, it is not considered a new edge. When there are no new directed constraint edges in the destination branch, exit branch, and confirmation branch in this round, stop the expansion and output the intention super-edge table. In S3-3, for the case where the same directed constraint edge in the intention superedge table enters multiple branches simultaneously, the branch distance value and sequential reversal value of the directed constraint edge in each branch are calculated respectively. The branch distance value is the number of directed constraint edges traversed from the source action edge to the directed constraint edge. The sequential reversal value is calculated pairwise for each pair of adjacent directed constraint edges in the branch. The production step number of the directed constraint edge is taken from the production step number carried by the endpoint production node. When the production step number of the subsequent directed constraint edge is less than the production step number of the previous directed constraint edge, the sequential reversal value is incremented by 1. The branch distance value and the sequential reversal value are added to obtain the branch assignment value. The branch assignment values of the same directed constraint edge are arranged in ascending order. The branch with the first position in the sorted order is used to generate the edge assignment branch. If the branch assignment values are the same, the edge assignment branches are generated in the order of destination branch, confirmation branch, and exit branch. The branch assignment table is output. In S3-4, the intention superedge table is organized according to the branch attribution table. Branch edges belonging to the destination branch are arranged by branch round and branch distance value to generate the destination closed path. Branch edges belonging to the exit branch are arranged by branch round and branch distance value to generate the prohibited early path. Branch edges belonging to the confirmation branch are arranged by branch round and branch distance value to generate the confirmed arrival path. The destination closed path, the prohibited early path, and the confirmed arrival path all retain the starting production node, ending production node, edge direction, and production step number of the corresponding directed constraint edge. Then, the destination closed path, the prohibited early path, the confirmed arrival path, the source action edge, and the action time are merged to generate the operation intention record. The operation intention record is used for subsequent partial order sequence dynamic programming, converting the destination closed path into a pending clearing state bit and the prohibited early path into an interrupted state bit. Through the above processing, the source action edge is expanded into an operation intent record that includes the destination closure path, the prohibited early path, and the confirmed arrival path. This allows on-site actions to be associated with their subsequent process objectives, the paths that must not occur prematurely, and the detection or acceptance confirmation locations, avoiding simply treating the action record as a completed process state. In practical applications: when the feed valve V101 opens, forming a source action edge from the metering tank T101 to the reactor R101, the system expands along the process edge direction with R101 as the intent endpoint, obtaining the purpose branch leading to the reactor feed completion position and subsequent detection position; it expands in the opposite direction along the process edge with T101 as the intent starting point, obtaining the exit branch formed by the raw material tank outlet, the return branch, and the upstream isolation position; if the tail detection point A101 carries the detection quantity and detection time, the confirmation branch is formed by extending from the purpose branch to A101. The finally generated operation intent record is used to determine whether subsequent feeding, heating, or pressurization actions occur prematurely before the feed purpose closure.
[0021] S4. Read the operation intent record and the on-site action record whose action time is later than the operation intent record, perform partial order sequence dynamic programming with prohibition interruption, rewrite the target closed path as a state bit to be cleared, rewrite the prohibited early path as an interruption state bit, and rewrite the state bit to be cleared and the interruption state bit according to the action time, and output the intent state table. In this implementation, the operation intent record already provides the target closure path, the prohibited advance path, and the action time. Subsequent processing needs to determine whether subsequent field actions, after the source action occurs, will complete the target closure path first, or hit the prohibited advance path before the target closure. To this end, the directed constraint edges in the path are converted into state bits, and then recursively calculated line by line according to the sequence of subsequent field actions, so that the target closure progress and the prohibited advance hit status are expressed in the same time table. This implementation process includes the following steps: In S4-1, the target closed path, prohibited early path, and action time are read from the operation intent record. The action time is the action time carried when the source action edge enters the operation intent record. Records with action times greater than the specified action time are filtered in the field action record, with the current calculation time as the filtering endpoint. If processed in batches, the batch end time is used as the filtering endpoint. The filtered record rows are arranged in ascending order of action time. If the action times are the same, they are arranged in ascending order of the record row number in the field action record, thereby generating the subsequent field action sequence. If the subsequent field action sequence is empty, no recursion is generated, and the subsequent result is the initial row of the dynamic programming. In S4-2, a dynamic programming initial row with a prohibited interruption is established based on the target closed path and the prohibited early path. For each directed constraint edge in the target closed path, a state bit to be cleared is generated using the operation intention record number and the directed constraint edge number, and the state bit to be cleared is assigned a value of 1, which indicates that the directed constraint edge has not been cleared by subsequent field actions. For each directed constraint edge in the prohibited early path, an interruption state bit is generated using the operation intention record number and the directed constraint edge number, and the interruption state bit is assigned a value of 0, which indicates that the directed constraint edge has not been hit by subsequent field actions. The dynamic programming initial row includes the operation intention record number, the initial recursive sequence number, the action time, the state bit string to be cleared, and the interruption state bit string. In S4-3, dynamic programming with a partial order sequence of prohibited interruptions is dynamically planned according to the subsequent field action sequence. For each subsequent field action record, its action edge is obtained, and the starting production node, ending production node, and edge direction of the action edge are compared with the directed constraint edge to which the state bit belongs. If the action edge and the directed constraint edge to which the state bit to be cleared belong have the same starting production node, ending production node, and edge direction, the state bit to be cleared is changed from 1 to 0. If the action edge and the directed constraint edge to which the interruption state bit belongs have the same starting production node, ending production node, and edge direction, the interruption state bit is changed from 0 to 1. For each subsequent field action record, a dynamic programming recursion is generated. The dynamic programming recursion includes the recursion number, action time, action edge, state bit string to be cleared, and interruption state bit string. The same action edge is recursively planned in different operation intention records without overwriting each other. In S4-4, the dynamic programming recursive steps are arranged in ascending order of action time, and when the action times are the same, they are arranged in ascending order of recursion number. The last dynamic programming recursive step is retained as the last result. When the subsequent on-site action sequence is empty, the initial row of the dynamic programming is used as the last result. The pending clearing state bit string, interruption state bit string and action time are read from the last result and merged to generate the intention state table. In the intention state table, a pending clearing state bit of 1 indicates that there are still uncleared edges in the target closed path, and an interruption state bit of 1 indicates that the prohibited path has been hit by the subsequent on-site action. Through the above processing, the path in the operation intent record no longer remains in a static graph structure, but is transformed into a state bit that is recursively generated according to the on-site actions. The system can determine whether the target closure is completed and whether the prohibited action has occurred prematurely in the same time sequence, and provide direct values for subsequent process target gap records. In practical applications: the operation intent record generated after the feed valve V101 is opened carries the target closure path and the prohibited premature path. The system reads the actions that are later than the opening time of V101 from the on-site action record. If the subsequent detection branch action hits the directed constraint edge in the target closure path, the corresponding pending clearing state bit changes from 1 to 0. If the pending clearing state bit is still 1, and the heating branch action hits the directed constraint edge in the prohibited premature path, the corresponding interruption state bit changes from 0 to 1. Finally, the intent state table retains the last state "target not cleared and prohibited action hit", for subsequent generation of process target gap records.
[0022] S5. Extract the uncleared state bits to be cleared and the hit interrupted state bits according to the intention state table, generate the process purpose gap record, and lock the gap node and gap graph edge in the digital twin constraint graph based on the process purpose gap record, generate blocking action and recovery action, and output the chemical safety production management result. In this implementation, the intent status table is used to receive the dynamic programming results of the partial-order sequence with prohibited interruptions. The last bit reflects the clearing status of the destination closed path and the hit status of the prohibited advance path after the source action edge is triggered. If the pending clearing status bit is still 1, it means that there are still directed constraint edges in the destination closed path that have not been cleared by subsequent field actions. If the interruption status bit is 1, it means that the prohibited advance path has been hit by subsequent field actions. When both exist simultaneously, it means that the field action has crossed the process destination boundary led by the source action edge. This implementation process includes the following steps: In S5-1, the last result of the intention status table is read. The last result includes the operation intention record number, action time, pending clear status bit string, and interrupt status bit string. The pending clear status bit string is read bit by bit, and the pending clear status bits with a value of 1 are extracted. An uncleared bit table is generated according to the operation intention record number and the directed constraint edge number. The interrupt status bit string is read bit by bit, and the interrupt status bits with a value of 1 are extracted. An interrupt hit bit table is generated according to the operation intention record number and the directed constraint edge number. When the uncleared bit table is empty, it means that the target closed path has been cleared by subsequent on-site actions. When the interrupt hit bit table is empty, it means that the prohibited advance path has not been hit. When either of them is empty, no gap trigger record is generated, and the last result is saved as a gap-free status record. When neither the uncleared bit table nor the interrupt hit bit table is empty, the operation intention record number, the action time of the last result, the uncleared bit table number, and the interrupt hit bit table number are merged to generate a gap trigger record. In S5-2, the operation intent record is read based on the gap trigger record, and the directed constraint edge number carried by each state bit in the uncleared bit table and the hit interrupt bit table is read. The directed constraint edge to which the state bit belongs in the uncleared bit table is determined to be an unclosed edge, and the directed constraint edge to which the state bit belongs in the hit interrupt bit table is determined to be an early action edge. The action time in the process purpose gap record is taken from the action time of the first hit state bit in the hit interrupt bit table, which is the dynamic programming recursion. When multiple interrupt state bits are hit at the same action time, the action time of the first hit state bit is taken in ascending order of the recursion number. Then, the operation intent record number, source action edge, unclosed edge, early action edge and action time are merged to generate the process purpose gap record. This record indicates that when there are still uncleared edges in the purpose closure path, the early path is prohibited from being triggered by subsequent field actions. In S5-3, gap edges are locked in the digital twin constraint diagram according to the process objective gap record. Gap edges consist of unclosed edges and early action edges. If there are the same directed constraint edges in the unclosed edges and early action edges, a gap edge is retained according to the directed constraint edge number. The starting production node and ending production node of each gap edge are read, and duplicates are removed according to the device identifier and production step number of the production node to generate gap nodes. Gap nodes are used to mark the graph structure range between the unfinished area of the process objective and the area where the early action occurs. The gap edge retains the edge direction, edge category and production step number for subsequent generation of blocking and recovery actions. In S5-4, blocking actions are generated based on advance action edges. Each blocking action includes the advance action edge number, the endpoint production node of the advance action edge, the blocking direction, and the blocking time. The blocking direction is taken from the edge direction of the advance action edge. This is used to stop or withdraw subsequent production actions that proceed in the same direction as the advance action edge. Recovery actions are generated based on unclosed edges and their corresponding confirmed arrival paths. Each recovery action includes the unclosed edge number, the confirmed arrival path number, the confirmation value location, and the recovery time. The recovery time is taken from the time the chemical safety production management result is generated. When an unclosed edge belongs to multiple confirmed arrival paths, the number of edges traversed from the unclosed edge to the production node containing the confirmation value is read from each confirmed arrival path. The confirmed arrival path with the highest traversed edge count is selected in ascending order to generate the recovery action. When the number of traversed edges is the same, the path with the highest traversed edge count is selected in ascending order based on the detection time or receipt time in the confirmation value. Finally, the process objective gap record, gap node, gap diagram edge, blocking action, and recovery action are merged, and the chemical safety production management result is output. Through the above processing, the status bits in the intent status table are converted into process objective gap records. The system can locate the gap edge and gap node when the objective closed path is not completed and the prohibited early path has been triggered, and give blocking and recovery actions, so that subsequent production actions are no longer based solely on a single instruction or alarm. In practical applications: after the feed valve V101 is opened, there is still a tail end detection branch in the objective closed path that has not been cleared, and the pending clearing status bit remains at 1; subsequently, the heating branch action hits the prohibited early path, and the interruption status bit changes from 0 to 1; the system generates an uncleared bit table and a hit interruption bit table from the last bit result, determines the tail end detection branch as an unclosed edge, determines the heating branch as an early action edge, and then locks the reactor R101, the tail end detection point A101, and the gap node where the heating branch is located, outputting a blocking action to stop heating and a recovery action to complete the tail end detection.
[0023] Working Principle: This solution first transforms the equipment, pipelines, valves, pumps, detection points, and production steps in the chemical plant into a digital twin constraint diagram based on a digital twin device model. Then, it reads control commands and status samples from real-time chemical production data, confirms whether the on-site actions actually occurred by using the state difference before and after the commands, and links the on-site actions to the action edges in the digital twin constraint diagram. Subsequently, starting from the action edge, it reverse-engineers the process objective that the action should complete, generating a closed path, a prohibited path for early arrival, and a confirmed arrival path. Then, it recursively judges according to the order of subsequent actions: whether the completed path has been completed, and whether the prohibited path for early arrival has been triggered. If the process objective has not been completed, but subsequent actions have occurred ahead of schedule, a process objective gap record is generated, and blocking and recovery actions are output. In practical applications, for example, if the feed valve has been opened, the system will not simply consider "successful valve opening" as the completion of this step. Instead, it will continue to track in the digital twin constraint diagram: whether the feed has reached the reactor, whether the tail end detection has been completed, and whether the original reflux or upstream exit path has been processed. If the tail end detection has not been completed, but the operator or control system continues to execute the heating action, the system will identify the state of "the feed purpose is not closed but the heating has occurred in advance", lock the reactor, detection point and heating branch involved, and output the management result of stopping the heating, supplementing the tail end detection or restoring the relevant path, thereby avoiding the continued advancement of conflicting production actions on site without alarm or shutdown.
[0024] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A chemical safety production management method based on big data, characterized in that, include: S1. Based on the digital twin device model, read the production nodes, process connection relationships and production order, write the production nodes as graph nodes, write the process connection relationships and production order as directed constraint edges, and output the digital twin constraint graph. S2. Read the on-site actions and action times from the real-time data of chemical production, generate action edges in the digital twin constraint graph based on the on-site actions, and merge the on-site actions, action times and action edges to generate on-site action records; S3. For the on-site action record, read the action edge and action time, perform the directed intention hypergraph closure operation with the action edge as the hyperedge root, generate the destination closed path, the prohibited early path and the confirmed arrival path, and merge the destination closed path, the prohibited early path, the confirmed arrival path, the action edge and the action time to generate the operation intention record. S4. Read the operation intent record and the on-site action record whose action time is later than the operation intent record, perform partial order sequence dynamic programming with prohibition interruption, rewrite the target closed path as a state bit to be cleared, rewrite the prohibited early path as an interruption state bit, and rewrite the state bit to be cleared and the interruption state bit according to the action time, and output the intent state table. S5. Extract the uncleared pending status bits and the hit interrupted status bits from the intent status table, generate process objective gap records, and lock the gap nodes and gap graph edges in the digital twin constraint graph based on the process objective gap records, generate blocking actions and recovery actions, and output the chemical safety production management results.
2. The chemical safety production management method based on big data according to claim 1, characterized in that: S1 includes: S1-1. Read the production objects and production step numbers in the digital twin device model, merge the production objects with the same device identifier and participating in the same production step into production nodes, write the production step number into the production node, and output the production node table. S1-2. Read the process connection relationship based on the production node table. The process connection relationship consists of the connection start point, the connection end point and the connection direction. Write the production node to which the connection start point belongs as the start production node, write the production node to which the connection end point belongs as the end production node, and generate directed constraint edges from the start production node to the end production node according to the connection direction. Output the process edge table. S1-3. Read the production sequence according to the production step number in the production node table. The production sequence consists of the current production step number, the next production step number, and the sequence direction. Write the production node to which the current production step number belongs as the starting production node, and write the production node to which the next production step number belongs as the ending production node. Generate directed constraint edges from the starting production node to the ending production node according to the sequence direction. Merge the directed constraint edges in the process edge table and the directed constraint edges generated by the production sequence, and output the digital twin constraint graph.
3. The chemical safety production management method based on big data according to claim 2, characterized in that: S2 includes: S2-1. Read the control instruction line and status sampling line from the real-time data of chemical production. The control instruction line contains the instruction object identifier, instruction value and instruction time. The status sampling line contains the sampling object identifier, status value and sampling time. Sort them according to the instruction time and sampling time respectively, and output the real-time row table. S2-2. For control command lines, read the state sampling behavior that is the same as the command object identifier, the sampling time is earlier than the command time and the last in the sorting from the real-time line table as the previous state line, and read the state sampling behavior that is the same as the command object identifier, the sampling time is later than the command time and the first in the sorting as the next state line. Subtract the state value of the previous state line from the state value of the next state line to generate the action difference, and output the action difference table.
4. The chemical safety production management method based on big data according to claim 3, characterized in that: S2 further includes: S2-3. Write the control instruction line with a non-zero action difference as the field action, write the instruction time as the action time, and write the instruction object identifier, instruction value and action difference into the field action, and output the field action table. S2-4. Based on the digital twin constraint graph reading device identifier and the instruction object identifier, the production node is written as the target production node. When the action difference is positive, the directed constraint edge with the starting production node as the target production node is written as the outgoing action edge. When the action difference is negative, the directed constraint edge with the ending production node as the target production node is written as the reclaimed action edge. The on-site action, action time, outgoing action edge or reclaimed action edge are merged to generate the on-site action record.
5. The chemical safety production management method based on big data according to claim 4, characterized in that: S3 further includes: S3-1. Read the action edge and action time in the on-site action record, write the action edge as the source action edge, write the starting point production node of the source action edge as the intention starting point, write the ending point production node of the source action edge as the intention ending point, and attach the pending repayment mark to the source action edge to generate the intention root record. S3-2. Perform a directed intent hypergraph closure operation based on the intent root record. The source action edge is the hyperedge root, the path extending from the intent endpoint along the direction of the directed constraint edge is the destination branch, the path extending from the intent starting point along the opposite direction of the directed constraint edge is the exit branch, and the path from the destination branch and the exit branch to the production node containing the confirmation value is the confirmation branch. The confirmation value consists of the detection value or the acceptance value. The detection value consists of the detection quantity, the detection time, and the detection node. The acceptance value consists of the acceptance status bit, the acceptance time, and the acceptance node. The acceptance status bit is 0 or 1. Expand according to the round until the number of newly added directed constraint edges in this round is zero, and output the intent hyperedge table.
6. The chemical safety production management method based on big data according to claim 5, characterized in that: S3 further includes: S3-3. For the case where the same directed constraint edge in the intention super edge table enters multiple branches at the same time, calculate the branch distance value and the order and reverse value. The branch distance value is the number of edges traversed from the source action edge to the directed constraint edge. The order and reverse value is the number of times the production step number of the subsequent directed constraint edge in the branch is less than the production step number of the preceding directed constraint edge. Sort the sum of the branch distance value and the order and reverse value in ascending order and take the first sorted branch as the edge belonging branch. Output the branch belonging table. S3-4. Based on the branch attribution table, write the destination branch as the destination closed path, the exit branch as the prohibited early path, and the confirmation branch as the confirmed arrival path. Then, merge the destination closed path, the prohibited early path, the confirmed arrival path, the source action edge, and the action time to generate an operation intent record.
7. The chemical safety production management method based on big data according to claim 6, characterized in that: S4 includes: S4-1. Read the target closed path, prohibited early path and action time from the operation intent record, and extract the record line whose action time is later than the operation intent record from the on-site action record, and generate the subsequent on-site action sequence in ascending order of action time; S4-2. Based on the destination closed path and the prohibited early path, establish the initial row of the partial order sequence dynamic programming with the prohibition interruption. Write the directed constraint edges in the destination closed path as the state bit to be cleared and assign it a value of 1, and write the directed constraint edges in the prohibited early path as the interruption state bit and assign it a value of 0.
8. The chemical safety production management method based on big data according to claim 7, characterized in that: S4 further includes: S4-3. Dynamic programming with partial order sequence of prohibition interruption is dynamically planned according to the subsequent on-site action sequence. The action edge is read line by line. When the action edge hits the directed constraint edge to which the state bit to be cleared belongs, the state bit to be cleared is changed from 1 to 0. When the action edge hits the directed constraint edge to which the interruption state bit belongs, the interruption state bit is changed from 0 to 1. Dynamic programming is generated and recursively implemented. S4-4. The dynamic programming is recursively processed in ascending order of action time, retaining the last result. The pending state bits, interrupted state bits and action time in the last result are merged, and the intention state table is output.
9. The chemical safety production management method based on big data according to claim 8, characterized in that: S5 includes: S5-1. Read the last bit of the intention status table, extract the pending status bits with a value of 1 to generate an uncleared bit table, extract the interrupt status bits with a value of 1 to generate a hit interrupt bit table, and generate a gap trigger record when both the uncleared bit table and the hit interrupt bit table are not empty. S5-2. Based on the gap trigger record, read the operation intention record, determine the directed constraint edge to which the uncleared bit table belongs as an unclosed edge, determine the directed constraint edge to which the hit interrupt bit table belongs as an early action edge, and generate the process purpose gap record based on the unclosed edge, the early action edge and the action time.
10. The chemical safety production management method based on big data according to claim 9, characterized in that: The S5 also includes: S5-3. Based on the process objective gap record, lock the gap graph edge in the digital twin constraint graph. The gap graph edge consists of unclosed edges and early action edges. After deduplicating the starting production node and ending production node of the gap graph edge, the gap node is generated. S5-4. Generate blocking actions based on advance action edges, generate recovery actions based on unclosed edges and their confirmed arrival paths, and merge process objective gap records, gap nodes, gap diagram edges, blocking actions, and recovery actions to output the chemical safety production management results.
