Power knowledge base construction method and system based on natural language and knowledge graph

By constructing a power knowledge base based on natural language and knowledge graphs, the problems of low efficiency and poor accuracy in knowledge retrieval in the power knowledge management system have been solved, and efficient and accurate power knowledge query and management have been achieved.

CN121579697APending Publication Date: 2026-02-27STATE GRID INFORMATION & TELECOMM GRP CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511513712.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-22
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

The existing power knowledge management system lacks a unified management approach, resulting in low knowledge retrieval efficiency, serious information silos, difficulty in meeting complex query needs, and poor knowledge query accuracy.

Method used

This paper adopts a natural language and knowledge graph-based approach. By acquiring multi-source power data, preprocessing, entity recognition, and relation extraction, a power knowledge graph is constructed and optimized. Finally, a power knowledge base is built, and BERT or RoBERTa models are used for semantic understanding and path query to obtain relevant knowledge.

Benefits of technology

It achieves wide applicability and high query accuracy in power knowledge management, enabling the quick and accurate acquisition of relevant power knowledge and improving the effectiveness and convenience of power knowledge management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121579697A_ABST
    Figure CN121579697A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an electric power knowledge base construction method and system based on a natural language and a knowledge graph, and belongs to the technical field of electric power knowledge base construction. The electric power knowledge base construction method comprises the following steps: acquiring multi-source electric power data in an electric power system; carrying out preprocessing on the multi-source electric power data; performing entity identification and relation extraction on the preprocessed multi-source power data; constructing an electric power knowledge graph according to the entities and the relationship; optimizing the electric power knowledge graph to construct an electric power knowledge base; obtaining a current search request; and inputting the search request into the power knowledge base to obtain related power knowledge. The mode of constructing the electric power knowledge graph and the electric power knowledge base through the multi-source electric power data is adopted, the effectiveness of electric power knowledge management can be effectively improved, the applicability is wider, and searching is more convenient and more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power knowledge base construction technology, specifically to a method and system for constructing a power knowledge base based on natural language and knowledge graphs. Background Technology

[0002] With the rapid development of power systems, the power industry has accumulated a wealth of knowledge resources, including technical documents, operation logs, fault records, equipment parameters, and standards. However, this knowledge is usually stored in unstructured text, tables, and images, lacking a unified management method, resulting in low knowledge retrieval efficiency and severe information silos.

[0003] Traditional power knowledge management systems often employ simple keyword matching or database query methods, which are insufficient to meet complex query needs and cannot effectively support semantic reasoning and cross-domain knowledge integration.

[0004] In the process of realizing this invention, the inventors of this application discovered that the above-mentioned solutions in the prior art have the defects of narrow applicability and poor knowledge retrieval accuracy. Summary of the Invention

[0005] The purpose of this invention is to provide a method and system for constructing a power knowledge base based on natural language and knowledge graphs. This method and system for constructing a power knowledge base based on natural language and knowledge graphs has the functions of wide applicability and high knowledge query accuracy.

[0006] To achieve the above objectives, one embodiment of the present invention provides a method for constructing a power knowledge base based on natural language and knowledge graphs, including: Acquire multi-source power data from the power system; The multi-source power data is preprocessed; Entity identification and relationship extraction are performed on the preprocessed multi-source power data; Construct an electricity knowledge graph based on the entities and relationships; The power knowledge graph is optimized to construct a power knowledge base; Get the current search request; The search request is input into the power knowledge base to obtain relevant power knowledge.

[0007] Optionally, acquiring multi-source power data from the power system includes: Power data was obtained using web crawlers, API interfaces, and file import. The power data is then categorized.

[0008] Optionally, preprocessing the multi-source power data includes: The multi-source power data is cleaned. The cleaned multi-source power data is then standardized.

[0009] Optionally, entity identification and relationship extraction of the preprocessed multi-source power data includes: Construct entity recognition models and relation extraction models; The entity recognition model is used for identification and annotation, and an entity type system is established. The aforementioned relation extraction model is used to model entity relations for knowledge fusion.

