A safety knowledge base construction method for industrial production supervision
Patent Information
- Application Number
- CN202611202728.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-10
- Publication Date
- 2026-10-16
AI Technical Summary
两类数据在格式、粒度和表达方式上存在显著差异,现有技术缺乏将事故报告中的定性描述与操作日志中的定量时序轨迹进行有效对齐与融合的手段,导致操作日志蕴含的精细时序动态信息始终未被纳入知识库构建体系
1)本发明从历史事故报告中提取状态变化趋势描述和操作动作描述,从异常操作日志中提取设备状态参数轨迹和操作指令触发记录,将两类数据源分别转换为附带原始时序标记的状态事件节点和操作事件节点,依据时序标记之间的先后关系、交叠关系或包含关系将状态事件节点与操作事件节点配对为对齐单元,并按次序串联为状态转移节点链,由节点来源一致性比值、精确时间戳覆盖比值和相邻对齐单元间时序冲突次数加权计算对齐置信度,汇集高置信度链构成危险操作序列特征库。可以理解的是事故报告的文本时间描述与操作日志的毫秒级采样记录在时基和粒度上存在本质差异,若强制按时间戳等距插值或固定窗对齐,必然产生大量错位关联。本发明以偏序关系替代精确时间戳匹配,仅要求事件之间的先后、交叠或包含等时序逻辑成立,不对绝对时间差做硬性约束,将对齐问题从精确时刻配准松弛为时序逻辑约束,使事故报告的定性演变描述与操作日志的定量动态轨迹首次实现可靠融合,操作日志蕴含的精细时序信息得以无损进入知识库构建流程。
Smart Images

