Hidden danger accident correlation degree evaluation method based on intermediate index
Through an intermediate index-based method, combined with accident tree analysis and deep learning technology, a hidden danger text tree is constructed and an index sequence is generated, which solves the problem of insufficient accuracy of the correlation evaluation of hidden danger accidents in the existing technology, and achieves efficient correlation evaluation of hidden danger accidents and risk identification.
Patent Information
- Application Number
- CN202411733365.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-21
AI Technical Summary
The existing technology lacks an effective correlation weight evaluation mechanism in the assessment of the correlation degree of hidden dangers and accidents, and it is difficult to effectively manage and analyze in large-scale accident databases and hidden danger databases, resulting in low evaluation accuracy.
The intermediate index-based method is used to build an accident database through accident tree analysis, and the BERT model is used to extract the sentence vector of hidden danger description, build a hidden danger text tree, and use transformer generation model to generate a hidden danger index sequence, calculate the similarity between hidden dangers and accidents, and finally evaluate the correlation between hidden dangers and accidents.
It realizes in-depth semantic analysis of hidden danger text and accurate assessment of the correlation between hidden dangers and accidents, improves the accuracy and efficiency of assessment, can efficiently identify high-risk hidden dangers, and improves the accuracy and efficiency of accident prevention and hidden danger management.
Smart Images

