Intelligent recommendation method for potential safety hazard treatment measures

By constructing a safety hazard knowledge graph and using a Sentence-BERT network for semantic matching, the method addresses the inefficiency of manual hazard control measure formulation, enhancing safety management efficiency and accuracy through intelligent hazard recommendation and measure retrieval.

CN119179858AActive Publication Date: 2024-12-24CHINA THREE GORGES UNIV

Patent Information

Application Number
CN202411050679.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-01
Publication Date
2024-12-24
Estimated Expiration
2044-08-01

AI Technical Summary

Technical Problem

Safety hazard control measures in construction are formulated subjectively and inefficiently by project managers or experts based on industry standards and project conditions, relying heavily on personal experience, leading to low efficiency in formulation.

Method used

A safety hazard knowledge graph is constructed using deep learning to build a Sentence-BERT network model for semantic matching of construction hazards, enabling intelligent recommendation of historically similar hazards and retrieval of corresponding control measures through a Cypher statement.

Benefits of technology

This approach enhances the efficiency and accuracy of safety hazard management by intelligently recommending similar historical hazards and their control measures, providing a solid guarantee for construction safety and improving the comprehensiveness of hazard management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119179858A_ABST
    Figure CN119179858A_ABST
Patent Text Reader

Abstract

An intelligent recommendation method for potential safety hazard treatment measures comprises the following steps: collecting potential hazard text data accumulated in a construction process, performing entity and relationship extraction on semi-structured potential hazard data by means of a Python tool, constructing a potential safety hazard knowledge graph, and importing the potential safety hazard knowledge graph into a Neo4j graph database for storage; building a construction hidden danger semantic matching Sension-BERT model, learning deep semantic features of target hidden dangers and historical hidden dangers, and recommending historical safety hidden dangers most similar to the target hidden dangers; and searching a treatment measure corresponding to the historical potential safety hazard by utilizing a Cypher query statement of the knowledge graph. Three text semantic matching model test results are compared and analyzed, historical hidden dangers most similar to the current hidden dangers are recommended according to semantic similarity, treatment measures of the historical hidden dangers are retrieved, and visual display is performed through a knowledge graph so as to provide reference for formulating the treatment measures of the current hidden dangers. And the construction safety management work is more intelligent and efficient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of engineering intelligent construction, and in particular to an intelligent recommendation method for safety hazard control measures. Background Art

[0002] As an effective way to develop and utilize water resources, construction occupies an important position in the field of renewable energy. However, its construction is difficult and dangerous. Accurate and scientific measures to eliminate hidden dangers will help improve the level of construction safety management and reduce casualties. At present, safety hazard control measures are mainly formulated by project managers or invited experts based on industry standards and specifications combined with project actual conditions. The effectiveness of control measures depends on personnel experience, and the formulation efficiency is relatively low. Therefore, it is of great significance to improve the level of construction safety management by using knowledge graphs combined with computer semantic matching technology to quickly recommend historical hidden danger records corresponding to the target hidden dangers, draw experience from historical hidden dangers, and then quickly formulate effective hidden danger control measures.

[0003] It is not easy to mine hidden dangers similar to the target hidden dangers from massive historical hidden danger texts. It requires a deep understanding of the semantic information of the text. Natural language processing (NLP) technology, as an important research method in the computer field, converts words into vectors through models such as Word2vec or BERT, providing an effective means for further extracting semantic information and semantic matching at the sentence level. With the continuous development of computer technology, deep learning models based on pre-trained models have shown good results in semantic matching, providing technical support for safety hidden danger matching. In addition, knowledge graphs intuitively display information through graph structures, which can clearly represent various entities and their relationships, help understand and analyze complex data, and provide convenience for extracting information related to governance measures from historical hidden dangers. Summary of the invention

[0004] The problem that safety hazard control measures are mainly formulated by project managers or invited experts based on industry standards and specifications in combination with project actual conditions, and the effectiveness of the control measures depends on personnel experience, and the efficiency of formulation is relatively low. The present invention provides an intelligent recommendation method for safety hazard control measures, which constructs a safety hazard knowledge graph, and on this basis, utilizes the semantic extraction advantages of deep learning to build a Sentence-BERT network model for semantic matching of construction hazards, extracts deep semantic features of target hazards and historical hazards, and intelligently recommends historically similar hazards, and uses Cypher statements to retrieve hazard control measures, in order to provide a reference for formulating current hazard control measures.

