Knowledge graph generation method based on large language model
Through the knowledge graph generation method based on large language model, the problem that traditional power grid data management systems are difficult to deal with and utilize unstructured data is solved, intelligent query and decision-making support are realized, and the grid operation and maintenance efficiency and service quality are significantly improved.
Patent Information
- Application Number
- CN202411739323.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-04
AI Technical Summary
Traditional power grid data management systems are difficult to effectively process and utilize massive unstructured and structured data, resulting in knowledge loss and inefficient query, and are unable to support complex knowledge correlation analysis and deep-level decision support.
Using a knowledge graph generation method based on a large language model, by collecting and preprocessing the power grid operation and maintenance data, using a large language model for entity recognition, relationship extraction and sentiment analysis, a graph database is constructed and a preliminary knowledge graph is formed, dynamically updated and applied to support intelligent query and decision-making.
It improves the accuracy and completeness of information extraction, realizes complex knowledge correlation and dynamic updates, significantly improves the speed and accuracy of fault processing, and enhances the operating efficiency and service quality of the power grid.
Smart Images

Figure CN119557456A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power grid management and intelligent data processing technology, and in particular to a knowledge graph generation method based on a large language model. Background Art
[0002] As power grid management becomes increasingly complex, traditional data management systems face major challenges in processing and integrating massive amounts of unstructured and structured data. A large amount of business data and experiential knowledge generated in daily operation and maintenance at grassroots power supply stations, such as operation and maintenance records, fault reports, and equipment manuals, mostly exist in the form of unstructured text. This information contains a wealth of knowledge and experience, but due to its unstructured nature, it is difficult to be effectively captured and utilized by existing data management systems, resulting in a large loss of knowledge and low query efficiency.
[0003] In addition, existing power grid data management systems mostly rely on static database technology and lack flexible knowledge representation and intelligent data processing capabilities. These systems are difficult to support complex knowledge association analysis and in-depth decision support, and cannot meet the needs of modern power grid intelligence and automation. For example, when dealing with sudden failures, the system often cannot provide comprehensive and accurate fault cause analysis and corresponding maintenance suggestions, affecting the operation and maintenance efficiency and safety of the power grid. Summary of the invention
[0004] The purpose of the present invention is to provide a knowledge graph generation method based on a large language model, which can realize intelligent query and decision support in the process of power grid operation and maintenance by constructing and managing power grid-related knowledge graphs, thereby improving the operation efficiency and service quality of the power grid.
[0005] To achieve the above object, the present invention provides a knowledge graph generation method based on a large language model, comprising:
[0006] S1, collection and preprocessing of power grid operation and maintenance data;
[0007] S2, processes the pre-processed power grid operation and maintenance data through a large language model;
[0008] S3, constructs the data processed by the large language model into a graph database, and forms a preliminary knowledge graph after verification and optimization;
[0009] S4, dynamically update and apply the initially formed knowledge graph.
[0010] Optionally, step S1 includes:
[0011] S1.1, collecting various types of operation and maintenance data from power grid operation and maintenance, wherein the various types of operation and maintenance data include: structured data and unstructured data;
[0012] S1.2, performing data preprocessing on the structured data and the unstructured data;
[0013] Wherein, the step S1.2 comprises:
[0014] The structured data extracts key fields and performs normalization processing; the unstructured data is cleaned and subjected to natural language processing to remove irrelevant characters, and the cleaned unstructured data is segmented and labeled.
[0015] Optionally, step S2 comprises:
[0016] By using the trained large language model, entity recognition is performed on the unstructured data to identify key entities in the unstructured data, and the key entities are labeled and classified;
[0017] Relationship extraction is performed on structured entity data to extract logical relationships between the entity data and form relationship data between the entity data.
[0018] Optionally, step S2 further comprises:
[0019] Sentiment analysis is performed on the structured entity data and the relationship data between the entity data, and the structured entity data and its relationship data are classified and labeled according to the result of the sentiment analysis.
[0020] Optionally, step S3 includes:
[0021] S3.1, designing different types of entity data and relationship data into a graph structure;
[0022] S3.2, import the designed graph structure into the graph database, and verify and optimize the graph database.
[0023] Optionally, step S3.1 comprises:
[0024] According to different types of entity data and relationship data, different types of nodes and edges are defined; wherein each type of node and edge has its specific attributes;
[0025] According to the attributes of different types of nodes and edges, corresponding graph structures are designed.
[0026] Optionally, the nodes include: equipment, fault, operation, employee, document; the edges include: belongs to, causes, uses, affects, creates, executes.
[0027] Optionally, the step S3.2 comprises:
[0028] Import the designed graph structure into the graph database to establish the relationship between entities;
[0029] Verify and optimize the graph structure imported into the graph database to form a preliminary knowledge graph.
[0030] Optionally, the dynamically updating the initially formed knowledge graph in step S4 includes:
[0031] Automatically identify newly added entity data and relationship data, and add them to the knowledge graph;
[0032] Automatically correct or delete outdated information in the knowledge graph to ensure the real-time nature of the knowledge graph.
[0033] Optionally, the application of the dynamically updated knowledge graph in step S4 includes: intelligent query and decision support;
[0034] The intelligent query and decision support are:
[0035] Development of a decision support system for intelligent query interfaces of dynamically updated knowledge graphs;
[0036] Use the graph database in the knowledge graph to query entity data and relationship data to quickly query and obtain query results;
[0037] The query results are output as visual analysis reports to assist power grid operation and maintenance personnel in making decisions.
[0038] In summary, compared with the prior art, the present invention has the following beneficial effects:
[0039] 1. The invention provides a knowledge graph generation method based on a large language model, which uses the large language model (LLM) technology to automatically extract key information from unstructured text, such as fault causes, equipment parameters, and maintenance strategies, and improve the accuracy and completeness of information extraction through deep understanding of natural language;
[0040] 2. The present invention provides a knowledge graph generation method based on a large language model, which integrates the extracted information into the knowledge graph in a structured manner through the powerful relationship representation and query capabilities of the graph database, thereby realizing complex knowledge association and dynamic update;
[0041] 3. The present invention provides a knowledge graph generation method based on a large language model, which supports intelligent query and decision support based on the knowledge graph, significantly improves the speed and accuracy of fault handling, thereby enhancing the operating efficiency and service quality of the power grid. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 This is a flowchart of the knowledge graph generation method of the present invention. DETAILED DESCRIPTION
[0043] The following will be combined with the attached Figure 1 , the technical content, structural features, objectives achieved and effects of the present invention are described in detail through preferred embodiments.
[0044] It should be noted that the drawings are in a very simplified form and use non-precise proportions. They are only used to conveniently and clearly assist in explaining the embodiments of the present invention, and are not used to limit the conditions for the implementation of the present invention. Therefore, they have no substantive technical significance. Any structural modification, change in proportional relationship or adjustment of size, without affecting the effects and purposes that can be achieved by the present invention, should still fall within the scope of the technical content disclosed by the present invention.
[0045] In the description of the present invention, it should be noted that the terms "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0046] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0047] The present invention provides a knowledge graph generation method based on a large language model, such as Figure 1 As shown, the knowledge graph generation method includes the following steps:
[0048] S1, collection and preprocessing of power grid operation and maintenance data.
[0049] S1.1, collect various types of operation and maintenance data from power grid operation and maintenance, wherein the various types of operation and maintenance data include: structured data (such as database records) and unstructured data (such as text reports, equipment manuals, fault descriptions, etc.).
[0050] S1.2, performing data preprocessing on the structured data and the unstructured data.
[0051] S1.2.1, extract key fields from the structured data and normalize them.
[0052] Specifically, the process of processing the structured data includes:
[0053] Extract key fields from database records of structured data, wherein the key fields include: equipment number, fault code, maintenance record, etc.;
[0054] The extracted key fields are standardized, including unified data format, unified data units, and consistent data value ranges, to ensure data consistency and accuracy.
[0055] S1.2.2, cleaning and natural language processing of the unstructured data.
[0056] Specifically, the process of processing the unstructured data includes:
[0057] Collecting unstructured data such as text reports, equipment manuals, fault descriptions, etc.;
[0058] Clean the collected unstructured data, remove irrelevant characters, and unify the terminology;
[0059] Use natural language processing technology to segment and annotate the cleaned unstructured data.
[0060] S2, processes the pre-processed power grid operation and maintenance data through the large language model (LLM).
[0061] Using large language model technology, unstructured data is processed by entity recognition, relationship extraction, and sentiment analysis, where sentiment analysis is an optional processing step.
[0062] S2.1, perform entity recognition on unstructured data.
[0063] Use a trained large language model, such as a GPT (Generative Pre-Trained Transformer) model, to process unstructured data and automatically identify key entities in the unstructured data; the key entities include: device name, fault type, and operation steps;
[0064] The identified key entities are labeled and classified to generate structured entity data.
[0065] S2.2, perform relationship extraction on structured entity data.
[0066] Extracting logical relationships between the structured entity data; the logical relationships include: "lead to", "belong to", "use", etc.;
[0067] By using a relation extraction algorithm, the relation between entity data is annotated through the logical relation to form relation data between entity data.
[0068] S2.3, optionally, perform sentiment analysis on the structured entity data and its relationship data.
[0069] Performing sentiment analysis on the structured entity data and its relationship data to determine the state of the entity data, such as fault type and fault severity;
[0070] According to the results of sentiment analysis, structured entity data and its relationship data are classified and labeled.
[0071] S3, constructs the data processed by the large language model (LLM) into a graph database, and forms a preliminary knowledge graph after verification and optimization.
[0072] The results of the large language model (LLM) processing are converted into a graph structure and stored in a graph database. The graph structure is composed of nodes representing entity data and edges representing relationship data.
[0073] Specifically, the construction of the graph database includes the following steps:
[0074] S3.1, design different types of entity data and relationship data into graph structures.
[0075] S3.1.1, define different types of nodes and edges according to different types of entity data and relationship data; each type of node and edge has its own specific attributes.
[0076] The nodes include: equipment, fault, operation, employee, and document.
[0077] The attributes of the device include: device ID, device name, device type, device specifications, device location, and device manufacturing date; the attributes of the fault include: fault ID, fault name, fault description, fault occurrence date, and fault status; the attributes of the operation include: operation ID, operation name, operation type, operation execution date, and operation description; the attributes of the employee include: employee ID, employee name, employee position, and employee contact information; the attributes of the document include: document ID, document type, document content, and document creation date.
[0078] The edges include: belongs to, causes, uses, affects, creates, and executes.
[0079] The belonging attributes include: belonging to relationship ID, belonging to description; the resulting attributes include: resulting in relationship ID, resulting in description; the used attributes include: using relationship ID, using description; the affected attributes include: affecting relationship ID, affecting description; the created attributes include: creating relationship ID, creating description; the executed attributes include: executing relationship ID, executing description.
[0080] S3.1.2, design corresponding graph structures according to the attributes of different types of nodes and edges.
[0081] S3.2, import the designed graph structure into the graph database, and verify and optimize the graph database.
[0082] S3.2.1, import the designed graph structure into the graph database and establish the relationship between entities.
[0083] S3.2.2, verify and optimize the graph structure imported into the graph database to ensure the integrity and accuracy of the graph database and form a preliminary knowledge graph.
[0084] The structure of the graph database formed is shown in Table 1 of the following table:
[0085] Table 1 Structure of graph database
[0086]
[0087]
[0088] S4, dynamically update and apply the initially formed knowledge graph.
[0089] The constructed preliminary knowledge graph is dynamically updated, intelligently queried, and supported in decision making to cope with the ever-changing situations in power grid operation and maintenance.
[0090] The dynamic update includes: automatically identifying newly added entity data and relationship data, and adding them to the knowledge graph; automatically correcting or deleting outdated information in the knowledge graph to ensure the real-time nature of the knowledge graph.
[0091] The intelligent query and decision support include: developing a decision support system for an intelligent query interface for a dynamically updated knowledge graph; using a graph database in the knowledge graph to query entity data (i.e., nodes) and relationship data (i.e., edges) to quickly query and obtain query results, such as fault cause analysis, maintenance recommendations, etc.; and outputting query results as a visual analysis report to assist power grid operation and maintenance personnel in making decisions.
[0092] In summary, the knowledge graph generation method based on the large language model provided by the present invention can effectively use the graph database and LLM technology to build a comprehensive and dynamic power grid knowledge graph, which can not only improve the management efficiency of power grid data, but also enhance the intelligent level of decision-making, thereby better supporting the intelligent operation and maintenance of the power grid. In addition, the implementation of this technology will greatly improve the service quality and operation and maintenance efficiency of power supply stations.
[0093] Although the content of the present invention has been described in detail through the above preferred embodiments, it should be appreciated that the above description should not be considered as a limitation of the invention. After reading the above content, it will be obvious to those skilled in the art for various modifications and substitutions of the present invention. Therefore, the protection scope of the present invention should be limited by the attached claims.
Claims
1. A knowledge graph generation method based on a large language model, characterized in that: Include: S1, collection and preprocessing of power grid operation and maintenance data; S2, processes the pre-processed power grid operation and maintenance data through a large language model; S3, constructs the data processed by the large language model into a graph database, and forms a preliminary knowledge graph after verification and optimization; S4, dynamically update and apply the initially formed knowledge graph.
2. The knowledge graph generation method according to claim 1, characterized in that: The step S1 comprises: S1.1, collecting various operation and maintenance data from power grid operation and maintenance, wherein the various operation and maintenance data include: structured data and unstructured data; S1.2, performing data preprocessing on the structured data and the unstructured data; Wherein, the step S1.2 comprises: The structured data extracts key fields and performs normalization processing; the unstructured data is cleaned and subjected to natural language processing to remove irrelevant characters, and the cleaned unstructured data is segmented and labeled.
3. The knowledge graph generation method according to claim 2, characterized in that: The step S2 comprises: Performing entity recognition on the unstructured data by using a trained large language model to identify key entities in the unstructured data, and labeling and classifying the key entities; Relationship extraction is performed on structured entity data to extract logical relationships between the entity data and form relationship data between the entity data.
4. The knowledge graph generation method according to claim 3, characterized in that: The step S2 further comprises: Sentiment analysis is performed on the structured entity data and the relationship data between the entity data, and the structured entity data and its relationship data are classified and labeled according to the result of the sentiment analysis.
5. The knowledge graph generation method according to claim 3 or 4, characterized in that: The step S3 comprises: S3.1, designing different types of entity data and relationship data into a graph structure; S3.2, import the designed graph structure into the graph database, and verify and optimize the graph database.
6. The knowledge graph generation method according to claim 5, characterized in that: The step S3.1 comprises: According to different types of entity data and relationship data, different types of nodes and edges are defined; wherein each type of node and edge has its specific attributes; According to the attributes of different types of nodes and edges, corresponding graph structures are designed.
7. The knowledge graph generation method according to claim 6, characterized in that: The nodes include: equipment, failure, operation, employee, document; the edges include: belongs to, causes, uses, affects, creates, executes.
8. The knowledge graph generation method according to claim 6, characterized in that: The step S3.2 comprises: Import the designed graph structure into the graph database to establish the relationship between entities; Verify and optimize the graph structure imported into the graph database to form a preliminary knowledge graph.
9. The knowledge graph generation method according to claim 8, characterized in that: The step S4 of dynamically updating the initially formed knowledge graph includes: Automatically identify newly added entity data and relationship data, and add them to the knowledge graph; Automatically correct or delete outdated information in the knowledge graph to ensure the real-time nature of the knowledge graph.
10. The knowledge graph generation method according to claim 9, characterized in that: The application of the dynamically updated knowledge graph in step S4 includes: intelligent query and decision support; The intelligent query and decision support are: Development of a decision support system for intelligent query interfaces of dynamically updated knowledge graphs; Use the graph database in the knowledge graph to query entity data and relationship data to quickly query and obtain query results; The query results are output as visual analysis reports to assist power grid operation and maintenance personnel in making decisions.
Citation Information
Cited By
Power operation and maintenance knowledge graph generation method based on large model and graph neural network
CN120542538A