Construction of knowledge graph of gate hydraulic hoist based on BERT model and question and answer system

By constructing a knowledge graph for hydraulic gate hoists based on the BERT model, the problems of low efficiency in knowledge management and information retrieval for hydraulic gate hoists are solved, achieving efficient and accurate knowledge acquisition and complex problem handling, and possessing real-time knowledge update capabilities.

CN119862282BActive Publication Date: 2025-12-30ZHENGZHOU UNIV +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411817484.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-12-30
Estimated Expiration
2044-12-11

AI Technical Summary

Technical Problem

Existing hydraulic gate hoists suffer from low efficiency and poor accuracy in knowledge management and information retrieval, struggle to handle complex natural language problems, and face difficulties in knowledge updates.

Method used

A knowledge graph for hydraulic gate hoists based on the BERT model is constructed, including modules for data collection and preprocessing, entity and relation extraction, knowledge graph construction, natural language understanding, knowledge graph retrieval, and answer generation. The BERT model is used for entity recognition and relation extraction, and the Neo4j graph database is used for knowledge storage and updating, enabling self-learning and real-time updates.

Benefits of technology

It improves information retrieval efficiency, enhances system robustness, can handle complex and diverse user questions, and ensures the timeliness and accuracy of the knowledge base.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119862282B_ABST
    Figure CN119862282B_ABST
Patent Text Reader

Abstract

The application discloses a gate hydraulic hoist knowledge graph construction and question and answer system based on a BERT model, which comprises a data collection and preprocessing module, an entity and relation extraction module, a knowledge graph construction module, a natural language understanding module, a knowledge graph retrieval module, an answer generation module and a user interaction module.The knowledge graph construction module integrates entity and relation information, generates a visual knowledge graph, and is used for supporting intelligent question and answer of the hydraulic hoist.The natural language understanding module is responsible for intention recognition and analysis on a question raised by a user, relevant information is inquired through the knowledge graph retrieval module, an answer is generated, and the answer is displayed through the user interaction module.Data interaction is realized among the modules through API, and the construction, updating and question and answer functions of the knowledge graph are realized.The application provides an intelligent and automatic hydraulic hoist information query solution, and improves the accuracy and efficiency of information retrieval.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence and mechanical engineering, specifically to a method for constructing a knowledge graph of a hydraulic gate hoist based on BERT (Bidirectional Encoder Representations from Transformers) and its application in a question-answering system, belonging to the field of natural language processing. Background Technology

[0002] BERT is a self-supervised model that can learn a good feature representation on its own. As a recently emerging general technique, it uses a Transformer network. BERT uses a bidirectional Transformer, passing two LSTMs concatenated from left to right and right to left to generate features for downstream tasks. Each segmented character has three embedded representations: Token Embeddings, Segment Embeddings, and Position Embeddings. Token Embeddings are used for text classification tasks, converting each word and special symbols into word embeddings; Segment Embeddings separate and label sentences; Position Embeddings encode the positional information of each character, perceiving the positional relationships between words. It solves the long-standing dependency problem in NLP and addresses issues that Word2vec cannot solve, as it can compare the context on both sides of all layers. It can perform both classification and question-answering tasks.

[0003] Knowledge graph is a structured knowledge representation method and data management model based on semantic networks. It uses triples (head entity, relation, tail entity) to represent and associate data. Knowledge graph question answering system is a question answering system that uses knowledge graph. It can answer questions accurately and efficiently and achieve intelligent retrieval of knowledge in special domains through interactive question answering. Knowledge graph question answering system has been widely used in many fields. For example, Zhu et al.[2] developed a question answering system based on the knowledge graph of traditional Chinese medicine and a series of deep learning models, and built an interactive platform for automatically answering user questions. Li and Zhao et al.[3] constructed a physical fitness knowledge graph based on crawler data and expert knowledge and proposed a physical fitness intelligent question answering system based on the knowledge graph to answer physical fitness questions. Hanifah and Kusumaningrum[4] established a question answering system specifically for natural science questions and used the Long Short-Term Memory (LSTM) model to handle answer selection problems. However, as a key field, the potential advantages of knowledge graph question answering system have not been fully explored in the field of water conservancy engineering.

