Knowledge extraction method and device for water burst accident potential in tunnel construction and storage medium

By using multi-model comparative experiments and data grading technology, a knowledge graph of potential hazards of sudden water inrush during tunnel construction was constructed, which solved the problem of scattered storage of knowledge about potential hazards of sudden water inrush during tunnel construction, and realized efficient and accurate prediction and intelligent decision-making for potential hazards of sudden water inrush during tunnel construction.

CN121598102APending Publication Date: 2026-03-03TAIYUAN UNIVERSITY OF TECHNOLOGY +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511752392.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-26
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively integrate and analyze fragmented knowledge about potential water inrush hazards during tunnel construction, leading to untimely predictions and limiting the level of intelligence in monitoring, early warning, and emergency decision-making.

Method used

By employing multi-model comparative experiments, adversarial sampling optimization of occlusion processing, and data grading techniques, a knowledge semantic framework is constructed to perform entity recognition and relation extraction. A knowledge graph is then built and stored in a graph database, enabling efficient knowledge extraction of potential hazards related to sudden water inrush during tunnel construction.

Benefits of technology

It improves the accuracy and comprehensiveness of knowledge extraction, enhances the ability to predict potential water inrush accidents during tunnel construction, and improves the intelligence level of monitoring, early warning, and emergency decision-making.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121598102A_ABST
    Figure CN121598102A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of tunnel water inrush accident safety evaluation, in particular to a knowledge extraction method and device for tunnel construction water inrush accident hidden dangers and a storage medium, and the method comprises the following steps: S1, collecting all data related to the tunnel construction water inrush accident hidden dangers, and analyzing the features of the water inrush accident hidden dangers, constructing a knowledge semantic framework, and extracting entities and entity relationship categories; s2, acquiring a corpus set to be processed, preprocessing data in the corpus set, constructing a data set, and grading the data in the data set according to sources; compared with the prior art, the method has the advantages that compared with a traditional knowledge extraction method, resistance sampling and type constraint optimization shielding processing are added, so that the problem that false negative samples can only be generated depending on high-quality input is avoided, the samples are further screened, the main beam of the input samples is improved, and the model training effect is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of safety assessment technology for tunnel water inrush accidents, specifically to a method, equipment, and storage medium for extracting knowledge about potential hazards of water inrush accidents during tunnel construction. Background Technology

[0002] Preventing sudden water inrush accidents during tunnel construction relies on various tunnel construction safety knowledge. This knowledge is scattered across fragmented data, such as hazard identification lists, construction safety specifications, and accident investigation reports, forming a large dataset on potential tunnel construction water inrush hazards. While this accumulating data provides a rich source of knowledge for tunnel construction safety, significant semantic differences and fragmented storage in unconnected systems severely limit comprehensive and interconnected analysis of potential water inrush hazards. Furthermore, the lack of expertise among technical personnel hinders the effective in-depth mining and reuse of this information, leading to untimely identification and prediction of potential tunnel construction water inrush hazards. This threatens the prevention and control of potential tunnel construction water inrush hazards and further limits the level of intelligent monitoring, early warning, and emergency decision-making.

[0003] Knowledge extraction techniques can be broadly categorized into three types: rule-based and dictionary-based methods, machine learning-based methods, and deep learning-based methods. Currently, deep learning methods are mostly used for knowledge extraction with large datasets and complex data structures. These methods rely on various neural networks to complete the knowledge extraction task. While these methods can automatically learn the complex features of text, in applications involving sudden water inrush accidents during tunnel construction, traditional identification methods suffer from problems such as blurred entity boundaries, difficulty in learning from small samples, and incomplete and inaccurate feature extraction due to the wide range of data sources. Specifically, these problems include contradictory descriptions of the same entity from different data sources, errors or outdated data, and the diversity of data sources. How to resolve ambiguities in the data, reduce false negative samples during training, improve data extraction accuracy, and adapt to extraction from multiple data sources are the problems that this application aims to solve by applying knowledge extraction to the field of sudden water inrush accidents during tunnel construction.

[0004] Therefore, developing a new method, equipment, and storage medium for extracting knowledge about potential water inrush accidents during tunnel construction is not only of urgent research value, but also has good economic benefits and industrial application potential. This is the driving force and foundation for the completion of this invention. Summary of the Invention

