Hydropower engineering construction risk coupling evolution reasoning method
Through the BERT-GPLINKER model and knowledge map technology, the construction risk of hydropower engineering construction risk coupling evolutionary knowledge map is solved, the problem of difficulty in identifying and predicting the relationship between construction risk and its interaction in existing technology, and realizing more accurate construction safety risk prediction prediction predictions And prevention.
Patent Information
- Application Number
- CN202411385204.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-01-21
AI Technical Summary
The existing technology is difficult to effectively identify and predict complex risk factors and their interactions in hydropower construction, resulting in a lack of active defense capabilities and accuracy in construction safety management.
The joint extraction model of Bert-GPLinker risk factors and their relationships is used, combined with knowledge graph technology, to construct a risk coupling evolution knowledge graph. By quantifying the transition probability between risk factors, the multi-node evolution path of construction risks can be intelligently predicted.
It has improved the understanding of risk factors and their relationships in the text of the construction accident case, enhanced the dynamic management capabilities of construction risks, and achieved more accurate construction safety risk prediction and prevention.
Smart Images

Figure CN119336919A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of construction safety management, and in particular, relates to a coupled evolutionary reasoning method for hydropower engineering construction risks. Background Art
[0002] Most hydropower projects are located in mountainous and canyon areas with complex geological conditions, long construction periods, high intensity and complicated processes. In addition, there are dense construction personnel, large equipment, frequent high-altitude cross operations, great mutual interference, many safety influencing factors, and serious risk coupling effects, which can easily lead to accidents. Since the 1980s, more than 1,200 hydropower construction accidents have occurred in China. This shows that there are still major problems in construction risk management and accident prevention. Therefore, understanding the coupling evolution law of construction risks and ensuring construction safety are the primary challenges currently faced.
[0003] Traditional construction safety management methods have many limitations. In terms of risk protection measures, they are often based on post-event static prevention, which is difficult to adapt to the complex and changeable dynamic characteristics of hydropower engineering construction systems and lacks active defense capabilities. In terms of risk reasoning, they rely too much on the subjective experience of safety supervisors and fail to make full use of the prior knowledge in the valuable construction accident case texts in the past, which can easily lead to incomplete safety risk identification and inaccurate reasoning results. In terms of the importance of quantitative risk factors, single-type evaluation methods such as questionnaires, statistical analysis, and expert judgment are often used, which fail to consider the complex interaction between multiple categories of risk factors, resulting in low credibility of quantitative results.
[0004] With the development of artificial intelligence technology, using deep learning, natural language processing and other technologies to mine construction accident case texts, extract risk factors and their interactions, and reveal the coupled evolution law of construction risks has become a new idea for construction risk prevention and control management. Among them, knowledge graphs are highly praised for their structured representation methods, powerful semantic processing and information integration capabilities. It can effectively describe various entities, concepts and relationships in complex construction accident case texts, and visualize them in the form of graphics. Therefore, it is of great significance to realize the integration and reuse of text knowledge, guide the risk management and rectification work at the construction site of hydropower projects, and ensure construction safety.
[0005] The extraction of construction risk factors and their relationships is a prerequisite for building a risk-coupled evolutionary knowledge graph. Relationship extraction mainly relies on unstructured accident case texts. To build a risk-coupled evolutionary knowledge graph, semantic extraction must be performed and converted into structured knowledge information. However, due to the large number and types of construction risks, the interactions between risk factors in the text are complex and the semantic expressions are diverse, making it difficult for existing text knowledge intelligent extraction methods to apply. The reason is that the current method is only used for single risk factor identification tasks with few semantic elements and simple relationships, and it is difficult to meet the needs of multi-risk extraction with rich knowledge entities and complex associations.
[0006] The coupled evolutionary reasoning of risk factors is the logical destination for constructing the knowledge graph of the evolution of hydropower engineering construction risks. Common risk reasoning methods usually require a large amount of historical data to drive, but the depth of data utilization is not enough. It is impossible to discover the semantic associations between risk factors from unstructured texts, nor can it extract the coupled evolutionary laws of risks, so it is impossible to accurately realize the multi-node reasoning of risk evolution. Therefore, it is necessary to integrate risk factors and their relationships to build a coupled evolutionary knowledge graph of construction risks. Combining text matching and local optimal search methods, using graph reasoning capabilities, find the evolutionary path with the highest probability of risk factor transfer at the construction site. Summary of the invention
[0007] The technical problem to be solved by the present invention is to provide a coupled evolutionary reasoning method for hydropower project construction risks. Through model design, the information between entities, relationships and text sequences is effectively integrated, the model's ability to understand text semantics is improved, and risk factors and their relationships with high diversity and complexity in construction accident case texts are extracted. By quantifying the transfer probability between construction risk factors, a risk coupled evolution knowledge graph is constructed, and the multi-node evolution path with the highest construction risk transfer probability is intelligently predicted.
[0008] In order to solve the above technical problems, the technical solution adopted by the present invention is: a method for coupled evolutionary reasoning of hydropower project construction risks, comprising the following steps:
[0009] S1. Collect texts of hydropower engineering construction accident cases and build an initial corpus;
[0010] S2, preprocessing the corpus;
[0011] S3, construct a joint extraction model of Bert-GPLinker risk factors and their relationships;
[0012] S4. Build a risk coupling evolution knowledge graph to perform intelligent prediction of multi-node risk evolution paths.
[0013] In a preferred embodiment, step S1 includes the following steps:
[0014] S1.1. Collect the case texts of hydropower engineering construction accidents in several years;
[0015] S1.2. Organize the collected construction accident case texts into a “.txt” set to build an initial corpus.
[0016] In a preferred embodiment, step S2 includes the following steps:
[0017] S2.1. Data cleaning: including deleting irrelevant information and removing redundant or contradictory data;
[0018] S2.2, word segmentation: add a mature word library in the field of construction risk identification, and build a professional word library that matches the hydropower project construction risk data on the basis of establishing a professional term library for construction risk. The word library content includes special vocabulary for multiple construction risk factors;
[0019] S2.3, stop word removal: construct a special stop word list for hydropower engineering construction accident case text, remove punctuation marks and pronouns, prepositions, conjunctions, numerals, and modal particles, and reduce the dimension of the feature items of this text;
[0020] S2.4, label definition: using the risk evolution mechanism of the accident cause "2-4" model, the risk factors in the accident case text are divided into five entity categories: "organizational culture", "management system", "individual ability", "individual action", and "accident type", and the Brat annotation software is used for annotation;
[0021] S2.5. Divide the data set: Divide the accident case texts in the corpus into training set, validation set and test set according to the proportion.
[0022] In the preferred solution, in step S3, the joint extraction model of Bert-GPLinker risk factors and their relationships is constructed, which includes four parts, namely:
[0023] 1) Bert part: Use Bert to obtain dynamic word vectors rich in context information;
[0024] 2) Attention mechanism: The attention mechanism is used to enhance the model's ability to model the relative position relationship in the text sequence;
[0025] 3) Global Pointer decoder part: Use the Global Pointer decoder to convert triplet extraction into quintuple extraction;
[0026] 4) Loss function part: Design the loss function for class-imbalanced multi-label classification and automatically calculate the balance weights.
[0027] In the preferred solution, the Bert part uses the Bert pre-trained language model as a feature encoder to encode the sentence semantic vector and extract tokens; after a given sentence X is encoded by the Bert layer, the output H = {h1, h2, h3, ..., h n |h i ∈R d×1}, where d is the dimension of embedding and n is the number of tokens; set the maximum length of the sentence to l, truncate the sentences that exceed the maximum length from the back to the front, and add 0 to the end of the sentences that are less than the maximum length.
[0028] In the preferred solution, the attention mechanism is designed to design a rotational position encoding method to integrate relative position information into the model, thereby enhancing the model's sensitivity to the relative positions between entities. For the i-th and j-th vectors h in H i and h j , after linear transformation by the fully connected layer, the sequence output vector q for scoring is obtained i,c and k j,c , the expression is:
[0029] q i,c =ω q,c h i +b q,c (1);
[0030] k j,c =ω k,c h j +b k,c (2);
[0031] In the formula, q i,c and k j,c is the vector used to identify c-type entities, ω q,c and ω k,c is the weight of the change, b q,c and b k,c is the deviation, so the scoring formula is defined as follows:
[0032]
[0033] In the formula, S c (i,j) indicates the score of X[i:j] being entity type c and j ≥ i, where the subsequence X[i:j] consisting of the i-th element to the j-th element in the sentence is the c-type entity, and X[i:j] is the segment of entity type c in sentence X with starting position i and ending position j;
[0034] The rotational position is encoded as a transformation matrix that satisfies the equation Where R j-iis the position encoding matrix; construct a specific matrix R associated with position i and j in the text sequence i and R j Then, the dot product attention mechanism is used to respectively compare the vector q at positions i and j i,c and k j,c By multiplying, we can add the relative position information to formula (3) and obtain the score function S of entity c. c (i,j)', the expression is:
[0035]
[0036] In the preferred solution, the Global Pointer decoder part, the joint extraction is to extract the knowledge triples (subject, relation, object) of the text, namely (s, r, o), where s, p, o represent subject, relation, and object respectively, and use the Global Pointer decoder to convert it into (s h ,s t ,r,o h ,o t ) Extraction of five tuples, where s h and t are the first and last positions of the subject entity, o h and t are the first and last positions of the object entity respectively; according to (s h ,s t ,r,o h ,o t ) The scoring function s(i,j)' of the quintuple is used. When training the model, let the quintuple s(i,j)'>0 for the labeled data and s(i,j)'<0 for the other quintuples. When predicting, enumerate all possible quintuples and output the part with s(i,j)'>0.
[0037] In the preferred solution, the loss function part constructs a "Softmax+cross entropy" multi-label classification loss function Loss, simplifies the multi-label classification problem into the difference between the target score and the non-target score, and uses the logsumexp calculation in the cross entropy to automatically balance the weight of each category. The expression is:
[0038]
[0039] In formula (5), we only need to consider the case of i≤j, that is, formula (6) should be satisfied, and the expression is:
[0040]
[0041] Where i and j are the starting and ending positions of entity type c in sentence X; Ω is all possible combinations of position and entity type; l is the length of sentence X; λ c is a set of entities of type c; Q c is the set of entity types that are not c; set the threshold to 0 and use S in the prediction stage c (i,j)'>0 is the discrimination condition, and the model decoding process is to parse out all position segments X[i:j] that meet the condition.
[0042] In the preferred solution, in step S4, a risk coupling evolution knowledge graph is constructed, and the evolution path of multiple nodes of intelligently predicting construction risks includes two parts:
[0043] 1) First, a calculation method for the risk factor transfer probability is designed to quantify the relationship information between risk factors; secondly, the extracted risk factors and their relationships are imported into the Neo4j graph database, a risk evolution knowledge graph is built, and the evolutionary path with the highest transfer probability of each risk factor is intelligently inferred.
[0044] In a preferred solution, the quantitative part of the relationship between the risk factors, the transition probability between risk factors A and B, represents the confidence level P(B|A) that the relationship is established, and is expressed as:
[0045]
[0046] In the formula, COUNT(A,B) is the frequency of risk factor A and risk factor B occurring simultaneously in the entire corpus, and COUNT(A) is the frequency of risk factor A occurring in the entire corpus;
[0047] The risk coupling evolution knowledge graph part uses the extracted risk factors as nodes V, the relationships as directed edges E, and constructs a set in the form of G = {V, E}, which is imported into the Neo4j graph database to build a construction risk coupling evolution knowledge graph. Combined with text matching technology, a multi-node construction risk coupling evolution path with the maximum transfer probability is generated.
[0048] The invention provides a method for coupling evolutionary reasoning of hydropower engineering construction risks, which has the following beneficial effects:
[0049] 1. In S1, a crawler technology is creatively developed for the field of hydropower engineering construction safety, and multi-source data such as high-quality construction accident cases, production safety reports, and accident notifications related to the field are collected to improve the professionalism and pertinence of the data and enrich the contextual information of entities and relationships. This method can construct a more comprehensive and accurate data set, thereby improving the effect of joint extraction of entity relationships in hydropower engineering construction accident reports.
[0050] 2. In S2, in order to improve the quality of text data, extract key information, and reduce data dimensions, the present invention proposes an innovative method for constructing a word segmentation vocabulary, which enhances the model's ability to understand the context between entities and relationships by repeatedly segmenting, analyzing, and adding vocabulary to a large amount of text until an ideal word segmentation vocabulary is obtained.
[0051] 3. In S3, the Bert-GPLinker risk factor and relationship joint extraction model is constructed, and the Bert pre-trained language model is used as the feature encoder to encode the sentence semantic vector. A rotational position encoding method is designed to integrate the relative position information into the model, thereby enhancing the model's sensitivity to the relative positions between entities.
[0052] 4. In S4, a risk coupling evolution knowledge graph was constructed, a calculation method for the risk factor transfer probability was designed, and the relationship information between risk factors was quantified. The extracted risk factors and their relationships were imported into the Neo4j graph database, a risk evolution knowledge graph was constructed, and the evolution path with the maximum transfer probability of each risk factor was intelligently inferred. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] The present invention will be further described below in conjunction with the accompanying drawings and embodiments:
[0054] Figure 1 is a flow chart of the present invention;
[0055] Figure 2 It is the Bert-GPLinker model structure;
[0056] Figure 3 The relationship between evaluation indicators and iteration rounds;
[0057] Figure 4 Partial knowledge graph of the evolutionary relationship of risk factors;
[0058] Figure 5 A multi-node coupled evolutionary reasoning system for construction risks. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0060] Combination Figure 1 to Figure 5 The specific embodiments of the present invention are described in further detail.
[0061] like Figure 1 As shown, a coupled evolutionary reasoning method for hydropower project construction risks includes the following steps:
[0062] S1. Collect texts of hydropower engineering construction accident cases and build an initial corpus.
[0063] The steps include:
[0064] S1.1. Collect the text of China’s hydropower engineering construction accident cases from 1980 to 2024.
[0065] S1.2. Organize the collected construction accident case texts into a “.txt” set to build an initial corpus.
[0066] S2. Preprocess the corpus, including data cleaning, word segmentation, and stop word removal.
[0067] The specific steps include:
[0068] S2.1, Data cleaning: The purpose is to eliminate noise and remove redundant, irrelevant or contradictory data. This includes deleting spaces, dates, job descriptions, responsible persons and responsible units, and other information that does not contain causal or progressive relationships between risk factors; and unifying data with multiple descriptions of a risk and cumbersome terms. For example, replace "failure to wear seat belts as required", "seat belts not fastened", "improper selection of seat belt fixing points", etc. with "improper use of protective equipment".
[0069] S2.2, word segmentation: Add mature word libraries such as Jieba that are currently widely used in the field of construction risk identification. On the basis of establishing a professional terminology library for construction risk, build a professional word library that matches the construction risk data of hydropower projects. The word library content includes multiple construction risk factors, which can achieve accurate word segmentation of accident case texts.
[0070] The steps for constructing a word segmentation vocabulary are as follows:
[0071] 1) Organize the risk characteristic words that affect hydropower project construction accidents into documents to be segmented;
[0072] 2) Organize and summarize the industry standards related to the risks of hydropower project construction in China, including the "Guidelines for Hazard Identification and Risk Assessment in Water Conservancy and Hydropower Project Construction", "Risk Management Specifications for Large and Medium-sized Hydropower Project Construction", "Construction Project Safety Management Regulations", etc., and establish a composite vocabulary containing professional and common terms.
[0073] 3) Compare the word segmentation results with the compound word library, remove the existing elements in the compound word library, add the non-existing elements, and delete the wrong word segmentation results, and repeat this process until the ideal word library is obtained.
[0074] S2.3. Remove stop words: Construct a special stop word list for the hydropower engineering construction accident case text to remove punctuation marks, pronouns, prepositions, conjunctions, numerals, modal particles, etc., to achieve dimensionality reduction of the feature items in the text and improve the speed and ability of extracting risk factors and their relationships.
[0075] S2.4, label definition: referring to the risk evolution mechanism of the "2-4" model of accident causes, the risk factors in the accident case text are divided into five entity categories: "organizational culture", "management system", "individual ability", "individual action", and "accident type". The Brat annotation software is used for annotation. In this embodiment, the total number of annotated entities is 838 and the total number of relationships is 2988.
[0076] S2.5, Dataset Division: After the above preprocessing operations, each accident case text is about 500 characters, which constitutes the hydropower engineering accident case text library. The 1292 accident case texts in the text library are randomly divided into training set, verification set and test set in a ratio of 6:2:2.
[0077] S3. Construct a Bert-GPLinker risk factor and relationship joint extraction model.
[0078] like Figure 2 As shown in the figure, the Bert-GPLinker model effectively integrates the information between entities, relations and text sequences, and solves the problem of difficulty in triple extraction in relation extraction tasks to a certain extent. It includes four parts. First, Bert is used to obtain dynamic word vectors rich in contextual information. Then the attention mechanism is used to enhance the model's ability to model relative position relationships in text sequences. Finally, the Global Pointer decoder is used to convert triple extraction into quintuple extraction. In addition, the class-imbalanced multi-label classification loss function "Softmax+cross entropy" is designed to automatically calculate the balance weight.
[0079] The Bert part uses the Bert pre-trained language model as a feature encoder to encode the sentence semantic vector and extract tokens. Given a sentence X, after encoding it through the Bert layer, the output H = {h1,h2,h3,…,h n |h i ∈R d×1}, where d is the dimension of the embedding and n is the number of tokens. Set the maximum length of the sentence to l, truncate the sentences that exceed the maximum length from the back to the front, and add 0 to the end of the sentences that are less than the maximum length.
[0080] In the attention mechanism, a rotary position embedding (RoPE) is designed to integrate relative position information into the model and enhance the model's sensitivity to the relative positions between entities. i and h j , after linear transformation by the fully connected layer, the sequence output vector q for scoring is obtained i,c and k j,c , the expression is:
[0081] q i,c =ω q,c h i +b q,c (1);
[0082] k j,c =ω k,c h j +b k,c (2);
[0083] q i,c and k j,c is the vector used to identify c-type entities, ω q,c and ω k,c is the weight of the change, b q,c and b k,c is the deviation, so the scoring formula is defined as follows:
[0084]
[0085] In the formula, S c It means that X[i:j] is an entity type c, and j ≥ i, where the subsequence consisting of the i-th element to the j-th element is the c-type entity.
[0086] RoPE is used to make full use of the boundary information of the entity and explicitly add relative position information to the model. RoPE is a transformation matrix that satisfies the equation Where R j-i is the position encoding matrix. First, construct a specific matrix R related to positions i and j in the text sequence i and R j Then, the dot product attention mechanism is used to respectively deal with the vector q at positions i and j. i,c and k j,c By multiplying, we can add the relative position information to formula (3) and obtain the score function S of entity c. c (i,j)'. The attention score only depends on the relative position (i,j), that is, the attention score contains the relative position information.
[0087]
[0088] The Global Pointer decoder part, joint extraction is to extract the knowledge triples (subject, predicate, object) of the text, namely (s, p, o), and use the Global Pointer decoder to convert it into (s h ,s t ,p,o h ,o t ) Extraction of five tuples, where s h and t are the first and last positions of the subject entity, o h and t are the first and last positions of the object entity respectively. h ,s t ,p,o h ,o t ) The scoring function s(i,j)' of the quintuple is used. When training the model, let the quintuple s(i,j)'>0 for the labeled data and s(i,j)'<0 for the other quintuples. When predicting, enumerate all possible quintuples and output the part with s(i,j)'>0.
[0089] In the loss function part, a "Softmax+cross entropy" multi-label classification loss function is constructed. The multi-label classification problem is simplified to the difference between the target score and the non-target score, and the logsumexp calculation in the cross entropy is used to automatically balance the weight of each category.
[0090]
[0091] In formula (5), we only need to consider the case of i≤j, that is, formula (6) should be satisfied.
[0092]
[0093] Where i and j are the starting and ending positions of entity type c in sentence X; Ω is all possible combinations of position and entity type; l is the length of sentence X; λ c is a set of entities of type c; Q c is the set of entities whose type is not c. Set the threshold to 0 and use S c (i,j)'>0 is the discrimination condition, and the model decoding process is to parse out all position segments X[i:j] that meet the condition.
[0094] S4. Build a risk coupling evolution knowledge graph to realize intelligent prediction of multi-node risk evolution paths.
[0095] Building a risk coupling evolution knowledge graph and intelligently predicting the evolution path of multiple risk nodes includes two parts. First, design a calculation method for the risk factor transfer probability and quantify the relationship information between risk factors. Secondly, import the extracted risk factors and their relationships into the Neo4j graph database, build a risk evolution knowledge graph, and intelligently infer the evolution path with the highest transfer probability of each risk factor.
[0096] The quantitative part of the relationship between the risk factors, the transition probability between risk factors A and B, represents the confidence level P(B|A) that the relationship is established:
[0097]
[0098] In the formula, COUNT(A,B) is the frequency of risk factor A and risk factor B occurring simultaneously in the entire corpus, and COUNT(A) is the frequency of risk factor A occurring in the entire corpus.
[0099] The risk coupling evolution knowledge graph part uses the extracted risk factors as nodes V, the relationships as directed edges E, and constructs a set in the form of G = {V, E}, which is imported into the Neo4j graph database to build a risk coupling evolution knowledge graph. Combined with text matching technology, a multi-node construction risk coupling evolution path with the maximum transfer probability is generated.
[0100] In this embodiment, the parameters for Bert-GPLinker model training are set as follows: learning rate 1×10 -5 , word vector dimension is 200, and iteration rounds are 300.
[0101] Combination Figure 3 , train and validate the Bert-GPLinker model, Figure 3 In (a), the total loss value converges fastest in the first 100 rounds, indicating that the model has a high learning ability for risk factors and their relationships in the early stage of training. As the number of iterations increases, the total loss value steadily decreases. When the iteration reaches about 150 rounds, the convergence rate gradually stabilizes, the total loss value fluctuates around 0.1218, and the accuracy curve stabilizes at the highest level, reaching 95.98%. Figure 3 The changing trend of the total loss value and accuracy curve in the first 150 rounds in (b) is Figure 3 (a) is basically the same, the final total loss value is stable at around 0.1774, and the accuracy, precision, recall and F1 score of the verification results are also stable at 94.72%, 93.71%, 90.46% and 92.06% respectively. Figure 3 (a) and (b) The curve changes of loss function and accuracy show that the Bert-GPLinker model proposed in this study has a better fitting effect on the self-built dataset.
[0102] Combined with Table 1, under the same experimental conditions, the classic models BiLSTM-CRF, BERT-BILSTM-CRF, mainstream models TPLinker and CasRel were compared on the test set. It can be seen that the accuracy of the extraction results of the Bert-GPLinker model proposed in the present invention on the test set is 93.94%, the precision is 93.52%, the recall is 90.33%, and the F1 score is 91.90%, which are all better than the comparison algorithm. Compared with the BiLSTM-CRF and BERT-BILSTM-CRF pipeline methods, the accuracy is improved by 36.50% and 41.09% respectively; the F1 score is improved by 43.62% and 49.55% respectively. The comparison results with the two pipeline models illustrate the superiority of joint extraction of risks and relationships, which can effectively solve the problems of error propagation, insufficient information interaction, and redundant information generation in the pipeline method, and improve the extraction accuracy.
[0103] From the performance comparison analysis with the joint extraction models TPLinker and CasRel, it can be seen that the accuracy values of the Bert-GPLinker model increased by 2.72% and 10.22% respectively; the F1 scores increased by 3.57% and 10.75% respectively, and the precision and recall rates also achieved good results. This is because although the CasRel model can effectively solve the problem of overlapping risk relationships, it ignores the prediction and extraction of risk relationship types. In addition, there is no relationship overlap problem in the dataset used in the present invention, and the complex risk and relationship identification process affects the final extraction results. Although the TPLinker model is better than the CasRel model, it is difficult to accurately identify long texts containing a large amount of entity boundary information. The main reason is that risks and relationships need to be labeled and extracted separately, without deep interaction and association, resulting in insufficient deep understanding of the semantic features of the text. Therefore, the accuracy of the model is not high when applied to a self-built dataset.
[0104] Table 1 Effect of joint extraction of regional risk factors and their relationships
[0105]
[0106] Combination Figure 4, with 831 risk factors extracted using the Bert-GPLinker model as nodes and 2699 relationships as directed edges. The Neo4j graph database is used to visualize the risk coupling evolution knowledge graph. Among them, the transition probability on the directed edge represents the possibility of risk factor evolution, which is quantified using formula (7) to finally obtain the knowledge graph of coupled evolution of hydropower project construction risk factors. The figure contains 70 construction risk factor nodes and 411 relationships. Among them, green nodes represent organizational culture factors, purple nodes represent management system factors, blue nodes represent individual ability factors, gold represents individual behavior factors, and red represents accident types.
[0107] Combination Figure 5 , the construction risk coupling evolutionary reasoning system constructed can quickly and intelligently infer the multi-node coupling evolutionary path and accident type with the highest probability for any input risk factor node. For example: input the risk factor text of "welding operation" into the system. The left side of the figure is the evolutionary node (part) related to the risk factor of "welding operation", which includes 20 safety risk factor nodes and 46 relationships. The right side is the intelligent reasoning of the evolutionary path with the maximum transfer probability of the risk factor. It can be seen that the probability of the occurrence of the risk factor of "welding operation" is 0.0239. The forward evolutionary path of this node is: "imperfect safety production system", "unimplemented safety responsibility system", "unreasonable construction plan", "inadequate safety management", "lax qualification review", "unlicensed work"; the backward evolutionary path is: "pipe mouth aging", "failure of anti-backfire device", "failure of pressure regulator", "gas leakage", "fire". The probability of the entire risk evolutionary path is 2.3726×10 -8 .
[0108] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for coupled evolutionary reasoning of hydropower project construction risks, characterized in that: The following steps are involved: S1. Collect texts of hydropower engineering construction accident cases and build an initial corpus; S2, preprocessing the corpus; S3, construct a joint extraction model of Bert-GPLinker risk factors and their relationships; S4. Build a risk coupling evolution knowledge graph to perform intelligent prediction of multi-node risk evolution paths.
2. A method for coupled evolutionary reasoning of hydropower engineering construction risks according to claim 1, characterized in that: The step S1 includes the following steps: S1.
1. Collect the case texts of hydropower engineering construction accidents in several years; S1.
2. Organize the collected construction accident case texts into a ".txt" set to build an initial corpus.
3. A method for coupled evolutionary reasoning of hydropower engineering construction risks according to claim 1, characterized in that: The step S2 includes the following steps: S2.
1. Data cleaning: including deleting irrelevant information and removing redundant or contradictory data; S2.2, word segmentation: add a mature word library in the field of construction risk identification, and build a professional word library that matches the hydropower project construction risk data on the basis of establishing a professional term library for construction risk. The word library content includes special vocabulary for multiple construction risk factors; S2.3, stop word removal: construct a special stop word list for hydropower engineering construction accident case text, remove punctuation marks and pronouns, prepositions, conjunctions, numerals, and modal particles, and reduce the dimension of the feature items of this text; S2.4, label definition: using the risk evolution mechanism of the "2-4" model of accident causes, the risk factors in the accident case text are divided into five entity categories: "organizational culture", "management system", "individual ability", "individual action", and "accident type", and the Brat annotation software is used for annotation; S2.
5. Divide the data set: Divide the accident case texts in the corpus into training set, validation set and test set according to the proportion.
4. A method for coupled evolutionary reasoning of hydropower engineering construction risks according to claim 1, characterized in that: In step S3, the joint extraction model of Bert-GPLinker risk factors and their relationships is constructed, which includes four parts, namely: 1) Bert part: Use Bert to obtain dynamic word vectors rich in context information; 2) Attention mechanism: The attention mechanism is used to enhance the model's ability to model the relative position relationship in the text sequence; 3) Global Pointer decoder part: Use the Global Pointer decoder to convert triplet extraction into quintuple extraction; 4) Loss function part: Design the loss function for class-imbalanced multi-label classification and automatically calculate the balance weights.
5. A method for coupled evolutionary reasoning of hydropower engineering construction risks according to claim 4, characterized in that: The Bert part uses the Bert pre-trained language model as a feature encoder to encode the sentence semantic vector and extract tokens. After a given sentence X is encoded by the Bert layer, the output H = {h1,h2,h3,…,h n |h i ∈R d×1 }, where d is the dimension of embedding and n is the number of tokens; set the maximum length of the sentence to l, truncate the sentences that exceed the maximum length from the back to the front, and add 0 to the end of the sentences that are less than the maximum length.
6. A method for coupled evolutionary reasoning of hydropower engineering construction risks according to claim 5, characterized in that: In the attention mechanism, a rotational position encoding method is designed to integrate relative position information into the model, enhancing the model's sensitivity to the relative positions between entities. For the i-th and j-th vectors h in H i and h j , after linear transformation by the fully connected layer, the sequence output vector q for scoring is obtained i,c and k j,c , the expression is: q i,c =ω q,c h i +b q,c (1); k j,c =ω k,c h j +b k,c (2); In the formula, q i,c and k j,c is the vector used to identify c-type entities, ω q,c and ω k,c is the weight of the change, b q,c and b k,c is the deviation, so the scoring formula is defined as follows: In the formula, S c (i,j) indicates the score of X[i:j] being entity type c and j ≥ i, where the subsequence X[i:j] consisting of the i-th element to the j-th element in the sentence is the c-type entity; X[i:j] is the segment of entity type c in sentence X with starting position i and ending position j; The rotational position is encoded as a transformation matrix that satisfies the equation Where R j-i is the position encoding matrix; construct a specific matrix R associated with position i and j in the text sequence i and R j Then, the dot product attention mechanism is used to respectively compare the vector q at positions i and j i,c and k j,c By multiplying, we can add the relative position information to formula (3) and obtain the score function S of entity c. c (i,j)', the expression is:
7. A method for coupled evolutionary reasoning of hydropower engineering construction risks according to claim 4, characterized in that: The Global Pointer decoder part, joint extraction is to extract the knowledge triples (subject, relation, object) of the text, namely (s, r, o), where s, p, and o represent subject, relation, and object respectively, and use the Global Pointer decoder to convert it into a five-tuple extraction of (sh, st, r, oh, ot), where s h and t are the first and last positions of the subject entity, o h and t are the first and last positions of the object entity respectively; according to the scoring function s(i,j)' of the quintuple (sh,st,r,oh,ot), when training the model, let the quintuple s(i,j)'>0 for the labeled data and the s(i,j)'<0 for the remaining quintuples. When predicting, enumerate all possible quintuples and output the part where s(i,j)'>0.
8. A method for coupled evolutionary reasoning of hydropower engineering construction risks according to claim 4, characterized in that: In the loss function part, the "Softmax+cross entropy" multi-label classification loss function Loss is constructed to simplify the multi-label classification problem into the difference between the target score and the non-target score. The logsumexp calculation in the cross entropy is used to automatically balance the weight of each category. The expression is: In formula (5), we only need to consider the case of i≤j, that is, formula (6) should be satisfied, and the expression is: Where i and j are the starting and ending positions of entity type c in sentence X; Ω is all possible combinations of position and entity type; l is the length of sentence X; λ c is a set of entities of type c; Q c is the set of entity types that are not c; set the threshold to 0 and use S in the prediction stage c (i,j)'>0 is the discrimination condition, and the model decoding process is to parse out all position segments X[i:j] that meet the condition.
9. A method for coupled evolutionary reasoning of hydropower engineering construction risks according to claim 1, characterized in that: In step S4, a risk coupling evolution knowledge graph is constructed, and the evolution path of multiple nodes of intelligently predicting construction risks includes two parts: 1) First, a calculation method for the risk factor transfer probability is designed to quantify the relationship information between risk factors; secondly, the extracted risk factors and their relationships are imported into the Neo4j graph database, a risk evolution knowledge graph is built, and the evolutionary path with the highest transfer probability of each risk factor is intelligently inferred.
10. A method for coupled evolutionary reasoning of hydropower engineering construction risks according to claim 9, characterized in that: The quantitative part of the relationship between the risk factors, the transition probability between risk factors A and B, represents the confidence level P(B|A) that the relationship is established, and is expressed as: In the formula, COUNT(A,B) is the frequency of risk factor A and risk factor B occurring simultaneously in the entire corpus, and COUNT(A) is the frequency of risk factor A occurring in the entire corpus; The risk coupling evolution knowledge graph part uses the extracted risk factors as nodes V, the relationships as directed edges E, and constructs a set in the form of G = {V, E}, which is imported into the Neo4j graph database to build a construction risk coupling evolution knowledge graph. Combined with text matching technology, a multi-node construction risk coupling evolution path with the maximum transfer probability is generated.
Citation Information
Cited By
Knowledge graph creating method and device and computer readable medium
CN120450021A