[0005] The technical solution adopted by the present invention is:

[0006] An intelligent recommendation method for safety hazard control measures includes the following steps:

[0007] Step 1: Collect records of safety hazards at the construction site, including the time and location of discovery, rectification requirements, deadlines, etc.

[0008] Step 2: Text preprocessing:

[0009] Clean the safety hazard record data collected in step 1 to remove incomplete safety hazard records and data with missing rectification requirements; according to the time of hazard discovery, select 2 / 3 of the total number of hazards discovered earlier as the historical hazard set, and select 1 / 3 of the total number of hazards discovered later as the target hazard set.

[0010] Step 3: Safety hazard map construction:

[0011] Taking the structured historical hidden danger set as the data source, the hidden danger entities, attributes and relationships are extracted with hidden danger issues as the core, and the hidden danger knowledge graph is constructed and stored in the neo4j graph database;

[0012] Step 4: Semantic matching dataset organization:

[0013] Search for hidden dangers similar to the target hidden danger data in the historical hidden danger set, and define the text pairs formed by the target hidden danger and similar hidden dangers as the positive sample set, while the text pairs formed by the target hidden danger and its non-similar historical hidden dangers are defined as the negative sample set. The sample set is randomly shuffled and divided into training set, validation set and test set in a ratio of 7:1.5:1.5;

[0014] Step 5: Model building:

[0015] Build a Sentence-BERT network model for semantic matching of construction hazards, and input the training set in step 4 for training;

[0016] Step 6: Model Testing:

[0017] Adjust the parameters of the Sentence-BERT network model in step 5 according to the training results, input the test set in step 4 into the trained Sentence-BERT network model, and output the historical similar hidden danger results that are most similar to the target hidden danger;

[0018] Step 7: Model Validation:

[0019] Input the validation set from step 4 into the Sentence-BERT network model trained in step 6, and calculate the accuracy, precision and other evaluation indicators based on the labels corresponding to the positive and negative sample sets, and use the validation set to display the results of intelligent recommendation of similar hidden dangers.

[0020] Step 8: Visualization:

[0021] Call the Sentence-BERT network model trained in step 6 to retrieve hidden danger data similar to the target hidden danger from the historical hidden danger set, and use the Cypher statement of the hidden danger knowledge graph constructed in step 3 to query the entity content related to hidden danger management in the historical hidden danger data.

[0022] The step 3 comprises the following steps:

[0023] S301: With the help of Python tools and manual correction, 9 types of entities including inspection date, hidden danger location, hidden danger problem, hidden danger rectification requirements, etc. were extracted, totaling 191,070 entities;

[0024] S302: Adopting the template-based relationship extraction method, extracting 7 types of relationships including hidden danger-time, hidden danger-type, hidden danger-location, hidden danger-measure, hidden danger-deadline, hidden danger-unit, unit-execution, totaling 148,610 relationships;

[0025] S303: In the process of knowledge storage, Neo4j graph database is selected to store construction hazard knowledge, entity content query is performed with the help of Cypher tool, and a construction hazard knowledge graph is constructed;

[0026] S304: In the process of intelligently recommending similar historical hidden dangers based on the target hidden danger, if the target hidden danger has never occurred before, it is necessary to store the target hidden danger in the historical hidden dangers to update the hidden danger knowledge graph, thereby improving the generalization ability of the graph.

[0027] In step 5, the Sentence-BERT network model includes an input layer, a BERT model layer, a Pooling layer, and an output layer;

[0028] At the input layer, the safety hazard text and the corresponding historical similar hazard text are input into the BERT model layer and converted into word embedding vectors.