[0010] Optionally, constructing an electricity knowledge graph based on the entities and relationships includes: Choose a graph database system; The fused knowledge is imported into the graph database system to obtain a power knowledge graph.

[0011] Optionally, the graph database system includes Neo4j or JanusGraph.

[0012] Optionally, optimizing the power knowledge graph to construct a power knowledge base includes: The graph index of the power knowledge graph is optimized; The graph reasoning of the aforementioned power knowledge graph is optimized; Knowledge fusion is performed on the power knowledge graph to obtain a power knowledge base.

[0013] Optionally, the search request can be input into the power knowledge base to obtain relevant power knowledge, including: The semantic understanding model BERT or RoBERTa is used to perform intent recognition and entity extraction on the search request; Based on the intent of the search request and the entities, perform path queries to obtain multiple search results; Obtain the similarity between the search request and multiple search results; The search results are sorted and output based on the similarity.

[0014] Optionally, obtaining the similarity between the search request and multiple search results includes: Obtain the text vector of the search request and each of the search results; The similarity between the search request and the search result is obtained according to formula (1). (1) in, For the search request and the first The similarity of the search results The text vector of the search request. For the first The text vector of each search result. The number is an integer.

[0015] On the other hand, the present invention also provides a power knowledge base construction system based on natural language and knowledge graphs, comprising: The knowledge acquisition module is used to acquire knowledge about electricity. The controller, connected to the knowledge acquisition module, is used to execute any of the above-described methods for constructing a power knowledge base.

[0016] Through the above technical solutions, the power knowledge base construction method and system based on natural language and knowledge graph provided by this invention can effectively construct a power knowledge graph by acquiring multi-source power data from the power system, performing entity recognition and relation extraction on the multi-source power knowledge data, and optimizing the power knowledge graph to obtain a power knowledge base. Based on the current search request and the power knowledge base, relevant power knowledge can be obtained accurately and quickly. The method of constructing a power knowledge graph and power knowledge base using multi-source power data can effectively improve the effectiveness of power knowledge management, has wider applicability, and makes searching more convenient and accurate.

[0017] Other features and advantages of the embodiments of the present invention will be described in detail in the following detailed description section. Attached Figure Description

[0018] The accompanying drawings are provided to further illustrate embodiments of the present invention and form part of the specification. They are used together with the following detailed description to explain the embodiments of the present invention, but do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of a method for constructing an electric power knowledge base based on natural language and knowledge graphs according to an embodiment of the present invention; Figure 2 This is a flowchart illustrating the acquisition of multi-source power data in a power knowledge base construction method based on natural language and knowledge graphs according to an embodiment of the present invention. Figure 3 This is a flowchart of the preprocessing of multi-source power data in a power knowledge base construction method based on natural language and knowledge graph according to an embodiment of the present invention; Figure 4 This is a flowchart of entity recognition and relation extraction in a method for constructing an electric power knowledge base based on natural language and knowledge graph according to an embodiment of the present invention; Figure 5This is a flowchart of constructing an electric power knowledge graph in a method for constructing an electric power knowledge base based on natural language and knowledge graph according to an embodiment of the present invention; Figure 6 This is a flowchart of optimizing the power knowledge graph in a power knowledge base construction method based on natural language and knowledge graph according to an embodiment of the present invention; Figure 7 This is a flowchart illustrating the process of searching for power knowledge in a power knowledge base construction method based on natural language and knowledge graphs according to an embodiment of the present invention. Detailed Implementation

[0019] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the scope of the present invention.

[0020] It should be noted that the acquisition, transmission, storage, use, and processing of data in the technical solution of this application all comply with relevant laws and regulations. In the embodiments of this application, certain existing industry solutions such as software, components, and models may be mentioned. These should be considered exemplary, intended only to illustrate the feasibility of implementing the technical solution of this application, and do not imply that the applicant has already used or necessarily used such solutions.