[0004] Hydraulic gate hoists are widely used mechanical equipment in engineering construction, mainly for gate opening and closing, bridge lifting, and other applications in water conservancy projects. Their operation and maintenance involve a great deal of professional knowledge, including hydraulic systems, mechanical structures, and control systems. Currently, knowledge management and information retrieval for hydraulic gate hoists primarily rely on the following methods:

[0005] 1. Paper and electronic documents: including operation manuals, maintenance manuals, technical standards, etc.

[0006] 2. Expert System: A rule-based system that provides basic fault diagnosis and operation guidance through predefined rules and knowledge base.

[0007] 3. Traditional question-answering systems: These systems use keyword matching and simple natural language processing techniques to answer users' common questions.

[0008] Current technologies for knowledge management and information retrieval of hydraulic gate hoists still have many shortcomings, failing to efficiently meet users' needs for knowledge acquisition and question answering. Most existing question-answering systems are based on rule matching or traditional machine learning methods, which struggle to handle complex natural language questions. With the widespread application of the BERT model in natural language processing, constructing a knowledge graph of hydraulic gate hoists using the BERT model and applying it to question-answering systems is expected to significantly improve the efficiency and accuracy of knowledge management and information retrieval.

[0009] Currently, knowledge management for hydraulic gate hoists in water conservancy projects mainly relies on engineers' maintenance experience and troubleshooting manuals. This approach suffers from insufficient support from professional technicians, high costs in acquiring fault knowledge, low inheritability, and poor accuracy. Specifically:

[0010] 1. Information silos: Information in paper and electronic documents is scattered, making it difficult to centrally manage and quickly retrieve.

[0011] 2. Rigid rules: Expert systems have fixed rules, making it difficult to handle complex and dynamically changing problems, and they lack the ability to learn and update themselves.

[0012] 3. Poor search accuracy: Traditional question-answering systems rely on simple keyword matching, which makes it difficult to understand the true intent of the user's question, resulting in low accuracy of the answers.

[0013] 4. Difficulty in updating knowledge: The knowledge base in the existing system is updated slowly and cannot reflect the latest technologies and operating procedures in a timely manner. Summary of the Invention

[0014] This invention aims to provide a method for constructing a knowledge graph of hydraulic gate hoists and a question-answering system based on the BERT (Bidirectional Encoder Representations from Transformers) model, in order to solve the problems of low efficiency and poor accuracy in knowledge management and information retrieval in the existing technology.

[0015] The specific technical solution of the present invention is as follows:

[0016] The knowledge graph construction and question answering system for hydraulic gate hoists based on the BERT model includes a data collection and preprocessing module, an entity and relation extraction module, a knowledge graph construction module, a natural language understanding module, a knowledge graph retrieval module, an answer generation module, and a user interaction module. The modules interact with each other through APIs to form a complete knowledge graph construction and question answering system.

[0017] In the entity and relation extraction module, the following processing steps are performed:

[0018] Step (2.1) Predefine the entity type and relationship type of the hydraulic gate hoist. Based on the current working conditions, the hydraulic gate hoist determines the operating equipment, then determines the component information, and finally determines the part information, status information, behavior information, fault information and sensor data based on the component information.

[0019] Step (2.2) Build a BERT-BiLSTM-CRF neural network model for entity extraction. Divide the vectorized data into training set, test set and validation set as input to the model. Set the model parameters and start training. Finally, save the trained model to model_path.

[0020] Step (2.3) constructs a BERT-BiLSTM-Attention neural network model for relation extraction. This model extracts the contextual representation of the input sentence through BERT layers, captures sequence dependencies through BiLSTM layers, and finally assigns weights in the Attention layer to enhance the model's attention to important features. Training is performed after inputting a dataset that includes entity and relation annotations. Input data is fed into the model in batches, and prediction values ​​are obtained through forward propagation, and a loss function (such as cross-entropy loss) is calculated. Backpropagation is used to adjust the model parameters, and the dataset is randomly shuffled in each epoch to improve generalization ability. After multiple rounds of training and validation, the model parameters that achieve optimal performance are saved in the specified path `model_path` for use in subsequent model loading and prediction tasks.