[0005] In order to overcome the deficiencies of the prior art as mentioned above, the inventors conducted in-depth research and, after a great deal of creative work, completed this invention.

[0006] Specifically, the technical problem to be solved by the present invention is to provide a method, equipment and storage medium for extracting knowledge of potential hazards of sudden water inrush accidents during tunnel construction, so as to solve the various technical problems mentioned in the background art.

[0007] To achieve the above objectives, the present invention provides the following technical solution: A method for extracting knowledge about potential hazards of sudden water inrush during tunnel construction includes the following steps: S1: Collect all data related to the potential danger of sudden water inrush during tunnel construction, analyze the characteristics of the potential danger, construct a knowledge semantic framework, and extract entity and entity relationship categories; S2: Obtain the corpus to be processed, preprocess the data in the corpus, construct the dataset, and classify the data in the dataset according to its source; S3: Conduct comparative experiments using multiple models, perform entity recognition on the data separately, and construct the optimal recognition model; S4: Extract entity relationships, and optimize occlusion handling with adversarial sampling during relationship extraction; S5: Construct a knowledge graph, extract knowledge from the data using the optimal recognition model, construct triplet data, perform knowledge fusion, use data hierarchy as the fusion processing level, and evaluate the entity alignment effect through evaluation metrics. S6: Knowledge storage, which stores the merged triplet data in a graph database to build a knowledge system for potential hazards of sudden water inrush during tunnel construction with dimensional associations.

[0008] In this invention, as an improvement, S2 specifically includes the following steps: (1) Data preprocessing: Text filtering and cleaning of the corpus data to remove invalid information that is not related to the accident hazard; (2) Data classification: The preprocessed data is classified based on the data source; (3) Data annotation: The data before classification is annotated using annotation tools to mark the location and semantic information of entities and relationships in the corpus. The annotated data is used as the recognition database for model training.

[0009] In this invention, as an improvement, the occlusion processing optimized by adversarial sampling includes: The RoBERTa model is used to generate difficult negative samples based on the dataset. Build a type constraint rule library and apply the rule constraints to generate high-quality candidate negative samples; The TransE model is used to calculate the sample count of all candidate negative samples. The higher the score, the greater the probability that the triplet is true. Extract the negative sample scores from the positive samples and form a score vector; Calculate the sampling probability of each negative sample, and select negative samples for training based on the probability distribution; The selected positive and negative samples are used to update the model parameters, and a database of positive samples and paired negative samples for training is constructed.

[0010] In this invention, as an improvement, classifying data according to its source includes: A multi-dimensional scoring standard is established to evaluate the reliability of each knowledge source. The scoring standard includes six scoring items: authority, accuracy, timeliness, coverage, consistency and structure. High and low score criteria are constructed for each scoring item. Based on the knowledge source score, it is divided into four levels: core source, high-quality source, reference source, and marginal source. Among them, the core source serves as the reference benchmark for entities and relationships.

[0011] In this invention, as an improvement, knowledge fusion specifically includes the following steps: (1) Entity alignment: a combination of exact matching and fuzzy matching is used to filter entity names and their core attributes to obtain an alignment candidate set; Calculate the similarity between entities and determine whether to align them using an alignment decision threshold; (2) Conflict detection and resolution: Based on the constraint rules of the knowledge semantic framework, conflict entries that contradict the entity pair's relational expression are screened, and attribute values ​​are calculated as a unified result to complete the conflict resolution; (3) Alignment effect evaluation: Precision P, recall R and F1 value are used as the core evaluation indicators for entity alignment, and conflict resolution consistency rate is used as the evaluation indicator for conflict handling effect. The entity alignment and resolution effect is judged to be satisfactory if the entity alignment F1 value is greater than or equal to 0.8 and the conflict resolution consistency rate is greater than or equal to 90%.

[0012] In this invention, as an improvement, data hierarchical classification is used as a knowledge fusion processing level, including: In entity alignment, the candidate set is selected using a high-level priority principle, with the core source entity as the standard entity, and other source entities aligned to the standard entity. In similarity calculation, entities are transformed into structured numerical vectors, and the entity similarity between vectors is calculated using the cosine similarity formula. The weight of knowledge source level is defined, and the comprehensive similarity is calculated by weighting the entity source level. The weight of multi-level combined knowledge sources is calculated by average value. In conflict resolution, when an entity's conflict entry has a unique core source entry, that unique value is used. If the conflict entry has multiple core sources, the knowledge source scoring standard is used as a secondary scoring item to calculate a weighted score, and the highest attribute value is selected as the unified result.