[0021] Figure 1 This is a flowchart of a method for constructing an electric power knowledge base based on natural language and knowledge graphs according to an embodiment of the present invention. Figure 1 In this context, the method for constructing the power knowledge base may include: In step S1, multi-source power data from the power system is acquired. These power knowledge sources include power industry standards, equipment manuals, operation logs, fault reports, technical documents, and research papers. This data typically exists in various formats such as text, tables, and images, thus requiring unified collection and preprocessing.

[0022] In step S2, the multi-source power data is preprocessed.

[0023] In step S3, entity identification and relationship extraction are performed on the preprocessed multi-source power data.

[0024] In step S4, an electricity knowledge graph is constructed based on entities and relationships.

[0025] In step S5, the power knowledge graph is optimized to construct a power knowledge base.

[0026] In step S6, the current search request is obtained.

[0027] In step S7, the search request is entered into the power knowledge base to obtain relevant power knowledge.

[0028] In steps S1 to S7, multi-source power data from the power system is first acquired and preprocessed. Then, entity recognition and relationship extraction are performed on the preprocessed multi-source power data to construct a power knowledge graph. Further, the power knowledge graph is optimized to obtain a power knowledge base. Finally, based on the current search request and the power knowledge base, relevant power knowledge can be obtained.

[0029] Traditional power knowledge management mainly includes three types: first, traditional database query systems, which rely on predefined database structures, cannot effectively handle unstructured text data, and the query results lack contextual relevance; second, full-text search engines, which are based on keyword matching, and the search results are easily affected by synonyms and polysemous words, making it difficult to provide accurate knowledge matching; and third, rule-based knowledge management systems, which rely on manually formulated rules, have poor flexibility, and are difficult to adapt to the dynamic updating and expansion needs of power knowledge. In this embodiment of the invention, the method of constructing a power knowledge graph and a power knowledge base using multi-source power data can effectively improve the effectiveness of power knowledge management, has wider applicability, and provides more convenient and accurate searches.

[0030] In this embodiment of the invention, the acquisition of multi-source power data can be as follows: Figure 2 As shown, specifically, in Figure 2 In addition, the method for constructing this power knowledge base may also include: In step S10, power data is obtained using web crawlers, API interfaces, and file import.

[0031] In step S11, the power data is classified. This can include classifying and managing the data sources.

[0032] In this embodiment of the invention, after acquiring multi-source power data, it is necessary to preprocess the multi-source power data. Specifically, the preprocessing steps can be as follows: Figure 3 As shown. Specifically, in Figure 3 In addition, the method for constructing this power knowledge base may also include: In step S20, data cleaning is performed on the multi-source power data. This includes removing duplicate data, invalid characters, and noise, and performing preprocessing operations such as word segmentation, part-of-speech tagging, and stop word removal.

[0033] In step S21, the cleaned multi-source power data is standardized. This involves converting unstructured text into structured data, such as converting equipment parameter tables into key-value pair format, and standardizing units, terminology, and naming rules.

[0034] In this embodiment of the invention, in order to achieve a structured representation of power knowledge, it is necessary to use natural language processing technology to perform entity recognition and relation extraction on the text. Specific steps can be as follows: Figure 4 As shown. Specifically, in Figure 4 In addition, the method for constructing this power knowledge base may also include: In step S30, an entity recognition model and a relation extraction model are constructed.

[0035] In step S31, an entity recognition model is used for identification and annotation, and an entity type system is established. For entity recognition, key entities in the power text, such as "transformer," "relay," "insulation resistance," and "short-circuit current," can be identified. A deep learning-based named entity recognition model (such as BERT-BiLSTM-CRF) is used to annotate the text entities and establish an entity type system, such as equipment, parameter, and fault categories.

[0036] In step S32, a relation extraction model is used to model entity relationships for knowledge fusion. Relation extraction identifies semantic relationships between entities, such as "device A contains component B" or "parameter X affects the operating state of device Y." A graph neural network (GNN)-based relation extraction model is used to model entity relationships in the text and generate relation triples (subject, relation, object).