[0029] Specific as Figure 5As shown in the figure, taking "the safety distance between acetylene cylinders and oxygen cylinders is insufficient" as an example, after the BERT model removes stop words and performs word segmentation, the sentence is "acetylene cylinder / oxygen cylinder / safety distance / insufficient", and the words are presented in the form of vectors. "The corresponding word vector for acetylene cylinder is (-0.38691133 0.71248794...-0.01407175)" "The corresponding word vector for oxygen cylinder is (-0.1483857 0.22868624...0.22028413)" "The corresponding word vector for safety distance is (0.10901136-0.24216454...0.50504297)" "The corresponding word vector for insufficient is (-0.22338304 -0.343628...-0.01832486)";

[0030] The Pooling layer performs an average pooling operation on the output of the BERT model layer, compressing the representation of the entire sentence into a vector of fixed dimension.

[0031] Specifically: after average pooling, the sentence vector corresponding to the insufficient safety distance between the acetylene cylinder and the oxygen cylinder is the average of the corresponding parts of the word vectors, and the final vector is (-0.16241717 0.08884541...0.1732326225).

[0032] After passing through the output layer, the cosine similarity between the target hidden danger and the historical similar hidden danger sentence vectors x and y is calculated. The specific formula is shown in formula (8). The semantic similarity between the two sentence vectors is expressed by calculating the cosine similarity Cosine_Similarity(x,y).

[0033]

[0034] The Sentence-BERT network model has a twin network structure. X1 and X2 are two inputs of the twin neural network, which are respectively passed into the neural network model with the same weight W for encoding mapping to generate a vector representation in the new space. The specific operation is as follows Figure 4 As shown in Figure 1, through this operation, the two sentences pass through the BERT model with the same weights and output two sentence vectors.

[0035] The cosine similarity is used to calculate the loss function Loss to optimize the performance of the model on the semantic similarity task, thereby achieving the effect of "minimizing the distance between similar sentence pairs and maximizing the distance between dissimilar sentence pairs". The details are as follows:

[0036] During the training process, as the model performance improves, the Loss value will gradually decrease. In the process of reducing the Loss value, the Cosine_Similarity value of two similar texts (positive samples) gradually increases, and the Cosine_Similarity value of two dissimilar texts (negative samples) gradually decreases, making |l i -Cosine_Similarity(x i ,y i )| value gradually decreases, thus achieving the effect of "minimizing the distance between similar sentence pairs and maximizing the distance between dissimilar sentence pairs".

[0037]

[0038] In the formula, m is the sample size of the training set, l is i is the corresponding value of the i-th text pair label, the positive sample label is 1 and the negative sample label is 0.

[0039] The input layer includes the following steps:

[0040] S5021: Input data in the form of characters, each character contains word feature information, paragraph feature information and position feature information. The paragraph feature information is used to distinguish the text paragraph where the character is located, and the position feature information describes the specific position of the character in the text to distinguish the role of the same character in different contexts;

[0041] S5022: Using word feature information via the Transformer mechanism, each character in the input text is converted into a vector of fixed dimension. The specific operation is as follows Figure 5 As shown in the figure, taking "The safety distance between acetylene cylinders and oxygen cylinders is insufficient" as an example, after the BERT model removes stop words and performs word segmentation, the sentence is "Acetylene cylinder / oxygen cylinder / safety distance / insufficient", and the words are presented in the form of vectors. "The corresponding word vector for acetylene cylinder is (-0.38691133 0.71248794...-0.01407175)" "The corresponding word vector for oxygen cylinder is (-0.1483857 0.22868624...0.22028413)" "The corresponding word vector for safety distance is (0.10901136 -0.24216454...0.50504297)" "The corresponding word vector for insufficient is (-0.22338304-0.343628...-0.01832486)".

[0042] In step 6, the parameters of the Sentence-BERT network model are mainly set to 4 groups, the initial learning rate is 0.0005, the optimization algorithm uses the Adam algorithm, the iteration rounds (epochs) are 50, and the batch_size is set to 16.

[0043] The step 7 comprises:

[0044] S701: In the training phase, similarity scores of potential risk text pairs under four semantic similarity evaluation methods, namely Manhattan distance, Euclidean distance, dot product similarity and cosine similarity, are calculated respectively; the correlation between the semantic similarity of text pairs and labels is measured by the Pearson coefficient value P and the Spearman coefficient value S between the score and the actual label, and is used as an evaluation indicator of model performance:

[0045]

[0046]

[0047] Where Y i is the similarity score of the i-th text pair; m is the sample size of the training set; l i The corresponding value of the label for the i-th text pair is 1 for the positive sample label and 0 for the negative sample label; is the mean similarity of m text pairs; is the mean of the labels of m text pairs; rank(a) is the rank of vector a; the value range of P and S is [-1,1]. When the values ​​of P and S are 0, it means that the two selected samples have no correlation. The closer the value is to 1, the stronger the positive correlation is; the closer the value is to -1, the stronger the negative correlation is.

[0048] For two vectors in the m set of vectors A=(A1,A2,...,A n ) and B=(B1,B2,...,B n ), the Manhattan distance similarity is:

[0049]

[0050] For two vectors in the m set of vectors A=(A1,A2,...,A n ) and B=(B1,B2,...,B n ), the Euclidean distance similarity is:

[0051]

[0052] For two vectors in the m set of vectors A=(A1,A2,...,A n ) and B=(B1,B2,...,B n ), the dot product similarity is:

[0053]

[0054] For two vectors in the m set of vectors A=(A1,A2,...,A n ) and B=(B1,B2,...,B n ), the cosine similarity is:

[0055]

[0056] By calculating four semantic similarities: Manhattan Distance, Euclidean Distance, Dot Product Similarity, and Cosine Similarity, and using their values ​​as Y i Substituting into equation (1) and equation (2), we can obtain the Pearson coefficient value P and Spearman value S of the model under four different measurement methods.

[0057] S702: During the testing phase, the accuracy, precision, recall and F1-Score are calculated to evaluate the model's recognition effect on the target hidden dangers and similar historical hidden dangers.

[0058]

[0059] In the formula, TP is true positive, indicating positive samples and correct recognition; FN is false negative, indicating positive samples and wrong recognition; FP is false positive, indicating negative samples and wrong recognition; TN is true negative, indicating negative samples and correct recognition.

[0060] The present invention provides an intelligent recommendation method for potential safety hazards control measures, and the technical effects are as follows:

[0061] 1) The present invention takes into account the problem that the process of formulating safety hazard control measures is highly subjective and inefficient when project managers or invited experts formulate safety hazard control measures based on industry standards and specifications and combined with project actual conditions. A safety hazard knowledge graph is constructed. On this basis, the semantic extraction advantages of deep learning are utilized to build a Sentence-BERT network model for semantic matching of construction hazards, making construction safety management more intelligent and efficient.

[0062] 2) The present invention takes into account the semantic similarity between historical hazards and target hazards, and realizes intelligent recommendation of historical similar hazards through the Sentence-BERT network model of construction hazard semantic matching. It also uses the Cypher statement of the knowledge graph to retrieve the control measures corresponding to the historical hazards, and uses them as a reference for formulating control measures for target hazards, demonstrating good engineering value.

[0063] 3) The significance of the present invention lies in that it effectively promotes the efficient handling of safety hazards, provides a solid guarantee for construction safety, considers matching construction safety hazards with standard specification clauses in the future, solves situations where the target hazards have never occurred before, and improves the comprehensiveness and accuracy of safety hazard management. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:

[0065] Figure 1 It is the entity-relationship diagram (ER diagram) of construction safety hazards.

[0066] Figure 2 This is the knowledge map of construction safety hazards (part).

[0067] Figure 3 This is the Sentence-BERT network structure diagram for semantic matching of construction hazards.

[0068] Figure 4 This is the structure diagram of the twin network.

[0069] Figure 5 This is the BERT model structure diagram.

[0070] Figure 6 are the Pearson and Spearman values ​​under different measurement methods.

[0071] Figure 7 This is a graph showing the search results for historical similar hidden danger control measures. DETAILED DESCRIPTION

