Fault question and answer method based on large language model and knowledge graph

By combining knowledge graphs with large language models, efficient and accurate troubleshooting of complex equipment faults is achieved, solving the problems of low response efficiency and delayed knowledge updating of traditional methods, and improving the adaptability and accuracy of the system.

CN120653733APending Publication Date: 2025-09-16XIDIAN UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510701299.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-28
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

In the fault diagnosis of complex equipment and systems, the traditional fault question-and-answer method has low response efficiency and insufficient accuracy, is difficult to handle diverse fault descriptions and complex equipment associations, and lacks an efficient knowledge updating mechanism.

Method used

Combining the structured reasoning capabilities of the knowledge graph with the natural language understanding and generation capabilities of the large language model, accurate analysis of fault problems can be achieved through multi-source data entity relationship extraction, knowledge graph construction and optimization, and the answers of the large language model are fed back to the knowledge graph through the user feedback mechanism, forming a closed-loop optimization.

Benefits of technology

It improves the accuracy and robustness of fault diagnosis, adapts to multi-source heterogeneous data environments, supports the solution of unlabeled data and emerging fault modes, reduces response time, and improves the system's self-optimization capabilities and knowledge updating efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120653733A_ABST
    Figure CN120653733A_ABST
Patent Text Reader

Abstract

The invention discloses a fault question and answer method based on a large language model and a knowledge graph. The method mainly solves the problems that in the prior art, under a complex scene, semantic understanding is insufficient, knowledge updating is lagged, and the cross-modal data integration capacity is poor. The method comprises the following implementation steps: 1) collecting multiple types of data sources, extracting entities and attributes from the data sources, and constructing a mutual relationship between the entities and the attributes; 2) preprocessing the data, and establishing a knowledge graph; 3) receiving a question of a user, and performing word segmentation processing on a text; (4) obtaining the type corresponding to each segmented word by utilizing the text classification network, searching fault phenomena and obtaining similar fault phenomena of the fault phenomena; 5) respectively obtaining answers based on the knowledge graph and the large language model; 6, whether the answer of the large language model is supplemented into the knowledge graph or not is decided according to the feedback of the user to the two answers.By means of the method, the situations that knowledge updating lags behind and semantic understanding is insufficient can be effectively improved, and the fault diagnosis accuracy and robustness of a system in the multi-source heterogeneous data environment are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer technology and further relates to data processing technology. Specifically, it is a fault question-answering method based on a large language model and a knowledge graph, which can be used for fault diagnosis of complex equipment and systems. Background Art

[0002] In modern, complex equipment and system operation and maintenance scenarios, fault diagnosis and problem solving are critical to ensuring stable system operation. Traditional fault question-and-answer methods primarily rely on rule bases derived from manual experience or retrieval techniques based on keyword matching. These methods often suffer from low response efficiency, insufficient accuracy, and weak generalization capabilities when faced with diverse fault descriptions, complex equipment relationships, and the ambiguity of natural language expressions. As equipment becomes more intelligent, fault scenarios become increasingly complex, and data sources become multi-sourced (such as technical documentation, maintenance records, user feedback, and field papers), placing higher demands on the knowledge integration, semantic understanding, and dynamic learning capabilities of fault question-and-answer systems.

[0003] As a structured knowledge representation method, knowledge graphs can abstract domain knowledge into entities, attributes, and relationships, effectively organize multi-source heterogeneous data, and support complex associative queries and reasoning. They have already seen initial application in the field of fault diagnosis. However, the construction of traditional knowledge graphs relies on manually defined schemas and rules, which can lead to problems such as data redundancy and incomplete resolution of contradictions. They also struggle to handle the ambiguity and diversity of natural language expressions. Furthermore, when user questions involve fault scenarios not explicitly included in the knowledge graph, approaches based solely on knowledge graphs may not provide effective answers.

[0004] Large language models (LLMs), with their powerful natural language understanding and generation capabilities, can semantically parse user questions and generate responses that align with human language conventions, demonstrating significant advantages in open-domain question answering. However, in specialized fault question answering scenarios, large language models can lack the precise constraints of domain-specific knowledge, leading to factual errors or deviations from practical solutions. Furthermore, they struggle to effectively integrate with structured equipment fault data (such as fault codes and component relationships).