Figure CN122925642A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial safety knowledge management technology, specifically to a method for constructing a safety knowledge base for industrial production supervision. Background Technology
[0002] The construction of a safety knowledge base in the field of industrial production supervision is a crucial foundational task for ensuring production safety. In existing technologies, the construction of safety knowledge bases primarily relies on the static analysis of textual materials such as accident reports and hazard investigation records. Knowledge graphs are constructed through entity relationship extraction, and the resulting knowledge base is essentially a descriptive organization of static accident elements.
[0003] However, industrial accidents are dynamic processes that evolve gradually from a normal state through the superposition of multiple factors, including abnormal changes in equipment parameters and operational interventions. Accident reports record descriptions of equipment state changes and operational actions during the accident's evolution in unstructured text, while operation logs record the continuous trajectory of equipment operating parameters and the precise triggering times of operational commands in high-resolution time series. These two types of data differ significantly in format, granularity, and expression. Existing technologies lack effective means to align and integrate the qualitative descriptions in accident reports with the quantitative time-series trajectories in operation logs, resulting in the fine-grained temporal dynamic information contained in operation logs remaining unintegrated into the knowledge base construction system.
[0004] Existing solutions typically employ frequent subsequence mining or co-occurrence statistics to identify key nodes in accident evolution. However, frequently occurring combinations are not necessarily the causal factors leading to accidents; the true causal chain may be obscured by frequent accompanying phenomena due to its low frequency of occurrence. Regarding the boundary delineation between safety and hazard, existing solutions directly treat operational sequences that did not result in accidents as negative safety samples. However, a significant proportion of these sequences represent lucky safety cases where operational behaviors deviated from procedures and only avoided accidents due to accidental environmental factors. Using these as safety benchmarks would cause the knowledge base's assessment of hazard boundaries to systematically favor the risk-taking side. Furthermore, existing safety knowledge bases lack the ability to quantitatively label the applicable boundaries of their own knowledge entries. The effectiveness of safety knowledge is highly dependent on specific working conditions. Changes in coupling parameters such as environmental temperature, humidity, and material batch characteristics may cause the same knowledge entry to exhibit different confidence levels in different scenarios. Existing technologies do not quantify the reliability of knowledge entries under different environmental coupling parameter conditions and cannot provide self-assessment information on confidence levels during knowledge retrieval.
[0005] Therefore, existing technologies lack a safety knowledge base construction scheme that can align and fuse qualitative evolution descriptions in accident reports with quantitative time-series trajectories in operation logs, extract dynamic time-series correlations between equipment state coupling patterns and operational action execution logic, and achieve self-assessment of knowledge item confidence through negative sample comparison and probability calibration. Summary of the Invention
[0006] The purpose of this invention is to provide a method for constructing a safety knowledge base for industrial production supervision, thereby solving the following technical problems: Existing methods for constructing industrial production supervision safety knowledge bases rely solely on static text parsing of accident reports for knowledge extraction and organization. They fail to align and integrate the qualitative evolution descriptions in accident reports with the quantitative time-series trajectories in operation logs, nor can they extract the dynamic time-series correlation between equipment state coupling patterns and operational action execution logic, or conduct confidence self-assessment of the environmental applicability boundaries of knowledge entries.
[0007] The objective of this invention can be achieved through the following technical solutions: A method for constructing a safety knowledge base for industrial production supervision includes the following steps: S1: Extract the equipment status change trend sequence and operation action time sequence from historical accident reports and abnormal operation logs, align them according to time sequence to generate a state transition node chain, and form a dangerous operation sequence feature library; S2: Subsequence segmentation is performed on each state transition node chain in the hazardous operation sequence feature library. The equipment state coupling pattern and operation action execution logic in each subsequence are extracted. The key node combination that triggers the accident consequences is identified and generalized and merged to generate a set of hazardous evolution paths. S3: Extract the entire state transition sequence from the historical normal operation log that matches the prefix of the starting subsequence of the dangerous evolution path, and extract those that did not lead to accident consequences as negative sample paths to form a negative sample comparison path library; S4: Discretize and symbolically encode the dangerous evolution path and the negative sample comparison path, generalize and merge the homologous paths, and generate a trajectory index map composed of dangerous state subsequences and safe differentiation branches; S5: Extract the deviation distribution of device status parameters and environmental coupling parameters of the negative sample path corresponding to each node in the trajectory index map, determine the confidence correction coefficient corresponding to the value range of each environmental coupling parameter and attach it to the node to generate a safety knowledge graph; S6: Build an inverted trajectory index for each trajectory index entry in the security knowledge graph, and build a knowledge base storage structure based on the inverted trajectory index.
[0008] As a further aspect of the present invention: the specific construction process of the dangerous operation sequence feature library in S1 is as follows: The equipment status change trend and operation actions are extracted from the accident report to form a first state trend sequence and a first action sequence. The equipment status parameter trajectory and operation command trigger record are extracted from the abnormal operation log to form a second state trend sequence and a second action sequence. Each element in the state trend sequence and operation action sequence is converted into a state event node and an operation event node, respectively, and a time sequence mark is added to each node. State event nodes and operation event nodes whose time sequence marks satisfy the sequential, overlapping, or inclusion relationship are paired as alignment units and connected in sequence according to the time sequence mark order to form a state transition node chain. The alignment confidence is calculated by weighting the ratio of the number of accident report nodes to log nodes, the ratio of the number of precise timestamp nodes, and the number of time sequence conflicts between adjacent alignment units. State transition node chains exceeding a preset threshold are collected to form a dangerous operation sequence feature library.
[0009] As a further aspect of the present invention: In step S2, the specific process of extracting the device state coupling mode and operation action execution logic in each sub-sequence is as follows: For each state transition node chain in the dangerous operation sequence feature library, identify the change points of the equipment state trend in the chain, and cut the chain into sub-sequences with the change points as boundaries; extract the change direction and change rate of the state event nodes in the sub-sequences, pair nodes with the same change direction and rate ratio falling into a preset strong coupling interval as strong coupling node pairs, and pair nodes with opposite change directions and rate ratio falling into a preset mutual inverse coupling interval as mutual inverse coupling node pairs, and construct the equipment state coupling pattern from the strong coupling node pairs and mutual inverse coupling node pairs; extract the operation event nodes in the sub-sequences, mark the order according to the time sequence, connect adjacent nodes with trigger intervals less than a preset dependency threshold and trigger condition reference relationships to form operation dependency chains, and group nodes with trigger intervals less than a preset concurrency threshold and no trigger condition reference relationships into operation concurrency groups, and construct the operation action execution logic from the operation dependency chains and operation concurrency groups.
[0010] As a further aspect of the present invention: the specific generation process of the dangerous evolution path set in S2 is as follows: Strongly coupled and mutually inversely coupled node pairs are extracted from each subsequence. Operation dependency chains and operation concurrency groups are extracted. Strongly coupled node pairs are associated with the overlapping parts of the temporal markers in the operation dependency chains or operation concurrency groups. Mutually inversely coupled node pairs are associated with the overlapping parts of the temporal markers in the operation dependency chains or operation concurrency groups to form coupling-operation association groups. Coupled-operation association groups with more than a preset coupling density threshold and with broken operation dependency chains or missing operation concurrency groups are marked as key node combinations. Subsequences marked with key node combinations are arranged according to their original temporal order to form a dangerous subsequence set for the state transition node chain. Dangerous subsequence sets of different state transition node chains are compared pairwise. Two dangerous subsequence sets with the longest common node sequence are extracted, merged into a generalized dangerous subsequence, and replaced with the original two sets. The comparison and merging are repeated until no more can be merged to obtain a dangerous evolution path set.
[0011] As a further aspect of the present invention: the specific construction process of the negative sample comparison path library in S3 is as follows: Using the first subsequence of each generalized hazardous subsequence as the initial matching template, the entire state transition sequence with prefix matching and no accident labeling is extracted as a candidate negative sample path. Subsequences in the candidate negative sample path with broken operation dependency chains or missing operation concurrency groups are identified as intervention recovery subsequences. The segment from the first appearance of the intervention recovery subsequence to the end is removed, and the preceding segment is retained as a safety differentiation branch. The segment in the safety differentiation branch that is consistent with the node sequence of the corresponding generalized hazardous subsequence but different from the node sequence after the bifurcation point is marked as a safety differentiation segment. The safety differentiation segment and the corresponding generalized hazardous subsequence form a safety-hazard control pair, which are then collected to form a negative sample comparison path library.
[0012] As a further aspect of the present invention: in step S4, the specific construction process of the trajectory index map is as follows: Discretized symbol encoding is performed on each generalized dangerous subsequence in the dangerous evolution path set, mapping the state event type and operation event type of each node to state symbols and operation symbols, and arranging them in node order to form dangerous path symbol strings. Discretized symbol encoding is performed on each safe differentiation branch in the negative sample comparison path library, mapping the state event type and operation event type of each node to state symbols and operation symbols, and arranging them in node order to form safe path symbol strings. Symbol strings with the same prefix in dangerous path symbol strings and safe path symbol strings are grouped into homologous path groups, with dangerous path symbol strings as the backbone and safe path symbol strings as branches. At the bifurcation nodes, safe path symbol strings are attached to dangerous path symbol strings to form trajectory index branches. The segments extending from the bifurcation nodes along the direction of safe path symbol strings in the trajectory index branches are marked as safe differentiation branches, and the segments extending along the direction of dangerous path symbol strings are marked as dangerous state subsequences. The trajectory index branches, safe differentiation branches, and dangerous state subsequences constitute the trajectory index map.
[0013] As a further aspect of the present invention: in step S5, the specific process for generating the security knowledge graph is as follows: For each bifurcation node in the trajectory index map, extract the equipment state parameter records and environmental coupling parameter records of each sample in the safety differentiation branch and dangerous state subsequence corresponding to the bifurcation node. Calculate the deviation of each environmental coupling parameter value under the same equipment state to form an environmental parameter deviation set. Use kernel density estimation to fit the deviation distribution to obtain the deviation probability density distribution of each environmental coupling parameter. Divide the value interval of each environmental coupling parameter into several segments according to a preset segmentation step size. Calculate the conditional probability that the environmental coupling parameter deviation in each segment exceeds a preset danger threshold based on the deviation probability density distribution. Use the conditional probability as a misjudgment probability calibration value and attach it to the corresponding bifurcation node. Traverse all bifurcation nodes to complete the attachment to obtain the safety knowledge graph.
[0014] As a further aspect of the present invention: the specific construction process of the knowledge base storage structure in step S6 is as follows: Extract the hazardous state subsequences and safe differentiation branches from each trajectory index branch, concatenate the symbol sequences of the hazardous state subsequences and safe differentiation branches of the same branch into trajectory index entries and assign entry identifiers; extract the state symbols and operation symbols from each trajectory index entry, and establish an inverted mapping of each state symbol and operation symbol pointing to the trajectory index entry; store the misjudgment probability calibration value attached to the bifurcation node as auxiliary calibration information associated with the entry identifier; construct a three-level inverted trajectory index storage structure with the inverted mapping as the first-level index, the trajectory index entries as the second-level index, and the auxiliary calibration information as the third-level storage unit.
[0015] The beneficial effects of this invention are: 1) This invention extracts descriptions of state change trends and operational actions from historical accident reports, and extracts equipment state parameter trajectories and operational command trigger records from abnormal operation logs. These two data sources are converted into state event nodes and operational event nodes with original time-series tags, respectively. Based on the sequential, overlapping, or inclusion relationships between the time-series tags, state event nodes and operational event nodes are paired as alignment units and sequentially chained into a state transition node chain. Alignment confidence is calculated by weighting the node source consistency ratio, accurate timestamp coverage ratio, and the number of time-series conflicts between adjacent alignment units. High-confidence chains are then compiled to form a hazardous operation sequence feature library. It is understandable that the textual time descriptions in accident reports and the millisecond-level sampling records in operation logs differ fundamentally in time base and granularity. Forcing alignment by equidistant interpolation or fixed windows based on timestamps will inevitably result in numerous misaligned associations. This invention replaces precise timestamp matching with a partial order relationship, requiring only that the temporal logic such as the order, overlap, or inclusion between events be true, without imposing hard constraints on absolute time differences. It relaxes the alignment problem from precise time registration to temporal logic constraints, enabling the qualitative evolution description of accident reports and the quantitative dynamic trajectory of operation logs to be reliably integrated for the first time. The fine temporal information contained in the operation logs can be entered into the knowledge base construction process without loss.
[0016] 2) This invention divides the state transition node chain into several subsequences based on the turning point of the device state change trend. It extracts the change direction and rate of change of state event nodes in each subsequence. Nodes with the same change direction and rate ratio falling within the strong coupling range are paired as strongly coupled node pairs, while nodes with opposite change directions and rate ratio falling within the mutually inverse coupling range are paired as mutually inverse coupled node pairs. Simultaneously, it constructs operation dependency chains and operation concurrency groups according to the triggering time interval and conditional reference relationships of operation event nodes. Strongly coupled node pairs or mutually inverse coupled node pairs are associated with operation dependency chains or operation concurrency groups that overlap in time sequence to form coupling-operation association groups. Key node combinations are marked based on the criteria of coupling node pair density exceeding a threshold and the existence of broken operation dependency chains or missing operation concurrency groups. It is understandable that existing technologies typically use the frequency of subsequences occurring before an accident as the criterion, leading to the incorrect reinforcement of frequently occurring but non-causal nodes, while low-frequency but truly accident-triggering causal chains are generalized and flattened. This invention uses the physical coupling strength between device states and the integrity of operational logic as the judgment dimensions, directly targeting the causal characteristics of accident evolution, so that the key causal nodes no longer depend on statistical frequency, fundamentally avoiding the obscuring of the causal chain by high-frequency accompanying phenomena.
[0017] 3) This invention extracts the deviations in environmental coupling parameters between the safe branch and the hazardous state subsequence under the same equipment conditions from each bifurcation node in the trajectory index map. It uses kernel density estimation to fit the deviation probability density distribution, divides the environmental parameter value intervals according to a preset segmentation step size, and calculates the conditional probability that the deviation exceeds a preset hazardous threshold within each segment. This conditional probability is then used as a misjudgment probability calibration value and appended to the corresponding bifurcation node. This constructs a three-level inverted trajectory index storage structure: a first-level index using inverted mappings of state symbols and operation symbols, a second-level index using trajectory index entries, and a third-level storage unit using misjudgment probability calibration values. It is understood that the effectiveness of safety knowledge entries varies significantly under different environmental conditions. Existing technologies using fixed thresholds or linear correction coefficients cannot characterize the threshold effect and nonlinear influence of environmental parameters on risk. This invention uses kernel density estimation, a non-parametric method, to preserve the true form of the deviation distribution and assigns explicit risk semantics to the calibration values using conditional probabilities, ensuring that each bifurcation node carries quantifiable confidence information under different environmental conditions. The three-level inverted index structure decouples symbol-level coarse screening, entry-level fine sorting, and probability-level calibration in layers. During retrieval, relevant trajectory index entries are quickly located based on the current state symbol and operation symbol, and the calibration probability corresponding to the current environmental parameter value is obtained simultaneously, realizing an integrated response of knowledge retrieval and confidence self-assessment. Attached Figure Description
[0018] The invention will now be further described with reference to the accompanying drawings.
[0019] Figure 1 This is a schematic diagram of a method for constructing a safety knowledge base for industrial production supervision according to the present invention. Detailed Implementation
[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] Please see Figure 1 As shown, this invention is a method for constructing a safety knowledge base for industrial production supervision, comprising the following steps: S1: Extract the equipment status change trend sequence and operation action time sequence from historical accident reports and abnormal operation logs, align them according to time sequence to generate a state transition node chain, and form a dangerous operation sequence feature library; First, descriptions of equipment status change trends and operational actions are extracted from historical industrial production accident reports to form a first state trend sequence and a first action sequence. The equipment status change trend description refers to the qualitative changes in equipment operating parameters recorded in the accident report text during the accident's evolution, such as descriptive terms like "temperature continues to rise," "pressure drops sharply," and "liquid level slowly falls." This type of description reflects the macroscopic evolution direction of the equipment status at the time of the accident. The operational action description refers to the specific intervention actions performed by operators at each stage of the accident, as recorded in the accident report text, such as operational terms like "close the feed valve," "start the standby pump," and "open the pressure relief valve." Next, equipment status parameter trajectories and operational command trigger records are extracted from historical abnormal operation logs to form a second state trend sequence and a second action sequence. The equipment status parameter trajectory refers to the continuous sampling value sequence of equipment operating parameters recorded in a distributed control system or data acquisition and monitoring control system, such as the time sequence of temperature values collected by a temperature sensor every second. The operational command trigger record refers to the trigger time and command content of each operational command recorded in the control system, such as a timestamp accurate to the millisecond level for the issuance of a valve closing command.
[0022] Each element in the first and second state trend sequences is converted into a state event node, and each element in the first and second action sequences is converted into an operation event node. Each node is accompanied by a time sequence marker obtained from the original records. For nodes originating from accident reports, the time sequence marker refers to the time description of the event occurrence parsed from the text or the chronological order of events in the narrative; for nodes originating from operation logs, it refers to the precise timestamp or sampling sequence number recorded by the control system. State event nodes with time sequence markers that satisfy sequential, overlapping, or inclusion relationships are paired with operation event nodes to form alignment units. A sequential relationship means that one event occurs completely earlier than another; an overlapping relationship means that the occurrence time intervals of two events partially overlap; and an inclusion relationship means that the occurrence time interval of one event completely falls within the occurrence time interval of another event. The alignment units are concatenated in the order of their time sequence markers to form a state transition node chain. The alignment confidence of the chain is calculated by weighting the ratio of the number of accident report source nodes to the number of log source nodes in the chain, the ratio of the number of nodes with precise timestamps, and the number of time sequence conflicts between adjacent alignment units. The state transition node chains with alignment confidence exceeding a preset threshold are aggregated to form a dangerous operation sequence feature library.
[0023] It is understandable that the textual time descriptions in incident reports and the millisecond-level sampling records in operation logs differ fundamentally in terms of time base and granularity. Forcing alignment using equidistant interpolation based on timestamps or fixed windows would inevitably lead to numerous misalignments. This invention replaces precise timestamp matching with a partial order relationship, requiring only that the temporal logic of events—such as sequence, overlap, or inclusion—be valid, without imposing hard constraints on absolute time differences. This relaxes the alignment problem from precise time-based registration to temporal logic constraints. Based on this, node source consistency reflects the degree of matching between the two types of data sources at the event level; time-series marker accuracy reflects the reliability of the time information upon which alignment depends; and the number of time-series conflicts reflects the degree of consistency between the alignment result and the incident evolution logic. A weighted comprehensive evaluation of these three factors ensures that the fine-grained temporal dynamic information contained in the operation logs can be reliably integrated into the knowledge base construction process, guaranteeing the quality of the data foundation upon which subsequent steps rely from the source.
[0024] S2: Subsequence segmentation is performed on each state transition node chain in the hazardous operation sequence feature library. The equipment state coupling pattern and operation action execution logic in each subsequence are extracted. The key node combination that triggers the accident consequences is identified and generalized and merged to generate a set of hazardous evolution paths. For each state transition node chain in the hazardous operation sequence feature library, identify the turning points where the trend of equipment state change changes in the sequence. Use these turning points as boundaries to divide the state transition node chain into several sub-sequences. A turning point refers to a node position in the state transition node chain where the direction of change of adjacent state event nodes reverses or changes from change to stabilization. For example, the turning point when temperature changes from a continuous rise to a decrease, or the transition point when pressure changes from a rapid decrease to a tendency to stabilize. After dividing by turning points, the state change trend within each sub-sequence remains unidirectional, while the state change trends between adjacent sub-sequences differ.
[0025] Extract all state event nodes from each subsequence and calculate the direction and rate of change for each state event node. The direction of change refers to the overall evolution of the state parameter within the subsequence's coverage period, such as increasing, decreasing, or remaining stable. The rate of change refers to the magnitude of the state parameter's change per unit time. State event nodes with the same direction of change and a rate of change ratio falling within a preset strong coupling interval are paired as strongly coupled node pairs. For example, if both temperature and pressure change in the direction of increase, and the ratio of the temperature change rate to the pressure change rate is within a preset interval, it indicates a positive strong coupling relationship between the two. State event nodes with opposite directions of change and a rate of change ratio falling within a preset reciprocal coupling interval are paired as reciprocal coupled node pairs. For example, if the liquid level continuously decreases while the valve opening continuously increases, and the two change in opposite directions with a rate ratio within a preset interval, it indicates that the increase in valve opening is the direct cause of the decrease in liquid level. The strongly coupled node pairs and the reciprocal coupled node pairs constitute the equipment state coupling pattern of this subsequence.
[0026] Extract all operation event nodes from each subsequence. Based on the temporal order of the operation event nodes, concatenate adjacent operation event nodes whose trigger time interval is less than a preset dependency threshold and who have a trigger condition reference relationship to form an operation dependency chain. The trigger condition reference relationship means that the trigger condition of a later operation instruction explicitly references the execution result of a previous operation instruction. For example, in the instruction "start the vent pump after the feed valve is closed," "feed valve closed" is a prerequisite trigger condition for "start the vent pump." Operation event nodes whose trigger time interval is less than a preset concurrency threshold and who do not have a trigger condition reference relationship are grouped into operation concurrency groups. For example, if an operator issues multiple independent operation instructions simultaneously within the same time window, these instructions constitute an operation concurrency group. The operation dependency chain and the operation concurrency group constitute the operation action execution logic of this subsequence. For each subsequence, extract strongly coupled and mutually inversely coupled node pairs from the device state coupling pattern of that subsequence. Extract the operation dependency chains and operation concurrency groups from the operation action execution logic of that subsequence. Associate the strongly coupled node pairs with the operation dependency chains or operation concurrency groups that overlap with the timing marks, and associate the mutually inversely coupled node pairs with the operation dependency chains or operation concurrency groups that overlap with the timing marks, forming coupling-operation association groups. Coupled-operation association groups in each subsequence where the number of coupled node pairs exceeds a preset coupling density threshold and where there are broken operation dependency chains or missing operation concurrency groups are marked as critical node combinations. A broken operation dependency chain means that the execution result of an operation instruction in the operation dependency chain does not trigger subsequent dependent operations within a specified time, indicating an interruption in the operation chain; a missing operation concurrency group means that some operation instructions that should have been executed synchronously in the operation concurrency group are missing, indicating incomplete operation execution. Arrange the subsequences marked with critical node combinations in each state transition node chain according to their original timing order to form a dangerous subsequence set for that state transition node chain. The dangerous subsequence sets of different state transition node chains are compared pairwise. The two dangerous subsequence sets with the longest common node sequence are extracted and merged. The merged generalized dangerous subsequences are used to replace the two dangerous subsequence sets until there are no more dangerous subsequences to be merged, thus obtaining the dangerous evolution path set.
[0027] It is understandable that existing technologies typically use the frequency of subsequences occurring before an accident as the criterion for determining critical nodes. This leads to the erroneous reinforcement of frequently occurring but non-causal nodes, while low-frequency but truly accident-triggering causal chains are generalized and smoothed out. This invention uses the physical coupling strength between equipment states and the completeness of operational logic as the judgment dimensions, directly targeting the causal characteristics of accident evolution. High density of coupled node pairs indicates dense abnormal correlations between multiple equipment parameters; broken operational dependency chains or missing operational concurrency groups indicate gaps in the logical level of operational responses. When both conditions are met simultaneously, it means that equipment states are highly coupled but operational responses fail to fully cover the situation, precisely constituting the critical node combination that triggers accident consequences. This judgment mechanism eliminates the reliance on statistical frequency for causal critical nodes, fundamentally avoiding the obscuring of causal chains by high-frequency accompanying phenomena. The longest common subsequence generalization merging merges structurally similar paths only while retaining critical node combinations, preserving rare paths with strong causal effects from forced merging, ensuring the causal completeness of the dangerous evolution path set.
[0028] S3: Extract the entire state transition sequence from the historical normal operation log that matches the prefix of the starting subsequence of the dangerous evolution path, and extract those that did not lead to accident consequences as negative sample paths to form a negative sample comparison path library; Extract the complete state transition sequence from the historical normal operation log. The historical normal operation log refers to the state parameter trajectory and operation command sequence recorded by the control system during normal production operation of the same or similar production unit, which is different from the abnormal operation log used in S1. The operation process corresponding to the normal operation log has not experienced any accidents or abnormal events. Using the first subsequence of each generalized hazard subsequence as the starting matching template, extract the complete state transition sequence with a prefix consistent with the starting matching template and without accident labeling fields, as the candidate negative sample path. The prefix consistency means that the node sequence of several consecutive subsequences at the beginning of the candidate negative sample path is completely consistent with the node sequence of the starting matching template, indicating that the candidate negative sample path and the hazard evolution path share the same initial evolution process before the accident. Identify subsequences in the candidate negative sample path that have broken operation dependency chains or missing operation concurrency groups. Subsequences with broken chains or missing subsequences are determined as intervention and recovery subsequences. The segment from the first appearance of the intervention and recovery subsequence to the end of the path in the candidate negative sample path is removed, and the remaining segment of the path after removal is used as the safety differentiation branch. The segments in each safe differentiation branch that are consistent with the node sequence of the corresponding generalized dangerous subsequence and whose node sequences after the bifurcation point are different are marked as safe differentiation segments. The safe differentiation segments and the corresponding generalized dangerous subsequences form a safe-danger control pair. All safe-danger control pairs are collected to form a negative sample comparison path library.
[0029] It is understandable that a significant proportion of operational sequences that do not result in accidents are cases of fortunate safety where the operation deviated from procedures but only avoided accidents due to timely intervention by operators or accidental environmental factors. Existing technologies directly include such sequences as negative safety samples for comparison, leading to a systematic bias in the hazard boundary assessment criteria towards the riskier side. This invention identifies the existence of intervention and recovery sub-sequences by recognizing broken operational dependency chains or missing operational concurrency groups. The physical meaning is that the original operational logic flow is disrupted, inevitably indicating external intervention. By truncating the segment from the intervention point to the end of the path, the remaining preceding path represents a path that naturally evolved to the intervention point without human correction and has not yet resulted in an accident; this is a truly safe path. By excluding all fortunate safety sequences from the negative sample pool, the reliability and conservatism of hazard boundary assessment are ensured from the source.
[0030] S4: Discretize and symbolically encode the dangerous evolution path and the negative sample comparison path, generalize and merge the homologous paths, and generate a trajectory index map composed of dangerous state subsequences and safe differentiation branches; Each generalized hazard subsequence in the hazard evolution path set is discretized and symbolically encoded. The state event type and operation event type of each node in the generalized hazard subsequence are mapped to state symbols and operation symbols, arranged in node order to form a hazard path symbol string. The state event type refers to the type of equipment parameter change trend described by the state event node, such as temperature increase, temperature decrease, pressure increase, pressure decrease, etc., and each type corresponds to an independent state symbol. The operation event type refers to the type of operation command described by the operation event node, such as valve opening, valve closing, pump starting, pump stopping, etc., and each type corresponds to an independent operation symbol.
[0031] Discretized symbol encoding is performed on each safety differentiation branch in the negative sample comparison path library. The state event type and operation event type of each node in the safety differentiation branch are mapped to state symbols and operation symbols, arranged in node order to form a safety path symbol string. Symbol strings with the same prefix in the dangerous path symbol string and the safe path symbol string are grouped into a homogeneous path group. For each homogeneous path group, the safe path symbol string is attached to the dangerous path symbol string at the bifurcation node, forming a trajectory index branch, with the dangerous path symbol string as the trunk and the safe path symbol string as the branch. The bifurcation node refers to the node position in the dangerous path symbol string and the safe path symbol string where the difference begins from a certain node. Before this node, the two are completely consistent, and after this node, their directions are different, corresponding to the path differentiation into dangerous and safe directions from a certain decision point or state point in actual operation. The segment extending from the bifurcation node along the direction of the safe path symbol string in each trajectory index branch is marked as a safety differentiation branch, and the segment extending from the bifurcation node along the direction of the dangerous path symbol string is marked as a dangerous state subsequence. The trajectory index map is composed of all trajectory index branches, safety differentiation branches, and dangerous state subsequences.
[0032] Understandingly, discretized symbol encoding maps continuous temporal trajectories to symbol strings on a finite set of symbols. Homogeneous path merging merges paths sharing the same prefix into the same trajectory index branch, simultaneously displaying both dangerous and safe directions at bifurcation nodes. This graphical structure directly maps the question of "why the same initial state and operational sequence can produce two drastically different results—safe and dangerous"—to the branching structure at bifurcation nodes. This allows operators to intuitively understand at which decision node, under what operating conditions, the system's evolutionary direction might fundamentally diverge, providing a structured trajectory reference framework for safe decision-making.
[0033] S5: Extract the deviation distribution of device status parameters and environmental coupling parameters of the negative sample path corresponding to each node in the trajectory index map, determine the confidence correction coefficient corresponding to the value range of each environmental coupling parameter and attach it to the node to generate a safety knowledge graph; For each bifurcation node in the trajectory index map, the equipment state parameter records and environmental coupling parameter records of each sample in the safety differentiation branch corresponding to that bifurcation node are extracted, as are the equipment state parameter records and environmental coupling parameter records of each sample in the hazardous state subsequence corresponding to that bifurcation node. The environmental coupling parameters refer to the operating environment parameters that interact with the equipment state parameters and jointly affect the system's safety state, such as ambient temperature, ambient humidity, material batch characteristic parameters, and cooling water temperature. The deviations in the values of each environmental coupling parameter in the safety differentiation branch and the hazardous state subsequence under the same equipment state are calculated to form an environmental parameter deviation set. Kernel density estimation is used to fit the distribution of the environmental parameter deviation set to obtain the deviation probability density distribution of each environmental coupling parameter. Kernel density estimation is a non-parametric probability density estimation method that does not pre-determine the distribution shape of the deviation data, but directly fits the true probability density curve from the data itself. The value intervals of each environmental coupling parameter are divided into several segments according to a preset segmentation step size. Based on the deviation probability density distribution, the conditional probability that the deviation of the environmental coupling parameter in each segment exceeds a preset hazardous threshold is calculated. The conditional probability is used as the misjudgment probability calibration value for the bifurcation node under the corresponding environmental coupling parameter value segment, and is appended to the bifurcation node in the trajectory index graph. After traversing all bifurcation nodes in the trajectory index graph and completing the appending, a safety knowledge graph is obtained.
[0034] It is understandable that the effectiveness of safety knowledge entries varies significantly under different environmental conditions. The same equipment state sequence may complete safely at low ambient temperatures but may evolve into an accident at high ambient temperatures. Existing technologies using fixed thresholds or linear correction coefficients cannot characterize the threshold effect and nonlinear influence of environmental parameters on risk. This invention uses kernel density estimation, a nonparametric method, to preserve the true shape of the deviation distribution and assigns explicit risk semantics to the calibration value using conditional probability. This ensures that each bifurcation node carries quantifiable confidence information under different environmental conditions, achieving probabilistic labeling of the applicability boundaries of knowledge entries and providing a data foundation for self-assessment of confidence during subsequent retrieval processes.
[0035] S6: Build an inverted trajectory index for each trajectory index entry in the security knowledge graph, and build a knowledge base storage structure based on the inverted trajectory index.
[0036] Traverse each trajectory index branch in the safety knowledge graph, extract the hazardous state subsequences and safety differentiation branches of each trajectory index branch, concatenate the hazardous state subsequences and safety differentiation branch node symbol sequences of the same trajectory index branch to form trajectory index entries, and assign an entry identifier to each trajectory index entry. Extract the state symbols and operation symbols from each trajectory index entry, establish a state inverted mapping from each state symbol to the trajectory index entry containing that state symbol, and establish an operation inverted mapping from each operation symbol to the trajectory index entry containing that operation symbol. Store the false positive probability calibration value attached to the bifurcation nodes in each trajectory index entry as the entry's auxiliary calibration information, associated with the entry identifier. Construct a three-level inverted trajectory index storage structure using the state inverted mapping and operation inverted mapping as the first-level index, the trajectory index entries as the second-level index, and the auxiliary calibration information as the third-level storage unit.
[0037] Understandably, in real-time safety monitoring scenarios, the system needs to quickly retrieve matching hazard evolution paths and corresponding safety differentiation branches based on the currently collected equipment status and operational actions, and simultaneously obtain the misjudgment probability calibration value under the current environmental conditions. The three-level inverted index structure decouples symbol-level coarse screening, entry-level fine sorting, and probability-level calibration in layers. During retrieval, the current state symbol and operation symbol are used as query keys. The first-level inverted index mapping quickly locates the candidate trajectory index entry set, the second-level index finely screens and matches paths and obtains entry identifiers, and the third-level storage unit reads the calibration probability under the corresponding environmental conditions. This achieves an integrated response of knowledge retrieval and confidence self-assessment, providing dynamic knowledge support with probabilistic semantics for industrial site safety supervision.
[0038] In a preferred embodiment of the present invention, the specific construction process of the dangerous operation sequence feature library in step S1 is as follows: Descriptions of equipment status change trends and operational actions are extracted from historical industrial production accident reports to form a first state trend sequence and a first action sequence, respectively. Accident reports, written by safety management personnel after an accident, reflect the causal sequence of the accident's evolution; therefore, the extracted sequences retain directional information about the accident's development. Equipment status parameter trajectories and operational command trigger records are read from historical abnormal operation logs to form a second state trend sequence and a second action sequence, respectively. Operation logs record the precise timestamps of parameter changes and command triggers, containing detailed temporal information about the accident's evolution. Elements in both the first and second state trend sequences are uniformly converted into state event nodes, and elements in both the first and second action sequences are uniformly converted into operation event nodes. Each node is accompanied by a time sequence marker obtained from the original records. For nodes originating from accident reports, the time sequence marker is determined by the relative order of descriptive words and the logical flow of the context; for nodes originating from operation logs, the time sequence marker is the precise timestamp or sampling number recorded by the control system. Pairing state event nodes with operation event nodes whose timing markers satisfy sequential, overlapping, or inclusion relationships creates state-action alignment units. A sequential relationship means one node's timing marker is completely earlier than another's; an overlapping relationship means the time intervals indicated by the timing markers of two nodes partially overlap; and an inclusion relationship means one node's time interval completely falls within another node's time interval. This pairing method, based on partial order relationships, does not impose hard constraints on absolute time differences, only requiring that the timing logic between events holds. This allows qualitative descriptions in incident reports and quantitative records in operation logs to be paired within a unified timing logic framework, avoiding misalignments caused by different time bases. All alignment units are then sequentially chained together according to the timing marker order of their respective nodes, forming a state transition node chain. For each state transition node chain, calculate the alignment confidence score: Calculate the ratio of nodes originating from incident reports to nodes originating from operation logs to obtain a node source consistency score. The more balanced the number of nodes from the two data sources, the higher the degree of mutual corroboration between incident reports and operation logs in terms of event coverage. Calculate the ratio of nodes with precise timestamps to the total number of nodes in the chain to obtain a time-series marking accuracy score. A higher precision timestamp coverage ratio indicates more reliable time information upon which the alignment relies. Calculate the number of times the time sequence between adjacent alignment units in the chain conflicts with the incident evolution logic to obtain a sequence conflict deduction score. Fewer conflicts indicate a better match between the alignment result and the physical logic of the incident evolution. Sum these three scores with weights to obtain the alignment confidence score. Collect state transition node chains with alignment confidence scores exceeding a preset threshold to form a hazardous operation sequence feature library.
[0039] It is understandable that the textual time descriptions in incident reports and the millisecond-level sampling records in operation logs differ fundamentally in their time base. Forcibly aligning them using fixed time windows or equal-interval interpolation would inevitably result in numerous misalignments, leading to the construction of state transition node chains containing unrelated state and operation events. This would render subsequent dangerous evolution paths extracted from contaminated data unreliable. This invention replaces precise timestamp matching with a partial order relation, achieving alignment at the event logic level without imposing hard constraints on absolute time differences. This allows the fine-grained temporal dynamic information contained in operation logs to be reliably integrated into the knowledge base construction process for the first time. Furthermore, alignment confidence is introduced as a quality screening mechanism. The reliability of each chain is comprehensively evaluated through three dimensions: node source consistency, temporal tag accuracy, and the number of order conflicts. Low-quality alignment results are excluded from the feature library, ensuring the quality of the data foundation upon which all subsequent steps, such as subsequence cutting, key node identification, negative sample matching, and graph construction, rely. This ensures that the final safety knowledge graph accurately reflects the dynamic evolution of incidents.
[0040] In another preferred embodiment of the present invention, the specific process of extracting the device state coupling mode and operation action execution logic in each sub-sequence in step S2 is as follows: For each state transition node chain in the hazardous operation sequence feature library, identify the turning points where the equipment state change trend changes. Use these turning points as boundaries to divide the state transition node chain into several sub-sequences. A turning point is a node position in the state transition node chain where the change direction of adjacent state event nodes reverses or changes from change to stagnation. For example, in a state transition node chain, the temperature change trend changes from a continuous rise to a decline, or the pressure change trend changes from a rapid decline to a tendency to stabilize. After dividing by turning points, the state change trend within each sub-sequence remains in a single direction, while the state change trends between adjacent sub-sequences differ, ensuring that each sub-sequence corresponds to a continuous stage in the accident evolution process with a consistent state change direction. Extract all state event nodes from each sub-sequence and calculate the change direction and rate of change for each state event node. The change direction refers to whether the state parameter increases, decreases, or remains stable within the sub-sequence's coverage period, and the change rate refers to the magnitude of the state parameter's change per unit time. State event nodes with the same direction of change and a rate ratio falling within a preset strong coupling interval are paired as strongly coupled node pairs. For example, if the temperature and pressure of a reactor rise simultaneously in a certain subsequence, and the magnitude of the pressure increase corresponding to each degree Celsius increase in temperature remains stable within a certain range, this indicates that there is an energy transfer or physical field coupling relationship between the temperature and pressure changes, and therefore they are marked as strongly coupled node pairs. State event nodes with opposite directions of change and a rate ratio falling within a preset reciprocal coupling interval are paired as reciprocal coupled node pairs. For example, if the liquid level continuously decreases while the outlet valve opening continuously increases in a certain subsequence, and the two change in opposite directions but with a stable rate ratio, this indicates that the increase in valve opening is the direct physical cause of the decrease in liquid level, and therefore they are marked as reciprocal coupled node pairs. The equipment state coupling pattern of this subsequence is constituted by strongly coupled node pairs and reciprocal coupled node pairs.
[0041] Extract all operation event nodes from each subsequence and analyze them according to their temporal marker order. Connect adjacent operation event nodes with trigger intervals less than a preset dependency threshold and a trigger condition reference relationship to form an operation dependency chain. A trigger condition reference relationship means that the execution of a later operation instruction is predicated on the completion of a previous operation instruction. For example, for the operation event nodes "close the feed valve" and "start the vent pump," if the vent pump's starting condition explicitly requires the feed valve to be closed, then these two operation event nodes have a trigger condition reference relationship. If their trigger intervals are also within the dependency threshold range, they are connected as an operation dependency chain. Operation event nodes with trigger intervals less than a preset concurrency threshold and no trigger condition reference relationship are grouped into an operation concurrency group. For example, if an operator simultaneously issues independent operation instructions such as adjusting cooling water flow, adjusting stirring speed, and opening the vent valve within the same time window, these operation event nodes do not have a trigger condition reference relationship but are highly close in time, indicating that they belong to parallel execution actions under the same response decision, and are therefore grouped into an operation concurrency group. The operation dependency chain and operation concurrency group constitute the operation action execution logic of this subsequence.
[0042] It is understandable that the strong coupling between state event nodes reveals the interconnected propagation effect of multiple equipment parameters at the physical level, while the inverse coupling reveals the physical causal chain of how operational actions affect equipment states. Operational dependency chains reveal the sequence of steps and preconditions for operators to perform operations, and operational concurrency groups reveal the combination patterns of multiple responses taken simultaneously by operators at specific decision nodes. Both characterize the intrinsic mechanism of accident evolution from the equipment and personnel perspectives, respectively. This allows subsequent identification of key node combinations to be based on two dimensions with clear causal meaning: physical coupling strength and operational logic integrity, rather than simply relying on the statistical frequency of events. This ensures that each path in the set of hazard evolution paths possesses traceable physical causal logic.
[0043] In another preferred embodiment of the present invention, the specific process for generating the set of dangerous evolution paths in step S2 is as follows: For each subsequence, extract the strongly coupled node pairs and mutually inversely coupled node pairs from the device state coupling pattern of that subsequence. Simultaneously, extract the operation dependency chains and operation concurrency groups from the operation action execution logic of that subsequence. Associate the strongly coupled node pairs with the operation dependency chains or operation concurrency groups that overlap with the timing markers, and associate the mutually inversely coupled node pairs with the operation dependency chains or operation concurrency groups that overlap with the timing markers, forming coupling-operation association groups. Overlapping timing markers refer to the overlap or inclusion relationship between the time intervals covered by the state coupling node pairs and the time intervals covered by the operation dependency chains or operation concurrency groups. This means that the coupling changes in device state and the occurrence of operation actions are synchronous in time, and there is a temporal correspondence between the two. For example, in a subsequence, temperature and pressure form a strongly coupled node pair, with their coupled change lasting from 10:15 to 10:20 on a certain day. Simultaneously, the operation log records that the operator executed the operation dependency chain of "closing the steam valve and then starting the vent valve." The timing markers of these two actions overlap, indicating that this set of equipment state coupling changes and this set of operational actions occurred within the same time period. Therefore, they are associated as a coupling-operation association group. Similarly, liquid level and outlet valve opening form a reciprocally coupled node pair, with their change period coinciding with the time period of the concurrent operation group of "increasing the cooling water flow and decreasing the stirring speed." These are then associated as another coupling-operation association group. Through this association, each coupling-operation association group simultaneously contains the equipment state coupling relationship and the operational action logic relationship within that time period, forming a complete "state-operation" association unit.
[0044] Coupled-operation association groups in each subsequence where the number of coupled node pairs exceeds a preset coupling density threshold and where there are broken operation dependency chains or missing operation concurrency groups are marked as critical node combinations. A number of coupled node pairs exceeding the preset coupling density threshold indicates that within this time period, there are dense abnormal coupling relationships between multiple equipment parameters, and the correlation of equipment states is highly deteriorated. A broken operation dependency chain means that after an operation instruction in the operation dependency chain is executed, the subsequent dependent operation that should be triggered does not occur within the specified time window. For example, the operator closes the steam valve, but the vent valve, which should subsequently be opened according to the operating procedure, is not opened, thus breaking the operation chain. Missing operation concurrency groups mean that one or more of the multiple operation instructions that should be executed synchronously in an operation concurrency group are missing. For example, concurrent operations to deal with overpressure conditions should simultaneously include closing the steam valve, opening the vent valve, and starting the cooling pump, but in actual operation, only the first two are executed while the cooling pump is not started, making the operation concurrency group incomplete. Both broken operation dependency chains and missing operation concurrency groups reflect logical gaps or omissions in the operator's response to the current equipment state. The simultaneous occurrence of high coupling density and incomplete operational logic indicates that the equipment status has experienced serious associated anomalies, and the operators' response measures have failed to fully cover these anomalies, which constitutes the key node combination that triggers the consequences of the accident.
[0045] The subsequences marked with key node combinations in each state transition node chain are arranged in their original temporal order to form the dangerous subsequence set of that state transition node chain. Pairwise comparisons are performed on the dangerous subsequence sets of different state transition node chains, and the two sets of dangerous subsequences with the longest common node sequence are extracted and merged. The longest common node sequence refers to the longest continuous subsequence in the two sets of dangerous subsequences that is completely identical in node type and arrangement order; it represents the core stage commonly experienced by different accident cases during the evolution process. During merging, using this longest common node sequence as the skeleton, the unique nodes of each of the two sets of dangerous subsequences are appended to the corresponding positions on the skeleton to form a generalized dangerous subsequence, which replaces the original two sets of dangerous subsequences. The above pairwise comparison and merging / replacement process is repeated until there are no longer any mergeable longest common node sequences between any remaining two sets of dangerous subsequences. The final retained generalized dangerous subsequences constitute the dangerous evolution path set.
[0046] This invention uses two dimensions—equipment state coupling density and operational logic integrity—as judgment criteria. High coupling density indicates physical-level linkage anomalies among multiple equipment parameters, while operational logic breaks or omissions indicate that operators failed to respond completely to such anomalies. Both conditions being met simultaneously constitute sufficient conditions for triggering accident consequences. This judgment logic directly targets the physical causal mechanism of accidents, rather than statistical co-occurrence probabilities, enabling the accurate identification and retention of low-frequency but highly causal key node combinations. In the generalization and merging stage, the longest common node sequence comparison method is used to merge paths with similar evolutionary structures in different accident cases. During merging, only the common node sequence is used as the skeleton, while unique nodes are retained as branches. This eliminates path fragmentation caused by accidental factors such as sensor sampling differences and inconsistent recording granularity, while avoiding the smoothing out of structural differences with independent causal significance due to forced merging. For the final solution, the set of hazard evolution paths is the core source of content for constructing a safety knowledge graph. Its quality directly determines the causal completeness and physical interpretability of the hazard-side paths in the graph. Only by establishing causal criteria in the key node identification stage and retaining structural differences in the generalization and merging stage can the trajectory index graph and negative sample comparison path library constructed subsequently truly reflect the dynamic evolution law of accidents from quantitative to qualitative change.
[0047] In another preferred embodiment of the present invention, the specific construction process of the negative sample comparison path library in step S3 is as follows: Extract the entire state transition sequence from historical normal operation logs. Historical normal operation logs refer to the state parameter trajectories and operation command sequences automatically recorded by the control system during normal production operation periods when no accidents or abnormal events occurred, originating from the same or similar production unit as the abnormal operation logs. Using the first subsequence of each generalized hazard subsequence as the initial matching template, extract the entire state transition sequence whose prefix matches the initial matching template and has no accident annotation field, as candidate negative sample paths. The initial matching template is the first-ranked subsequence in the generalized hazard subsequences; it represents the initial stage of the hazard evolution path. For example, the first subsequence of a generalized hazard subsequence may contain the node combination "strong coupling of temperature rise and pressure rise, operator non-response." Search the entire state transition sequence in the normal operation logs. If the beginning of a normal operation sequence also contains the same subsequence structure as "strong coupling of temperature rise and pressure rise, operator non-response," then the prefix of this sequence matches the initial matching template, indicating that this normal operation sequence shares the same pre-accident initial evolution process with the hazard evolution path. The "no accident label" field indicates that the operation record corresponding to this sequence has not been marked as an accident or abnormal event by the system, confirming that it falls within the scope of safe operation. The entire state transition sequence that meets both of the above conditions is extracted as a candidate negative sample path.
[0048] Identify subsequences in candidate negative sample paths that exhibit broken operation dependency chains or missing operation concurrency groups. A broken operation dependency chain refers to a situation where, although there is a prerequisite dependency between adjacent operation event nodes in the candidate path, the subsequent operation is not triggered within the specified time window. A missing operation concurrency group refers to a situation where one or more of the multiple operation instructions that should be executed synchronously within a time window are missing in the candidate path. Subsequences with broken chains or missing operation concurrency groups are identified as intervention-recovery subsequences. Physically, a broken operation dependency chain or missing operation concurrency group signifies that the original operational logic flow has been disrupted. This disruption is inevitably caused by external intervention, such as an operator discovering an abnormal trend and taking corrective measures, or an automatic protection system triggering interlocking actions to replace the original operational logic. Regardless of whether the intervention originates from humans or the system, the appearance of an intervention-recovery subsequence indicates that the subsequent evolution of the path is no longer a result of natural development but a product of external corrective forces. The segment from the first appearance of the intervention-recovery subsequence to the end of the candidate negative sample path is truncated, and the remaining segment is designated as a safety differentiation branch. The logic behind the truncation is that the path segment after intervention cannot represent the inherent safety characteristics of the system. Including it in the safety benchmark would incorrectly attribute the protective effect of external intervention to the inherent safety attributes of the path itself. The retained initial path is the path that naturally evolved to the intervention point without human correction or system protection intervention and has not yet resulted in an incident. The reason it has not evolved into an incident is that the path's own state evolution direction and operational execution logic possess inherent safety, rather than relying on external forces to forcibly correct it. Therefore, it belongs to a truly safe path.
[0049] In each safe differentiation branch, segments whose node sequences are identical to the corresponding generalized hazardous subsequence but whose node sequences differ after the bifurcation point are designated as safe differentiation segments. A bifurcation point is the node position where the safe differentiation branch and the generalized hazardous subsequence first differ in their node sequences; before this node, their node sequences are completely identical, and from this node onward, they diverge. Safe differentiation segments and their corresponding generalized hazardous subsequences form safe-hazard control pairs. All safe-hazard control pairs are collected to form a negative sample comparison path library.
[0050] In another preferred embodiment of the present invention, the specific construction process of the trajectory index map in step S4 is as follows: Discretized symbol encoding is performed on each generalized dangerous subsequence in the dangerous evolution path set, mapping the state event type and operation event type of each node to state symbols and operation symbols, and arranging them in node order to form dangerous path symbol strings. Discretized symbol encoding is performed on each safe differentiation branch in the negative sample comparison path library, mapping the state event type and operation event type of each node to state symbols and operation symbols, and arranging them in node order to form safe path symbol strings. Symbol strings with the same prefix in dangerous path symbol strings and safe path symbol strings are grouped into homologous path groups, with dangerous path symbol strings as the backbone and safe path symbol strings as branches. At the bifurcation nodes, safe path symbol strings are attached to dangerous path symbol strings to form trajectory index branches. The segments extending from the bifurcation nodes along the direction of safe path symbol strings in the trajectory index branches are marked as safe differentiation branches, and the segments extending along the direction of dangerous path symbol strings are marked as dangerous state subsequences. The trajectory index branches, safe differentiation branches, and dangerous state subsequences constitute the trajectory index map.
[0051] In another preferred embodiment of the present invention, the specific process of generating the security knowledge graph in step S5 is as follows: For each bifurcation node in the trajectory index map, extract the equipment state parameter records and environmental coupling parameter records of each sample in the safety differentiation branch and dangerous state subsequence corresponding to the bifurcation node. Calculate the deviation of each environmental coupling parameter value under the same equipment state to form an environmental parameter deviation set. Use kernel density estimation to fit the deviation distribution to obtain the deviation probability density distribution of each environmental coupling parameter. Divide the value interval of each environmental coupling parameter into several segments according to a preset segmentation step size. Calculate the conditional probability that the environmental coupling parameter deviation in each segment exceeds a preset danger threshold based on the deviation probability density distribution. Use the conditional probability as a misjudgment probability calibration value and attach it to the corresponding bifurcation node. Traverse all bifurcation nodes to complete the attachment to obtain the safety knowledge graph.
[0052] In another preferred embodiment of the present invention, the specific construction process of the knowledge base storage structure in step S6 is as follows: Extract the hazardous state subsequences and safe differentiation branches from each trajectory index branch, concatenate the symbol sequences of the hazardous state subsequences and safe differentiation branches of the same branch into trajectory index entries and assign entry identifiers; extract the state symbols and operation symbols from each trajectory index entry, and establish an inverted mapping of each state symbol and operation symbol pointing to the trajectory index entry; store the misjudgment probability calibration value attached to the bifurcation node as auxiliary calibration information associated with the entry identifier; construct a three-level inverted trajectory index storage structure with the inverted mapping as the first-level index, the trajectory index entries as the second-level index, and the auxiliary calibration information as the third-level storage unit.
[0053] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the claims of this invention should still fall within the patent coverage of this invention.
Claims
1. A method for constructing a safety knowledge base for industrial production supervision, characterized in that, Includes the following steps: S1: Extract the equipment status change trend sequence and operation action time sequence from historical accident reports and abnormal operation logs, align them according to time sequence to generate a state transition node chain, and form a dangerous operation sequence feature library; S2: Subsequence segmentation is performed on each state transition node chain in the hazardous operation sequence feature library. The equipment state coupling pattern and operation action execution logic in each subsequence are extracted. The key node combination that triggers the accident consequences is identified and generalized and merged to generate a set of hazardous evolution paths. S3: Extract the entire state transition sequence from the historical normal operation log that matches the prefix of the starting subsequence of the dangerous evolution path, and extract those that did not lead to accident consequences as negative sample paths to form a negative sample comparison path library; S4: Discretize and symbolically encode the dangerous evolution path and the negative sample comparison path, generalize and merge the homologous paths, and generate a trajectory index map composed of dangerous state subsequences and safe differentiation branches; S5: Extract the deviation distribution of device status parameters and environmental coupling parameters of the negative sample path corresponding to each node in the trajectory index map, determine the confidence correction coefficient corresponding to the value range of each environmental coupling parameter and attach it to the node to generate a safety knowledge graph; S6: Build an inverted trajectory index for each trajectory index entry in the security knowledge graph, and build a knowledge base storage structure based on the inverted trajectory index.
2. The method for constructing a safety knowledge base for industrial production supervision according to claim 1, characterized in that, In S1, the specific construction process of the dangerous operation sequence feature library is as follows: The equipment status change trend and operation actions are extracted from the accident report to form the first status trend sequence and the first action sequence; the equipment status parameter trajectory and operation command trigger record are extracted from the abnormal operation log to form the second status trend sequence and the second action sequence. Each element in the state trend sequence and operation action sequence is converted into a state event node and an operation event node, respectively, and a time sequence label is added to each node; Pair state event nodes and operation event nodes that satisfy the sequential, overlapping or inclusion relationship of timing tags into alignment units, and connect them in sequence according to the timing tag order to form a state transition node chain. The alignment confidence is calculated by weighting the ratio of the number of incident reporting nodes to the number of log nodes in the chain, the ratio of the number of precise timestamp nodes, and the number of time-series conflicts between adjacent alignment units. The collection of state transition node chains exceeding a preset threshold constitutes a dangerous operation sequence feature library.
3. The method for constructing a safety knowledge base for industrial production supervision according to claim 1, characterized in that, In step S2, the specific process of extracting the device state coupling pattern and operation action execution logic from each sub-sequence is as follows: For each state transition node chain in the dangerous operation sequence feature library, identify the change points of the equipment state trend in the chain, and cut the chain into sub-sequences with the change points as boundaries; extract the change direction and change rate of the state event nodes in the sub-sequences, pair nodes with the same change direction and rate ratio falling into the preset strong coupling interval as strong coupling node pairs, and pair nodes with opposite change directions and rate ratio falling into the preset mutual inverse coupling interval as mutual inverse coupling node pairs, and construct the equipment state coupling pattern from the strong coupling node pairs and mutual inverse coupling node pairs; Extract operation event nodes from the subsequence, mark them in chronological order, connect adjacent nodes with trigger intervals less than a preset dependency threshold and trigger condition reference relationships to form an operation dependency chain, and group nodes with trigger intervals less than a preset concurrency threshold and no trigger condition reference relationships into an operation concurrency group. The operation action execution logic is constructed by the operation dependency chain and the operation concurrency group.
4. The method for constructing a safety knowledge base for industrial production supervision according to claim 1, characterized in that, In S2, the specific process for generating the set of dangerous evolution paths is as follows: Strongly coupled and mutually inversely coupled node pairs are extracted from each subsequence. Operation dependency chains and operation concurrency groups are extracted. Strongly coupled node pairs are associated with the overlapping parts of the temporal markers in the operation dependency chains or operation concurrency groups. Mutually inversely coupled node pairs are associated with the overlapping parts of the temporal markers in the operation dependency chains or operation concurrency groups to form coupling-operation association groups. Coupled-operation association groups with more than a preset coupling density threshold and with broken operation dependency chains or missing operation concurrency groups are marked as key node combinations. Subsequences marked with key node combinations are arranged according to their original temporal order to form a dangerous subsequence set for the state transition node chain. Dangerous subsequence sets of different state transition node chains are compared pairwise. Two dangerous subsequence sets with the longest common node sequence are extracted, merged into a generalized dangerous subsequence, and replaced with the original two sets. The comparison and merging are repeated until no more can be merged to obtain a dangerous evolution path set.
5. The method for constructing a safety knowledge base for industrial production supervision according to claim 1, characterized in that, In S3, the specific construction process of the negative sample comparison path library is as follows: Using the first subsequence of each generalized hazardous subsequence as the starting matching template, extract the full state transition sequence with prefix matching and no accident label as candidate negative sample path; identify subsequences in the candidate negative sample path that have broken operation dependency chain or missing operation concurrency group, determine them as intervention recovery subsequence, cut off the segment from the first appearance of intervention recovery subsequence to the end, and retain the first segment as safety differentiation branch; The segment in the safe differentiation branch that is consistent with the node sequence of the corresponding generalized dangerous subsequence but different from the node sequence after the bifurcation point is the safe differentiation segment. The safe differentiation segment and the corresponding generalized dangerous subsequence form a safe-danger control pair, which are then collected to form a negative sample comparison path library.
6. The method for constructing a safety knowledge base for industrial production supervision according to claim 1, characterized in that, In S4, the specific construction process of the trajectory index map is as follows: Discretized symbol encoding is performed on each generalized dangerous subsequence in the dangerous evolution path set, mapping the state event type and operation event type of each node to state symbols and operation symbols, and arranging them in node order to form dangerous path symbol strings; discretized symbol encoding is performed on each safe differentiation branch in the negative sample comparison path library, mapping the state event type and operation event type of each node to state symbols and operation symbols, and arranging them in node order to form safe path symbol strings; symbol strings with the same prefix in dangerous path symbol strings and safe path symbol strings are grouped into homologous path groups, with dangerous path symbol strings as the backbone and safe path symbol strings as branches, and at the bifurcation nodes, safe path symbol strings are attached to dangerous path symbol strings to form trajectory index branches; The segments extending along the safe path symbol string from the bifurcation node in the trajectory index branch are marked as safe differentiation branches, and the segments extending along the dangerous path symbol string are marked as dangerous state subsequences; the trajectory index map is composed of trajectory index branches, safe differentiation branches, and dangerous state subsequences.
7. The method for constructing a safety knowledge base for industrial production supervision according to claim 1, characterized in that, In S5, the specific process for generating the security knowledge graph is as follows: For each bifurcation node in the trajectory index map, extract the equipment state parameter records and environmental coupling parameter records of each sample in the safety differentiation branch and dangerous state subsequence corresponding to the bifurcation node. Calculate the deviation of each environmental coupling parameter value under the same equipment state to form an environmental parameter deviation set. Use kernel density estimation to fit the deviation distribution to obtain the deviation probability density distribution of each environmental coupling parameter. Divide the value interval of each environmental coupling parameter into several segments according to a preset segmentation step size. Calculate the conditional probability that the environmental coupling parameter deviation in each segment exceeds a preset danger threshold based on the deviation probability density distribution. Use the conditional probability as a misjudgment probability calibration value and attach it to the corresponding bifurcation node. Traverse all bifurcation nodes to complete the attachment to obtain the safety knowledge graph.
8. The method for constructing a safety knowledge base for industrial production supervision according to claim 1, characterized in that, In step S6, the specific construction process of the knowledge base storage structure is as follows: Extract the hazardous state subsequences and safe differentiation branches from each trajectory index branch, concatenate the symbol sequences of the hazardous state subsequences and safe differentiation branches of the same branch into trajectory index entries and assign entry identifiers; extract the state symbols and operation symbols from each trajectory index entry, and establish an inverted mapping of each state symbol and operation symbol pointing to the trajectory index entry; store the misjudgment probability calibration value attached to the bifurcation node as auxiliary calibration information associated with the entry identifier; construct a three-level inverted trajectory index storage structure with the inverted mapping as the first-level index, the trajectory index entries as the second-level index, and the auxiliary calibration information as the third-level storage unit.