[0021] In the data collection and preprocessing module, the data is processed as follows:

[0022] Step (1.1) Collect text data related to the hydraulic gate hoist;

[0023] Step (1.2) converts the text data into a uniform txt format;

[0024] Step (1.3) Use Python for data cleaning: Use the jieba word segmentation tool to segment the txt text, remove stop words, and remove special characters and punctuation marks;

[0025] Step (1.4) Define entity labels and perform BIO sequence labeling on the cleaned text using the sequence labeling tool LabelStudio;

[0026] Step (1.5) Text vectorization: Use the Word2Vec tool in the Gensim library of Python to convert the text data into a numerical vector.

[0027] The following steps are included in the use of the BERT model for entity recognition and relation extraction from documents related to hydraulic gate hoists:

[0028] (2.3.1) Use a pre-trained BERT model to extract features from the hydraulic gate hoist technical documents;

[0029] (2.3.2) Based on feature extraction, train a task-specific BERT-BiLSTM-CRF entity extraction model to identify key entities in the document;

[0030] (2.3.3) Utilize the bidirectional encoder feature of BERT to extract the relationships between entities;

[0031] Step (2.4) Prediction: Load the trained BERT-BiLSTM-CRF entity extraction model and BERT-BiLSTM-Attention relation extraction model to predict the unlabeled data, extract labeled entities and relations from a large amount of unprocessed data. This step first extracts key entities from the text through the entity recognition model, and then uses the relation extraction model to identify the potential relations between entities.

[0032] Step (2.5) Evaluation: Model evaluation metrics: Load the trained entity recognition and relation extraction models to predict the test set, calculate the accuracy, recall, F1 score and precision based on the model prediction results, and calculate the evaluation metrics of the entity recognition model and relation extraction model respectively to measure the performance of the model.

[0033] In the knowledge graph construction module, the following processing is performed:

[0034] (3.1) Knowledge fusion: The knowledge graph for fault diagnosis of hydraulic gate hoists belongs to the vertical domain knowledge graph. The graph integrates three entities: engineering, equipment and components.

[0035] (3.2) Knowledge storage - Neo4j graph database: Neo4j graph database is selected as the platform and Cypher is used as the query language to realize the data storage, query, update and visualization functions involved in the knowledge graph application of hydraulic gate hoist faults;

[0036] (3.3) Knowledge update: In Neo4j, new entities and relationships are first identified by comparing the newly added data with the existing data, and new nodes and edges are created in the graph; for existing entities and relationships, the corresponding update operations are performed directly using the Cypher query language; through regular knowledge updates, the fault knowledge graph is continuously improved, and timely, accurate and comprehensive information is also provided for the question answering system.

[0037] The question-answering system comprises the answer generation module and the user interaction module. It also includes a natural language understanding module, which uses natural language understanding to convert text information into a semantic representation that the machine can understand. The process is as follows:

[0038] (4.1) Define question types and construct question templates based on question types;

[0039] (4.2) Collect and label a large number of questions to build training and test datasets. Each question needs to be labeled with its corresponding template type.

[0040] (4.3) Classify questions using the BERT model:

[0041] 4.3.1) Perform word segmentation and part-of-speech tagging on the questions;

[0042] 4.3.2) Convert the question to BERT input format;

[0043] 4.3.3) Using a pre-trained BERT model, add a classification layer to output the question classification results;

[0044] 4.3.4) Input question data for training, optimize the parameters of the classification layer, so that the model can accurately classify questions and identify user intent.

[0045] In the answer generation module, the natural language generation module processes the results retrieved from the knowledge graph into natural language and outputs them to the user.