[0037] In this embodiment of the invention, after obtaining the entities and relationships of power knowledge, a power knowledge graph can be constructed. The specific construction steps can be as follows: Figure 5 As shown. Specifically, in Figure 5 In addition, the method for constructing this power knowledge base may also include: In step S40, a graph database system is selected. This graph database system may include Neo4j or JanusGraph, etc.

[0038] In step S41, the fused knowledge is imported into the graph database system to obtain a power knowledge graph.

[0039] In steps S40 and S41, the knowledge graph consists of nodes (entities) and edges (relationships), supporting efficient knowledge storage and retrieval. Based on the characteristics of knowledge in the power sector, a hierarchical structure for the graph is designed. For example, power equipment, power parameters, and power faults are used as the main node categories, and corresponding attributes and relationship types are defined. A suitable graph database system for the power knowledge graph is selected, and data import and storage optimization are performed. Simultaneously, an automated update mechanism is designed to ensure that the knowledge graph can dynamically expand as power knowledge accumulates. For example, when a new power standard is released or a new equipment model is introduced, the system can automatically identify the new knowledge and update the graph.

[0040] In this embodiment of the invention, in order to improve the query efficiency and reasoning ability of the knowledge graph, it needs to be optimized. Specific optimization steps can be as follows: Figure 6 As shown. Specifically, in Figure 6 In addition, the method for constructing this power knowledge base may also include: In step S50, the graph index of the power knowledge graph is optimized. Specifically, the indexing mechanism of the graph database can be utilized to optimize the indexing of frequently queried entities and relationships, thereby improving query response speed.

[0041] In step S51, the graph reasoning of the power knowledge graph is optimized. This can be achieved by introducing a rule-based reasoning engine (such as the OWL inference engine) or a deep learning-based reasoning model (such as Graph Neural Networks) to support reasoning about implicit relationships in the knowledge graph. For example, based on the similarity between the parameters of device A and the parameters of device B, possible fault modes of device B can be inferred.

[0042] In step S52, knowledge fusion is performed on the power knowledge graph to obtain a power knowledge base. This involves fusing knowledge from different data sources to eliminate redundant and conflicting information. For example, when two data sources describe the parameters of the same device differently, the system can select the most reliable information for storage through confidence assessment and conflict resolution mechanisms.

[0043] In this embodiment of the invention, after the power knowledge base is constructed, relevant power knowledge can be searched in the power knowledge base based on the current search request. Specific steps can be as follows: Figure 7 As shown, specifically, in Figure 7 In addition, the method for constructing this power knowledge base may also include: In step S70, a semantic understanding model based on BERT or RoBERTa is used to identify the intent and extract entities from the search request. The core of intelligent retrieval lies in understanding the user's query intent and transforming it into a query request to the knowledge graph. Therefore, a semantic understanding model based on BERT or RoBERTa can be used to identify the intent and extract entities from the natural language query input by the user. For example, when a user inputs "how to detect abnormal insulation resistance in a transformer," the system can identify key entities and actions such as "transformer," "insulation resistance," and "detection." The query intent is then categorized based on the context and semantics of the user's query, into different intent categories such as "equipment parameter query," "fault diagnosis," and "standard specification query," and an appropriate retrieval strategy is selected.

[0044] In step S71, path queries are performed based on the intent of the search request and the entities to obtain multiple search results. After understanding the user's query intent, an efficient retrieval system needs to be designed based on the structure of the knowledge graph. Specifically, retrieval can include path queries, graph expansion queries, and multimodal retrieval. Path queries utilize the path query function of the graph database to retrieve relevant knowledge along predefined relational paths starting from the user-specified entities. For example, if a user queries "transformer maintenance steps," the system can retrieve relevant maintenance guidelines through the path "transformer → maintenance → steps." When the entity or relation queried by the user does not directly exist in the graph, the system can use the graph expansion mechanism, employing semantic similarity calculation or relational reasoning, to find knowledge related to the user's query. For example, if a user queries "how to handle short-circuit faults," the system can expand to related entities such as "short-circuit current" and "relay protection," and retrieve relevant handling solutions. Furthermore, mixed retrieval in multiple formats, including text, images, and tables, is supported. For example, if a user uploads a photo of equipment and asks "what are the parameters of this equipment," the system can extract the equipment model using image recognition technology and retrieve the relevant parameters of the equipment by combining the knowledge graph.