[0013] In this invention, as an improvement, the cosine similarity calculation formula is as follows: in, A m and B m Representing entities respectively A Attributes m and physical entities B Attributes m .in a i and b i These represent the word frequencies of the word segmentation. S Indicates the total number of attributes.

[0014] A computer device, including a memory, a processor, and communication components; The memory is configured to store one or more instructions; The processor is loaded by the communication component and executes memory instructions to perform the knowledge extraction method according to any one of claims 1-8.

[0015] A computer-readable storage medium storing executable instructions that are loaded and executed by a processor to implement the knowledge extraction method as described in any one of claims 1-8.

[0016] Compared with the prior art, the beneficial effects of the present invention are: (1) Compared with traditional knowledge extraction methods, this invention adds adversarial sampling and type constraint optimization occlusion processing, thereby avoiding the problem of relying solely on high-quality input and generating false negative samples, further screening samples, improving the main beam of input samples, and ensuring the model training effect.

[0017] (2) Compared with traditional knowledge fusion, this application adds hierarchical labels to the data, marks the data level by the data source, and uses the data level as the fusion processing level. This not only significantly improves the quality of the knowledge graph, but also provides a confidence basis for subsequent applications such as knowledge system construction, knowledge reasoning, and question answering, thus achieving high-quality knowledge fusion. Attached Figure Description

[0018] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the accompanying drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn to scale.

[0019] Figure 1This is a flowchart illustrating the knowledge extraction method of the present invention. Figure 2 This is a schematic diagram of the partial entity recognition evaluation results in Embodiment 1 of the present invention. Detailed Implementation

[0020] The embodiments of the technical solution of the present invention will now be described in detail with reference to the accompanying drawings. These embodiments are merely illustrative of the technical solution of the present invention and are therefore intended to limit the scope of protection of the present invention.

[0021] A method for extracting knowledge about potential hazards of sudden water inrush during tunnel construction includes the following steps: S1: Collect all data related to the potential hazards of sudden water inrush during tunnel construction, construct an ontology model of the potential hazards of sudden water inrush during tunnel construction. The ontology model is established using a seven-step method, which involves collecting data on potential hazards of sudden water inrush during tunnel construction, conducting characteristic analysis of potential hazards of sudden water inrush based on accident causation theory, identifying the key elements and their meanings involved in the knowledge points of the hazards, constructing a knowledge semantic framework, and clarifying the entities and relationships of potential hazards of sudden water inrush during tunnel construction. S2: Construct a corpus based on the collected data, and preprocess the data in the corpus. The preprocessing includes two parts: first, text cleaning of the corpus data to filter out literature materials that are not related to the case of sudden water inrush accident during tunnel construction; second, using the brat tool to annotate the corpus data, annotating entities and the relationships between entities, generating an ANN file after annotation, constructing a dataset, classifying the data in the dataset according to the data source, and setting classification labels. S3: Conduct comparative experiments using multiple models. Divide the data into training and test sets according to a predetermined ratio, perform entity recognition, and evaluate the recognition performance of each model using metrics including precision, recall, and accuracy. F 1 value; S4: Identify entity relationships, including optimizing occlusion handling with adversarial sampling and evaluating the entity relationship identification performance; S5: Construct a knowledge graph, extract knowledge from the data using the optimal recognition model, build triplet data, perform knowledge fusion, use data hierarchical classification as the fusion processing level, and use accuracy as the evaluation metric. P Recall rate R and F A single value is used to evaluate the alignment effect of the model; S6: Knowledge storage, which stores the merged triplet data in the Neo4j graph database to build a knowledge system for potential hazards of sudden water inrush during tunnel construction with dimensional associations.

[0022] Data sources include news websites, official websites of provincial emergency management bureaus, and CNKI (China National Knowledge Infrastructure). Collected data includes photos of potential hazards at tunnel construction sites, case studies of sudden water inrush accidents during tunnel construction, engineering data, expert experience, and tunnel construction safety standards and regulations. The semantic framework includes basic accident information, causes of sudden water inrush accidents, manifestations of hazards, and safety measures; therefore, case studies of sudden water inrush accidents and tunnel construction standards are the primary sources of information.