[0046] The user interaction module is responsible for receiving user-input questions, processing the questions, performing knowledge graph retrieval, and providing the answers back to the user.

[0047] The beneficial effects of this invention are as follows: By utilizing the BERT model to construct a knowledge graph of a hydraulic gate hoist and applying it to a question-answering system, this invention has the following advantages:

[0048] 1. Improve information retrieval efficiency: It can answer user questions quickly and accurately, thereby improving the efficiency of knowledge acquisition.

[0049] 2. Enhance system robustness: Leveraging the powerful natural language understanding capabilities of the BERT model, it can handle complex and diverse user questions.

[0050] 3. Rich knowledge base: The question-answering system based on knowledge graphs has more comprehensive and structured knowledge storage and management capabilities.

[0051] 4. Real-time knowledge updates: The system can learn and update itself based on new data, ensuring the timeliness and accuracy of the knowledge base. Attached Figure Description

[0052] Figure 1 This is a diagram of the overall architecture of the present invention;

[0053] Figure 2 Entity-relationship type diagram;

[0054] Figure 3 This is a diagram of the question-and-answer system architecture.

[0055] Figure 4 This is the source graph of the knowledge graph dataset;

[0056] Figure 5 Label the data in the graph;

[0057] Figure 6 This is a screenshot of the question-and-answer system interface. Detailed Implementation

[0058] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0059] like Figure 1 As shown, the knowledge graph construction and question-answering system for hydraulic gate hoists based on the BERT model includes a data collection and preprocessing module, an entity and relation extraction module, a knowledge graph construction module, a natural language understanding module, a knowledge graph retrieval module, an answer generation module, and a user interaction module. The modules interact with each other through APIs to form a complete knowledge graph construction and question-answering system.

[0060] In the data collection and preprocessing module, the data is processed as follows:

[0061] Step (1.1) Collect textual data such as technical documents, research papers, hydraulic gate hoist specifications, international standard documents, and maintenance manuals related to hydraulic gate hoists;

[0062] Step (1.2) converts the text data into a uniform txt format;

[0063] Step (1.3) Use Python for data cleaning: Use the jieba word segmentation tool to segment the txt text, remove stop words, and remove special characters and punctuation marks;

[0064] Step (1.4) Define entity labels and perform BIO sequence labeling on the cleaned text using the sequence labeling tool LabelStudio. The BIO sequence labeling format is shown in Table 1.

[0065] Step (1.5) Text vectorization: Use the Word2Vec tool in the Gensim library of Python to convert the text data into numerical vectors for subsequent processing by deep learning models.

[0066] Table 1. BIO sequence labeling format.

[0067] Entity label start tag intermediate marker End marker project B-PROJECT M-PROJECT E-PROJECT Fault B-FAULT M-FAULT E-FAULT Components B-COMPONENT M-COMPONENT E-COMPONENT sensor B-SENSOR M-SENSOR E-SENSOR equipment B-DEVICE M-DEVICE E-DEVICE Behavior B-BEHAVIOR M-BEHAVIOR E-BEHAVIOR state B-CONDITION M-CONDITION E-CONDITION Component B-PART M-PART E-PART other O O O

[0068] In the entity and relation extraction module, the following processing steps are performed:

[0069] Step (2.1) predefine the entity type and relationship type of the hydraulic gate hoist, such as Figure 2 As shown, the hydraulic gate hoist determines the operating equipment based on the current working conditions, then determines the component information, and finally determines the part information, status information, behavior information, fault information and sensor data based on the component information;

[0070] Step (2.2) Build a BERT-BiLSTM-CRF neural network model for entity extraction. Divide the vectorized data into training set, test set and validation set as input to the model. Set the model parameters and start training. Finally, save the trained model to model_path.