[0005] Existing fault question-answering systems that rely solely on knowledge graphs or large language models struggle to balance the structured nature of knowledge with the flexibility of natural language processing, and lack efficient user feedback mechanisms for dynamic knowledge updates and optimization. Therefore, combining the structured knowledge reasoning capabilities of knowledge graphs with the natural language understanding and generation capabilities of large language models to achieve complementary advantages, while also enabling continuous knowledge iteration through user feedback, has become a key technical challenge in improving the accuracy and robustness of fault question-answering systems. Summary of the Invention

[0006] The purpose of the present invention is to address the deficiencies of the above-mentioned prior art and propose a fault question-answering method based on a large language model and a knowledge graph, which is used to solve the problems of traditional fault question-answering solutions in complex scenarios, such as insufficient semantic understanding, delayed knowledge updating, and weak cross-modal data integration capabilities. The present invention achieves accurate analysis of fault problems, efficient response, and dynamic optimization of knowledge by integrating structured knowledge reasoning and natural language generation capabilities, that is, through entity relationship extraction from multi-source data, construction and optimization of knowledge graphs, word segmentation and classification processing of natural language problems, and collaborative answering of large language models and knowledge graphs; at the same time, the user feedback mechanism is used to feed back the verified large language model answers to the knowledge graph, forming a closed loop of "knowledge acquisition-reasoning generation-feedback optimization", effectively improving the situation of delayed knowledge updating and insufficient semantic understanding, significantly improving the system's fault diagnosis accuracy and robustness in a multi-source heterogeneous data environment, and providing a more adaptable solution for fault diagnosis of complex equipment and systems.

[0007] To achieve the above objectives, the technical solutions of the present invention include the following:

[0008] (1) Collect various types of data sources, extract entities and attributes from them, and build relationships between entities and attributes;

[0009] (2) Preprocess the data of each entity, attribute and relationship, and construct a knowledge graph;

[0010] (3) The system receives the question raised by the user, loads the relevant stop words and word breakers, and performs word segmentation on the user text;

[0011] (4) All segmented words are sent to the text classification network to obtain the type corresponding to each segmented word. The segmented word and its classification type are output as the result. Based on the result, the fault phenomenon corresponding to the current text is found and its similar fault phenomenon is obtained.

[0012] (5) Based on the knowledge graph, according to the fault phenomenon in step (4) and its similar fault phenomena, find the corresponding solution as the answer;

[0013] (6) The user selects and calls the large language model, and inputs the question raised by the user in step (3) into it through the corresponding interface, and uses the model to obtain a reference answer to the question;

[0014] (7) Provide the two answers given in steps (5) and (6) to the user, and decide whether to add the reference answer given by the large language model to the knowledge graph based on the user feedback results.

[0015] Compared with the prior art, the present invention has the following advantages:

[0016] First, advantages of multi-technology integration:

[0017] This invention combines the structured reasoning capabilities of knowledge graphs with the natural language understanding and generation capabilities of large language models. It not only ensures the professionalism and accuracy of troubleshooting (based on the rule constraints of knowledge graphs), but also improves adaptability to ambiguous problems and complex scenarios (based on the semantic generalization of large language models), realizing the complementary advantages of "symbolic reasoning" and "statistical learning".

[0018] Second, dynamic knowledge evolution:

[0019] Because the present invention converts the verified large language model answers into structured knowledge and integrates it into the knowledge graph through the user feedback mechanism, it solves the problems of high cost and strong lag in manual updating of traditional knowledge graphs, and enables the system to have self-optimization capabilities and adapt to constantly updated equipment failure scenarios.

[0020] Third, efficient semantic analysis:

[0021] This invention is based on a text processing process that combines word segmentation classification with cosine similarity matching. It can quickly locate the core elements of the problem (equipment type, fault phenomenon, and operating behavior), reduce the complexity of knowledge graph retrieval, and improve response efficiency. At the same time, it eliminates ambiguities and contradictions in multi-source data through data preprocessing, ensuring the reliability of knowledge reasoning.

[0022] Fourth, enhanced generalization ability:

[0023] This invention supports answers to unlabeled data and emerging fault modes, covers long-tail questions not covered by the knowledge graph through the generation capability of the large language model, and avoids generating wrong answers by combining the domain knowledge constraints of the knowledge graph, thus balancing openness and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 It is an overall implementation flow chart of the method of the present invention.

[0025] Figure 2 It is a schematic diagram of the construction process of the knowledge graph in the present invention. DETAILED DESCRIPTION

[0026] The present invention will be further described below with reference to the accompanying drawings.

[0027] Example 1: Refer to the attached Figure 1 The present invention proposes a fault question answering method based on a large language model and a knowledge graph, which specifically includes the following steps:

[0028] Step 1) Collect various data sources, extract entities and attributes from them, and build relationships between entities and attributes. In this embodiment, the various data sources collected include, but are not limited to, professional data, relevant academic papers, technical reports, and expert knowledge. Building relationships between entities and attributes is specifically accomplished by the following steps:

[0029] (1.1) Data is divided into structured data and unstructured data according to data type, and sent to the structured parsing module and text parsing module respectively to obtain a unified data format, and then stored in JSON files or CSV files;

[0030] (1.2) Perform word segmentation and part-of-speech tagging on the data in a unified format, obtain the relationship between entities and attributes through natural language processing, and construct entity-relationship-attribute triples.

[0031] Step 2) Preprocess the data for each entity, attribute, and relationship, and construct a knowledge graph. The data preprocessing performed in this step in this embodiment includes the following operations: a. Organize entities, attributes, and relationships, and perform hashing to remove duplicates; b. Correct any conflicting entities, attributes, and relationships using rules or expert voting; c. Predict implicit relationships using methods such as TransE; d. Construct an entity-relationship graph and store it in Neo4j, while also storing the entities and attributes in MySQL.

[0032] Step 3) The system receives the question raised by the user, loads the relevant stop words and word breakers, and performs word segmentation on the user text;

[0033] Step 4) All segmented words are fed into the text classification network to obtain the type corresponding to each segmented word, which includes the device category, the user's operation, and the fault phenomenon. The segmented word and its classification type are output as the result. Based on the result, the fault phenomenon corresponding to the current text is searched and similar fault phenomena are obtained. The specific implementation steps are as follows:

[0034] (4.1) Based on the classification results, determine the type of each segmented word and obtain problem-related information. In this embodiment, the problem-related information obtained here specifically refers to the information obtained based on the corresponding types of all segmented words, including the device category, the user's operation, and the fault phenomenon, that is, the entire content expressed in the user text. The user's question text is segmented into multiple different types of segmented words, generally covering information that can reflect the fault situation, such as the device category, the user's operation, and the fault phenomenon.

[0035] (4.2) Based on the device category in the relevant information, the brand and model of the device are disassembled and, combined with the user's operations, the corresponding fault phenomenon is found through the knowledge graph. The fault location and fault code are then found based on the fault phenomenon.

[0036] (4.3) Based on the fault phenomenon, combined with the fault location and fault code, find the corresponding similar fault phenomenon by calculating the cosine similarity.

[0037] Step 5) Based on the knowledge graph, according to the fault phenomenon in step 4) and its similar fault phenomena, find the corresponding solution as the answer; in this embodiment, the solution obtained based on the knowledge graph is at least two corresponding solutions found in the database based on the fault phenomenon and its similar fault phenomena. If there are multiple similar fault phenomena with similar conditions, each similar fault phenomenon can obtain a corresponding solution, and finally the solution corresponding to the fault phenomenon is used as the answer.

[0038] Step 6) The user selects and calls the large language model, inputs the question posed by the user in step 3) into it through the corresponding interface, and uses the model to obtain a reference answer to the question;

[0039] Step 7) Provide the two answers given in steps 5) and 6) to the user. Based on the user's feedback, decide whether to add the reference answer given by the large language model to the knowledge graph. The specific implementation is as follows:

[0040] (7.1) If the user feedback indicates that the large language model solution can solve the problem, the answer is segmented into sentences, entities and attributes are constructed, and the relationship between entities and attributes is established. The data is then stored in the knowledge graph for future use.