[0023] Based on the study of the characteristics of sudden water inrush disasters during tunnel construction, 24 types of entities are defined, including construction personnel, methods and regulations, construction machinery, construction materials, adverse geology, topography, meteorological conditions, and stratum lithology, as well as 9 types of entity relationships that need to be extracted, such as occurrence, adoption, adoption, cause, location, possession, restriction, inclusion, and activity.

[0024] In step S4, the RoBERTa model is introduced to optimize occlusion handling, but some problems still exist. The RoBERTa model learns language rules rather than factual knowledge, which makes it prone to false negatives and training bias. Therefore, adversarial sampling is added, and the specific steps are as follows: The RoBERTa model is used to generate difficult negative samples based on the dataset. A type constraint rule library is constructed, in which the rule constraints are based on 24 types of entities and 9 types of entity relationships. A set of ternary constraint rules of "relationship-head entity type-tail entity type" is formulated, and the rule constraints are applied to generate high-quality candidate negative samples. Propagate all candidate negative and positive samples forward and calculate the score of the negative samples using the TransE model. The higher the score, the greater the probability that the triplet is formed. Extract the negative sample scores from the positive samples and form a score vector; The sampling probability of each negative sample is calculated using the Softmax function, with the temperature coefficient as a hyperparameter. The calculation formula is as follows: in, T For temperature parameters, Z i For the elements of the input vector, Z j This represents the original score corresponding to the j-th element. K The total number of categories, e To calculate the score using negative samples.

[0025] Based on the probability distribution, negative samples are selected for training from the positive samples, and a database of positive samples and paired negative samples for training is constructed.

[0026] To enhance training reliability, the selected positive and negative samples can be used to calculate the gradient through the loss function, update the entity and relation vectors in the TransE model, and repeat the adversarial sampling process to make the model converge. The above is an optimization of occlusion handling in model training.

[0027] Data classification based on source includes: Establish a multi-dimensional scoring standard to evaluate the reliability of each knowledge source. The scoring standard includes six scoring items: authority, accuracy, timeliness, coverage, consistency, and information structure. Based on the knowledge source score, it is divided into four levels: core source, high-quality source, reference source, and marginal source.

[0028] In the scoring criteria, authority refers to the credibility of the data source organization, such as national authoritative news agencies and construction safety standards and regulations, which are highly credible sources; accuracy is based on actual historical construction data to determine whether the data is accurate; timeliness refers to the update time of the information, with outdated information placed in the low-score category; coverage refers to whether the data covers the core concepts and relationships of the field; consistency refers to whether the data is internally consistent and logically coherent; and structuredness refers to whether the data is in a standard format, with complex formats requiring adjustment and parsing. Each scoring item has two segmentation standards: high-level characteristics and low-level characteristics.

[0029] Based on the total score, they are divided into different levels. Among them, the core source serves as the reference benchmark for entities and relationships, the high-quality source is given high weight in conflict resolution, the reference source is given low weight in conflict resolution, and the marginal source is only used to supplement scarce information.

[0030] The construction of knowledge graphs and knowledge fusion specifically includes the following steps: (1) Entity alignment: a combination of exact matching and fuzzy matching is used to filter entity names and their core attributes to obtain an alignment candidate set. The high-level priority principle is adopted in the filtering process, with the core source entity as the standard entity and other level source entities aligned to the standard entity. The similarity between entities is calculated by converting entities into structured numerical vectors, calculating the entity similarity between vectors using the cosine similarity formula, clarifying the knowledge source level weights, and calculating the comprehensive similarity by weighting the entity source level. The weights of multi-level combined knowledge sources are calculated using the average value, and alignment decision thresholds are used to determine whether alignment is achieved. (2) Conflict detection and resolution: Based on the constraint rules of the knowledge semantic framework, conflict entries that contradict the entity pair's relational expression are screened, and attribute values ​​are calculated as a unified result to complete the conflict resolution; (3) Alignment effect evaluation, based on accuracy P Recall rate R and FThe F1 score is used as the core evaluation indicator for entity alignment, and the conflict resolution consistency rate is used as the evaluation indicator for conflict handling effectiveness. The entity alignment and resolution effectiveness are judged to be met if the entity alignment F1 score is greater than or equal to 0.8 and the conflict resolution consistency rate is greater than or equal to 90%.