[0071] Step (2.3) constructs a BERT-BiLSTM-Attention neural network model for relation extraction. This model extracts the contextual representation of the input sentence through the BERT layer, captures sequence dependencies through the BiLSTM layer, and finally assigns weights in the Attention layer to enhance the model's attention to important features. Training is performed after inputting the dataset, which includes entity and relation annotations. Input data is fed into the model in batches, and prediction values ​​are obtained through forward propagation, and a loss function (such as cross-entropy loss) is calculated. Backpropagation is used to adjust the model parameters, and the dataset is randomly shuffled in each epoch to improve generalization ability. After multiple rounds of training and validation, the model parameters that achieve optimal performance are saved in the specified path `model_path` for subsequent model loading and prediction tasks. This invention utilizes the BERT model for entity recognition and relation extraction of documents related to hydraulic gate hoists, specifically including the following steps:

[0072] (2.3.1) Use a pre-trained BERT model to extract features from the hydraulic gate hoist technical documents;

[0073] (2.3.2) Based on feature extraction, train a task-specific BERT-BiLSTM-CRF entity extraction model to identify key entities in the document, such as hydraulic system components, operating procedures, maintenance methods, etc.

[0074] (2.3.3) Utilize the bidirectional encoder feature of BERT to extract the relationships between entities, including the causal relationships between component connections, operation steps and results;

[0075] Step (2.4) Prediction: Load the trained BERT-BiLSTM-CRF entity extraction model and BERT-BiLSTM-Attention relation extraction model to predict the unlabeled data, so as to extract labeled entities and relations from a large amount of unprocessed data;

[0076] Step (2.5) Evaluation: Model evaluation metrics: Load the trained entity recognition and relation extraction models to predict the test set, calculate the accuracy, recall, F1 score and precision based on the model prediction results, and calculate the evaluation metrics of the entity recognition model and relation extraction model respectively to measure the performance of the model.

[0077] In the knowledge graph construction module, the following processing is performed:

[0078] (3.1) Knowledge Fusion: Knowledge fusion, also known as entity alignment, is crucial because data in the hydraulic gate hoist fault domain often exhibits coreference. Coreference resolution is necessary during graph construction to achieve a standardized and unified description. The hydraulic gate hoist fault diagnosis knowledge graph is a vertical domain knowledge graph with scarce data sources. This graph only considers entity fusion for three types of entities: engineering, equipment, and components. Figure 2 As shown. Taking "piston oil leakage" as an example, the extracted fault entity "oil leakage" is expanded into "piston seal oil leakage" through context entity reference. A set of entities "seal oil leakage, piston rod oil leakage, oil seal oil leakage, etc." is generated through candidate entities. Finally, the candidate entities are sorted and merged to be equivalent to the fault entity "seal oil leakage" in the graph.

[0079] (3.2) Knowledge Storage - Neo4j Graph Database: There are many ways to store knowledge graphs, among which relational databases and graph databases are the most commonly used. Considering the complex entity relationships and frequent queries and updates of hydraulic gate hoists, a graph database is more suitable for storage. This invention selects the high-performance Neo4j graph database as the platform and uses Cypher as the query language, which can realize the data storage, query, update, and visualization functions involved in the application of hydraulic gate hoist fault knowledge graph.

[0080] (3.3) Knowledge Update: Updating a knowledge graph refers to the periodic or as-needed modification, addition, or deletion of entities, relationships, attributes, and other information within the graph to ensure it remains synchronized with changes in the real world. The update method used is incremental updating, which adds new knowledge to the existing knowledge graph using newly added data as input. In Neo4j, new entities and relationships are first identified by comparing the new data with existing data, and new nodes and edges are created in the graph. For existing entities and relationships, the Cypher query language can be used to perform the corresponding update operations. Through regular knowledge updates, the fault knowledge graph can be continuously improved, while also providing timely, accurate, and comprehensive information for the question-answering system.

[0081] The question-answering system consists of an answer generation module and a user interaction module. The question-answering system also includes a natural language understanding module, which uses natural language understanding to convert text information into semantic representations that machines can understand.

[0082] (4.1) Define question types and construct question templates based on question types, such as "How to operate XX", "What is the cause of XX's failure", "How to maintain XX", as shown in Table 2, which defines 8 question types;

[0083] Table 2. Template for troubleshooting hydraulic gate hoists.