[0045] In step S72, the similarity between the search request and multiple search results is obtained. Specifically, for the similarity between the search request and each search result, the search request and each search result can first be converted into text vectors, and then the similarity between the search request and the search results can be obtained according to formula (1). (1) in, For search requests and the The similarity of the search results For the text vector of the search request, For the first The text vector of each search result. The results are numbered by integer. In addition, traditional retrieval algorithms such as TF-IDF and BM25 can be used for preliminary screening, and then semantic similarity models (such as Sentence-BERT) can be used to sort the results.

[0046] In step S73, the search results are sorted and output based on similarity. The sorting can also be based on factors such as semantic similarity between the search request and the search results, path length, and weight. For example, if a user searches for "how to test the insulation resistance of a transformer," the system will prioritize returning knowledge items directly related to "insulation resistance testing." Furthermore, the system can recommend relevant knowledge content based on the user's historical query records and preferences. For instance, if a user frequently searches for maintenance methods for power equipment, the system can prioritize recommending maintenance-related knowledge in related queries.

[0047] In this embodiment of the invention, the system supports users to provide feedback on the search results, such as liking, saving, and correcting errors, and uses the feedback data to optimize the search model and improve the accuracy of subsequent queries.

[0048] In this embodiment of the invention, for training the natural language processing model, a pre-trained language model (such as BERT or RoBERTa) can be used as the base model, and fine-tuned on a text dataset in the power industry to improve the model's domain adaptability. For constructing the knowledge graph, the Neo4j graph database can be used to store the knowledge graph, and efficient graph querying can be achieved through the Cypher query language.

[0049] On the other hand, the present invention also provides a power knowledge base construction system based on natural language and knowledge graphs, which may include a knowledge acquisition module and a controller.

[0050] The knowledge acquisition module is used to acquire power knowledge. The controller is connected to the knowledge acquisition module and is used to execute any of the power knowledge base construction methods mentioned above.

[0051] Through the above technical solutions, the power knowledge base construction method and system based on natural language and knowledge graph provided by this invention can effectively construct a power knowledge graph by acquiring multi-source power data from the power system, performing entity recognition and relation extraction on the multi-source power knowledge data, and optimizing the power knowledge graph to obtain a power knowledge base. Based on the current search request and the power knowledge base, relevant power knowledge can be obtained accurately and quickly. The method of constructing a power knowledge graph and power knowledge base using multi-source power data can effectively improve the effectiveness of power knowledge management, has wider applicability, and makes searching more convenient and accurate.

[0052] This invention utilizes natural language processing and knowledge graph technology to achieve structured representation and intelligent retrieval of power knowledge, significantly improving the intelligence level of power knowledge management. Compared to traditional database queries and full-text search methods, this invention can more accurately understand the user's query intent and provide more relevant and precise knowledge retrieval results. For example, in power equipment fault diagnosis scenarios, users can input "How to detect abnormal transformer insulation resistance" using natural language. The system can quickly identify relevant entities and relationships, and combined with knowledge graph reasoning, provide detailed detection steps and suggestions, thereby improving the efficiency and accuracy of fault diagnosis.