[0072] An intelligent recommendation method for safety hazard control measures collects the hidden danger text data accumulated during the construction process, extracts entities and relationships from semi-structured hidden danger data with the help of Python tools, constructs a safety hazard knowledge graph and imports it into the neo4j graph database for storage; builds a Sentence-BERT model for semantic matching of construction hidden dangers, learns the deep semantic features of target hidden dangers and historical hidden dangers, and recommends historical safety hidden dangers that are most similar to the target hidden dangers; uses the Cypher query statement of the knowledge graph to retrieve the corresponding control measures for the historical safety hidden dangers. The experimental results of three text semantic matching models are compared and analyzed, and the historical hidden dangers that are most similar to the current hidden dangers are recommended based on semantic similarity, and their control measures are retrieved and visualized through the knowledge graph, in order to provide a reference for the formulation of current hidden danger control measures.

[0073] like Figure 1 to Figure 7 As shown, an intelligent recommendation method for safety hazard control measures includes the following steps:

[0074] S1: A total of 32,221 safety hazard records were collected at the construction site, including the discovery time, location, rectification requirements, deadlines, etc.;

[0075] S2: Clean the data: After removing the incomplete data and the data with missing rectification requirements in the hidden danger records, a total of 31,845 valid hidden danger data were finally obtained. According to the chronological order, the 21,230 hidden dangers discovered earlier were used as the historical hidden danger data set, and the 10,615 hidden dangers discovered later were used as the target hidden danger data set;

[0076] S3: Safety hazard graph construction: Take the structured historical hazard set as the data source, extract hazard entities, attributes and relationships with hazard issues as the core, build a hazard knowledge graph, and store it in the neo4j graph database;

[0077] S4: Semantic matching data set collation: Search for hidden dangers similar to the target hidden danger data in the historical hidden danger set, and define the text pairs formed by the target hidden danger and similar hidden dangers as the positive sample set, while the text pairs formed by the target hidden danger and its non-similar historical hidden dangers are defined as the negative sample set. The sample set is randomly shuffled and divided into training set, validation set and test set with a ratio of 7:1.5:1.5;

[0078] S5: Build a Sentence-BERT network model for semantic matching of construction hazards, and input the training set hazard text pairs for training;

[0079] S6: Adjust model parameters: Use cosine similarity to measure the similarity between the target hidden danger and the historical hidden danger, and output the similarity score between the hidden danger texts. Specifically, the similarity score of the two text vectors is calculated using formula (8).

[0080] S7: Calculate Pearson and Spearman coefficients to evaluate model performance. Use accuracy, precision and other evaluation indicators to compare and analyze the effects of the models used;

[0081] S8: Call the trained model to retrieve hidden danger data similar to the target hidden danger from the historical hidden danger set, and use the Cypher statement of the knowledge graph to query the entity content related to hidden danger management in the historical hidden danger data.

[0082] In step S1, the collected construction safety hazard texts are from the safety inspection records during the construction of a hydropower station. After data cleaning and data set division, the historical hazard data set is used to define the construction safety hazard entity, entity attributes, and the relationship between different types of entities to establish a construction safety hazard entity-relationship diagram (ER diagram). The specific framework is as follows: Figure 1 shown.

[0083] according to Figure 1 The structure shown in the figure uses Python tools and manual correction to extract 9 types of entities, including inspection date, hidden danger location, hidden danger problem, hidden danger rectification requirements, etc., totaling 191,070 entities. The template-based relationship extraction method is used to extract 7 types of relationships, including hidden danger-time, hidden danger-type, hidden danger-location, hidden danger-measures, hidden danger-deadline, hidden danger-unit, and unit-execution, totaling 148,610 relationships. The Neo4j graph database is used to store construction hidden danger knowledge, with entities as nodes and entity relationships as edges to build a construction hidden danger knowledge graph, such as Figure 2 Show 2000 of them.

[0084] In step S5, the constructed Sentence-BERT network model for semantic matching of construction hazards can accurately recommend historical hazards similar to the target hazards. Figure 3 As shown in the figure, the Sentence-BERT model is a twin network structure, which includes an input layer, a BERT model layer, a Pooling layer, and an output layer.

[0085] The Sentence-BERT model uses the idea of ​​twin networks to train the Sentence-BERT model. The structure is as follows Figure 4 As shown in the figure, X1 and X2 are two inputs of the twin neural network, which are respectively passed into the neural network model with the same weight W for encoding mapping to generate vector representations in the new space. The similarity of the two inputs is evaluated by calculating the loss function Loss. Through the loss function, the distance between similar sentence pairs is minimized and the distance between dissimilar sentence pairs is maximized.

