Bridge major accident potential dictionary based on knowledge graph
Through the knowledge graph-based dictionary of major accident hazards on bridges, combined with the BERT-BiLSTM-MHA-CRF model and auxiliary search module, the problem of major accident hazard information retrieval in bridge construction has been solved, and the rapid and accurate hidden danger identification and prevention measures have been achieved, which has improved the Construction management efficiency.
Patent Information
- Application Number
- CN202411270686.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2024-12-13
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
During the bridge construction process, it is difficult for the existing technology to quickly and effectively retrieve and manage related major accident hazard information, which makes it time-consuming and labor-intensive to find standard information, and the search system lacks interpretability and cannot provide specific solutions.
Using a knowledge graph-based dictionary for major accidents, including problem recognition module, Cypher query statement construction module and query feedback module, entity recognition and question dictionary database matching are performed through the BERT-BiLSTM-MHA-CRF model, combining auxiliary search modules and knowledge The ontology model is constructed at the graph to achieve efficient inquiry and answers to major bridge accident hazards.
It greatly reduces user search time, improves the efficiency of identifying hidden dangers and taking preventive measures, provides accurate and feasible answers, enhances the management efficiency of the construction process, and realizes more accurate and efficient standard query and answer services through knowledge graphs.
Smart Images

Figure CN119128103A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent question-answering systems, and in particular to a knowledge graph-based dictionary of bridge major accident hazards. Background Art
[0002] In recent years, my country's modernization process has gradually accelerated, and the most representative of these is the rapid development of highway bridge construction. In the construction and operation of some bridges, there may be serious problems that directly or indirectly lead to structural failure, production safety accidents, or affect the service life of the bridge, such as insufficient bearing capacity, insufficient structural stability, failure to meet design specifications or standards, or structural design defects such as insufficient earthquake and wind resistance, material quality problems caused by the use of unqualified building materials, temporary support system failure and unsafe conditions of mechanical equipment, construction under severe weather conditions and other environmental hazards, personnel working at height, insufficient safety protection, insufficient training and other hazards, unreasonable construction organization, poor management and supervision mechanisms and other management loopholes and hazards. Therefore, in order to discover and prevent problems in a timely manner, researchers began to combine knowledge graph technology and question-answering system technology to solve problems, and this field has become a popular research direction.
[0003] Knowledge graphs use one or more artificial intelligence technologies to extract the required knowledge from large amounts of text data and structured data, and then organize them in a graphical structure, aiming to enable machines to better understand human knowledge. Knowledge graphs are a semantic network that expresses the relationships between entities. They use entities as nodes and relationships between entities as attributes between edges. They play an important role in the field of automatic question answering and are being used more and more. The most important form of developing and reusing knowledge graphs is to match query paths in the graph database based on the query language of the graph database itself and return the desired knowledge content. The question-answering system combined with the knowledge graph has largely solved the drawbacks of the traditional question-answering system and realized the transition from document question-answering to knowledge graph question-answering.
[0004] In the era of Internet big data, how to quickly retrieve specific information has not been effectively solved. There are endless search engines on the market, but users still rely on keywords to search for answers. On the other hand, for the knowledge in the field of bridge accident hazards, the industry involves a wide range of content. The construction process has the characteristics of many field operations, long construction time, high mobility of operators, and complex and diverse processes. The diversity of bridge construction scenes, project scales, construction environments, process machinery and equipment, and construction seasons has formed the variability of construction technical solutions and the uniqueness of construction status. Faced with the large-scale divisions or sub-projects in construction, the difficulty of construction operations and the process greatly affected by the natural environment, if you want to find the relevant information in the standards, you still need to manually look through them, which is very time-consuming and laborious. At the same time, the search system lacks the problem of explainability, and most of the time it is impossible to give specific and appropriate solutions or answers. Summary of the invention
[0005] The purpose of the present invention is to provide a dictionary of major bridge accident hazards based on knowledge graph, so as to solve the above-mentioned problems existing in the prior art.
[0006] In order to achieve the above object, the technical solution adopted by the present invention is as follows:
[0007] A dictionary of major bridge accident hazards based on knowledge graph, including the following contents:
[0008] Question identification module: used to identify the main information in the question input by the user, and distinguish the entity type and question subject to which the question belongs;
[0009] Cypher query statement construction module: used to identify the intent of the question and fill the slots of the query statement template according to the entity type and question type of the question to match the corresponding query statement;
[0010] Query feedback module: used to predefine the output format of query results. When a corresponding query statement is matched, the query results are returned according to the matching query statement template.
[0011] Preferably, the question identification module first saves different question entities according to their entity types according to the corpus of knowledge triples into the corresponding entity dictionary library, and then saves the corresponding question words into the question dictionary library according to the possible questioning methods of the question entities; when the user enters a question, it needs to go through the search and matching of the above two dictionaries, and after passing through the entity dictionary library, the specific entity name and its entity type will be returned; the relationship between the entity type and the question word is certain, and after the entity type is determined by the entity dictionary library, it only needs to go through the question dictionary library related to this entity type to determine the entity type of the question and the corresponding question word.
[0012] Preferably, the question recognition module uses a BERT-BiLSTM-MHA-CRF model to perform bidirectional processing on the encoded feature vector to obtain a bidirectional feature vector, and then performs entity recognition according to the question input by the user to determine the entity type in the question; the BERT-BiLSTM-MHA-CRF model includes:
[0013] Input layer: used to construct the input text sequence into an input sequence that contains questions and question features and can be recognized by the embedding layer;
[0014] Embedding layer: used to load the pre-trained word embedding vector of major hidden dangers of bridge accidents through the BERT model to obtain the lexical semantic information, attributes and location information of the problem, and generate a one-way sequence that is easy for the BiLSTM layer to accept;
[0015] BiLSTM layer: used to perform global feature extraction and obtain feature vectors containing context features;
[0016] MHA attention mechanism layer: used to perform residual connection and layer normalization on the vectors output by the embedding layer and BiLSTM layer to obtain the feature vector input to the CRF layer, thereby optimizing the network structure of the model;
[0017] CRF layer: used to predict the label score of the input sequence, and then calculate the distribution probability of different label sequences, screen out the optimal label sequence, and achieve the prediction of the global optimal label sequence.
[0018] Preferably, the hidden danger dictionary also includes:
[0019] Auxiliary retrieval module: When the question identification module fails to find any results, it is used to assist in finding the question subject based on the keywords of the question by comparing the keywords with the entity types, thereby achieving accurate search of the entity types of the question.
[0020] Preferably, the auxiliary retrieval module first extracts all entity nodes in the knowledge graph of major accident hazards of bridges and removes duplicates, and saves the extracted content in the form of a list; when the input question is unsuccessful in the query of the question identification module, it prompts to enter the keywords of the question, uses the keywords of the question to make a similarity comparison with the entity list, and finally returns the entity name with the highest similarity.
[0021] Preferably, the bridge major accident hazard dictionary is constructed using the following steps:
[0022] S1. Construct an ontology model: determine the scope and objectives of the knowledge graph and the concepts and entities that need to be represented, hierarchize the concepts and entities that need to be represented, establish a conceptual system, define relationships for each concept and entity, and realize the construction of the ontology model;
[0023] S2, knowledge extraction: directly extract knowledge elements from selected accident cases;
[0024] S3, knowledge fusion: identify and align the same entities from different data sources to integrate relational data from different data sources and handle contradictory or conflicting information from different data sources;
[0025] S4. Knowledge storage: Store the knowledge triples in Excel tables, and in the Python environment, rely on the code database Py2neo to achieve the collaboration between Neo4j and the Python environment, and then implement the storage task of knowledge triples based on Neo4j.
[0026] Preferably, step S1 specifically includes analyzing the hidden danger characteristics of the bridge during the construction process, and constructing the entity type based on the accident type, construction location, construction link, and accident process when the bridge accident occurs;
[0027] Read and analyze the materials related to the prevention and control of safety hazards in bridge engineering, summarize the logical relationships between entity types, determine all entity types and entity relationships, and finally construct an ontology model that meets the knowledge graph requirements of major accident hazard prevention and control in bridges.
[0028] Preferably, the logical relationships between entity types include: contains relationship, which is the genus-species relationship within the entity concept; adopts relationship, which is the method used by the entity type; adopts relationship, which is the type or machinery used by the entity type; occurs relationship, which is the accident process or hidden danger; is in relationship, which is the relationship between the entity type and the construction link; is located in relationship, which is the relationship between the entity type and the working environment; belongs to relationship, which is the relationship between the accident type and the accident process; triggers relationship, which is the relationship between the hidden danger manifestation and the accident process.
[0029] Preferably, step S2 specifically includes selecting and screening available accident cases, converting them into text and saving them in Word format, deleting spaces and erroneous statements that occur during the copying process, and performing line break processing, storing the processed text in TXT format, and setting the encoding format to UTF-8 to achieve text data cleaning;
[0030] Use Label-studio annotation software to perform entity annotation tasks on the cleaned text data. Before annotation, add entity types and entity relationships in advance. When annotating, directly select the text and check the entity type. Drag the entity relationship between entities. The CSV file corresponding to the annotation file is generated during the annotation process. The CSV file generated by annotation and its corresponding TXT text are finally generated through text preprocessing to generate relevant data sets. The data sets will be used for neural network training and as labeled knowledge element triples to participate in the construction of the final knowledge graph.
[0031] Preferably, step S3 specifically comprises: adopting a theoretical analysis method, using Python language to reprocess the results of text annotation related to bridge safety accident hazard prevention and control to generate two Excel files, obtaining the conceptual information of the entity in this scenario, comparing it with other files, and updating the entity relationship expression method in the relationship column. Repeating this task finally completes the task of merging entities that express the same concept in the same entity type.
[0032] The beneficial effects of the present invention are as follows: 1. The question-answering system is combined with the knowledge graph technology, and the relevant knowledge on the major accident hazards of bridges is organized and managed in the form of knowledge graphs. On this basis, a dictionary of major accident hazards of bridges is constructed, and the data stored in the graph is effectively utilized in the form of questions and answers. Users do not need to use professional question-answering methods to ask questions. The system will process the questions and finally provide users with accurate and feasible answers. It no longer relies on people to repeatedly check and search for the desired content. For construction site workers, the search time is greatly reduced, and the efficiency of identifying hidden dangers and taking corresponding prevention and control measures can be improved, so as to better complete the construction process. 2. The hidden danger dictionary can use the relationships and attributes in the knowledge graph to achieve more accurate and efficient standard query and answer services, and in actual applications, professional and technical personnel can obtain the required professional knowledge and information through this dictionary to improve the quality of the project, reduce the occurrence of hidden dangers and accidents, and take active and effective prevention and control measures for the hidden dangers that have already appeared. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 is a structural diagram of an accident potential hazard dictionary in an embodiment of the present invention;
[0034] Figure 2 is an operation flow chart of the accident potential hazard dictionary in an embodiment of the present invention;
[0035] Figure 3 It is a model structure diagram of the problem identification module in an embodiment of the present invention. DETAILED DESCRIPTION
[0036] 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. It should be understood that the specific implementation methods described herein are only used to explain the present invention and are not used to limit the present invention.
[0037] Embodiment 1
[0038] like Figure 1 and Figure 2As shown, in this embodiment, a dictionary of major bridge accident hazards based on knowledge graph is provided, including a problem identification module, an auxiliary retrieval module, a Cypher query statement construction module and a query feedback module; the key entity names in the user input text can be extracted by the problem identification module, and the user's consultation intention can be judged according to the user input text, and the entity type and question category can be further judged, so as to determine the two features of the question subject and the question word. The auxiliary retrieval module extracts all the entity nodes in the knowledge graph of major bridge accident hazards and removes the duplicates, and saves the extracted content in the form of a list. After that, when the input question is fruitless, the question-answering system will prompt to enter keywords, and use the keywords entered by the user to make a similar comparison with the entity list, and finally return the entity name with the highest similarity. The Cypher query statement construction module identifies the intention of the user's question statement, and fills the query statement template according to the entity type and question type of the user's question statement to match the Cypher query statement. The query feedback module searches in the knowledge graph of major bridge accident hazards accordingly, obtains the text query result, and returns the text query result to the user.
[0039] 1. Problem Identification Module
[0040] The function of the question recognition module is to identify the main information in the question input by the user, and to distinguish the entity type and the subject of the question. After the user inputs the question into the question recognition module, the entity objects contained therein are first retrieved, and the entity type to which the entity object belongs can be determined by matching it with the defined dictionary library; then the question form is matched with the content of the defined dictionary library to determine the type of question, that is, to determine the content that the question wants to find.
[0041] In this embodiment, the entity in the question is identified as follows:
[0042] The question recognition module first saves different question entities into the corresponding entity dictionary according to their entity types based on the corpus of knowledge triples, and then saves the corresponding question words into the question dictionary according to the possible questioning methods of the question entities; when the user enters a question, it needs to go through the search and matching of the above two dictionaries, and the specific entity name and its entity type will be returned after passing through the entity dictionary; the relationship between the entity type and the question word is certain. After the entity type is determined by the entity dictionary, it only needs to go through the question dictionary related to this entity type to determine the entity type of the question and the corresponding question word.
[0043] For example: What measures should be taken when a bridge erector overturns? When the question passes through the entity dictionary, the question subject "bridge erector overturns" will be extracted, and its entity type is hidden danger manifestation. When the question passes through the question dictionary, the question word "measures" can be extracted.
[0044] In this embodiment, Figure 3 As shown, the question recognition module adopts the BERT-BiLSTM-MHA-CRF model to perform bidirectional processing on the encoded feature vector to obtain a bidirectional feature vector, and performs entity recognition based on the question text input by the user to determine the entity type in the question to facilitate the operation of the subsequent auxiliary retrieval module.
[0045] The BERT-BiLSTM-MHA-CRF model consists of five parts: input layer, embedding layer, BiLSTM layer, MHA attention mechanism layer and CRF layer.
[0046] (1) Input layer: The input layer takes the input text sequence S t (t=1、2、3、……、n) is constructed into an input sequence a that contains user questions and question features and can be recognized by the BERT layer t (t=1, 2, 3,...,n).
[0047] (2) Embedding layer: The embedding layer uses the BERT model to load the pre-trained word embedding vector of major hidden dangers of bridge accidents to obtain the lexical semantic information, attributes and location information of the problem, and generates a one-way sequence X that is easy for the BiLSTM layer to accept. t (t=1, 2, 3,...,n).
[0048] The BERT (Bidirectional Encoder Representation form Transformer) model is a multi-layer bidirectional Transformer encoder based on fine-tuning, which captures the bidirectional relationships in the text more thoroughly based on the contextual relationships.
[0049] (3) BiLSTM layer: The BiLSTM layer performs global feature extraction and obtains the feature vector H containing context features. t .
[0050] Bidirectional long short-term memory (BiLSTM) is a bidirectional recurrent neural network composed of forward and backward LSTM. LSTM solves the problem of gradient vanishing and gradient exploding in the training process of traditional recurrent neural network (RNN) structure. The sequence output process is that the forward LSTM inputs X1, X2, X3, ..., X n Will get Backward LSTM input X1, X2, X3, ..., X n Will get Combine the forward and backward output vectors and finally output H t (t=1, 2, 3,...,n).
[0051] (4) MHA attention mechanism layer: Considering that the output vectors generated by the pre-trained Bert model and BiLSTM network contain a large number of positional features and semantic relationships. The MHA model is introduced to perform residual connection and layer normalization on the output vectors generated in the above steps to optimize the network structure of Bert-BiLSTM-MHA-CRF and improve the accuracy of sequence prediction tasks. The output vectors generated by the pre-trained Bert model and BiLSTM network are converted into three matrices of the same dimension through linear changes, namely, the value matrix (Value, abbreviated as V), the key matrix (Key, abbreviated as K), and the query matrix (Query, abbreviated as Q). The three matrices are input into the scaled dot product attention mechanism in turn. According to the following formula, the information is jointly represented m times to obtain the bridge accident hazard text feature matrix MHA (Q, K, V) at time t. Finally, the result of the m-time information joint representation is linearly changed to obtain the feature vector P of the input CRF layer. t (t=1, 2, 3,...,n).
[0052] MHA(Q,K,V)=C(h1,h2,…h m )·W o
[0053]
[0054] Among them, d k is the dimension value of matrix Q, K, V; h i is the calculation result of the i-th scaled dot product attention mechanism, i = 1, 2, 3, ..., m; C is the connection function of the matrix concatenation process; W o is the transformation matrix.
[0055] (5) CRF layer: Named entity recognition model, used to predict the global optimal label sequence. Given a set of input sequences P t (t=1、2、3、……、n), predict the score y of the label through the CRF layer t (t=1, 2, 3,..., n), y t The prediction result is affected by the adjacent nodes and the input variable P t The entire process of the CRF layer completing the prediction is:
[0056]
[0057]
[0058] Among them, score(P,y) is the scoring function of the predicted sequence y; transitions is the CRF transition matrix; features is the emission matrix; yt+1 Yes t The adjacent nodes of y, p(y,P) is the function of the predicted sequence probability P; y * To solve the function of predicting the label sequence, is the true label value, is the set of all possible label sequences.
[0059] The above three formulas are used to calculate the distribution probabilities of different label sequences, and finally the optimal label sequence is selected for output.
[0060] 2. Auxiliary Search Module
[0061] The auxiliary retrieval module is used to assist in finding the question subject based on the keywords of the question when the question identification module fails to find any results, by comparing the keywords with the entity types, thereby achieving accurate search of the entity types of the question.
[0062] The auxiliary retrieval module relies on the "Difflib" module in the Python language. The "Difflib" module is a comparison sequence library used to compare the similarities and differences between texts and strings. In the auxiliary detection module, all entity nodes in the knowledge graph of the bridge major accident hazard map are first extracted and deduplicated, and the extracted content is saved in the form of a list. After that, when the input question is fruitless, the question-answering system will prompt you to enter keywords, and use the keywords entered by the user to make a similarity comparison with the entity list, and finally return the entity name with the highest similarity.
[0063] 3. Cypher query statement construction module
[0064] The Cypher query statement construction module is used to identify the intent of the question and fill in the slots of the query statement template according to the entity type and question type of the question to match the corresponding query statement.
[0065] For the specific example, combined with the entity type of hidden danger manifestation and question words, it is judged that the user's question intention is "preventive measures when the bridge-building machine overturns", and the matched query language is: MATCH(m:`Hazard manifestation`)-[r:`Take`]->(n:`Preventive measures`)where m.name='Bridge-building machine overturns'RETURN m.name,n.name. The query statement template MATCH(m:`Hazard manifestation`)-[r:`Take`]->(n:`Preventive measures`)where m.name='{0}'RETURN m.name,n.name "{0}" is the position provided for the question subject, and the "m.name" and "n.name" in the return value respectively represent the question subject and the query return value, which is convenient for the application of the subsequent query statement processing module.
[0066] 4. Query Feedback Module
[0067] The query feedback module is used to predefine the output format of the query result return. When the corresponding query statement is matched, the query result is returned according to the matching query statement template.
[0068] The first information received by the query feedback module is a separate entity name or knowledge triple in the graph database, and the question type is returned according to the matching query statement template. The response template for this type of question can be pre-defined, and the information received by the module can be directly added to the module output.
[0069] Embodiment 2
[0070] In this embodiment, a knowledge graph of bridge accident hazards is constructed to construct a dictionary of bridge major accident hazards. The knowledge graph of bridge accident hazards contains several entity nodes, each of which includes associated entities, attributes, and relationships between nodes. The specific construction process is as follows:
[0071] S1. Constructing the ontology model: The seven-step method is used to construct the ontology model. The steps of the seven-step method are: determine the professional field and scope of the ontology; examine the possibility of reusing the ontology; list the important terms of the ontology; define classes and class hierarchies; define class attributes; define constraints; create instances. Determine the scope and objectives of the knowledge graph and the concepts and entities that need to be represented, hierarchize the concepts and entities that need to be represented, establish a concept system, define relationships for each concept and entity, and realize the construction of the ontology model.
[0072] Specifically: By analyzing the characteristics of hidden dangers in the construction process of bridges, and based on the four elements of accident type, construction site, construction link, and accident process when the bridge accident occurred, the entity type is constructed. The knowledge graph is mainly used for the identification and prevention of bridge accident hazards. On this basis, two entity types, namely, hidden danger manifestation and management measures, are added, and the management measures are divided into five aspects: people, law, environment, materials, and machinery. By reading relevant literature on bridge accident hazard prevention and control, five new entity types, namely, construction materials, construction machinery, working environment, geological conditions, and construction personnel, were added. Finally, 15 entity types were determined for the construction of the bridge safety hazard prevention and control ontology model.
[0073] In order to establish the relationship between entity types in the field of safety hazard prevention and control of bridge engineering, the relevant materials in the field of safety hazard prevention and control of bridge engineering were read and analyzed, and the logical relationships between entity types were summarized, including: containment relationship, the genus-species relationship within the entity concept; adoption relationship, the method used by the entity type; adoption relationship, the material or machinery used by the entity type; occurrence relationship, the accident process or hidden dangers; being in relationship, the relationship between the entity type and the construction link; located in relationship, the relationship between the entity type and the working environment; belonging to relationship, the relationship between the accident type and the accident process; triggering relationship, the relationship between the hidden danger manifestation and the accident process.
[0074] S2. Knowledge extraction: Knowledge elements are directly extracted and generated from selected accident cases.
[0075] The extraction process adopts manual extraction, and the entity and entity relationship annotation software is Label-Studio. LabelStudio is an open source data annotation tool that can use a simple and intuitive UI to mark data types such as audio, text, images, videos, and time series, and export them into various model formats. It can also be used to prepare raw data or improve existing training data to obtain more accurate machine learning models. While annotating entities, relationships can be annotated, which makes it the first choice for entity extraction, relationship extraction, and event extraction. The annotation software requires that the input text format is UTF-8 encoding format, but the case data formats are different and often cannot be directly used as the source file for annotation after simple copying. Therefore, the text should be cleaned to generate a data format that meets the requirements. After data cleaning of literature and related standards and specifications related to the prevention and control of safety hazards of bridge accidents, a large amount of data annotation text is finally produced. Since the Label-Studio annotation software requires that the annotated file name cannot be entered in Chinese, a pure digital name number is uniformly taken. Before annotating the bridge literature, the entity type and entity relationship are added in advance. When annotating, just select the text and check the entity type, and drag the entity relationship between entities. Each annotation text contains two formats of files, TXT and CSV. TXT files are source files for annotation, and CSV files are files generated during the annotation process. For example, "1.txt" is the annotation source file, and "1.csv" is the generated file corresponding to "1.txt". "1.csv" records the specific information of the annotation content, which is convenient for building a connection with the "1.txt" source file and matching related annotation content. CSV files generated during the annotation process and corresponding to the annotation files.
[0076] The text in the document represents the relevant information of the entity, from left to right: the specific content of the entity, the label of the entity, the start position of the entity, and the end position of the entity.
[0077] The CSV files generated by the annotation and their corresponding TXT texts are finally generated into relevant data sets through text preprocessing. The data sets will be used for neural network training and as annotated knowledge element triplets to participate in the construction of the final knowledge graph.
[0078] S3. Knowledge fusion: Identify and align the same entities from different data sources to integrate relational data from different data sources and handle contradictory or conflicting information from different data sources.
[0079] Since the extraction of the graph knowledge elements is directly extracted and generated from the selected literature, this results in a variety of expressions for the same entity concept in multi-source heterogeneous data, which is not conducive to the interaction of graph knowledge data and the scene application of the graph. To address this problem, a theoretical analysis method is adopted, and the Python language is used to process the results of the text annotation related to the prevention and control of bridge safety accident hazards to generate two Excel files, obtain the conceptual information of the entity in this scene, compare it with other files, and update the entity relationship expression in the relationship column. Repeat this task and finally complete the entity fusion task of expressing the same concept in the same entity type.
[0080] S4. Knowledge storage: The knowledge graph is based on Neo4j to implement the storage task of knowledge triples. Before using Neo4j, the knowledge triples are first stored in an Excel table, and the triple storage task is performed in the Python environment. Relying on the code database Py2neo, the collaboration between Neo4j and the Python environment is realized to complete the input of knowledge triples.
[0081] By adopting the above technical solution disclosed in the present invention, the following beneficial effects are obtained:
[0082] The present invention provides a dictionary of major accident hazards of bridges based on knowledge graphs, combines a question-answering system with knowledge graph technology, organizes and manages relevant knowledge on major accident hazards of bridges in the form of knowledge graphs, and constructs a dictionary of major accident hazards of bridges on this basis. The data stored in the graph is effectively utilized in the form of questions and answers. Users do not need to use professional question-answering methods to ask questions. The system will process the questions and finally provide users with accurate and feasible answers. It no longer relies on people to repeatedly check and search for the desired content. For construction site workers, the search time is greatly reduced, and the efficiency of identifying hidden dangers and taking corresponding prevention and control measures can be improved, so as to better complete the construction process. The hidden danger dictionary can use the relationships and attributes in the knowledge graph to achieve more accurate and efficient standard query and answer services, and in practical applications, professional and technical personnel can obtain the required professional knowledge and information through this dictionary to improve the quality of the project, reduce the occurrence of hidden dangers and accidents, and take active and effective prevention and control measures for the hidden dangers that have already appeared.
[0083] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be considered as the scope of protection of the present invention.
Claims
1. A knowledge graph-based dictionary of bridge major accident hazards, characterized by: include, Question identification module: used to identify the main information in the question input by the user, and distinguish the entity type and question subject to which the question belongs; Cypher query statement construction module: used to identify the intent of the question and fill the slots of the query statement template according to the entity type and question type of the question to match the corresponding query statement; Query feedback module: used to predefine the output format of query results. When a corresponding query statement is matched, the query results are returned according to the matching query statement template.
2. The knowledge graph-based dictionary of bridge major accident hazards according to claim 1 is characterized by: The question recognition module first saves different question entities into the corresponding entity dictionary according to their entity types based on the corpus of knowledge triples, and then saves the corresponding question words into the question dictionary according to the possible questioning methods of the question entities; when the user enters a question, it needs to go through the search and matching of the above two dictionaries, and the specific entity name and its entity type will be returned after passing through the entity dictionary; the relationship between the entity type and the question word is certain. After the entity type is determined by the entity dictionary, it only needs to go through the question dictionary related to this entity type to determine the entity type of the question and the corresponding question word.
3. The knowledge graph-based dictionary of bridge major accident hazards according to claim 1 is characterized by: The question recognition module uses the BERT-BiLSTM-MHA-CRF model to perform bidirectional processing on the encoded feature vector to obtain a bidirectional feature vector, and then performs entity recognition based on the question input by the user to determine the entity type in the question; the BERT-BiLSTM-MHA-CRF model includes: Input layer: used to construct the input text sequence into an input sequence that contains questions and question features and can be recognized by the embedding layer; Embedding layer: used to load the pre-trained word embedding vector of major hidden dangers of bridge accidents through the BERT model to obtain the lexical semantic information, attributes and location information of the problem, and generate a one-way sequence that is easy for the BiLSTM layer to accept; BiLSTM layer: used to perform global feature extraction and obtain feature vectors containing context features; MHA attention mechanism layer: used to perform residual connection and layer normalization on the vectors output by the embedding layer and BiLSTM layer to obtain the feature vector input to the CRF layer, thereby optimizing the network structure of the model; CRF layer: used to predict the label score of the input sequence, and then calculate the distribution probability of different label sequences, screen out the optimal label sequence, and achieve the prediction of the global optimal label sequence.
4. The knowledge graph-based dictionary of bridge major accident hazards according to claim 1 is characterized by: The hidden danger dictionary also includes: Auxiliary retrieval module: When the question identification module fails to find any results, it is used to assist in finding the question subject based on the keywords of the question by comparing the keywords with the entity types, thereby achieving accurate search of the entity types of the question.
5. The knowledge graph-based dictionary of bridge major accident hazards according to claim 4 is characterized by: The auxiliary retrieval module first extracts all entity nodes in the knowledge graph of major accident hazards of bridges and removes duplicates, and saves the extracted content in the form of a list; when the input question is unsuccessful in the query of the question identification module, it prompts to enter the keywords of the question, uses the keywords of the question to make a similarity comparison with the entity list, and finally returns the entity name with the highest similarity.
6. The knowledge graph-based dictionary of bridge major accident hazards according to claim 1 is characterized by: The bridge major accident hazard dictionary is constructed using the following steps: S1. Construct an ontology model: determine the scope and objectives of the knowledge graph and the concepts and entities that need to be represented, hierarchize the concepts and entities that need to be represented, establish a conceptual system, define relationships for each concept and entity, and realize the construction of the ontology model; S2, knowledge extraction: directly extract knowledge elements from selected accident cases; S3, knowledge fusion: identify and align the same entities from different data sources to integrate relational data from different data sources and handle contradictory or conflicting information from different data sources; S4. Knowledge storage: Store the knowledge triples in Excel tables, and in the Python environment, rely on the code database Py2neo to achieve the collaboration between Neo4j and the Python environment, and then implement the storage task of knowledge triples based on Neo4j.
7. The knowledge graph-based dictionary of bridge major accident hazards according to claim 6 is characterized by: Step S1 specifically includes analyzing the hidden danger characteristics of the bridge during construction, and constructing an entity type based on the accident type, construction location, construction link, and accident process when the bridge accident occurred; Read and analyze the materials related to the prevention and control of safety hazards in bridge engineering, summarize the logical relationships between entity types, determine all entity types and entity relationships, and finally construct an ontology model that meets the knowledge graph requirements of major accident hazard prevention and control in bridges.
8. The knowledge graph-based dictionary of bridge major accident hazards according to claim 7 is characterized by: The logical relationships between entity types include: containment relationship, the genus-species relationship within the entity concept; adoption relationship, the method used by the entity type; use relationship, the type or machinery used by the entity type; occurrence relationship, the accident process or hidden dangers; being relationship, the relationship between the entity type and the construction link; Located relations, the relations between entity types and the work environment; Belonging relationship, the relationship between accident type and accident process; triggering relationship, the relationship between hidden danger manifestation and accident process.
9. The knowledge graph-based dictionary of bridge major accident hazards according to claim 6 is characterized by: Step S2 specifically includes selecting and screening available accident cases, converting them into text and saving them in Word format, deleting spaces and incorrect expressions that occur during the copying process, and performing line break processing. The processed text is stored in TXT format, and the encoding format is set to UTF-8 to achieve text data cleaning; Use Label-studio annotation software to perform entity annotation tasks on the cleaned text data. Before annotation, add entity types and entity relationships in advance. When annotating, directly select the text and check the entity type. Drag the entity relationship between entities. The CSV file corresponding to the annotation file is generated during the annotation process. The CSV file generated by annotation and its corresponding TXT text are finally generated through text preprocessing to generate relevant data sets. The data sets will be used for neural network training and as labeled knowledge element triples to participate in the construction of the final knowledge graph.
10. The knowledge graph-based dictionary of bridge major accident hazards according to claim 6 is characterized by: Specifically, step S3 adopts the method of theoretical analysis and uses Python language to process the results of text annotation related to bridge safety accident hazard prevention and control to generate two Excel files, obtain the conceptual information of the entity in this scenario, compare it with other files, and update the entity relationship expression method in the relationship column. Repeat this task and finally complete the task of merging entities that express the same concept in the same entity type.
Citation Information
Patent Citations
Disease question-answering method, system and device based on knowledge graph and storage medium
CN115438162A
Game-oriented named entity identification method and device
CN117010393A
Intelligent question and answer method and system for bridge construction standard based on knowledge graph
CN117668170A
Vehicle man-machine question answering method and device, computer equipment and storage medium
CN117842077A
Construction industry safety question and answer method and equipment based on large language model technology
CN118332092A