[0031] The accuracy rate must be calculated for each entity type. P Recall rate R Harmonic Mean F The definition of the evaluation index is as follows: In the formula, TP This indicates the number of entities correctly identified by the model. FP This indicates the number of entities that the model incorrectly identified. FN Indicates the number of entities that the model failed to recognize during the recognition process; accuracy. P Used to evaluate the accuracy and recall of a model in identifying a specific entity type. R Used to evaluate the comprehensiveness of a model in recognizing a certain entity type. F A value of 1 is used to evaluate the model, taking into account both accuracy and recall, aiming to maximize the results of both while minimizing the difference between them.

[0032] In the evaluation of entity recognition models, the number of different entity types varies, and the evaluation results also differ for different entity types. Here, a weighted average algorithm is used to evaluate the overall recognition performance. The definition of the evaluation index is as follows: in, P 整 Indicates overall accuracy. R 整 Indicates the overall recall rate. F1 整 This represents the overall harmonic mean; N This represents the number of entity types, here we take 13. i Indicates the first i Entity types; TP i Indicates the first i The number of correctly identified entity types FP i Indicates the first i The number of misidentified entity types FNi Indicates the first i The number of unrecognized entities of each entity type.

[0033] Using data grading as a level for knowledge fusion processing includes: In conflict resolution, when an entity's conflict entry has a unique core source entry, that unique value is used. If the conflict entry has multiple core sources, the knowledge source scoring standard is used as a secondary scoring item to calculate a weighted score, and the highest attribute value is selected as the unified result.

[0034] The formula for calculating cosine similarity is as follows: After calculating entity similarity, the entity source weight is determined. The weights for core source, high-quality source, reference source, and edge source are 1.0, 0.8, 0.5, and 0.2, respectively. The entity source weight is calculated with the average value. For example, if an entity has both high-quality and reference sources, its weight is (0.8 + 0.5) ÷ 2 = 0.65, and 0.65 is used as the calculated weight.

[0035] The calculated entity similarity is multiplied by the hierarchical weight to obtain the weighted overall similarity.

[0036] The specific steps for conflict resolution are as follows: Detect conflicting entries of different attributes of the same entity and group them according to their source level, which are divided into core source group, high-quality source group, reference source group and edge source group; When a core source group has a unique, non-conflicting entry, the core source group entry is used to resolve the conflict. When a core source group has multiple conflicting items, the conflicting items are weighted and scored using a voting method based on the scoring items of the knowledge source scoring criteria, and the item with the highest score is selected as the conflict resolution item. When there is no core source group entry, repeat steps 2-3 above with the highest level group to obtain the resolution entry and resolve the conflict.

[0037] The specific steps for evaluating the alignment effect are as follows: (1) Evaluation index calculation, using accuracy rate P Recall rate R , F The 1 value is used as the core evaluation index for entity alignment, and the conflict resolution consistency rate is used as the evaluation index for conflict handling effectiveness. The entity alignment index is calculated using a weighted average algorithm, where the conflict resolution consistency rate = number of entity entries without conflict after resolution / total number of evaluated entity entries × 100%. (2) Effect judgment, entity alignment F A value ≥ 0.8 and a conflict resolution consistency rate ≥ 90% indicate that the entity alignment and resolution effect meets the standard. (3) Construct a standard alignment result set. From the structured dataset that has been aligned and conflict resolved, 20% of the samples are randomly selected by stratified sampling. Priority is given to covering the core types of the 24 types of entities to ensure that each type of entity and 9 types of relationships have a sufficient sampling ratio to avoid sample bias. (4) Compare the extracted proportional samples with the manually labeled ones to determine whether the evaluation results are accurate and form a standard alignment result set.