[0086]

[0087] In the formula, m is the sample size of the training set, l is i is the corresponding value of the i-th text pair label, the positive sample label is 1 and the negative sample label is 0.

[0088] At the input layer, the security risk text and the corresponding historical similar risk text are input into the BERT model layer. The BERT model structure is as follows: Figure 5 As shown in the figure. Each character contains word feature information, paragraph feature information and position feature information. The paragraph feature information is used to distinguish the text paragraph where the character is located, while the position feature information describes the specific position of the character in the text to distinguish the role of the same character in different contexts; each character in the input text is converted into a vector of fixed dimension through word feature information; the text features are extracted from the input text with the help of the Transformer mechanism to generate a text vector of security risks.

[0089] The Pooling layer performs an average pooling operation on the BERT output to compress the representation of the entire sentence into a vector of fixed dimension. Then, after passing through the output layer, the cosine similarity Cosine_Similarity(x,y) between the target hidden danger and the historical similar hidden danger sentence vectors x and y is calculated, as shown in formula (8).

[0090] In step S6, the model parameters are mainly set to 4 groups of experiments, the initial learning rate is 0.0005, the optimization algorithm uses the Adam algorithm, the iteration rounds (epochs) are 50, and the batch_size is set to 16.

[0091] like Figure 6 As shown, in step S7, Pearson and Spearman coefficients are calculated under Manhattan Distance, Euclidean Distance, Dot Product Similarity and Cosine Similarity methods.

[0092]

[0093] In the formula, the value range of P and S is [-1,1]. When the Pearson and Spearman values ​​are 0, it means that the two selected samples have no correlation. The closer the value is to 1, the stronger the positive correlation is. The closer the value is to -1, the stronger the negative correlation is.

[0094] The BERT, Word2vec-DSSM and BERT-DSSM models were compared and analyzed. The accuracy, precision, recall and F1-Score were calculated during the test phase to evaluate the model’s recognition effect on the target hidden dangers and similar historical hidden dangers.

[0095]

[0096] In the formula, TP is the true positive (positive sample and correct recognition); FN is the false negative (positive sample and wrong recognition); FP is the false positive (negative sample and wrong recognition); TN is the true negative (negative sample and correct recognition). The recognition effect is shown in Table 1.

[0097] Table 1 Comparison of test performance of different models

[0098]

[0099] As can be seen from Table 1, the Sentence-BERT model is better than the BERT, Word2vec-DSSM and BERT-DSSM models in identifying target hidden dangers and historical similar hidden dangers. Its evaluation indicators such as accuracy are all above 95%, and it can effectively capture the semantic information of safety hazards.

[0100] In step S8, by calling the trained model, an intelligent recommendation experiment of historical similar hidden dangers is carried out according to the target safety hidden dangers.

[0101] 150 target hidden danger texts were randomly selected from the test set samples, and the 3124 historical hidden dangers obtained were used as the recall text set for the historical similar hidden danger recommendation test. It was finally found that 138 of the 150 target hidden danger texts were accurately recommended to the corresponding similar historical hidden dangers, and the recommendation accuracy reached 92%. In order to intuitively express the recommendation effect, the recommendation results of some target hidden dangers are displayed, and the specific results are shown in Table 2.

[0102] Table 2: Results of historical hidden danger recommendation

[0103]

[0104]

[0105] Taking "At the K0+10 position of the left bank 4# curtain grouting hole, oxygen cylinders and acetylene cylinders are mixed and placed, which does not meet the safety distance specified in the relevant regulations, and there is a safety hazard" as an example, the historical hazard "Oxygen cylinders and acetylene cylinders are not placed at a safe distance, and there is a risk of explosion" is obtained through semantic recommendation. Using Cypher statements, enter "MATCH((n:'Hazard problem'{name:"Oxygen cylinders and acetylene cylinders are not placed at a safe distance, and there is a risk of explosion."}))RETURN nLIMIT 25" in the neo4j database, and the search results are as follows Figure 7 shown.

