Electronic equipment fault diagnosis system and method based on knowledge graph
The knowledge graph-based electronic equipment fault diagnosis system solves the problems of traditional fault diagnosis methods relying on expert experience and having a cumbersome diagnostic process. It achieves rapid and accurate fault diagnosis and knowledge sharing, and is suitable for on-site diagnosis of electronic equipment.
Patent Information
- Application Number
- CN202511221901.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-29
- Publication Date
- 2025-12-09
AI Technical Summary
Traditional fault diagnosis methods rely on expert experience, resulting in a cumbersome diagnostic process, inaccurate descriptions, unclear procedures, and an inability to achieve knowledge sharing and rapid diagnosis, making it difficult to extract fault patterns from massive amounts of data.
An electronic equipment fault diagnosis system based on knowledge graphs is adopted. It is built using the PyQt5 framework and combined with the Neo4j database. Through entity extraction and question classification modules, it can achieve rapid diagnosis of natural language problems.
It improves the efficiency and accuracy of fault diagnosis, saves experts' time, realizes knowledge sharing and standardized fault information storage, and is suitable for on-site diagnosis by non-professionals.
Smart Images

Figure CN121094091A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of fault diagnosis technology, and specifically to a knowledge graph-based electronic equipment fault diagnosis system and method. Background Technology
[0002] During the lifecycle of electronic equipment, maintenance personnel record a large amount of textual data on the causes of failures. However, this data is currently only used for statistical analysis and compilation into typical failure cases, and is not being fully utilized. Taking the commonly used fault tree diagnosis method and fault dictionary diagnosis method as examples, the fault tree diagnosis method is extremely labor-intensive and time-consuming to construct the fault tree for such complex systems. The fault dictionary diagnosis method requires matching test results with the fault dictionary one by one, and the search process is very slow, failing to meet the need for rapid fault diagnosis. Secondly, the isolation accuracy of fault diagnosis is low. It is very difficult to find the patterns of failure occurrence and establish accurate fault diagnosis models from the massive historical fault data of electronic equipment systems.
[0003] Based on the above analysis, traditional fault diagnosis methods mainly have the following problems: (1) Over-reliance on expert experience. In the process of remote fault diagnosis, fault diagnosis experts are required to have rich experience and be able to determine the cause of the fault as soon as possible after obtaining the fault information provided by the user. However, the training cost of fault diagnosis experts is high, experience accumulation is time-consuming, and expert experience is limited by the individual, making it difficult to share and accumulate knowledge, which is not conducive to the reuse of knowledge. When new problems occur, it is still necessary to manually consult various materials repeatedly, which is time-consuming and laborious.
[0004] (2) Inconsistent descriptions of fault phenomena. Due to users' lack of relevant industrial machinery background knowledge, they often make inaccurate or colloquial descriptions when reporting faults, which makes it impossible for experts to obtain accurate and comprehensive fault phenomena, affecting their judgment on the cause of the fault and the repair plan.
[0005] (3) The fault diagnosis process is cumbersome. When encountering problems that have never occurred before or are difficult, the fault diagnosis experts revert to the original method of searching for materials. They need to manually flip through typical fault cases, standard decoration manuals, etc. to confirm the problem. This process is time-consuming and laborious, which seriously affects the efficiency of fault diagnosis and makes it impossible to share knowledge. Others still need to manually consult materials to solve similar problems.
[0006] (4) Unclear fault diagnosis process. When a fault occurs, the diagnosis process becomes complicated and consumes more manpower and resources because maintenance personnel may not be clear about the equipment structure and its signal flow.
[0007] Today, knowledge graphs are an applied discipline born from the era of big data, a result of the integration of knowledge engineering, ontology, and natural language processing technologies. Essentially, they are semantic networks that reveal the relationships between entities and between entities and attributes. By integrating structured knowledge into search algorithms, they enable search engines to provide more accurate and relevant search results, helping users quickly obtain the information they need.
[0008] Knowledge graphs graphically represent complex relationships, providing an intuitive way to express them at the semantic level. This offers a more comprehensive and intuitive perspective on complex knowledge connections and enables reasoning. With the continuous development and expansion of knowledge graph technology, its rich associations and semantic information provide powerful support for information retrieval, intelligent question answering, recommendation systems, natural language processing, artificial intelligence, and enterprise knowledge management. Therefore, knowledge graphs hold significant importance and potential in the fields of knowledge representation and application. Summary of the Invention
[0009] To address the aforementioned problems, the purpose of this invention is to provide an electronic equipment fault diagnosis system and method based on knowledge graphs. This electronic equipment fault knowledge graph diagnosis system can not only effectively help maintenance personnel quickly locate the fault location, but also provide a complete and standardized way to store future fault data.
[0010] To achieve the above objectives, the technical solution adopted by this invention is: an electronic equipment fault diagnosis system based on a knowledge graph, built on the PyQt5 framework, comprising: The fault data import module is used to collect previously organized structured fault information text, select Neo4j as the database for storing the knowledge graph, read data from Excel, and import data of a specified type from Excel into the knowledge graph. The fault data management module is used to update the content in the Neo4j knowledge graph in a timely manner; The entity extraction module is used to extract entities from unstructured text. It has two functional interfaces: one is the knowledge graph construction function, and the other is the knowledge graph question answering function. It uses the RoBERTa-BiLSTM-CRF model to extract entities that can be used to build and query the knowledge graph. The user input module is used to receive natural language questions entered by users in the application window and send the questions to the question classification module. The question classification module is used to construct an intent recognition dataset and proposes a question classification method based on the BERT model to extract features and classify input natural language questions to obtain classification results. The entity linking module is used to extract entities from user questions in the knowledge graph question-and-answer function of the entity extraction module, and then find the node names and entity types with high similarity by matching them with cosine and Jaccard similarity. The template matching module determines the user's question intent by matching the query template based on the question classification results and the entity types obtained from entity links. It then fills the node names into the query statement, completes the query statement, and passes it to the answer generation module. The answer generation module uses a database query statement obtained after template matching to query the Neo4j database, and displays the answers obtained from the database to the user interface.
[0011] The present invention also provides a diagnostic method based on the above-mentioned electronic equipment fault diagnosis system, characterized by comprising the following steps: Step 1: Using the fault data import module, import the specified data type from Excel, the Visio file of the equipment troubleshooting flowchart, and the corresponding instruction Excel file into the Neo4j knowledge graph, and cross-link them with the original structured fault information. Step 2: Using the knowledge graph construction function in the entity extraction module, extract the enterprise's past unstructured fault information into structured text that conforms to the fault data import module, export it in Excel format, review it after extraction, and then import the data into the knowledge graph through the fault data import module. Step 3: Use the user input module to receive the natural language questions entered by the user in the application window, and send the questions to the question classification module at the same time; Step 4: Using the question classification module, the input natural language questions are feature extracted and classified using a question classification method based on the BERT model. The classification results are then passed to the template matching module. Step 5: Use the knowledge graph question-and-answer function in the entity extraction module to extract the entities and entity types of the user's question, and pass the extracted entities and entity types to the entity linking module; Step 6: Using the entity linking module, find the node names and entity types with high similarity to the entities extracted by the entity extraction module after matching by cosine and Jaccard similarity, and pass the linking results to the template matching module. Step 7: Using the template matching module, match the database query language template based on the question classification results and entity link results, fill the node names into the template to improve the query language, and pass the improved query language to the answer generation module. Step 8: Using the answer display module, query the Neo4j database to generate query results, and display the troubleshooting suggestions obtained from the database query to the user; Step 9: If no content is found, after repairing the equipment, use the knowledge graph management module to add the new fault information to the knowledge graph in a timely manner.
[0012] As a preferred embodiment of the present invention, the fault information in step one includes fault location, fault cause, fault phenomenon and troubleshooting method node labels, as well as various relationship types such as failure cause, cause, measures taken, composition and association, and various attributes such as the cabinet, the socket, the slot and the material code.
[0013] As a preferred embodiment of the present invention, importing data of a specified type from Excel into the knowledge graph specifically involves: First, the `read_excel` function from the pandas library is used to read the contents of the table header, which contains four columns: fault location, fault cause, fault phenomenon, and troubleshooting method. Then, the `Graph` function from the py2neo library is used to connect to the Neo4j database. The `Node` function is used to import nodes with attribute information into the knowledge graph. Finally, the `Relationship` function is used to import the relationships between nodes into the knowledge graph, thus completing the construction of a knowledge graph for the field of electronic equipment fault diagnosis.
[0014] As a preferred embodiment of the present invention, the import of the Visio file of the equipment troubleshooting flowchart and the corresponding instruction Excel file into the knowledge graph specifically involves: First, a Visio application object, appVisio, is created using the win32.gencache.EnsureDispatch function of the win32 library to operate the Visio software. Then, the appVisio function is used to open the specified file and assign it to the vdoc object. The connectors in the file are read to obtain the contents of the start box, connection, and end box, which are then transformed into a knowledge graph triple. The Node and Relationship functions are used to import this set of connectors into the knowledge graph. At the same time, the fault phenomena corresponding to the troubleshooting file are connected with the fault phenomena in the knowledge graph of the electronic equipment fault diagnosis domain that has been built. Then, the corresponding instruction file is read. The instruction file is divided into two columns. The first column is the content of the troubleshooting box in the Visio file, and the second column is the instruction for the operation within the box. The read_excel function in the pandas library is used to read the content of the two columns, and then the push function is used to add the operation instruction attribute of the troubleshooting flowchart node.
[0015] As a preferred embodiment of the present invention, the entity extraction model in step two includes: Named entity recognition is performed by constructing an entity knowledge base and replacing its entities with those in the labeled data using the RoBERTa-BiLSTM-CRF structure. In this model, the RoBERTa pre-trained model is responsible for encoding the word embedding vectors of the text sequence, while the BiLSTM layer is used to extract features from the encoding. The CRF layer is introduced to enhance the constraint of the annotation effect, and the prediction deviation is evaluated by comparing the predicted label with the actual label.
[0016] As a preferred embodiment of the present invention, the question classification method based on the BERT model in step four includes: Foundations of Pre-trained Language Models: BERT, as a pre-trained language model, learns unsupervised on large-scale texts to capture rich semantic and syntactic information of language; Input processing: Receive user queries and preprocess them to prepare for subsequent processing; Vector representation: The word embedding layer of BERT converts the input words into high-dimensional vectors containing semantic information to help understand the meaning of the question; Feature extraction: Utilizes a multi-layer Transformer structure to progressively extract higher-level abstract feature representations, capturing long-distance dependencies and contextual information in the text; Question classification: Add a classification layer, use a fully connected neural network and softmax activation function to map features to different question categories, and output the category to which the question belongs.
[0017] In a preferred embodiment of the present invention, in step seven, after processing the natural language question by question classification, the corresponding query template is found according to the question category, and the variables in the template are replaced by the results of entity linking, and the assembled query statement is passed to the answer generation module.
[0018] In a preferred embodiment of the present invention, in step eight, the answer display module uses the run function of the py2neo library to run the query statement, assembles the returned results, obtains a conversational answer, and returns the answer to the user.
[0019] Compared with the prior art, the technical solution adopted in this invention has the following beneficial effects: (1) This invention will provide services to enterprises, provide professional reference opinions for on-site diagnosis of electronic equipment, save experts' time, and improve on-site maintenance efficiency.
[0020] (2) This invention constructs the first knowledge graph in the field of electronic equipment failure for enterprises, making full use of previously recorded failure information and maximizing the value of these failure records. At the same time, the troubleshooting process is integrated into the failure information knowledge graph to assist on-site troubleshooting personnel in troubleshooting more quickly and improve the accuracy of troubleshooting. On the other hand, a dictionary-based multidimensional data augmentation method is proposed. By constructing an entity dictionary and a non-entity dictionary to replace the original dataset, the purpose of expanding the dataset is achieved, avoiding the problem that the model cannot be fully trained due to the small size of the dataset. At the same time, expanding the dataset can enhance the generalization ability of the model itself and reduce overfitting.
[0021] (3) In the past, enterprises have long faced problems such as a wide variety of data, large data volume, and strong data specialization. The data storage method is chaotic, and non-professionals cannot quickly obtain target information from the database. If equipment fails on-site, the only option is to rely on the existing health monitoring system to replace the faulty parts that indicate abnormalities. However, if this method fails to solve the fault and there is no corresponding technical expert support on-site, the equipment needs to be sent back to the original factory for repair, which consumes a lot of manpower and resources. The knowledge graph-based storage method solves the problem of scattered and chaotic fault information storage in the past, and the question-and-answer method makes it easier for on-site maintenance personnel to diagnose. At the same time, the entity extraction model and entity linking method based on deep learning can accurately locate the professional knowledge in the knowledge graph through the colloquial description of on-site maintenance non-professionals. Compared with the machine learning-based question-and-answer system, the accuracy is higher, providing users with a better experience.
[0022] (4) This invention overcomes the difficulties in terms of data. Due to the high confidentiality requirements of some information within the enterprise, it is not possible to use all of it for training the model. Therefore, data augmentation is performed using other data to improve the generalization ability of the model. This allows the model to be used for fault diagnosis of the enterprise's electronic equipment.
[0023] (5) Cosine similarity analyzes the vector representations of entity attributes, focusing on evaluating the similarity of vector directions. This is particularly effective when dealing with entities with rich attributes or dimensions. This method can accurately capture the similarity between entities in a high-dimensional attribute space, and is especially suitable for entities whose attribute values are numerical features. On the other hand, Jaccard similarity calculates the intersection-union ratio between sets of entity attributes, emphasizing the presence or absence of entity attributes rather than their specific values. This makes it excellent when dealing with entities with fewer attributes or features that are categorical data. This method has good adaptability to data sparsity and can effectively handle entities with only a few key attributes. When these two methods are used in combination, their complementary characteristics can greatly enhance the accuracy and robustness of entity linking. Attached Figure Description
[0024] Figure 1 This is a schematic diagram of the overall framework for fault diagnosis of electronic equipment in this embodiment.
[0025] Figure 2 This is a schematic diagram of the functional modules of an electronic equipment fault diagnosis system in this embodiment. Detailed Implementation
[0026] 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. Any modifications made to the technical solutions based on the technical concept proposed in this invention shall fall within the scope of protection of this invention.
[0027] like Figure 2 As shown in the diagram, a functional module diagram of an electronic equipment fault diagnosis system in this embodiment includes: 1. Fault Data Import Module Enterprises typically save pre-organized structured fault information text, such as fault location, fault cause, fault phenomenon, and troubleshooting method, in Excel document format. Using the fault data import module, the `read_excel` function from the pandas library is first used to read the contents of the four columns in the header: fault location, fault cause, fault phenomenon, and troubleshooting method. Then, the `Graph` function from the py2neo library is used to connect to the Neo4j database. The `Node` function is used to import nodes with attribute information into the knowledge graph, and the `Relationship` function is used to import the relationships between nodes into the knowledge graph, thus completing the construction of a knowledge graph for the field of electronic equipment fault diagnosis.
[0028] For the Visio file of the equipment troubleshooting flowchart and the corresponding instruction Excel file, firstly, a Visio application object `appVisio` is created using the `win32.gencache.EnsureDispatch` function from the Win32 library to operate the Visio software. Then, the `appVisio` function is used to open the specified file and assign it to the `vdoc` object. The connectors in the file are read, and the contents of the start box, connection, and end box are obtained. This is transformed into a knowledge graph triple. The `Node` function and the `Relationship` function are used to import this set of connectors into the knowledge graph. Simultaneously, the fault phenomena corresponding to the troubleshooting file are connected to the fault phenomena in the already constructed knowledge graph of electronic equipment fault diagnosis. Then, the corresponding instruction file is read, and the contents of two columns are read using the `read_excel` function from the pandas library. Finally, the `push` function is used to add the operation instructions attribute to the troubleshooting flowchart nodes.
[0029] 2. Fault Data Management Module When a new fault occurs, the troubleshooting personnel resolve it and promptly record the fault information. For example, if a new electronic component malfunctions, the troubleshooting personnel record detailed information such as the fault location, cause, symptoms, and troubleshooting methods. This information is then updated in the Neo4j knowledge graph through the fault data management module to ensure the accuracy and timeliness of the knowledge graph.
[0030] 3. Entity Extraction Module Knowledge Graph Construction Function: Addressing the lack of large-scale labeled datasets in the field of electronic equipment faults, a dictionary-based multidimensional data augmentation method is employed. This involves constructing an entity knowledge base and replacing entities in the labeled data with their corresponding entities, thus effectively augmenting the data. Then, a RoBERTa-BiLSTM-CRF structure is used for named entity recognition. The RoBERTa pre-trained model encodes word embedding vectors for the text sequence, while the BiLSTM layer extracts features from the encoding, effectively capturing and utilizing contextual information to calculate the probability of a character's category. Finally, a CRF layer is introduced to enhance the constraint of the annotation effect, ensuring the rationality of the predicted labels. The extracted results are then exported as Excel files categorized by fault location, fault cause, fault phenomenon, and troubleshooting method. These files are then submitted to experts for review and data entry before being imported into the fault data import module.
[0031] Knowledge graph question answering function: When a user enters a question, the entity and entity type in the user's question are extracted through the RoBERTa-BiLSTM-CRF model and passed to the entity linking module.
[0032] 4. User Input Module In the system interface built on the PyQt5 framework, the user enters a natural language question in the application window, the user input module receives the question and simultaneously sends the question to the question classification module.
[0033] 5. Question Classification Module An intent recognition dataset is constructed, and a question classification method based on the BERT model is used to process the input natural language questions. First, user questions are received and preprocessed. Then, the input words are converted into high-dimensional vectors using BERT's word embedding layer. Next, a multi-layer Transformer structure is used to progressively extract higher-level, more abstract feature representations. Finally, a classification layer is added, typically employing a fully connected neural network and a softmax activation function to map features to different question categories, outputting the question's category, and passing the result to the template matching module.
[0034] 6. Entity Link Module Upon receiving entities from user queries passed by the entity extraction module, cosine similarity and Jaccard similarity matching are used. Cosine similarity analyzes the vector representations of entity attributes, focusing on the similarity of vector directions, making it suitable for entities with rich attributes or dimensions. Jaccard similarity calculates the intersection-union ratio (IUU) between entity attribute sets, emphasizing the presence or absence of entity attributes, making it suitable for entities with fewer attributes or features exhibiting categorical data. These two methods are combined to find the node names and entity types with the highest similarity, and the link results are then passed to the template matching module.
[0035] 7. Template Matching Module The query template is determined by the user's question intent based on the question classification results and the entity types obtained from entity links. The node names are then filled into the query statement to improve it. The improved query statement is then passed to the answer generation module.
[0036] 8. Answer Display Module The query is executed using the `run` function of the py2neo library. The returned results are then assembled to obtain a conversational answer, which is returned to the user. If no results are found, after equipment repair, the knowledge graph management module is used to promptly add new fault information to the knowledge graph, ensuring timely updates and improving accuracy.
[0037] like Figure 1As shown, this invention can be used on computer systems related to electronic equipment maintenance. Users input questions about electronic equipment malfunctions into the application window, such as "What are the causes of malfunctions in a certain type of electronic component?" The system will then follow the processing flow of the aforementioned modules, searching for relevant information in the knowledge graph, and finally displaying troubleshooting suggestions on the user interface.
[0038] The embodiments of the present invention have achieved some positive results during the research and development or use process, and have indeed great advantages compared with the prior art. The following content describes them in conjunction with the data, charts and other information of the experimental process.
[0039] Table 1 shows the parameters for training the RoBERTa-BiLSTM–CRF model: parameter meaning Value Epoch Training rounds 25 Learning_rate Learning rate 3*10-5 batch_size Batch size 32 lstm_embedding_size LSTM word embedding dimension 768 optimizer Optimizer AdamW Table 2 shows examples of data augmentation: Original text The repair log reported that there were no scan lines during normal operation, and inspection revealed that the XHCL processing module indicator light was malfunctioning. Entity word synonym replacement The repair log reported that there were no scan lines during normal operation, and inspection revealed that the XHCL processing module's panel lights were malfunctioning. Non-entity synonym replacement The maintenance record indicated that there were no scan lines during normal operation; inspection revealed that the XHCL processing module indicator light was malfunctioning. Corpus deletion Inspection revealed an abnormal indicator light on the XHCL processing module. Table 3 shows the training results of the entity extraction model: Model Accuracy Recall rate F1 value BiLSTM-CRF 0.7954 0.8448 0.8193 BERT-BiLSTM-CRF 0.8160 0.8640 0.8393 Roberta-BiLSTM-CRF 0.8283 0.8833 0.8549 It can be seen that compared with the basic BiLSTM-CRF model, the Roberta-BiLSTM-CRF model trained in this paper improves precision, recall, and F1 score by 0.0329, 0.0385, and 0.0356, respectively. This proves that the proposed model can be effectively used for knowledge graph construction in the field of electronic equipment fault knowledge. Compared with the BERT pre-trained model, the Roberta pre-trained model improves precision, recall, and F1 score by 0.0123, 0.0193, and 0.0156, respectively, indicating that after introducing the dynamic masking strategy, Roberta has better generalization ability on electronic equipment fault data compared with the BERT model.
[0040] The system's accuracy was evaluated by testing a series of electronic equipment fault-related questions and calculating the percentage of correct answers provided. After multiple tests, the system demonstrated a very high accuracy rate, indicating its ability to effectively provide accurate suggestions for electronic equipment fault diagnosis. Furthermore, comparing the efficiency of traditional fault diagnosis methods with the knowledge graph-based method of this invention in handling complex fault problems revealed that the method significantly shortens diagnosis time and improves efficiency, effectively supporting the fault diagnosis needs of complex electromechanical products.
[0041] Although the present invention has been disclosed above with reference to preferred embodiments, the embodiments and accompanying drawings are not intended to limit the invention. Any person skilled in the art can make various changes or modifications without departing from the spirit and scope of the invention, and these changes will also be within the protection scope of the invention. Therefore, the protection scope of the present invention should be defined by the scope of the claims of this application.
Claims
1. A knowledge graph-based electronic equipment fault diagnosis system, built on the PyQt5 framework, characterized in that, include: The fault data import module is used to collect previously organized structured fault information text, select Neo4j as the database for storing the knowledge graph, read data from Excel, and import data of a specified type from Excel into the knowledge graph. The fault data management module is used to update the content in the Neo4j knowledge graph in a timely manner; The entity extraction module is used to extract entities from unstructured text. It has two functional interfaces: one is the knowledge graph construction function, and the other is the knowledge graph question answering function. It uses the RoBERTa-BiLSTM-CRF model to extract entities that can be used to build and query the knowledge graph. The user input module is used to receive natural language questions entered by users in the application window and send the questions to the question classification module. The question classification module is used to construct an intent recognition dataset and proposes a question classification method based on the BERT model to extract features and classify input natural language questions to obtain classification results. The entity linking module is used to extract entities from user questions in the knowledge graph question-and-answer function of the entity extraction module, and then find the node names and entity types with high similarity by matching them with cosine and Jaccard similarity. The template matching module determines the user's question intent by matching the query template based on the question classification results and the entity types obtained from entity links. It then fills the node names into the query statement, completes the query statement, and passes it to the answer generation module. The answer generation module uses a database query statement obtained after template matching to query the Neo4j database, and displays the answers obtained from the database to the user interface.
2. A diagnostic method for an electronic equipment fault diagnosis system based on a knowledge graph as described in claim 1, characterized in that, Includes the following steps: Step 1: Using the fault data import module, import the specified data type from Excel, the Visio file of the equipment troubleshooting flowchart, and the corresponding instruction Excel file into the Neo4j knowledge graph, and cross-link them with the original structured fault information. Step 2: Using the knowledge graph construction function in the entity extraction module, extract the enterprise's past unstructured fault information into structured text that conforms to the fault data import module, export it in Excel format, review it after extraction, and then import the data into the knowledge graph through the fault data import module. Step 3: Use the user input module to receive the natural language questions entered by the user in the application window, and send the questions to the question classification module at the same time; Step 4: Using the question classification module, the input natural language questions are feature extracted and classified using a question classification method based on the BERT model. The classification results are then passed to the template matching module. Step 5: Use the knowledge graph question-and-answer function in the entity extraction module to extract the entities and entity types of the user's question, and pass the extracted entities and entity types to the entity linking module; Step 6: Using the entity linking module, find the node names and entity types with high similarity to the entities extracted by the entity extraction module after matching by cosine and Jaccard similarity, and pass the linking results to the template matching module. Step 7: Using the template matching module, match the database query language template based on the question classification results and entity link results, fill the node names into the template to improve the query language, and pass the improved query language to the answer generation module. Step 8: Using the answer display module, query the Neo4j database to generate query results, and display the troubleshooting suggestions obtained from the database query to the user; Step 9: If no content is found, after repairing the equipment, use the knowledge graph management module to add the new fault information to the knowledge graph in a timely manner.
3. The method for fault diagnosis of electronic equipment based on knowledge graph as described in claim 2, characterized in that: The fault information in step one includes node tags for fault location, fault cause, fault phenomenon and troubleshooting method, as well as various relationship types such as failure cause, cause, measures taken, composition and association, and various attributes such as cabinet, socket, slot and material code.
4. The method for fault diagnosis of electronic equipment based on knowledge graph as described in claim 2, characterized in that: The specific steps for importing data of a specified type from Excel into the knowledge graph are as follows: First, the `read_excel` function from the pandas library is used to read the contents of the table header, which contains four columns: fault location, fault cause, fault phenomenon, and troubleshooting method. Then, the `Graph` function from the py2neo library is used to connect to the Neo4j database. Finally, the `Node` function is used to import the nodes with attribute information into the knowledge graph. The Relationship function is used to create relationships between nodes and import them into a knowledge graph, thus completing the construction of a knowledge graph for the field of electronic equipment fault diagnosis.
5. The method for fault diagnosis of electronic equipment based on knowledge graph as described in claim 2, characterized in that: The specific steps for importing the Visio file of the equipment troubleshooting flowchart and the corresponding Excel file of instructions into the knowledge graph are as follows: First, a Visio application object, appVisio, is created using the win32.gencache.EnsureDispatch function of the win32 library to operate the Visio software. Then, the appVisio function is used to open the specified file and assign it to the vdoc object. The connectors in the file are read to obtain the contents of the start box, connection, and end box, which are then transformed into a knowledge graph triple. The Node and Relationship functions are used to import this set of connectors into the knowledge graph. At the same time, the fault phenomena corresponding to the troubleshooting file are connected with the fault phenomena in the knowledge graph of the electronic equipment fault diagnosis domain that has been built. Then, the corresponding instruction file is read. The instruction file is divided into two columns. The first column is the content of the troubleshooting box in the Visio file, and the second column is the instruction for the operation within the box. The read_excel function in the pandas library is used to read the content of the two columns, and then the push function is used to add the operation instruction attribute of the troubleshooting flowchart node.
6. The method for fault diagnosis of electronic equipment based on knowledge graphs as described in claim 2, characterized in that, The entity extraction model in step two includes: Named entity recognition is performed by constructing an entity knowledge base and replacing its entities with those in the labeled data using the RoBERTa-BiLSTM-CRF structure. In this model, the RoBERTa pre-trained model is responsible for encoding the word embedding vectors of the text sequence, while the BiLSTM layer is used to extract features from the encoding. The CRF layer is introduced to enhance the constraint of the annotation effect, and the prediction deviation is evaluated by comparing the predicted label with the actual label.
7. The method for fault diagnosis of electronic equipment based on knowledge graphs as described in claim 2, characterized in that, The question classification method based on the BERT model in step four includes: Foundations of Pre-trained Language Models: BERT, as a pre-trained language model, learns unsupervised on large-scale texts to capture rich semantic and syntactic information of language; Input processing: Receive user queries and preprocess them to prepare for subsequent processing; Vector representation: The word embedding layer of BERT converts the input words into high-dimensional vectors containing semantic information to help understand the meaning of the question; Feature extraction: Utilizes a multi-layer Transformer structure to progressively extract higher-level abstract feature representations, capturing long-distance dependencies and contextual information in the text; Question classification: Add a classification layer, use a fully connected neural network and softmax activation function to map features to different question categories, and output the category to which the question belongs.
8. The method for fault diagnosis of electronic equipment based on knowledge graph as described in claim 2, characterized in that, In step seven, after processing the natural language questions by question classification, the corresponding query template is found according to the question category, and the variables in the template are replaced by the results of entity linking. The completed query statement is then passed to the answer generation module.
9. The method for fault diagnosis of electronic equipment based on knowledge graph as described in claim 2, characterized in that, In step eight, the answer display module uses the run function of the py2neo library to run the query statement, assembles the returned results, obtains a conversational answer, and returns the answer to the user.