[0084] Serial Number category Question Template 1 Fault Overview Could you provide an overview of the fault? 2 Fault Classification What type of fault is this? 3 Fault type What are the possible types of failures that a certain part or component may experience? 4 sensor What types of malfunctions might the sensors used in this device experience? 5 Fault behavior What malfunction occurred during equipment operation? 6 Fault maintenance When equipment malfunctions, which parts should be repaired or replaced? 7 Fault impact What impact will this malfunction have? 8 Troubleshooting How can this problem be resolved?

[0085] (4.2) Collect and label a large number of questions to build training and test datasets. Each question needs to be labeled with its corresponding template type.

[0086] (4.3) Classify questions using the BERT model:

[0087] 4.3.1) Perform word segmentation and part-of-speech tagging on the questions;

[0088] 4.3.2) Convert the question into BERT input format, including the input token, segment IDs, and attention masks;

[0089] 4.3.3) Using a pre-trained BERT model, add a classification layer (fully connected layer) to output the question classification results;

[0090] 4.3.4) Input question data for training, optimize the parameters of the classification layer, so that the model can accurately classify questions and identify user intent.

[0091] In the answer generation module, the natural language generation module processes the results found through the knowledge graph and outputs them to the user in natural language. For example: Query result: Operation method: Start the hydraulic system, press the open / close button, and observe the opening / close status. Generated answer: The operation method of the hydraulic gate opener is to start the hydraulic system, press the open / close button, and observe the opening / close status.

[0092] The user interaction module is the core of the question-answering system. It is responsible for receiving user-input questions, processing the questions, performing knowledge graph retrieval, and providing the answers back to the user.

[0093] The question-answering system of this invention is based on the BERT model and specifically includes the following steps:

[0094] (1) Problem understanding: Use the BERT model to identify the user's input question and extract keywords to understand the user's query needs.

[0095] (2) Knowledge retrieval: Based on the extracted keywords and intent, a search is conducted in the knowledge graph to find relevant entities and relationships.

[0096] (3) Answer generation: Combine the search results and the pre-trained language generation model to generate natural language answers and provide feedback to the user.

[0097] The above description is only a preferred embodiment of the present invention. It should be noted that those skilled in the art can make several changes and improvements without departing from the overall concept of the present invention, and these should also be considered within the scope of protection of the present invention.

Claims

1. A gate hydraulic hoist knowledge graph construction and question-answering system based on a BERT model, characterized in that: It comprises a data collection and preprocessing module, an entity and relationship extraction module, a knowledge graph construction module, a natural language understanding module, a knowledge graph retrieval module, an answer generation module, and a user interaction module, and each module interacts with each other through API to form a complete knowledge graph construction and question answering system. In the entity and relationship extraction module, the following processing steps are performed: Step (2.1) predefines the entity type and relationship type of the hydraulic hoist, and the hydraulic hoist determines the running equipment according to the current working condition, and then determines the component information, and finally determines the part information, state information, behavior information, fault information and sensor data according to the component information; Step (2.2) build BERT-BiLSTM-CRF neural network model for entity extraction, divide the vectorized data into training set, test set and validation set as the input of the model, set the model parameters and start training, and finally save the trained model to model_path; Step (2.3) build BERT-BiLSTM-Attention neural network model for relationship extraction, which extracts the context representation of the input sentence through the BERT layer, captures the sequence dependency through the BiLSTM layer, and finally assigns weights in the Attention layer to enhance the model's attention to important features; After inputting the data set, training is performed, and the data set includes entity and relationship annotations; the input data is transmitted into the model in batches, the predicted value is obtained through forward propagation, and the loss function is calculated; the model parameters are adjusted by using back propagation, and the order of the data set is randomly shuffled in each iteration to improve the generalization ability; after multiple rounds of training and verification, the model parameters with the best performance are saved in the specified path model_path for subsequent model loading and prediction tasks.