[0106] Depend on Figure 7 It can be seen that to solve this hidden danger, safety personnel need to store oxygen cylinders and acetylene cylinders separately at a safe distance of more than 5 meters, and pay attention to the placement of oxygen cylinders and acetylene cylinders to avoid sunlight. This hidden danger must be rectified and implemented within one day. It can be seen that the intelligent recommendation method for construction safety hidden dangers can effectively assist in the formulation of target hidden danger management measures.

Claims

1. An intelligent recommendation method for safety hazard control measures, characterized in that The following steps are involved: Step 1: Collect records of safety hazards at the construction site, including the time and location of discovery, rectification requirements, and deadlines; Step 2: Clean the safety hazard record data collected in step 1 to remove incomplete safety hazard records and data with missing rectification requirements; According to the time of hidden danger discovery, 2 / 3 of the hidden dangers discovered earlier are selected as the historical hidden danger set, and 1 / 3 of the hidden dangers discovered later are selected as the target hidden danger set; Step 3: Take the historical hidden danger set as the data source, extract hidden danger entities, attributes and relationships with hidden danger problems as the core, build a hidden danger knowledge graph, and store it in the neo4j graph database; Step 4: Search for hidden dangers similar to the target hidden danger data in the historical hidden danger set, and define the text pairs formed by the target hidden danger and the similar hidden danger as the positive sample set, and the text pairs formed by the target hidden danger and its non-similar historical hidden danger as the negative sample set; divide the sample set into training set, verification set and test set according to a certain ratio; Step 5: Build a Sentence-BERT network model for semantic matching of construction hazards, and input the training set in step 4 for training; Step 6: Adjust the parameters of the Sentence-BERT network model in step 5 according to the training results, input the test set in step 4 into the trained Sentence-BERT network model, and output the historical similar hidden danger results that are most similar to the target hidden danger; Step 7: Input the validation set from step 4 into the Sentence-BERT network model trained in step 6, and calculate the accuracy and precision evaluation indicators based on the labels corresponding to the positive and negative sample sets, and use the validation set to display the intelligent recommendation results of similar hidden dangers; Step 8: Call the Sentence-BERT network model trained in step 6 to retrieve hidden danger data similar to the target hidden danger from the historical hidden danger set, and use the Cypher statement of the hidden danger knowledge graph constructed in step 3 to query the entity content related to hidden danger governance in the historical hidden danger data.

2. The intelligent recommendation method for potential safety hazards control measures according to claim 1, characterized in that: The step 3 comprises the following steps: S301: With the help of Python tools and manual correction, nine types of entities including inspection date, hidden danger location, hidden danger problem, and hidden danger rectification requirements are extracted; S302: Adopting a template-based relationship extraction method, extracting seven types of relationships including hidden danger-time, hidden danger-type, hidden danger-location, hidden danger-measure, hidden danger-deadline, hidden danger-unit, and unit-execution; S303: In the process of knowledge storage, Neo4j graph database is selected to store construction hazard knowledge, entity content query is performed with the help of Cypher tool, and a construction hazard knowledge graph is constructed; S304: In the process of intelligently recommending historical similar hidden dangers based on the target hidden danger, if the target hidden danger has never occurred before, it is necessary to store the target hidden danger in the historical hidden dangers to update the hidden danger knowledge graph.

3. The intelligent recommendation method for potential safety hazards control measures according to claim 1 is characterized by: In step 5, the Sentence-BERT network model includes an input layer, a BERT model layer, a Pooling layer, and an output layer; At the input layer, the safety hazard text and the corresponding historical similar hazard text are input into the BERT model layer and converted into word embedding vectors; The Pooling layer performs an average pooling operation on the output of the BERT model layer, compressing the representation of the entire sentence into a vector of fixed dimension; After passing through the output layer, the cosine similarity between the target hidden danger and the historical similar hidden danger sentence vectors x and y is calculated. The specific formula is shown in formula (8). The cosine similarity Cosine_Similarity(x,y) of the two sentence vectors is calculated to express the semantic similarity between the two.