[0038] Example 1: S1: Obtain information on sudden water inrush accidents during tunnel construction, including: photos of potential hazards at the tunnel construction site, case studies of sudden water inrush accidents during tunnel construction, engineering data, expert experience in the field, and tunnel construction safety specifications and regulations. Case studies of sudden water inrush accidents and tunnel construction specifications will be the primary sources of data. The collected information on potential water inrush accidents will include: the causes of the accidents (direct, indirect, possible, and root causes); basic information about the accidents (time, location, tunnel name, and type); consequences (personnel casualties and economic losses); and relevant safety measures (including preventative measures such as advanced geological forecasting, treatment measures such as curtain grouting, usage scenarios of construction machinery, construction environment monitoring, selection of construction materials, and operational requirements for construction personnel and construction processes).

[0039] The collected data is used to build an ontology semantic framework in the ontology development tool Protégé software, forming a domain ontology model.

[0040] S2: The collected data underwent text cleaning, removing invalid information and retaining only relevant segments containing potential risks. Shorter texts were merged to form 150 Word documents. Then, spaces were removed, errors during copying were corrected, and line breaks were added. The documents were then saved as TXT files in UTF-8 encoding. Through data cleaning, images, spaces, tables, and other irrelevant characters were removed from the original text while preserving the original text content to the greatest extent possible, ultimately resulting in a corpus of 3563 entries.

[0041] The data within the corpus is graded based on its knowledge source, with high-level features receiving 5 points and low-level features receiving 1 point. The specific scoring criteria are as follows: Scoring Items Evaluation indicators High-level characteristics (5 points) Low-level feature (1 point) authoritative Credibility of information sources Sources: official agencies, construction safety standards, regulations, and authoritative experts Other information sources besides high-level features accuracy Comparison of multiple construction examples Similar information data under similar surrounding rock conditions and construction steps Error data and unverified information were found. Timeliness Information update frequency Updated in real time, with a clear timestamp Long period without updates Coverage Matching with the domain Core concepts and relationships related to the potential hazards of sudden water inrush during tunnel construction Uncovered core concept machine relationship consistency Are there internal contradictions in the data? No contradictions, logically sound There are obvious contradictions Information Structure Data format Consistent format Non-structurally consistent text needs to be parsed. Based on the above scoring criteria, data is assigned values ​​according to its source. The total score of the knowledge source is obtained by adding the scores of each scoring criterion. Among them, core sources are worth 24-30 points, high-quality sources are worth 18-23 points, reference sources are worth 12-17 points, and marginal sources are worth <12 points. They are divided into different levels according to the total score. Core sources serve as reference benchmarks for entities and relationships, high-quality sources are given high weight in conflict resolution, and marginal sources are only used to supplement scarce information.

[0042] After classifying the data into levels, the data is labeled. The corpus on the potential for sudden water inrush accidents during tunnel construction is unstructured data. Therefore, the data labeling task utilizes the web-based brat text annotation tool to structurally process the unstructured raw text on the potential for sudden water inrush accidents during tunnel construction. Using the brat text annotation tool, entities and their relationships are labeled. The original TXT text, after annotation, generates corresponding ANN files to record the location information of the labeled corpus.

[0043] The TXT text generated by brat annotation and the corresponding ANN annotation file are used to extract the entity location and type information of the annotations. The text and entity labels in the corpus are matched and associated. The text in the corpus is randomly shuffled and divided into training set and test set in an 8:2 ratio to construct positive samples for named entity recognition for model training.

[0044] S3: The training and test sets were used to train the selected recognition models, including BERT-BiLSTM-CRF, BERT, BiLSTM-CRF, BiLSTM, and BERT-CRF. Under the same experimental conditions, these five models were compared, and the BERT-BiLSTM-CRF model was determined to be the optimal recognition model. The entity recognition results of the BERT-BiLSTM-CRF model were compared with those of the manually labeled dataset. Some entity recognition results are shown below. Figure 2 As shown.

[0045] S4: Identify entity relationships and generate difficult negative samples that "match entity pairs but have incorrect relationships" based on the constructed positive samples; Using 24 types of entities and 9 types of entity relationships, a set of ternary constraint rules of "relationship-head entity type-tail entity type" is formulated as rule constraints to filter difficult negative samples and generate high-quality candidate negative samples; Propagate all candidate negative and positive samples forward, calculate the negative sample score using the TransE model, and use the model scoring function: f ( h , r , t )=-∥ h + r - t ∥ p in, p For norm type, h , r , t It is a triplet. h + r - tfor h+r and t The vector difference.