Figure CN119670870A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of safety management and accident prevention, and in particular relates to a method for evaluating the correlation between hidden dangers and accidents based on intermediate indexes. Background Art
[0002] In the prior art, the correlation assessment methods of hidden dangers and accidents usually rely on expert experience or simple statistical analysis to determine the correlation between hidden dangers and accidents. These traditional methods have certain limitations and are difficult to systematically process complex hidden danger and accident data, especially in the case of large-scale hidden danger or accident databases. It is difficult to effectively mine and quantify the complex relationship between hidden dangers and accidents. In addition, existing methods often lack deep semantic understanding and analysis of hidden danger texts, and cannot accurately capture the subtle differences in hidden danger descriptions, resulting in low accuracy in hidden danger correlation assessment.
[0003] Some existing technologies attempt to use accident tree analysis to analyze the causes of accidents and their associated hazards, but such methods can only assign weights to hazards in specific accident trees, and it is difficult to find the correlation between hazards and accidents in a wider range of hazard data. In addition, when processing hazard text, existing clustering algorithms often rely on manually set features or simple text matching methods, which cannot fully utilize the semantic information in hazard descriptions, resulting in insufficient accuracy in clustering and similarity calculation of hazard text.
[0004] Therefore, the existing technology still faces the following major problems in the evaluation of the correlation between hidden dangers and accidents: 1) Lack of effective evaluation mechanism for the correlation weight between hidden dangers and accidents; 2) Insufficient management and analysis capabilities for large-scale accident and hidden danger databases, and inability to provide accurate hidden danger correlation level assessment. In view of the above problems, a new method based on deep learning and natural language processing technology is urgently needed, which can effectively construct a hidden danger text tree model and calculate the hidden danger similarity through the generation model, so as to more accurately evaluate the correlation between hidden dangers and accidents. Summary of the invention
[0005] In view of the shortcomings existing in the related technologies, the present invention provides a hidden danger accident correlation assessment method based on intermediate index, which realizes the deep semantic analysis of hidden danger text and the accurate assessment of hidden danger accident correlation, and solves the problem of insufficient accuracy of existing assessment methods.
[0006] In a possible implementation, a method for assessing the correlation between hidden dangers and accidents based on an intermediate index is provided, comprising the following steps:
[0007] S10, accident database construction: collect accident cases, use accident tree analysis method to identify the direct and indirect causes of each accident case, analyze the relationship between the hidden dangers in the accident tree and the accident results, determine the accident weight for each hidden danger, integrate all the hidden dangers in the accident tree and their corresponding weights, and build an accident database;
[0008] S20, hidden danger text sentence vector extraction: perform text preprocessing on the hidden danger description, and use the pre-trained BERT model to extract the sentence vector of each hidden danger description;
[0009] S30, hidden danger text tree construction: establish hidden danger text trees level by level, perform k-means clustering, group hidden danger descriptions by similarity, construct a hierarchical hidden danger text tree, and generate a hidden danger text-index sequence data set;
[0010] S40, constructing and training a hidden danger index sequence generation model: Selecting a transformer generative model framework to construct a hidden danger index sequence generation model, using the prepared data set to train the model, and predicting its index sequence in the hidden danger text tree based on the semantic information of the hidden danger text;
[0011] S50, hidden danger similarity calculation: input the preprocessed hidden danger text into the trained generative model, generate a corresponding index sequence, locate the corresponding hidden danger node in the hidden danger text tree according to the index sequence, and calculate the text similarity with the accident hidden danger;
[0012] S60. Assessment of the correlation between hidden dangers and accidents: Based on the similarity between the current hidden dangers and the hidden dangers in the accident database and their corresponding accident weights, calculate the correlation weight of the current hidden danger leading to the accident and assess its correlation level.
[0013] In a possible implementation, in S20, text preprocessing is performed on the hidden danger description, including removing stop words and punctuation marks, and performing stem extraction and word form restoration;
[0014] Hidden danger text sentence vector extraction also includes: using the pre-trained BERT model to extract the sentence vector of each hidden danger description to capture the deep semantic information in the text.
[0015] In a possible implementation, in S30, the hidden danger text tree is constructed, including:
[0016] According to the set N nodes per level, where N is 20, and each node contains at most M hidden danger rules, where M is 50, k-means clustering is performed on the hidden danger descriptions;
[0017] If the number of hidden dangers in a cluster exceeds M, the cluster will continue to be divided into N sub-clusters, each of which contains at most M hidden dangers, until all clusters have less than M hidden dangers.
[0018] In a possible implementation, in S50, calculating the text similarity with the potential accident hazard includes: calculating the distance between the current potential accident node and the potential accident hazard node closest to the potential accident hazard text tree, and then calculating the similarity according to the inverse of the distance between the two nodes' closest ancestor nodes.
[0019] In a possible implementation, in S50,
[0020] Use the LCA algorithm to find the depth of two leaf nodes u and v and their nearest common ancestor w;
[0021] Use the following formula to calculate the nearest ancestor node distance between two nodes:
[0022] Distance(u,v)=Depth(u)+Depth(v)-2×Depth(w), the reciprocal is the similarity;
[0023] Depth(u) and Depth(v) represent the depth of nodes u and v in the tree respectively, and Depth(w) represents the depth of the most recent common ancestor w;
[0024] The smaller the distance Distance(u, v), the higher the similarity.
[0025] In a possible implementation, in S10, in the construction of the accident database, accident cases are collected from safety accident reports, industry databases, and accident data released by the government.
[0026] In a possible implementation, in S10, a database is constructed including the description and weight of each hidden danger, as well as the relationship between hidden dangers and their connection with accident results:
[0027]
[0028] Among them, d(t) is the depth of the hidden danger in the fault tree, D max The maximum depth of the fault tree, f(d i ,t)The weight of hidden dangers in the accident tree.
[0029] Based on the above technical scheme, the method for assessing the correlation between hidden dangers and accidents based on intermediate indexes of the present invention solves the problem of assessing the correlation between hidden dangers and accidents through the following steps: First, by collecting accident cases and using the accident tree analysis method to identify the direct and indirect causes of the accident, an accident library containing hidden dangers and their weights is constructed; then, the BERT model is used to process the hidden danger description text, extract deep semantic information, and construct a hierarchical hidden danger text tree through k-means clustering to generate a hidden danger index sequence; on this basis, the transformer generation model is used to predict the index position of the hidden danger in the text tree, and the similarity between the current hidden danger and the hidden danger in the accident library is calculated; finally, the similarity of the hidden danger and the hidden danger weight in the accident library is combined to calculate the correlation between the current hidden danger and the accident, and the risk is assessed according to the correlation level. The present invention provides a systematic and structured hidden danger correlation assessment method, which can effectively solve the problem of the difficulty of assessing the correlation between hidden dangers and accidents, and improve the accuracy and efficiency of accident prevention and hidden danger management. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0031] Figure 1 A flowchart of a method for assessing the correlation between hidden dangers and accidents based on intermediate indexes according to an implementation method;
[0032] Figure 2 It is a clustering retrieval tree based on hidden danger text;
[0033] Figure 3 It is a method for partitioning accident nodes in cluster retrieval tree. DETAILED DESCRIPTION
[0034] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0035] In the description of the present invention, it should be understood that the terms "center", "lateral", "longitudinal", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.
[0036] The terms "first", "second", and "third" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Thus, a feature defined as "first", "second", and "third" may explicitly or implicitly include one or more of the features.
[0037] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a direct connection, or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0038] In order to achieve the deep semantic analysis of hidden danger text and the accurate assessment of hidden danger accident relevance, the problem of insufficient accuracy of existing assessment methods is solved. On the one hand, the present application provides a hidden danger accident relevance assessment method based on intermediate index.
[0039] See also Figure 1 In a possible implementation, a method for assessing the correlation between hidden dangers and accidents based on an intermediate index is provided, comprising the following steps:
[0040] S10, accident database construction: collect accident cases, use accident tree analysis method to identify the direct and indirect causes of each accident case, analyze the relationship between the hidden dangers in the accident tree and the accident results, determine the accident weight for each hidden danger, integrate all the hidden dangers in the accident tree and their corresponding weights, and build an accident database;
[0041] S20, hidden danger text sentence vector extraction: perform text preprocessing on the hidden danger description, and use the pre-trained BERT model to extract the sentence vector of each hidden danger description;
[0042] S30, hidden danger text tree construction: establish hidden danger text trees level by level, perform k-means clustering, group hidden danger descriptions by similarity, construct a hierarchical hidden danger text tree, and generate a hidden danger text-index sequence data set;
[0043] S40, constructing and training a hidden danger index sequence generation model: Selecting a transformer generative model framework to construct a hidden danger index sequence generation model, using the prepared data set to train the model, and predicting its index sequence in the hidden danger text tree based on the semantic information of the hidden danger text;
[0044] S50, hidden danger similarity calculation: input the preprocessed hidden danger text into the trained generative model, generate a corresponding index sequence, locate the corresponding hidden danger node in the hidden danger text tree according to the index sequence, and calculate the text similarity with the accident hidden danger;
[0045] S60. Assessment of the correlation between hidden dangers and accidents: Based on the similarity between the current hidden dangers and the hidden dangers in the accident database and their corresponding accident weights, calculate the correlation weight of the current hidden danger leading to the accident and assess its correlation level.
[0046] Direct causes are factors that directly lead to accidents, usually manifested as unsafe behaviors of people (such as operating errors, violations of safety regulations) or unsafe conditions of things (such as equipment failures, defects). These causes are obvious and immediate causes when accidents occur.
[0047] Indirect causes are those factors that do not directly cause the accident but influence its occurrence through deeper mechanisms. These are usually related to personal factors or work-related management deficiencies. Indirect causes are the root causes of the accident.
[0048] Before an accident occurs, these hidden dangers are only potential accident risks. When an accident actually occurs, these hidden dangers become the cause of the accident, that is, the factors that directly or indirectly lead to the accident; hidden dangers are essentially the causes that have not occurred, and once an accident occurs, they are regarded as the actual causes of the accident.
[0049] In the above scheme, accident tree analysis and deep learning methods based on text processing are used to comprehensively analyze accident hazards. The construction of the accident database ensures that each hazard has a clear weight, and the correlation with the accident results is accurately calculated. The hazard text tree provides a structured framework for hazard similarity analysis. With the help of the conversion model / BERT model represented by the bidirectional encoder and the converter generation model
[0050] / transformer generation model, the text information of hidden danger description is converted into index sequence, so as to achieve accurate hidden danger similarity calculation and association evaluation.
[0051] Through this intermediate index-based hidden danger accident correlation assessment method, hidden dangers with a high correlation with accident results can be efficiently discovered from a large number of accident hidden dangers, thereby improving the accuracy of hidden danger identification; at the same time, processing technology based on text deep semantic information can improve the clustering effect of hidden danger text, making the correlation assessment of similar hidden dangers more reliable.
[0052] In a possible implementation, in S20, text preprocessing is performed on the hidden danger description, including removing stop words and punctuation marks, and performing stem extraction and word form restoration;
[0053] Hidden danger text sentence vector extraction also includes: using the pre-trained BERT model to extract the sentence vector of each hidden danger description to capture the deep semantic information in the text.
[0054] The purpose of text preprocessing is to simplify redundant information in the text so that key semantic features can be retained and used for subsequent sentence vector extraction; the BERT model can capture contextual information in the text, generate high-quality sentence vectors, and improve the semantic similarity analysis effect of hidden danger descriptions.
[0055] Through efficient text preprocessing and deep semantic extraction of the BERT model, this method can more accurately understand the key content in the hidden danger description, thereby improving the accuracy of hidden danger similarity calculation and the accuracy of accident correlation assessment.
[0056] In a possible implementation, in S30, the hidden danger text tree is constructed, including:
[0057] According to the set N nodes per level, where N is 20, and each node contains at most M hidden danger rules, where M is 50, k-means clustering is performed on the hidden danger descriptions;
[0058] If the number of hidden dangers in a cluster exceeds M, the cluster will continue to be divided into N sub-clusters, each of which contains at most M hidden dangers, until all clusters have less than M hidden dangers.
[0059] See also Figure 2 , N=3, M=20.
[0060] The purpose of the patent is to establish an effective quantitative model to evaluate the correlation between a small number of accident hazards and daily hazards, especially the proportion of accident hazards in accidents, and then deduce the potential impact of daily hazards in accidents. This quantitative relationship can be achieved through a tree structure and hazard similarity calculation.
[0061] Non-leaf nodes are mainly used as the middle level of the classification structure to organize the hierarchical relationship of leaf nodes. They do not contain hidden danger text data and are responsible for clustering and grouping hidden dangers.
[0062] The leaf node contains 1 to M hidden danger texts, which are the most semantically similar hidden danger sets after cluster analysis. The core function of the leaf node is to carry specific hidden danger descriptions.
[0063] If the hidden danger text in the leaf node has caused an accident, the leaf node is marked as an accident hidden danger node. All hidden dangers in the node are regarded as hidden dangers with potential accident risks.
[0064] If a leaf node does not contain any accident hazard text, the node is a non-accident hazard node, which means that these hazards have not led to any known accidents, but still need to be monitored.
[0065] By setting the number of nodes at each level and the maximum number of hidden dangers, the K-means clustering algorithm / k-means clustering process can effectively group the hidden danger descriptions according to similarity to form a hierarchical hidden danger text tree; the clustering method ensures the rationality and controllability of the tree structure through multiple iterative grouping.
[0066] When the hidden danger text data is large in scale, this method can form a hidden danger text tree with a hierarchical structure through clustering and grouping, which is convenient for subsequent similarity calculation and hidden danger correlation evaluation.
[0067] In a possible implementation, in S50, calculating the text similarity with the potential accident hazard includes: calculating the distance between the current potential accident node and the potential accident hazard node closest to the potential accident hazard text tree, and then calculating the similarity according to the inverse of the distance between the two nodes' closest ancestor nodes.
[0068] This similarity calculation method is based on the distance relationship between nodes in the hidden danger text tree; through the nearest common ancestor algorithm, the relative distance between two hidden danger nodes in the tree structure can be quickly located. The closer the distance, the higher the similarity.
[0069] Through this method, the similarity between hidden danger texts can be evaluated efficiently and accurately, thus providing reliable data support for the evaluation of the correlation between hidden dangers and accidents.
[0070] In a possible implementation, in S50,
[0071] Use the LCA algorithm to find the depth of two leaf nodes u and v and their nearest common ancestor w;
[0072] Use the following formula to calculate the nearest ancestor node distance between two nodes:
[0073] Distance(u,v)=Depth(u)+Depth(v)-2×Depth(w), the reciprocal is the similarity;
[0074] Depth(u) and Depth(v) represent the depth of nodes u and v in the tree respectively, and Depth(w) represents the depth of the most recent common ancestor w;
[0075] The smaller the distance Distance(u, v), the higher the similarity.
[0076] The LCA algorithm determines the relative distance between potential danger nodes u and v by calculating the depth relationship of nodes in the tree, and calculates the potential danger similarity based on the distance; the smaller the distance, the higher the similarity between the two potential danger nodes.
[0077] Leaf nodes are terminal nodes in the tree structure that have no child nodes or lower-level nodes. These nodes exist at any level of the tree structure, and each leaf node contains 1 to M pieces of hidden danger text data.
[0078] These leaf nodes represent the most semantically relevant set of hidden danger descriptions, that is, the data in each leaf node are hidden dangers with high similarity or correlation in the hidden danger descriptions.
[0079] The model determines the correlation and similarity between different hidden dangers by calculating the distance between two leaf nodes. The shorter the distance, the higher the semantic similarity between the two hidden dangers. The distance can be calculated based on the node depth in the tree structure and the path length between them.
[0080] The Latest Common Ancestor Algorithm (LCA) can be used to find the nearest common ancestor node of two leaf nodes, and the distance between the two leaf nodes is determined by the depth of this common ancestor node.
[0081] When a user inputs a specific hidden danger text, the model will first find the leaf node that best matches the text in the hidden danger text tree. This is achieved through semantic analysis and clustering algorithms to ensure that the hidden dangers entered by the user can be classified into the correct node.
[0082] Next, the model will search the tree structure for the potential accident node closest to the leaf node, that is, the node that caused the accident.
[0083] By calculating the distance between the leaf node where the input hidden danger is located and the accident hidden danger node, the model obtains the similarity between the two. The similarity is calculated by the inverse of the distance. The shorter the distance, the stronger the correlation between the two.
[0084] The hidden danger similarity is calculated based on the relative distance between leaf nodes. Therefore, the closer the input hidden danger text is to a certain accident hidden danger node, the more similar the hidden danger is to the accident hidden danger in semantics.
[0085] Through this similarity calculation, the system can help users quickly evaluate the degree of correlation between input hidden dangers and known accident hazards, thereby providing early warnings and helping users take corresponding preventive measures.
[0086] Through semantic analysis and tree structure, the model can quickly match the hidden danger text input by the user, and evaluate its similarity with the accident hidden danger through distance calculation.
[0087] The correlation between hidden dangers and accident hazards no longer relies on subjective judgment, but is evaluated through quantitative distance calculation, providing data support and scientific basis for the company's risk management.
[0088] In the tree structure, leaf nodes can exist at any level without being restricted by the hierarchy, providing a more flexible hidden danger classification method that is suitable for the management of large-scale hidden danger data sets.
[0089] This method can accurately capture the distance information of hidden danger nodes in the tree structure, making the similarity calculation more accurate and providing more reliable similarity data for the hidden danger accident correlation assessment.
[0090] By calculating the similarity and accident weight, the correlation between hidden dangers and historical accidents can be quantified to obtain a specific "correlation weight", that is, to assess how likely the current hidden dangers are to lead to accidents and help managers identify high-risk hidden dangers.
[0091] In a possible implementation, in S10, in the construction of the accident database, accident cases are collected from safety accident reports, industry databases, and accident data released by the government.
[0092] In a possible implementation, in S10, a database is constructed including the description and weight of each hidden danger, as well as the relationship between hidden dangers and their connection with accident results:
[0093]
[0094] Among them, d(t) is the depth of the hidden danger in the fault tree, D max The maximum depth of the fault tree, f(d i ,t)The weight of hidden dangers in the accident tree.
[0095] It means to sum up n hidden dangers, that is, calculate all the hidden dangers related to the accident one by one and add up their weights;
[0096] d(t): represents the depth of the hidden danger in the accident tree, that is, the level of hidden danger t in the accident tree relative to the root node; the greater the depth, the farther the hidden danger is from the accident result;
[0097] D max: Indicates the maximum depth of the accident tree, representing the level of the deepest node in the tree; it is the reference standard of the entire accident tree, used to regulate the depth of different hidden dangers;
[0098] It is a normalized weight adjustment coefficient, which is used to reflect the adjustment of the impact of the depth of the hidden danger on its impact. The shallower the depth of the hidden danger from the root node (accident occurrence), that is, the smaller d(t), the closer this coefficient is to 1, indicating that the hidden danger has a greater impact on the accident. On the contrary, the deeper the hidden danger is, the closer the coefficient is to 0, indicating that it has a smaller impact on the accident.
[0099] f(d i ,t): represents the weight of hidden danger t in the accident tree; this weight can be calculated through expert experience or algorithm, reflecting the importance of the hidden danger in causing the accident.
[0100] The purpose of the formula is to consider the depth of the hidden danger d(t) and its weight f(d i ,t), calculate the overall impact of hidden dangers associated with a certain accident; the closer the hidden danger is to the accident (the shallower the depth), the greater its contribution to the accident. By normalizing the depth d(t),, the impact of different hidden dangers is adjusted.
[0101] This formula quantifies the impact of hidden dangers on accidents by considering their depth in the accident tree and their corresponding weights. The greater the depth, the smaller the impact of the hidden danger on the accident outcome may be. By summing up the calculation, the total impact weight of all hidden dangers can be quantified.
[0102] This formula provides a mathematical model for the correlation between hidden dangers and accident outcomes. By introducing hidden danger depth and weight, the contribution of each hidden danger to the accident outcome can be evaluated more scientifically.
[0103] Based on the calculated relevance weight, each hidden danger can be assigned a relevance level (such as high, medium, and low). These levels can help enterprises and safety managers make quick decisions, concentrate resources to prioritize high-risk hidden dangers, and avoid accidents.
[0104] As an embodiment of the present invention, a method for assessing the correlation between hidden dangers and accidents based on intermediate indexes is specifically described as follows:
[0105] This embodiment proposes a method for evaluating the correlation between hidden dangers and accidents by combining fault tree analysis (FTA) and natural language processing (NLP) technology. This method attempts to overcome the problem that the number of hidden dangers in traditional fault tree analysis is limited and the potential impact of daily hidden dangers on accidents cannot be accurately evaluated.
[0106] The main steps of technical implementation include:
[0107] 1) Construction of accident database;
[0108] 2) Extraction of hidden danger text sentence vectors;
[0109] 3) Construction of hidden danger text tree;
[0110] 4) Hidden danger index sequence generation model;
[0111] 5) Hidden danger similarity calculation;
[0112] 6) Assessment of the correlation between hidden dangers and accidents.
[0113] The description of each step is as follows:
[0114] 1. Construction of accident database
[0115] 1. Accident data collection: First, a large number of accident cases need to be collected from various sources (such as safety accident reports, industry databases, etc.).
[0116] 2. Accident tree analysis: For each accident case collected, the accident tree analysis method is used to identify the direct and indirect causes of the accident.
[0117] 3. Determination of hidden danger-accident weight: By analyzing the relationship between hidden dangers and accident results in the accident tree, an accident weight is determined for each hidden danger. The determination of the weight usually needs to be based on the frequency and severity of the accident and the experience and judgment of experts.
[0118] That is, first, provide text data on specific hidden dangers that led to the accident;
[0119] Then, the weight ratio of the specific hidden danger text that caused the accident in the accident is provided.
[0120] 4. Database construction: Integrate all the hidden dangers and their corresponding weights in the accident tree to build an accident database. This database not only contains the description and weight of each hidden danger, but also saves the relationship between the hidden dangers and their connection with the accident results.
[0121]
[0122] d(t) is the depth of the hidden danger in the fault tree, D max The maximum depth of the fault tree, f(d i ,t) the weight of hidden danger in the accident tree; f(d i ,t) has different calculation methods, which can be determined by expert experience or calculated by algorithms.
[0123] 2. Hidden danger text sentence vector extraction
[0124] 1. Text preprocessing: Before extracting sentence vectors, the hidden danger description needs to be preprocessed. This includes removing stop words and punctuation marks, performing stemming or word form restoration, and other text cleaning work. The purpose of text preprocessing is to reduce noise and improve the efficiency and accuracy of model processing.
[0125] 2. Sentence vector extraction: Use the pre-trained BERT model to extract the sentence vector of each hidden danger description. BERT is a Transformer-based model that can capture deep semantic information in text. By inputting the hidden danger description into the BERT model, a fixed-length vector representation, namely the sentence vector, can be obtained. This vector captures the core semantic features of the hidden danger description and is the basis for subsequent clustering and model training.
[0126] The parameters when using GPT to train the model are as follows:
[0127] Data volume 3000000
[0128] Learning rate 3e-5
[0129] Dropout 0.2
[0130] epochs 80
[0131] Batch size 32
[0132] 3. Construction of Hidden Danger Text Tree
[0133] 1. Establish a hidden danger text tree level by level: According to the set N nodes per level, each node contains at most M hidden danger rules, and further k-means clustering is performed on each cluster. If the number of hidden dangers in a cluster exceeds M, the cluster is further divided into N sub-clusters, each of which contains at most M hidden dangers, until all clusters have less than M hidden dangers. N is 20, M is 50; or N is 3, M is 20, such as Figure 2 shown.
[0134] 2. Constructing the data set: Through clustering step by step, a hierarchical hidden danger text tree is finally constructed. Each node of the tree represents a cluster, and the hidden danger descriptions contained in the node are similar to each other. Each node can be assigned a unique index sequence according to its position in the tree, thereby constructing a hidden danger text-index sequence data set, see Figure 2 and Figure 3 .
[0135] Assuming that the hidden danger text "Fire dike in storage tank area is damaged" is located in the A2-B1-C2 node, then a hidden danger text-index sequence data such as "Fire dike in storage tank area is damaged A2-B1-C2" can be obtained.
[0136] Figure 3 In the example, the accident potential node is the node that contains the direct and indirect causes of the actual accident. The accident potential node also contains the potential hazards that did not cause the accident. As long as there is a text related to the accident, the node is an accident potential node. The non-accident potential node is the node that does not contain the direct and indirect causes of the actual accident. The intermediate node has no actual data, and its subordinate nodes have similar text similarities, which is the intermediate result of clustering.
[0137] 4. Hidden danger index sequence generation model
[0138] 1. Model construction: Select the transformer generative model framework to build a hidden danger index sequence generation model.
[0139] 2. Model training: Use the prepared dataset to train the selected model. During the training process, the model learns how to predict the index sequence of the hidden danger text in the hidden danger text tree based on its semantic information.
[0140] The training process is as follows:
[0141] 1) Fire embankment in the tank area is damaged -> A2
[0142] 2) Fire embankment damage in the tank area A2->B1
[0143] 3) Fire embankment damage in the tank area A2B1->C2
[0144] Finally, the fire embankment in the tank area was damaged -> A2B1C2
[0145] Modern Transformer models (such as BERT or GPT) process the entire sentence or text. The model understands the entire hazard description at once and gradually generates more specific indexes. That is, starting directly from the complete hazard description "Firewall damage in the storage tank area", the model generates multiple indexes in sequence; each step is based on the current complete hazard description, and the model outputs the index of the current stage (A2, B1, C2); the model processes the entire description each time and gradually improves the index sequence.
[0146] 3. Performance evaluation: The performance of the model is evaluated through the test set, focusing on the degree of match between the index sequence predicted by the model and the actual index sequence. Multiple indicators are used for evaluation.
[0147] 4. Model deployment: After the model training is completed and the performance reaches a satisfactory level, the model is deployed to the actual hidden danger investigation and accident prevention system. In this way, when the system receives a new hidden danger description, it can use the trained model to quickly generate the corresponding index sequence and locate the hidden danger in the hidden danger text tree accordingly.
[0148] 5. Calculation of Hidden Danger Similarity
[0149] 1. Generate index sequence: Input the preprocessed hidden danger text into the trained generative model, and the model will generate a corresponding index sequence. This sequence represents the position of the hidden danger in the hidden danger text tree.
[0150] 2. Locate the hidden danger node: locate the corresponding hidden danger node in the hidden danger text tree according to the generated index sequence. This node and its associated nodes contain known hidden dangers that are semantically similar to the current hidden danger.
[0151] 3. Calculate text similarity: Calculate the distance between the current hidden danger node and the nearest accident hidden danger node in the hidden danger text tree, and then calculate the similarity based on the inverse of the distance between the two nodes' nearest ancestor nodes. This step is to evaluate the semantic proximity between the current hidden danger and the accident hidden danger. Figure 3 .
[0152] First, use the LCA algorithm to find the nearest common ancestor w of the two leaf nodes
[0153] Then use the following formula to calculate the distance:
[0154] Distance(u,v)=Depth(u)+Depth(v)-2×Depth(w), and the reciprocal is the similarity.
[0155] VI. Assessment of the correlation between hidden dangers and accidents
[0156] 1. Correlation calculation: Based on the similarity between the current hidden danger and a hidden danger in the accident database and their corresponding accident weights, calculate the correlation weight of the current hidden danger leading to the accident.
[0157] 2. Risk level assessment: According to the correlation weight of the current hidden danger leading to the accident, the correlation level is assessed. The correlation level can be set according to the safety management policy of the organization.
[0158] Finally, it should be noted that: the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0159] The above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, a person skilled in the art should understand that the specific implementation mode of the present invention can still be modified or some technical features can be replaced by equivalents without departing from the spirit of the technical solution of the present invention, which should be included in the scope of the technical solution for protection of the present invention.
Claims
1. A method for assessing the correlation between hidden dangers and accidents based on intermediate indexes, characterized in that: The method comprises the following steps: S10, accident database construction: collect accident cases, use accident tree analysis method to identify the direct and indirect causes of each accident case, analyze the relationship between the hidden dangers in the accident tree and the accident results, determine the accident weight for each hidden danger, integrate all the hidden dangers in the accident tree and their corresponding weights, and build an accident database; S20, hidden danger text sentence vector extraction: perform text preprocessing on the hidden danger description, and use the pre-trained BERT model to extract the sentence vector of each hidden danger description; S30, hidden danger text tree construction: establish hidden danger text trees level by level, perform k-means clustering, group hidden danger descriptions by similarity, construct a hierarchical hidden danger text tree, and generate a hidden danger text-index sequence data set; S40, constructing and training a hidden danger index sequence generation model: Selecting a transformer generative model framework to construct a hidden danger index sequence generation model, using the prepared data set to train the model, and predicting its index sequence in the hidden danger text tree based on the semantic information of the hidden danger text; S50, hidden danger similarity calculation: input the preprocessed hidden danger text into the trained generative model, generate a corresponding index sequence, locate the corresponding hidden danger node in the hidden danger text tree according to the index sequence, and calculate the text similarity with the accident hidden danger; S60. Assessment of the correlation between hidden dangers and accidents: Based on the similarity between the current hidden dangers and the hidden dangers in the accident database and their corresponding accident weights, calculate the correlation weight of the current hidden danger leading to the accident and assess its correlation level.
2. The method for assessing the correlation between hidden dangers and accidents based on intermediate indexes according to claim 1 is characterized in that: In S20, text preprocessing is performed on the hidden danger description, including removing stop words and punctuation marks, and performing stem extraction and word form restoration; Hidden danger text sentence vector extraction also includes: using the pre-trained BERT model to extract the sentence vector of each hidden danger description to capture the deep semantic information in the text.
3. The method for assessing the correlation between hidden dangers and accidents based on intermediate indexes according to claim 2 is characterized in that: In S30, a hidden danger text tree is constructed, including: According to the set N nodes per level, where N is 20, and each node contains at most M hidden danger rules, where M is 50, k-means clustering is performed on the hidden danger descriptions; If the number of hidden dangers in a cluster exceeds M, the cluster will continue to be divided into N sub-clusters, each of which contains at most M hidden dangers, until all clusters have less than M hidden dangers.
4. The method for assessing the correlation between hidden dangers and accidents based on intermediate indexes according to claim 3 is characterized in that: In S50, calculating the text similarity with the potential accident hazard includes: calculating the distance between the current potential accident node and the potential accident hazard node closest to the potential accident hazard text tree, and then calculating the similarity according to the inverse of the distance between the two nodes' closest ancestor nodes.
5. The method for assessing the correlation between hidden dangers and accidents based on intermediate indexes according to claim 4 is characterized in that: In S50, Use the LCA algorithm to find the depth of two leaf nodes u and v and their nearest common ancestor w; Use the following formula to calculate the nearest ancestor node distance between two nodes: Distance(u,v)=Depth(u)+Depth(v)-2×Depth(w), the reciprocal is the similarity; Depth(u) and Depth(v) represent the depth of nodes u and v in the tree respectively, and Depth(w) represents the depth of the most recent common ancestor w; The smaller the distance Distance(u, v), the higher the similarity.
6. The method for assessing the correlation between hidden dangers and accidents based on intermediate indexes according to claim 5 is characterized in that: In S10, accident database construction, accident cases are collected from safety accident reports, industry databases, and accident data released by the government.
7. The method for assessing the correlation between hidden dangers and accidents based on intermediate indexes according to claim 5 is characterized in that: In S10, a database is constructed containing the description and weight of each hidden danger, as well as the relationship between hidden dangers and their connection with accident outcomes: Among them, d(t) is the depth of hidden danger in the fault tree, D max The maximum depth of the fault tree, f(d i ,t)The weight of hidden dangers in the accident tree.