2. The BERT model-based gate hydraulic hoist knowledge graph construction and question-answering system according to claim 1, characterized in that: In the data collection and preprocessing module, the data is processed as follows: Step (1.1) collect text data related to the hydraulic hoist; Step (1.2) convert the text data into a unified txt format; Step (1.3) use python for data cleaning: use jieba word segmentation tool to segment the txt text, remove stop words, and remove special characters and punctuation; Step (1.4) define entity labels and perform BIO sequence labeling on the cleaned text using the sequence labeling tool Label Studio; Step (1.5) text vectorization: use the Word2Vec tool in the Gensim library in python to convert the text data into numerical vectors.

3. The BERT model-based gate hydraulic hoist knowledge graph construction and question-answering system according to claim 1, characterized in that: The BERT model is used for entity recognition and relationship extraction of hydraulic hoist related documents, which includes the following steps: (2.3.1) use the pre-trained BERT model to extract features from the hydraulic hoist technical document; (2.3.2) based on feature extraction, train the BERT-BiLSTM-CRF entity extraction model for specific tasks to identify key entities in the document; (2.3.3) use the bidirectional encoder feature of BERT to extract the relationship between entities; Step (2.4) prediction: load the trained BERT-BiLSTM-CRF entity extraction model and BERT-BiLSTM-Attention relationship extraction model to predict the unannotated data, and extract the annotated entities and relationships from a large amount of unprocessed data. This step first extracts key entities from the text through the entity recognition model, and then uses the relationship extraction model to identify the potential relationship between entities; Step (2.5) evaluation: model evaluation indicators: load the trained entity recognition and relationship extraction models to predict the test set, calculate the accuracy, recall, F1 value and precision according to the model prediction results, and calculate the evaluation indicators of the entity recognition model and the relationship extraction model respectively to measure the performance of the model.

4. The BERT model-based gate hydraulic hoist knowledge graph construction and question-answering system according to claim 1, characterized in that: In the knowledge graph construction module, the following processing is performed: (3.1) Knowledge fusion: The hydraulic hoist fault diagnosis knowledge graph belongs to a vertical domain knowledge graph, and the graph performs entity fusion on engineering, equipment and component entities. (3.2) Knowledge storage-Neo4j graph database: Select Neo4j graph database as the building platform, use Cypher as the query language, and realize the data storage, query, update and visualization functions involved in the application of the hydraulic hoist fault knowledge graph. (3.3) Knowledge update: In Neo4j, first identify new entities and relationships by comparing new data and existing data, and create new nodes and edges in the graph. For existing entities and relationships, use Cypher query language to perform corresponding update operations. Through regular knowledge update, the fault knowledge graph is constantly improved, and timely, accurate and comprehensive information is provided for the question and answer system.

5. The BERT model-based gate hydraulic hoist knowledge graph construction and question-answering system according to claim 1, characterized in that: The answer generation module and the user interaction module constitute the question and answer system, which also includes a natural language understanding module. The natural language understanding module converts text information into semantic representations that can be understood by machines through natural language understanding. The process is as follows: (4.1) Define question types and build question templates through question types; (4.2) Collect and annotate a large number of questions to build training and test data sets. Each question needs to be annotated with its corresponding template type; (4.3) Use the BERT model to classify questions: 4.3.1) Tokenize and tag the part of speech of the question; 4.3.2) Convert the question to BERT input format; 4.3.3) Use the pre-trained BERT model and add a classification layer to output the question classification result; 4.3.4) Input question data for training to optimize the parameters of the classification layer so that the model can accurately classify questions and identify user intent.

6. The BERT model-based gate hydraulic hoist knowledge graph construction and question-answering system according to claim 1, characterized in that: In the answer generation module, the natural language generation module processes the results obtained from the knowledge graph into natural language and outputs them to the user; The user interaction module is responsible for receiving user input questions, processing questions, performing knowledge graph retrieval, and feeding back answers to the user.

Citation Information

Patent Citations

  • Power grid intelligent question-answering system based on domain knowledge graph

    CN117786052A

  • Knowledge graph construction method and device, medium, electronic equipment and program product

    CN118982066A