[0046] Calculate the sampling probability of negative samples, select negative samples for training from positive samples, and construct a database of positive samples and paired negative samples for training.

[0047] The above steps construct positive and negative sample databases for RoBERTa model recognition training. Some entity relationships and sample data are shown in the following figure: Association type relation name Relationship description Positive samples negative samples Clustering Relationship composition One concept is a constituent element of another concept, emphasizing the subordinate relationship between the part and the whole. Drilling Rig - Components - Drill Bit Drilling rig - includes - drill bit Category Relationship Include This indicates that a certain concept belongs to another concept with a broader scope. Construction environment - including hydrogeology Construction environment - leading to - hydrogeology Modifying Relationship have It reflects the correspondence between things and their inherent attributes. Surrounding Rock - Possesses - Grade Surrounding Rock - Occurrence - Level Limitation relationship limit Relationships that define the scope of application of relevant objects Workers - Restrictions - Safety Helmet Workers - take - safety helmet Spatial Relationships lie in This indicates the interdependent and mutually influential relationship between different entities at the spatial level. Xiema Tunnel - located in Chongqing Xiema Tunnel - Appearance - Chongqing causation lead to Describe the relationship between two or more events, where one event triggers the occurrence of another event. Heavy rainfall caused a sudden surge of water. Heavy rainfall - sudden gushing of water Method Relationship take The methods and approaches used by an entity in carrying out its related activities Inrush - Extraction - Curtain Grouting Water inrush - Curtain grouting adopted Material Relationships use The materials or machinery used by an entity in carrying out related activities Construction workers - use - protective equipment Construction personnel - possess - protective equipment Existence Relationship Appear The condition exhibited at the site or the actual safety hazards present. Fault gouge appears within the fault zone. Fault zone - leading to - fault gouge After RoBERTa model identification and optimization of occlusion processing, the entity relationship evaluation results are as follows: Relationship type Sample size F1 value accuracy Recall rate limit 108 0.54 0.74 0.57 lie in 114 0.76 0.75 0.69 use 136 0.6 0.83 0.87 Activity 191 0.56 0.57 0.82 Include 540 0.82 0.66 0.7 have 612 0.7 0.86 0.72 take 948 0.89 0.91 0.87 Appear 1054 0.84 0.84 0.8 lead to 1643 0.77 0.78 0.82 S5: Construct a knowledge graph to complete the establishment of the recognition system.

[0048] Based on the database, triplet data is automatically extracted and constructed through recognition models for knowledge fusion.

[0049] Based on entity alignment according to data source level, and after similarity calculation and conflict resolution, precision (P), recall (R), and F1 score are used as the core evaluation indicators for entity alignment to evaluate the alignment effect.

[0050] The aligned triple data is used to create nodes and relationships in the Neo4j graph database. The third-party library Py2neo is used to enable interaction between Neo4j and the Python environment. The triple knowledge is imported to complete the construction of a knowledge graph of potential hazards of sudden water inrush during tunnel construction.

[0051] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be covered within the scope of the claims and specification of the present invention.

Claims

1. A method for extracting knowledge about potential hazards of sudden water inrush during tunnel construction, characterized in that, Includes the following steps: S1: Collect all data related to the potential danger of sudden water inrush during tunnel construction, analyze the characteristics of the potential danger, construct a knowledge semantic framework, and extract entity and entity relationship categories; S2: Obtain the corpus to be processed, preprocess the data in the corpus, construct the dataset, and classify the data in the dataset according to its source; S3: Conduct comparative experiments using multiple models to identify potential hazards of sudden water inrush accidents during tunnel construction within the data, and construct the optimal identification model; S4: Identify entity relationships, where adversarial sampling optimizes occlusion handling; S5: Construct a knowledge graph, use the trained model to extract knowledge from the data, construct triple data, perform knowledge fusion, use data hierarchy as the fusion processing level, and evaluate the entity alignment effect through evaluation metrics. S6: Knowledge storage, which stores the merged triplet data in a graph database to build a knowledge system for potential hazards of sudden water inrush during tunnel construction with dimensional associations.