4. The intelligent recommendation method for safety hazard control measures according to claim 3 is characterized by: The Sentence-BERT network model has a twin network structure. X1 and X2 are two inputs of the twin neural network, which are respectively passed into the neural network model with the same weight W for encoding mapping to generate a vector representation in the new space. The cosine similarity is used to calculate the loss function Loss to optimize the performance of the model on the semantic similarity task, thereby achieving the effect of "minimizing the distance between similar sentence pairs and maximizing the distance between dissimilar sentence pairs".

5. The intelligent recommendation method for potential safety hazards control measures according to claim 4 is characterized by: During the training process, as the model performance improves, the Loss value will gradually decrease; while in the process of decreasing the Loss value, the Cosine_Similarity value of two similar texts will gradually increase, and the Cosine_Similarity value of two dissimilar texts will gradually decrease, making |l i -Cosine_Similarity(x i ,y i )| value gradually decreases, thus achieving the effect of "minimizing the distance between similar sentence pairs and maximizing the distance between dissimilar sentence pairs"; In the formula, m is the sample size of the training set, l is i is the corresponding value of the i-th text pair label, the positive sample label is 1 and the negative sample label is 0.

6. The intelligent recommendation method for potential safety hazard control measures according to claim 3 is characterized by: The input layer consists of the following steps: S5021: inputting data in the form of characters, each character including word feature information, paragraph feature information and position feature information; wherein the paragraph feature information is used to distinguish the text paragraph where the character is located, and the position feature information describes the specific position of the character in the text to distinguish the role of the same character in different contexts; S5022: Each character in the input text is converted into a vector of fixed dimension through the Transformer mechanism using word feature information.

7. The intelligent recommendation method for potential safety hazards control measures according to claim 1 is characterized by: The step 7 comprises: in the training phase, respectively calculating similarity scores of potential danger text pairs under four semantic similarity evaluation methods, namely Manhattan distance, Euclidean distance, dot product similarity and cosine similarity; measuring the correlation between the semantic similarity of the text pairs and the labels through the Pearson coefficient value P and the Spearman coefficient value S between the scores and the actual labels, and using them as evaluation indicators of model performance: Where Y i is the similarity score of the i-th text pair; m is the sample size of the training set; l i The corresponding value of the label for the i-th text pair is 1 for the positive sample label and 0 for the negative sample label; is the mean similarity of m text pairs; is the mean of the labels of m text pairs; rank(a) is the rank of vector a; the value range of P and S is [-1,1]. When the values ​​of P and S are 0, it means that the two selected samples have no correlation. The closer the value is to 1, the stronger the positive correlation is; the closer the value is to -1, the stronger the negative correlation is. For two vectors in the m set of vectors A=(A1,A2,...,A n ) and B=(B1,B2,...,B n ), the Manhattan distance similarity is: For two vectors in the m set of vectors A=(A1,A2,...,A n ) and B=(B1,B2,...,B n ), the Euclidean distance similarity is: For two vectors in the m set of vectors A=(A1,A2,...,A n ) and B=(B1,B2,...,B n ), the dot product similarity is: For two vectors in the m set of vectors A=(A1,A2,...,A n ) and B=(B1,B2,...,B n ), the cosine similarity is: By calculating four semantic similarities: Manhattan distance, Euclidean distance, dot product similarity, and cosine similarity, and using their values ​​as Y i Substituting into equation (1) and equation (2), we can obtain the Pearson coefficient value P and Spearman value S of the model under four different measurement methods; In the testing phase, the accuracy, precision, recall and F1-Score are calculated to evaluate the model’s recognition effect on the target hidden dangers and similar historical hidden dangers. In the formula, TP is true positive, indicating positive samples and correct recognition; FN is false negative, indicating positive samples and wrong recognition; FP is false positive, indicating negative samples and wrong recognition; TN is true negative, indicating negative samples and correct recognition.

Citation Information

Patent Citations

  • Hidden danger processing method based on knowledge graph

    CN114328946A

  • Knowledge graph automatic construction method and system for massive unstructured text

    WO2020000848A1

  • Neural network relationship extraction method, computer device, and readable storage medium

    WO2021174774A1

  • Entity relationship joint extraction-based legal knowledge graph construction method and device

    WO2022237013A1

Cited By

  • Construction safety risk management information processing method based on large model agent

    CN120952560A