[0053] This invention employs intelligent retrieval technology based on semantic understanding and graph querying, effectively solving the problems of low retrieval efficiency and inaccurate results in traditional power knowledge management systems. Through entity recognition, relation extraction, and semantic analysis, the system can understand the deep intent of user queries and, combined with the path query and reasoning mechanisms of the knowledge graph, provide more comprehensive and accurate retrieval results. For example, in a power equipment maintenance scenario, when a user inputs "how to replace a relay protection device," the system can identify key entities such as "relay protection device" and "replacement," and, combined with the equipment structure and maintenance process in the knowledge graph, provide detailed replacement steps and precautions, thereby improving the efficiency and accuracy of maintenance work.

[0054] This invention supports the integration of multi-source heterogeneous data on power knowledge, capable of processing data in various formats such as text, tables, and images, and uniformly transforming them into structured knowledge. Through the construction and optimization of knowledge graphs, the system can achieve knowledge fusion across data sources, eliminating redundant and conflicting information, and ensuring the consistency and integrity of knowledge. For example, in the scenario of power standard and specification management, the system can integrate power standard documents from different sources and provide consistent specification interpretations and recommendations through the reasoning mechanism of knowledge graphs, thereby improving the level of intelligence in standard management.

[0055] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0056] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0057] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0058] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0059] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0060] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0061] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0062] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0063] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A method for constructing an electricity knowledge base based on natural language and knowledge graphs, characterized in that, include: Acquire multi-source power data from the power system; The multi-source power data is preprocessed; Entity identification and relationship extraction are performed on the preprocessed multi-source power data; Construct an electricity knowledge graph based on the entities and relationships; The power knowledge graph is optimized to construct a power knowledge base; Get the current search request; The search request is input into the power knowledge base to obtain relevant power knowledge.

2. The method for constructing a power knowledge base according to claim 1, characterized in that, Acquiring multi-source power data from the power system includes: Power data was obtained using web crawlers, API interfaces, and file import. The power data is then categorized.

3. The method for constructing a power knowledge base according to claim 1, characterized in that, Preprocessing the multi-source power data includes: The multi-source power data is cleaned. The cleaned multi-source power data is then standardized.

4. The method for constructing a power knowledge base according to claim 1, characterized in that, Entity identification and relation extraction of the preprocessed multi-source power data include: Construct entity recognition models and relation extraction models; The entity recognition model is used for identification and annotation, and an entity type system is established. The aforementioned relation extraction model is used to model entity relations for knowledge fusion.

5. The method for constructing a power knowledge base according to claim 4, characterized in that, Constructing an electricity knowledge graph based on the entities and relationships includes: Choose a graph database system; The fused knowledge is imported into the graph database system to obtain a power knowledge graph.

6. The method for constructing a power knowledge base according to claim 5, characterized in that, The graph database system includes Neo4j or JanusGraph.

7. The method for constructing a power knowledge base according to claim 1, characterized in that, Optimizing the power knowledge graph to construct a power knowledge base includes: The graph index of the power knowledge graph is optimized; The graph reasoning of the aforementioned power knowledge graph is optimized; Knowledge fusion is performed on the power knowledge graph to obtain a power knowledge base.

8. The method for constructing a power knowledge base according to claim 1, characterized in that, The search request is input into the power knowledge base to obtain relevant power knowledge, including: The semantic understanding model BERT or RoBERTa is used to perform intent recognition and entity extraction on the search request; Based on the intent of the search request and the entities, perform path queries to obtain multiple search results; Obtain the similarity between the search request and multiple search results; The search results are sorted and output based on the similarity.

9. The method for constructing a power knowledge base according to claim 8, characterized in that, Obtaining the similarity between the search request and multiple search results includes: Obtain the text vector of the search request and each of the search results; The similarity between the search request and the search result is obtained according to formula (1). ,(1) in, For the search request and the first The similarity of the search results The text vector of the search request. For the first The text vector of each search result. The number is an integer.

10. A power knowledge base construction system based on natural language and knowledge graphs, characterized in that, include: The knowledge acquisition module is used to acquire knowledge about electricity. The controller, connected to the knowledge acquisition module, is used to execute the power knowledge base construction method as described in any one of claims 1-9.