2. The knowledge extraction method for potential water inrush accidents during tunnel construction according to claim 1, characterized in that, Data preprocessing in S2 includes the following steps: (1) The collected corpus data is filtered and cleaned to remove invalid information that is not related to the accident hazard; (2) Data annotation: After the data is classified, it is annotated by the annotation tool to mark the location and semantic information of entities and relationships in the corpus. The annotated data is used as the recognition database for model training.

3. The knowledge extraction method for potential water inrush accidents during tunnel construction according to claim 1, characterized in that, Optimizing occlusion handling with adversarial sampling includes: The RoBERTa model is used to generate difficult negative samples based on the dataset. Build a type constraint rule library and apply the rule constraints to generate high-quality candidate negative samples; The TransE model is used to calculate the sample count of all candidate negative samples. The higher the score, the greater the probability that the triplet is true. Extract the negative sample scores from the positive samples and form a score vector; Calculate the sampling probability of each negative sample, and select negative samples for training based on the probability distribution; The selected positive and negative samples are used to update the model parameters, and a database of positive samples and paired negative samples for training is constructed.

4. The knowledge extraction method for potential water inrush accidents during tunnel construction according to claim 1, characterized in that, Data classification based on source includes: A multi-dimensional scoring standard is established to evaluate the reliability of each knowledge source. The scoring standard includes six scoring items: authority, accuracy, timeliness, coverage, consistency, and information structure. High and low score criteria are constructed for each scoring item. Based on the knowledge source score, it is divided into four levels: core source, high-quality source, reference source, and peripheral source. Among them, the core source serves as the reference benchmark for entities and relationships.

5. The knowledge extraction method for potential water inrush accidents during tunnel construction according to claim 1, characterized in that, Knowledge integration specifically includes the following steps: (1) Entity alignment: a combination of exact matching and fuzzy matching is used to filter entity names and their core attributes to obtain an alignment candidate set; Calculate the similarity between entities and determine whether to align them using an alignment decision threshold; (2) Conflict detection and resolution: Based on the constraint rules of the knowledge semantic framework, conflict entries that contradict the entity pair's relational expression are screened, and attribute values ​​are calculated as a unified result to complete the conflict resolution; (3) Alignment effect evaluation: Precision P, recall R and F1 value are used as the core evaluation indicators for entity alignment, and conflict resolution consistency rate is used as the evaluation indicator for conflict handling effect. The entity alignment and resolution effect is judged to be satisfactory if the entity alignment F1 value is greater than or equal to 0.8 and the conflict resolution consistency rate is greater than or equal to 90%.

6. The knowledge extraction method for potential water inrush accidents during tunnel construction according to claim 5, characterized in that, Using data grading as a level for knowledge fusion processing includes: In entity alignment, the candidate set is selected using a high-level priority principle, with the core source entity as the standard entity, and other source entities aligned to the standard entity. In similarity calculation, entities are transformed into structured numerical vectors, and the entity similarity between vectors is calculated using the cosine similarity formula. The weight of knowledge source level is defined, and the comprehensive similarity is calculated by weighting the entity source level. The weight of multi-level combined knowledge sources is calculated by average value. In conflict resolution, when an entity's conflict entry has a unique core source entry, that unique value is used. If the conflict entry has multiple core sources, the knowledge source scoring standard is used as a secondary scoring item to calculate a weighted score, and the highest attribute value is selected as the unified result.

7. The knowledge extraction method for potential water inrush accidents during tunnel construction according to claim 6, characterized in that, The formula for calculating cosine similarity is as follows: in, A m and B m Representing entities respectively A Attributes m and physical entities B Attributes m .in a i and b i These represent the word frequencies of the word segmentation. S ∑ represents the total number of attributes. n i=1 ,∑ s m=1 They are summations, respectively.

8. A computer device, characterized in that: Includes memory, processor, and communication components; The memory is configured to store one or more instructions; The processor is loaded by the communication component and executes memory instructions to perform the knowledge extraction method according to any one of claims 1-8.

9. A computer-readable storage medium, characterized in that: The readable storage medium stores executable instructions, which are loaded and executed by a processor to implement the knowledge extraction method as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Method and system for evaluating risk of silt dam system

    CN118350643A

  • Tunnel water gushing disaster prediction method and device and storage medium

    CN119514779A

  • Shield construction typical risk knowledge graph construction method based on RoBERTa-WWM-ext-BiLSTM-CRF

    CN120316315A