[0041] (7.2) If the user feedback indicates that the large language model solution cannot solve the problem, the answer will be discarded.

[0042] Parts of the present invention that are not described in detail belong to common knowledge among those skilled in the art.

[0043] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Obviously, for professionals in this field, after understanding the content and principles of the present invention, they may make various modifications and changes in form and details without departing from the principles and structure of the present invention. However, these modifications and changes based on the ideas of the present invention are still within the scope of protection of the claims of the present invention.

Claims

1. A fault question answering method based on a large language model and knowledge graph, characterized in that: The steps include: (1) Collect various types of data sources, extract entities and attributes from them, and build relationships between entities and attributes; (2) Preprocess the data of each entity, attribute and relationship, and construct a knowledge graph; (3) The system receives the question raised by the user, loads the relevant stop words and word breakers, and performs word segmentation on the user text; (4) All segmented words are sent to the text classification network to obtain the type corresponding to each segmented word. The segmented word and its classification type are output as the result. Based on the result, the fault phenomenon corresponding to the current text is found and its similar fault phenomenon is obtained. (5) Based on the knowledge graph, according to the fault phenomenon in step (4) and its similar fault phenomena, find the corresponding solution as the answer; (6) The user selects and calls the large language model, and inputs the question raised by the user in step (3) into it through the corresponding interface, and uses the model to obtain a reference answer to the question; (7) Provide the two answers given in steps (5) and (6) to the user, and decide whether to add the reference answer given by the large language model to the knowledge graph based on the user feedback results.

2. The method according to claim 1, wherein: The multiple types of data sources mentioned in step (1) include at least professional data, relevant subject papers, technical reports and expert knowledge.

3. The method according to claim 2, wherein: Step (1) builds the relationship between entities and attributes. The implementation steps are as follows: (1.1) Data is divided into structured data and unstructured data according to data type, and sent to the structured parsing module and text parsing module respectively to obtain a unified data format, and then stored in JSON files or CSV files; (1.2) Perform word segmentation and part-of-speech tagging on the data in a unified format, obtain the relationship between entities and attributes through natural language processing, and construct entity-relationship-attribute triples.

4. The method according to claim 1, wherein: The data preprocessing in step (2) includes: sorting entities, attributes, and relationships, and performing hashing to remove duplicates; correcting contradictory entities, attributes, and relationships through rules or expert voting; predicting implicit relationships through the TransE method; constructing an entity relationship diagram and storing it in Neo4j, and storing the entities and attributes in MySQL.

5. The method according to claim 1, wherein: The type described in step (4) includes the device category, the operation performed by the user, and the fault phenomenon.

6. The method according to claim 5, characterized in that: Step (4) searches for the fault phenomenon corresponding to the word segmentation and obtains similar fault phenomena. The specific implementation steps are as follows: (4.1) Based on the classification results, determine the type of each segmentation and obtain relevant information about the problem; (4.2) Based on the device category in the relevant information, the brand and model of the device are disassembled and, combined with the user's operations, the corresponding fault phenomenon is found through the knowledge graph. The fault location and fault code are then found based on the fault phenomenon. (4.3) Based on the fault phenomenon, combined with the fault location and fault code, find the corresponding similar fault phenomenon by calculating the cosine similarity.

7. The method according to claim 6, characterized in that: The problem-related information refers to the information obtained based on the corresponding types of all segmentations, including the device category, the operation performed by the user, and the fault phenomenon, that is, the entire content expressed in the user text.

8. The method according to claim 6, wherein: The solution described in step (5) is a solution corresponding to the fault phenomenon and similar fault phenomena found from the database.

9. The method according to claim 1, wherein: Step (7) determines whether to add the reference answer given by the large language model to the knowledge graph based on the user feedback results. The specific implementation is as follows: (7.1) If the user feedback indicates that the large language model solution can solve the problem, the answer is segmented into sentences, entities and attributes are constructed, and the relationship between entities and attributes is established. The data is then stored in the knowledge graph for future use. (7.2) If the user feedback indicates that the large language model solution cannot solve the problem, the answer will be discarded.

Citation Information

Cited By

  • Wafer graph defect semantic reasoning method driven by retrieval enhancement large model

    CN121787596A