Knowledge hypergraph-based power system query method and related equipment

By using a knowledge hypergraph-based approach, a power system query method is automatically generated. Employing hyperedge modeling and bipartite graph storage techniques, this method solves the problems of poor scalability and information loss in existing technologies, and achieves efficient and accurate power system data query.

CN120975238APending Publication Date: 2025-11-18ELECTRIC POWER RES INST CHINA SOUTHERN POWER GRID CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511102929.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-07
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

Existing technologies in power system data management suffer from poor scalability, information loss, inefficient retrieval, and ambiguous answers. In particular, the computational cost is high when constructing and retrieving entity relationships, making it difficult to meet the needs of real-time applications.

Method used

A knowledge hypergraph-based approach is adopted, which automatically generates a knowledge graph, uses hyperedges to model multivariate relationships, combines bipartite graphs to optimize storage, and retrieves entity nodes and semantically related hyperedge nodes that match the query command in the bipartite graph of the power system. The context subgraph is then bidirectionally expanded to generate query feedback results.

Benefits of technology

It significantly improves the scalability and construction efficiency of power system data, fully preserves multi-dimensional related information, reduces storage and retrieval costs, and improves query accuracy and reasoning ability for complex problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120975238A_ABST
    Figure CN120975238A_ABST
Patent Text Reader

Abstract

The invention discloses a knowledge hypergraph-based power system query method and related equipment, and the method comprises the steps: obtaining a description document and a data file of a power system, and generating a power system knowledge graph; analyzing each independent data card in the data file, converting each independent data card into a corresponding hyperedge, connecting the hyperedge with all entity nodes related to the corresponding card to form a power system multivariate relation knowledge hypergraph, and converting the hypergraph into a power system bipartite graph for storage; when a query instruction is received, entity nodes matched with key entities in the query instruction and hyperedge nodes related to semantics are retrieved in the bipartite graph of the power system, and after a context subgraph is constructed through bidirectional expansion, a language model is input to generate a query feedback result. The problems that a traditional mode is poor in expansibility, information is lost, retrieval is low in efficiency and answers are fuzzy are solved, and construction efficiency, association integrity, retrieval performance and query accuracy are greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of power system automation technology, and more specifically, to a power system query method and related equipment based on a knowledge hypergraph. Background Technology

[0002] With the rapid development of new power systems, power grid structures are becoming increasingly complex, and operational data exhibits significant characteristics of massive volume, heterogeneity, and multi-dimensional correlation. Digital twin technology, as a core means to achieve efficient power grid monitoring, accurate simulation, and intelligent decision-making, heavily relies on the effective organization and utilization of power system data. Card-style data files generated by power system analysis software such as PSD-BPA and DSP serve as the foundational data for constructing digital twin models of the power grid, containing key information such as generators, transformers, and fault events, and are crucial for power grid operation analysis. However, how to efficiently manage this massive amount of heterogeneous data and uncover its inherent correlations has become a key bottleneck restricting the implementation of digital twin technology. Against this backdrop, knowledge graph technology has been introduced into the field of power system data management.

[0003] There are three main existing solutions, but all have significant drawbacks. Solution 1 involves manually defining patterns for knowledge graph construction. This relies on power industry experts pre-designing fixed patterns such as entity types and relationship types, then extracting information from the data to populate the graph. This solution is not only time-consuming and labor-intensive, but also requires redesigning the patterns when the power grid structure or data format is updated, resulting in extremely poor system adaptability and scalability. Solution 2 is a question-answering system based on traditional retrieval enhancement. It segments documents into text fragments, and when a user asks a question, it retrieves relevant fragments to assist in generating an answer. However, it completely ignores the physical relationships between entities, leading to factual errors or ambiguous answers when reasoning about complex problems. Solution 3 is graph retrieval enhancement based on ordinary graphs. Although it constructs a knowledge graph, the relationships in the graph are limited to binary relationships, meaning an edge connects only two entities. Power systems contain numerous multi-faceted relationships. For complex events involving multiple devices, parameters, and conditions, forcibly splitting them into binary relationships results in information fragmentation and context loss. Furthermore, existing technologies typically incur extremely high computational costs and time consumption when constructing and retrieving entity relationships from massive amounts of data, making it difficult to meet the needs of real-time applications.

[0004] These shortcomings severely restrict the efficient use of power system data, and there is an urgent need for better technical solutions to avoid these problems. Summary of the Invention

[0005] This application provides a power system query method and related equipment based on a knowledge hypergraph. By automatically generating a knowledge graph, modeling multi-dimensional relationships with hyperedges, optimizing storage with bipartite graphs, and combining subgraph construction with language model reasoning, it solves the problems of poor scalability, information loss, inefficient retrieval, and ambiguous answers in traditional methods, and significantly improves construction efficiency, association completeness, retrieval performance, and query accuracy.

[0006] A power system query method based on a knowledge hypergraph includes:

[0007] Obtain the power system's documentation and data files, and generate a power system knowledge graph based on the entity categories and attributes corresponding to the data card types identified from the documentation, and the entity relationships derived from analyzing the card co-occurrence patterns and field reference relationships in the data files.

[0008] Each independent data card in the data file is parsed, and each independent data card is converted into a corresponding hyperedge in combination with the power system knowledge graph. The hyperedge is then connected to all entity nodes involved in the corresponding card to form a power system multi-relationship knowledge hypergraph.

[0009] The power system multivariate relationship knowledge hypergraph is converted into a power system bipartite graph and stored.

[0010] When a query command is received, entity nodes that match the key entities in the query command and semantically related hyperedge nodes are retrieved in the bipartite graph of the power system. After bidirectional expansion to construct a context subgraph, the graph is input into the language model to generate query feedback results.

[0011] Optionally, the data card types include AC line cards, bus cards, fault cards, generator bus cards, and switch operation cards;

[0012] Each independent data card in the data file is parsed, and each independent data card is converted into a corresponding hyperedge using the power system knowledge graph. The hyperedge is then connected to all entity nodes involved in the corresponding card, including:

[0013] For the data card of the AC line card, the first bus physical node, the last bus physical node and the line parameter attribute node are connected by a hyperedge;

[0014] For the data card of the bus card, the bus physical node and the voltage level attribute node are connected by a hyperedge;

[0015] For the data card that is the fault card, the fault bus entity node, the fault type attribute node and the associated switch operation entity node are connected by a hyperedge;

[0016] For a data card that is a generator bus card, the generator bus physical node, the power generation attribute node, and the terminal voltage attribute node are connected by a hyperedge;

[0017] For data cards that are switch operation cards, the switch entity node, operation type attribute node, and operation time attribute node are connected by a hyperedge.

[0018] Optionally, the power system multivariate relational knowledge hypergraph is converted into a power system bipartite graph, including:

[0019] The entity nodes of the power system multi-relationship knowledge hypergraph are used as the first type of nodes in the power system bipartite graph.

[0020] Each of the superedges in the power system multivariate relation knowledge hypergraph is used as a second type of node in the power system bipartite graph;

[0021] For each entity node involved in the formation of the hyperedge, a connection edge is established with the corresponding hyperedge node in the power system bipartite diagram.

[0022] Optionally, the process of constructing the context subgraph through bidirectional expansion includes:

[0023] Starting from the matched entity node, find all directly connected candidate hyperedge nodes;

[0024] Starting from the semantically related hyperedge node, find all directly connected associated entity nodes;

[0025] The candidate superedge nodes, associated entity nodes, and their interconnections are merged into a context subgraph.

[0026] Optional, also includes:

[0027] By analyzing the co-occurrence patterns of different types of data cards in the data file, the event types are summarized.

[0028] The attribute dimensions of the hyperedge and the range rules of the associated entities are defined according to the event type. The attribute dimensions include the event triggering conditions and the event duration, and the range rules of the associated entities include the device type and parameter type involved in the event.

[0029] Optionally, retrieving entity nodes and semantically related hyperedge nodes that match the key entities in the query instruction from the bipartite power system graph includes:

[0030] Parse and extract the key entities from the query command;

[0031] In the first type of nodes of the power system binary diagram, entity nodes corresponding to the key entities are retrieved based on entity identifier matching;

[0032] The query command is converted into a vector form, and the semantic similarity with each hyperedge node in the power system bipartite diagram is calculated. Hyperedge nodes with semantic similarity greater than a preset threshold are identified as semantically related hyperedge nodes.

[0033] A power system query device based on a knowledge hypergraph includes:

[0034] The knowledge graph generation module is used to obtain the power system's explanatory documents and data files, and generate a power system knowledge graph based on the entity categories and attributes corresponding to the data card types identified from the explanatory documents, and the entity associations summarized by analyzing the card co-occurrence patterns and field reference relationships in the data files.

[0035] The knowledge hypergraph construction module is used to parse each independent data card in the data file, combine it with the power system knowledge graph to convert each independent data card into a corresponding hyperedge, and connect the hyperedge to all entity nodes involved in the corresponding card to form a power system multi-relationship knowledge hypergraph.

[0036] The bipartite graph conversion module is used to convert the power system multi-dimensional relational knowledge hypergraph into a power system bipartite graph for storage;

[0037] The system query feedback module is used to retrieve entity nodes and semantically related hyperedge nodes that match the key entities in the query command when a query command is received in the power system bipartite graph. After bidirectional expansion to construct a context subgraph, the module inputs the subgraph into a language model to generate query feedback results.

[0038] A power system query device based on a knowledge hypergraph, comprising a memory and a processor;

[0039] The memory is used to store programs;

[0040] The processor is configured to execute the program to implement the steps of the power system query method based on knowledge hypergraph as described in any of the preceding claims.

[0041] A readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the knowledge hypergraph-based power system query method as described in any of the preceding claims.

[0042] A computer program product includes a computer program that, when executed by a processor, performs the steps of the knowledge hypergraph-based power system query method as described in any of the preceding claims.

[0043] As can be seen from the above technical solutions, the power system query method and related equipment based on knowledge hypergraph provided in this application mainly include four steps: First, obtain power system specification documents and data files, and generate a knowledge graph based on the entity categories and attributes identified in the documents and the entity relationships analyzed and summarized in the data files; Second, parse each independent data card, combine it with the knowledge graph to convert it into hyperedges, and connect the corresponding entity nodes to form a multi-relationship knowledge hypergraph; Third, convert the multi-relationship knowledge hypergraph into a bipartite graph for storage; Fourth, when a query instruction is received, retrieve matching entities and semantically related hyperedges in the bipartite graph, bidirectionally expand and construct a context subgraph, and then input it into a language model to generate feedback results.

[0044] This solution addresses the shortcomings of existing technologies and achieves several beneficial effects. First, by automatically generating knowledge graph patterns, it overcomes the limitations of manually defining patterns. The solution automatically identifies entity categories and attributes from documentation and summarizes relationships from data files, eliminating the need for manual pattern pre-setting. It can adaptively adjust when the power grid data format is updated, significantly improving the system's scalability and construction efficiency. Second, it uses hyperedges to model multi-dimensional relationships, compensating for the expressive limitations of ordinary graphs. Each data card is converted into a hyperedge connecting multiple entities, fully preserving the multi-dimensional relationship information involved in complex events such as fault cards, and avoiding information loss and context breakage caused by splitting binary relationships. Third, it optimizes retrieval efficiency through bipartite graph storage. Compared to the ordinary graph structure used in traditional GraphRAG, bipartite graphs can more efficiently organize entity and hyperedge data, reducing storage and retrieval costs for massive amounts of data and meeting the needs of near real-time applications. Fourth, the combination of bidirectional extended subgraph and language model improves query accuracy. During retrieval, not only are key entities matched, but a complete context is also constructed through semantically related hyperedges, providing structured association information for the language model. This effectively solves the problem of ambiguous or incorrect answers caused by ignoring associations in traditional retrieval, and significantly enhances the reasoning ability for complex problems. Attached Figure Description

[0045] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0046] Figure 1 This is a flowchart of a power system query method based on a knowledge hypergraph disclosed in an embodiment of this application;

[0047] Figure 2 This is a schematic diagram of a power system query device based on a knowledge hypergraph disclosed in an embodiment of this application;

[0048] Figure 3 This is a hardware structure block diagram of a power system query device based on a knowledge hypergraph disclosed in an embodiment of this application. Detailed Implementation

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

[0050] This application can be used in a wide variety of general-purpose or special-purpose computing device environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor devices, distributed computing environments including any of the above devices, etc.

[0051] The following section introduces the solution proposed in this application. The technical solution is as follows, and details are provided below.

[0052] Figure 1 This is a flowchart of a power system query method based on a knowledge hypergraph disclosed in an embodiment of this application.

[0053] like Figure 1 As shown, the method may include:

[0054] Step S1: Obtain the power system's documentation and data files. Based on the entity categories and attributes corresponding to the data card types identified from the documentation, and the entity relationships derived from analyzing the card co-occurrence patterns and field reference relationships in the data files, generate a power system knowledge graph.

[0055] Specifically, the process begins by collecting documentation (including but not limited to user manuals, data card format specifications, parameter definition documents, etc.) and data files generated during actual operation from power system analysis software (such as PSD-BPA, DSP) via a pre-defined interface. Natural language processing (NLP) is then used to perform structured parsing of the documentation. A named entity recognition model is used to identify the data card types defined in the documentation (such as generator cards, transformer cards, fault cards, line cards, etc.). An attribute extraction algorithm is then used to extract the entity category (such as generator, bus, fault event, line, etc.) and its inherent attributes (such as generator rated capacity, voltage level, reactance value, etc.). Simultaneously, deep analysis of the data files is performed. Statistical learning methods are used to uncover card co-occurrence patterns (such as the co-occurrence patterns of specific types of fault cards with line cards and bus cards). Based on the reference relationships between fields (such as the correspondence between bus connection identifiers in cards and bus numbers in other cards), association rules between entities are summarized (such as fault events associated with lines, lines connected to buses, transformers associated with windings, etc.). Finally, by integrating the above entity categories, attributes, and relationships, a power system knowledge graph containing entity nodes, attribute information, and binary relationships is automatically constructed without the need for manual pre-definition of the graph pattern.

[0056] Step S2: Parse each independent data card in the data file, and combine it with the power system knowledge graph to convert each independent data card into a corresponding hyperedge. Connect the hyperedge to all entity nodes involved in the corresponding card to form a power system multi-relationship knowledge hypergraph.

[0057] Specifically, a structured parsing tool is used to parse each independent data card in the data file, extracting entity identifiers (such as unique equipment IDs, event numbers, etc.), parameter values ​​(such as fault occurrence time, short-circuit impedance, power flow values, etc.), and association clues (such as references to other entities mentioned in the card). Based on the power system knowledge graph generated in step S1, entity identifiers in the cards are mapped to corresponding entity nodes in the graph using entity linking technology (e.g., mapping line L101 in the card to entity nodes under the line category). The entire data card is converted into a hyperedge, which contains the card's type information (e.g., three-phase short-circuit fault card), parameter attributes (e.g., fault time, duration, fault location, etc.), and is associated with all entity nodes involved in the card through an edge connection mechanism (e.g., line nodes, bus nodes, protection device nodes, etc. associated with a fault card). Through the above process, the hyperedges corresponding to all independent data cards are integrated with the entity nodes in the knowledge graph to form a power system multi-relationship knowledge hypergraph that can fully express multi-relationships (e.g., a fault event involves lines, buses, protection devices, and multiple operating parameters simultaneously).

[0058] Step S3: Convert the power system multivariate relationship knowledge hypergraph into a power system bipartite graph and store it.

[0059] Specifically, to optimize the storage efficiency and retrieval performance of the knowledge hypergraph, a graph structure transformation algorithm is used to convert the multi-relationship knowledge hypergraph into a bipartite graph structure. This bipartite graph contains two independent sets of nodes: one is the entity node set, which retains all entity nodes (such as device nodes, event nodes, etc.) and their attribute information from the original knowledge hypergraph; the other is the hyperedge node set, where each hyperedge (corresponding to a data card) in the original knowledge hypergraph is treated as an independent node, storing the hyperedge type, parameters, and card metadata (such as generation time, data source, etc.). Connections between the entity node set and the hyperedge node set are established by constructing association edges, with the weight of the association edges dynamically allocated based on the importance of the entity in the corresponding hyperedge (such as core equipment, key parameter carriers, etc.). A high-performance graph database (such as a graph database system supporting distributed storage) is used to store the bipartite graph. Indexes (such as entity ID index, hyperedge type index, attribute value index, etc.) are created for both entity nodes and hyperedge nodes, and the storage structure of the relationships between nodes is optimized to support efficient adjacency queries, association traversals, and complex subgraph extraction operations, meeting the rapid access requirements of massive data in the power system.

[0060] Step S4: When a query instruction is received, retrieve entity nodes and semantically related hyperedge nodes that match the key entities in the query instruction in the power system bipartite graph, expand the context subgraph bidirectionally, and then input the subgraph into the language model to generate query feedback results.

[0061] Specifically, when a user inputs a natural language query command (e.g., querying all faults and associated protection device action information that occurred on 220kV line L101 in 2023), the query command is first processed using a semantic parsing model to extract key entities (e.g., 220kV line L101, faults, protection devices) and query intent (e.g., time range, association type). Based on a bipartite graph indexing mechanism, entity nodes that precisely match the key entities (e.g., entity nodes corresponding to line L101) are retrieved from the entity node set. Simultaneously, semantic similarity calculation (e.g., vector matching based on a pre-trained language model in the power field) is used to retrieve hyperedge nodes that are semantically related to the query intent (e.g., hyperedge nodes containing fault types and meeting the time criteria) from the hyperedge node set. A bidirectional expansion mechanism is then initiated: starting from the matched entity node, all its associated hyperedge nodes are traversed; starting from the retrieved hyperedge node, other associated entity nodes (e.g., protection device nodes, fault location nodes, etc.) are traversed. The entity nodes, hyperedge nodes, and associations involved in the expansion process are integrated to construct a subgraph that fully reflects the query context. The context subgraph is converted into a structured text description (including entity attributes, hyperedge parameters, and relationships), input into a language model fine-tuned with power sector data, and an accurate and structured natural language query response is generated that matches the query intent.

[0062] The process of constructing the context subgraph through bidirectional expansion includes:

[0063] ① Starting from the matched entity node, find all directly connected candidate hyperedge nodes.

[0064] Specifically, in a bipartite power system graph, entity nodes and hyperedge nodes are connected through associated edges, with each entity node corresponding to several directly associated hyperedge nodes. Based on the index structure of the bipartite graph, starting from the retrieved matching entity node (such as the entity node of line L101), all hyperedge nodes with direct connections to the entity node are obtained by traversing its adjacency list. These hyperedge nodes are candidate hyperedge nodes, and their corresponding data cards directly involve the entity node, such as the hyperedge nodes corresponding to fault cards, parameter configuration cards, and power flow record cards related to line L101. During the search process, the weights and association types (such as fault association, parameter configuration association, etc.) of the associated edges between candidate hyperedge nodes and matching entity nodes are recorded simultaneously, providing a basis for subsequent subgraph integration.

[0065] ② Starting from the semantically related hyperedge node, find all directly connected associated entity nodes.

[0066] Specifically, for semantically relevant hyperedge nodes retrieved in the bipartite graph (such as hyperedge nodes containing fault types and meeting time criteria), the connection list of each semantically relevant hyperedge node is traversed based on the bipartite graph's index and adjacency relationships. All entity nodes directly connected to this hyperedge node are extracted; these entity nodes are the associated entity nodes. Associated entity nodes encompass all entities involved in the corresponding data card, such as the line entity, bus entity, protection device entity, and fault location entity connected to a fault card's hyperedge node. During this process, the association edge weights and association types (such as core equipment association, parameter carrier association, etc.) between associated entity nodes and semantically relevant hyperedge nodes are also recorded to ensure the complete preservation of association information between entities and hyperedges.

[0067] ③ Merge the candidate superedge nodes, associated entity nodes, and their interconnections into a context subgraph.

[0068] Specifically, the process begins by deduplicating the candidate hyperedge nodes and associated entity nodes, removing duplicate nodes to avoid subgraph redundancy. Then, it integrates the connections between candidate hyperedge nodes and matching entity nodes, the connections between semantically relevant hyperedge nodes and associated entity nodes, and any indirect connections between candidate hyperedge nodes and associated entity nodes (e.g., connections formed between a candidate hyperedge node and an associated entity node through other hyperedges or entities). These nodes and connections are then organized into a bipartite graph structure, forming a local subgraph—the context subgraph—containing matching entity nodes, candidate hyperedge nodes, semantically relevant hyperedge nodes, associated entity nodes, and various associations. This subgraph fully presents the entities, data cards, and their diverse associations related to the query command, providing structured contextual information for the language model to generate accurate feedback results.

[0069] As can be seen from the above technical solutions, the power system query method and related equipment based on knowledge hypergraph provided in this application mainly include four steps: First, obtain power system specification documents and data files, and generate a knowledge graph based on the entity categories and attributes identified in the documents and the entity relationships analyzed and summarized in the data files; Second, parse each independent data card, combine it with the knowledge graph to convert it into hyperedges, and connect the corresponding entity nodes to form a multi-relationship knowledge hypergraph; Third, convert the multi-relationship knowledge hypergraph into a bipartite graph for storage; Fourth, when a query instruction is received, retrieve matching entities and semantically related hyperedges in the bipartite graph, bidirectionally expand and construct a context subgraph, and then input it into a language model to generate feedback results.

[0070] This solution addresses the shortcomings of existing technologies and achieves several beneficial effects. First, by automatically generating knowledge graph patterns, it overcomes the limitations of manually defining patterns. The solution automatically identifies entity categories and attributes from documentation and summarizes relationships from data files, eliminating the need for manual pattern pre-setting. It can adaptively adjust when the power grid data format is updated, significantly improving the system's scalability and construction efficiency. Second, it uses hyperedges to model multi-dimensional relationships, compensating for the expressive limitations of ordinary graphs. Each data card is converted into a hyperedge connecting multiple entities, fully preserving the multi-dimensional relationship information involved in complex events such as fault cards, and avoiding information loss and context breakage caused by splitting binary relationships. Third, it optimizes retrieval efficiency through bipartite graph storage. Compared to the ordinary graph structure used in traditional GraphRAG, bipartite graphs can more efficiently organize entity and hyperedge data, reducing storage and retrieval costs for massive amounts of data and meeting the needs of near real-time applications. Fourth, the combination of bidirectional extended subgraph and language model improves query accuracy. During retrieval, not only are key entities matched, but a complete context is also constructed through semantically related hyperedges, providing structured association information for the language model. This effectively solves the problem of ambiguous or incorrect answers caused by ignoring associations in traditional retrieval, and significantly enhances the reasoning ability for complex problems.

[0071] In addition, this application also includes:

[0072] ① By analyzing the co-occurrence patterns of different types of data cards in the data file, the event types are summarized;

[0073] ② Define the attribute dimensions of the hyperedge and the range rules of the associated entities according to the event type. The attribute dimensions include the event triggering conditions and the event duration. The range rules of the associated entities include the device type and parameter type involved in the event.

[0074] Specifically, in power system data files, various data cards do not exist in isolation; different types of cards exhibit regular co-occurrence characteristics under specific scenarios. Statistical analysis and pattern recognition algorithms are used for in-depth data mining of the data files. First, data cards are classified and labeled according to type (e.g., fault cards, protection action cards, power flow data cards, equipment parameter cards, etc.). Then, through sliding window statistics or association rule mining, the co-occurrence frequency and combination patterns of different types of cards in the time or scenario dimensions are identified. For example, in short-circuit fault scenarios, fault cards often appear together with protection action cards, line parameter cards, and bus data cards; in load adjustment scenarios, load change cards often co-occur with generator output cards and transformer tap changer cards. Based on these co-occurrence patterns and combined with the power system operation logic, typical event types are summarized, such as short-circuit fault events, load adjustment events, equipment maintenance events, and power flow exceeding limits events. Each event type corresponds to a set of characteristic card type combinations.

[0075] For each event type identified, corresponding hyperedge attribute dimensions and associated entity scope rules are defined based on knowledge of the power system domain. Regarding attribute dimensions, in addition to basic event type identifiers, the focus is on defining event triggering conditions (e.g., for short-circuit fault events, triggering conditions include fault type (three-phase short circuit / single-phase grounding), fault location, initial current value, etc.) and event duration (e.g., the time from fault occurrence to clearing, the execution period of load adjustment, etc.). This can be extended to auxiliary attribute dimensions such as event impact and processing status, ensuring that the hyperedge can fully characterize the key features of the event. Regarding associated entity scope rules, the core equipment types that must be associated with each event type are clearly defined (e.g., short-circuit fault events require association with lines, busbars, protection devices, etc.) and optional associated equipment types (e.g., adjacent transformers, monitoring terminals, etc.). The types of parameters that must be included are also specified (e.g., equipment rated parameters, real-time operating parameters, event processing parameters, etc.). By pre-setting these rules, when converting data cards into hyperedges in step S2, the attribute dimensions and associated entity ranges can be automatically matched according to the event type to which the card belongs. This ensures that the expression of multi-dimensional relationships by the hyperedges not only conforms to the logic of the power system but also has consistency and standardization, laying the foundation for the subsequent construction and query reasoning of the knowledge hypergraph.

[0076] In some embodiments of this application, the data card types include AC line cards, bus cards, fault cards, generator bus cards, and switch operation cards.

[0077] Based on this, the process of parsing each independent data card in the data file, converting each independent data card into a corresponding hyperedge using the power system knowledge graph, and connecting the hyperedge to all entity nodes involved in the corresponding card can specifically include:

[0078] Step S21: For the data card of the AC line card, connect the first-end bus physical node, the last-end bus physical node and the line parameter attribute node through a hyperedge.

[0079] Specifically, for data cards identified as AC line cards in the data file, the core information of the card is first extracted using a structured parsing tool, including the first-end bus identifier, the last-end bus identifier, and line parameter data (such as resistance value, reactance value, rated current, line length, etc.). Based on the power system knowledge graph generated in step S1, the first-end bus identifier is mapped to the corresponding bus-type entity node in the graph (i.e., the first-end bus entity node) using entity linking technology. Similarly, the last-end bus identifier is mapped to the last-end bus entity node. At the same time, the line parameter data is encapsulated into line parameter attribute nodes, which contain specific parameter values ​​and units such as resistance and reactance. A hyperedge corresponding to the AC line card is constructed. The attribute information of this hyperedge includes metadata such as the line's unique number, line type, and commissioning date. The hyperedge is linked to the first-end bus entity node, the last-end bus entity node, and the line parameter attribute node through connection relationships, fully expressing the multi-dimensional relationship of the AC line connecting the two busbars and possessing specific electrical parameters.

[0080] Step S22: For the data card of the bus card, connect the bus physical node and the voltage level attribute node through a hyperedge.

[0081] Specifically, for data cards identified as busbar cards, the busbar identifier and voltage level information are parsed and extracted. The corresponding busbar entity node (i.e., the busbar entity node) is located in the power system knowledge graph, and the voltage level information is constructed as a voltage level attribute node, which includes the voltage value and level classification. A hyperedge is generated for the corresponding busbar card, with attributes covering information such as busbar number, substation name, and operating status. The hyperedge directly connects the busbar entity node and the voltage level attribute node, accurately expressing the association relationship of the busbar possessing a specific voltage level attribute, providing structured knowledge support for subsequent power grid topology analysis and voltage stability assessment.

[0082] Step S23: For the data card that is the fault card, connect the fault bus entity node, the fault type attribute node, and the associated switch operation entity node through a hyperedge.

[0083] Specifically, for data cards identified as fault cards, the bus identifiers involved in the fault, fault type descriptions, and associated switch operation records are parsed and extracted. Fault bus entity nodes (corresponding to the buses involved in the fault) are mapped into the knowledge graph; the fault type description is converted into a fault type attribute node, containing characteristic parameters such as fault category and short-circuit impedance; and the corresponding switch operation entity node (i.e., associated switch operation entity node) is located through the switch operation records. A hyperedge is constructed for the corresponding fault card, with attributes including key information such as the fault occurrence time, fault duration, and fault handling status. The hyperedge simultaneously connects the fault bus entity node, the fault type attribute node, and the associated switch operation entity node, fully preserving the multi-dimensional association information that the fault event involves a specific bus, belongs to a specific type, and is associated with a corresponding switch operation, avoiding the loss of fault context caused by traditional binary relation decomposition.

[0084] Step S24: For the data card of the generator bus card, connect the generator bus entity node, power generation attribute node and terminal voltage attribute node through a hyperedge.

[0085] Specifically, for data cards identified as generator bus cards, the generator bus identifier, real-time power generation data, and terminal voltage monitoring values ​​are parsed and extracted. These are then mapped into a generator bus entity node in the knowledge graph. Power generation data is encapsulated into power generation attribute nodes, and terminal voltage values ​​are encapsulated into terminal voltage attribute nodes. A hyperedge is generated for the corresponding generator bus card. Hyperedge attributes include metadata such as generator number, power plant name, and operating mode. The hyperedge connects the generator bus entity node, power generation attribute node, and terminal voltage attribute node through connection relationships, clearly expressing the multi-dimensional operating status relationship of the generator bus outputting a specific power generation in real time and possessing a corresponding terminal voltage.

[0086] Step S25: For a data card that is a switch operation card, connect the switch entity node, operation type attribute node, and operation time attribute node with a hyperedge.

[0087] Specifically, for data cards identified as switch operation cards, the switch identifier, operation type description, and operation execution time are extracted through parsing. The corresponding switch-type entity node is located in the knowledge graph; the operation type description is converted into an operation type attribute node, and the operation time is converted into an operation time attribute node. A hyperedge is constructed for the corresponding switch operation card. Hyperedge attributes include information such as the switch's line number and the operation execution result. The hyperedge connects the switch entity node, the operation type attribute node, and the operation time attribute node, comprehensively recording the multi-faceted event relationships of switch operations being performed by a specific switch, belonging to a specific type, and occurring at a specific time. This provides a complete knowledge chain for power grid operation tracing and fault analysis.

[0088] In some embodiments of this application, the process of converting the power system multivariate relational knowledge hypergraph into a power system bipartite graph in step S3 is described, which may specifically include:

[0089] Step S31: Take the entity nodes of the power system multi-relationship knowledge hypergraph as the first type of nodes of the power system bipartite graph;

[0090] Step S32: Treat each hyperedge of the power system multivariate relation knowledge hypergraph as a second type of node in the power system bipartite graph;

[0091] Step S33: For each entity node participating in the formation of the superedge, establish a connection edge with the corresponding superedge node in the power system bipartite diagram.

[0092] Specifically, the entity nodes in the power system multi-relationship knowledge hypergraph cover various core elements of the power system, including equipment entities (such as AC lines, buses, generators, switches, etc.), attribute entities (such as line parameters, voltage levels, fault types, etc.), and event entities (such as fault events, switch operation events, etc.). During the conversion process, the inherent attribute information of these entity nodes is fully preserved, such as unique entity identifiers, type labels (lines, buses, parameters, etc.), and physical parameter values ​​(such as line resistance, bus rated voltage, etc.), and these are directly mapped to the first type of nodes in the bipartite graph, serving as the basic units carrying entity information in the bipartite graph structure.

[0093] In the multi-relationship knowledge hypergraph, each hyperedge corresponds to an independent data card representing a multi-relationship relationship after transformation. This relationship includes card type (e.g., AC line card, fault card), association rules (e.g., AC line connection between start and end buses, fault association between bus and switch), and key parameters (e.g., line length, fault occurrence time). During transformation, each hyperedge is independently encapsulated as a second-type node in a bipartite graph, retaining the hyperedge's type identifier, parameter attributes, and metadata (e.g., source file and generation time of the corresponding data card). This allows the second-type node to fully represent the multi-relationship logic and data characteristics carried by the original hyperedge, becoming a bridge unit connecting entity nodes.

[0094] For all entity nodes connected by each hyperedge in the multi-relationship knowledge hypergraph, the association relationships between the first type of nodes (entity nodes) and the second type of nodes (hyperedge nodes) are constructed in the bipartite graph. Specifically, if a hyperedge connects entity node A, entity node B, and entity node C in the knowledge hypergraph, then connection edges are established in the bipartite graph for entity node A and the hyperedge node, entity node B and the hyperedge node, and entity node C and the hyperedge node, respectively. The attributes of the connection edges record the role information of the entities in the original hyperedge (such as the head bus, the tail bus, fault-related equipment, etc.) and the association weight (assigned according to the importance of the entity in the hyperedge), ensuring that the semantic association between entities and hyperedges is fully preserved in the bipartite graph. Through the above connection operations, a power system bipartite graph is finally formed, consisting of the entity node set, the hyperedge node set, and the association edges between them, realizing the efficient organization and storage of multi-relationship knowledge.

[0095] Based on the above, the process of retrieving entity nodes and semantically related hyperedge nodes that match the key entities in the query instruction in the power system bipartite graph in step S5 specifically includes:

[0096] Step S51: Parse and extract the key entities from the query command;

[0097] Step S52: In the first type of nodes of the power system binary diagram, retrieve the entity node corresponding to the key entity based on entity identifier matching;

[0098] Step S53: Convert the query instruction into vector form, calculate the semantic similarity with each hyperedge node in the power system bipartite diagram, and take the hyperedge nodes with semantic similarity greater than a preset threshold as semantically related hyperedge nodes.

[0099] Specifically, natural language processing (NLP) techniques are used to semantically parse user-input queries. First, redundant modifiers are removed from the commands through word segmentation and part-of-speech tagging, retaining the core semantic units. Then, a pre-trained named entity recognition model in the power sector is used to identify and extract key entities from the commands. These entities typically include power equipment entities, event entities, and parameter entities. Simultaneously, the extracted key entities are standardized, unifying their names to ensure consistency with the identification rules of entity nodes in the bipartite graph.

[0100] Each of the first-class nodes (entity nodes) in the power system bipartite diagram contains a unique entity identifier, which is consistent with the entity codes in the data file and the definitions in the documentation. Using the normalized key entities extracted in step S51, an exact match retrieval is performed on the first-class node set using the graph database's index query function: the name or ID of the key entity is compared with the identifier field of the entity node, filtering out entity nodes that are completely or highly matched. For example, if the key entity is line L102, then entity nodes identified as line L102 are retrieved; if the key entity is generator G5, then generator entity nodes with the corresponding ID are matched. The retrieval results may be a single node or multiple related nodes (e.g., when entities with the same name but different voltage levels exist).

[0101] First, the query command is converted into a fixed-dimensional semantic vector, which contains the core intent of the command (such as querying fault-related devices or obtaining line parameters). Simultaneously, the textual description information of the second type of nodes (hyperedge nodes) in the bipartite graph (such as hyperedge type, associated entity summary, parameter attributes, etc.) is similarly vectorized to generate hyperedge node semantic vectors. Using cosine similarity or Euclidean distance algorithms, the semantic similarity between the query command vector and each hyperedge node vector is calculated, quantifying the degree of matching between the two in the semantic space. A preset similarity threshold is used to filter hyperedge nodes with similarity higher than this threshold as semantically relevant hyperedge nodes. For example, if the query command is to find short-circuit fault records for line L102, then semantically relevant hyperedge nodes include nodes associated with line L102 in all fault card type hyperedges, as well as hyperedge nodes whose semantic descriptions contain short-circuit faults or line fault records.

[0102] The following describes a power system query device based on a knowledge supergraph provided in an embodiment of this application. The power system query device based on a knowledge supergraph described below and the power system query method based on a knowledge supergraph described above can be referred to in correspondence.

[0103] See Figure 2 , Figure 2 This is a schematic diagram of a power system query device based on a knowledge hypergraph disclosed in an embodiment of this application.

[0104] like Figure 2 As shown, the power system query device based on a knowledge hypergraph may include:

[0105] The knowledge graph generation module is used to obtain the power system's explanatory documents and data files, and generate a power system knowledge graph based on the entity categories and attributes corresponding to the data card types identified from the explanatory documents, and the entity associations summarized by analyzing the card co-occurrence patterns and field reference relationships in the data files.

[0106] The knowledge hypergraph construction module is used to parse each independent data card in the data file, combine it with the power system knowledge graph to convert each independent data card into a corresponding hyperedge, and connect the hyperedge to all entity nodes involved in the corresponding card to form a power system multi-relationship knowledge hypergraph.

[0107] The bipartite graph conversion module is used to convert the power system multi-dimensional relational knowledge hypergraph into a power system bipartite graph for storage;

[0108] The system query feedback module is used to retrieve entity nodes and semantically related hyperedge nodes that match the key entities in the query command when a query command is received in the power system bipartite graph. After bidirectional expansion to construct a context subgraph, the module inputs the subgraph into a language model to generate query feedback results.

[0109] As can be seen from the above technical solutions, the power system query method and related equipment based on knowledge hypergraph provided in this application mainly include four steps: First, obtain power system specification documents and data files, and generate a knowledge graph based on the entity categories and attributes identified in the documents and the entity relationships analyzed and summarized in the data files; Second, parse each independent data card, combine it with the knowledge graph to convert it into hyperedges, and connect the corresponding entity nodes to form a multi-relationship knowledge hypergraph; Third, convert the multi-relationship knowledge hypergraph into a bipartite graph for storage; Fourth, when a query instruction is received, retrieve matching entities and semantically related hyperedges in the bipartite graph, bidirectionally expand and construct a context subgraph, and then input it into a language model to generate feedback results.

[0110] This solution addresses the shortcomings of existing technologies and achieves several beneficial effects. First, by automatically generating knowledge graph patterns, it overcomes the limitations of manually defining patterns. The solution automatically identifies entity categories and attributes from documentation and summarizes relationships from data files, eliminating the need for manual pattern pre-setting. It can adaptively adjust when the power grid data format is updated, significantly improving the system's scalability and construction efficiency. Second, it uses hyperedges to model multi-dimensional relationships, compensating for the expressive limitations of ordinary graphs. Each data card is converted into a hyperedge connecting multiple entities, fully preserving the multi-dimensional relationship information involved in complex events such as fault cards, and avoiding information loss and context breakage caused by splitting binary relationships. Third, it optimizes retrieval efficiency through bipartite graph storage. Compared to the ordinary graph structure used in traditional GraphRAG, bipartite graphs can more efficiently organize entity and hyperedge data, reducing storage and retrieval costs for massive amounts of data and meeting the needs of near real-time applications. Fourth, the combination of bidirectional extended subgraph and language model improves query accuracy. During retrieval, not only are key entities matched, but a complete context is also constructed through semantically related hyperedges, providing structured association information for the language model. This effectively solves the problem of ambiguous or incorrect answers caused by ignoring associations in traditional retrieval, and significantly enhances the reasoning ability for complex problems.

[0111] A power system query method based on a knowledge hypergraph includes:

[0112] Obtain the power system's documentation and data files, and generate a power system knowledge graph based on the entity categories and attributes corresponding to the data card types identified from the documentation, and the entity relationships derived from analyzing the card co-occurrence patterns and field reference relationships in the data files.

[0113] Each independent data card in the data file is parsed, and each independent data card is converted into a corresponding hyperedge in combination with the power system knowledge graph. The hyperedge is then connected to all entity nodes involved in the corresponding card to form a power system multi-relationship knowledge hypergraph.

[0114] The power system multivariate relationship knowledge hypergraph is converted into a power system bipartite graph and stored.

[0115] When a query command is received, entity nodes that match the key entities in the query command and semantically related hyperedge nodes are retrieved in the bipartite graph of the power system. After bidirectional expansion to construct a context subgraph, the graph is input into the language model to generate query feedback results.

[0116] Optionally, the data card types include AC line cards, bus cards, fault cards, generator bus cards, and switch operation cards;

[0117] Each independent data card in the data file is parsed, and each independent data card is converted into a corresponding hyperedge using the power system knowledge graph. The hyperedge is then connected to all entity nodes involved in the corresponding card, including:

[0118] For the data card of the AC line card, the first bus physical node, the last bus physical node and the line parameter attribute node are connected by a hyperedge;

[0119] For the data card of the bus card, the bus physical node and the voltage level attribute node are connected by a hyperedge;

[0120] For the data card that is the fault card, the fault bus entity node, the fault type attribute node and the associated switch operation entity node are connected by a hyperedge;

[0121] For a data card that is a generator bus card, the generator bus physical node, the power generation attribute node, and the terminal voltage attribute node are connected by a hyperedge;

[0122] For data cards that are switch operation cards, the switch entity node, operation type attribute node, and operation time attribute node are connected by a hyperedge.

[0123] Optionally, the power system multivariate relational knowledge hypergraph is converted into a power system bipartite graph, including:

[0124] The entity nodes of the power system multi-relationship knowledge hypergraph are used as the first type of nodes in the power system bipartite graph.

[0125] Each of the superedges in the power system multivariate relation knowledge hypergraph is used as a second type of node in the power system bipartite graph;

[0126] For each entity node involved in the formation of the hyperedge, a connection edge is established with the corresponding hyperedge node in the power system bipartite diagram.

[0127] Optionally, the process of constructing the context subgraph through bidirectional expansion includes:

[0128] Starting from the matched entity node, find all directly connected candidate hyperedge nodes;

[0129] Starting from the semantically related hyperedge node, find all directly connected associated entity nodes;

[0130] The candidate superedge nodes, associated entity nodes, and their interconnections are merged into a context subgraph.

[0131] Optional, also includes:

[0132] By analyzing the co-occurrence patterns of different types of data cards in the data file, the event types are summarized.

[0133] The attribute dimensions of the hyperedge and the range rules of the associated entities are defined according to the event type. The attribute dimensions include the event triggering conditions and the event duration, and the range rules of the associated entities include the device type and parameter type involved in the event.

[0134] Optionally, retrieving entity nodes and semantically related hyperedge nodes that match the key entities in the query instruction from the bipartite power system graph includes:

[0135] Parse and extract the key entities from the query command;

[0136] In the first type of nodes of the power system binary diagram, entity nodes corresponding to the key entities are retrieved based on entity identifier matching;

[0137] The query command is converted into a vector form, and the semantic similarity with each hyperedge node in the power system bipartite diagram is calculated. Hyperedge nodes with semantic similarity greater than a preset threshold are identified as semantically related hyperedge nodes.

[0138] The knowledge hypergraph-based power system query device provided in this application embodiment can be applied to knowledge hypergraph-based power system query equipment. Figure 3 The hardware structure block diagram of the power system query device based on the knowledge hypergraph is shown. (Refer to...) Figure 3 The hardware structure of a power system query device based on a knowledge hypergraph may include: at least one processor 1, at least one communication interface 2, at least one memory 3, and at least one communication bus 4.

[0139] In this embodiment of the application, the number of processor 1, communication interface 2, memory 3, and communication bus 4 is at least one, and processor 1, communication interface 2, and memory 3 communicate with each other through communication bus 4;

[0140] Processor 1 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention.

[0141] Memory 3 may include high-speed RAM, and may also include non-volatile memory, such as at least one disk storage device;

[0142] The memory stores a program, which the processor can call. The program is used for:

[0143] Obtain the power system's documentation and data files, and generate a power system knowledge graph based on the entity categories and attributes corresponding to the data card types identified from the documentation, and the entity relationships derived from analyzing the card co-occurrence patterns and field reference relationships in the data files.

[0144] Each independent data card in the data file is parsed, and each independent data card is converted into a corresponding hyperedge in combination with the power system knowledge graph. The hyperedge is then connected to all entity nodes involved in the corresponding card to form a power system multi-relationship knowledge hypergraph.

[0145] The power system multivariate relationship knowledge hypergraph is converted into a power system bipartite graph and stored.

[0146] When a query command is received, entity nodes that match the key entities in the query command and semantically related hyperedge nodes are retrieved in the bipartite graph of the power system. After bidirectional expansion to construct a context subgraph, the graph is input into the language model to generate query feedback results.

[0147] Optionally, the refined and extended functions of the program can be referred to the above description.

[0148] This application embodiment also provides a readable storage medium that can store a program suitable for execution by a processor, the program being used for:

[0149] Obtain the power system's documentation and data files, and generate a power system knowledge graph based on the entity categories and attributes corresponding to the data card types identified from the documentation, and the entity relationships derived from analyzing the card co-occurrence patterns and field reference relationships in the data files.

[0150] Each independent data card in the data file is parsed, and each independent data card is converted into a corresponding hyperedge in combination with the power system knowledge graph. The hyperedge is then connected to all entity nodes involved in the corresponding card to form a power system multi-relationship knowledge hypergraph.

[0151] The power system multivariate relationship knowledge hypergraph is converted into a power system bipartite graph and stored.

[0152] When a query command is received, entity nodes that match the key entities in the query command and semantically related hyperedge nodes are retrieved in the bipartite graph of the power system. After bidirectional expansion to construct a context subgraph, the graph is input into the language model to generate query feedback results.

[0153] Optionally, the refined and extended functions of the program can be referred to the above description.

[0154] This application also provides a computer program product, including a computer program, wherein the computer program is executed by a processor using the following method:

[0155] Obtain the power system's documentation and data files, and generate a power system knowledge graph based on the entity categories and attributes corresponding to the data card types identified from the documentation, and the entity relationships derived from analyzing the card co-occurrence patterns and field reference relationships in the data files.

[0156] Each independent data card in the data file is parsed, and each independent data card is converted into a corresponding hyperedge in combination with the power system knowledge graph. The hyperedge is then connected to all entity nodes involved in the corresponding card to form a power system multi-relationship knowledge hypergraph.

[0157] The power system multivariate relationship knowledge hypergraph is converted into a power system bipartite graph and stored.

[0158] When a query command is received, entity nodes that match the key entities in the query command and semantically related hyperedge nodes are retrieved in the bipartite graph of the power system. After bidirectional expansion to construct a context subgraph, the graph is input into the language model to generate query feedback results.

[0159] Optionally, the refined and extended functions of the program can be referred to the above description.

[0160] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, 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 a process, method, article, or apparatus. Without further limitations, 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 said element.

[0161] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0162] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A power system query method based on a knowledge hypergraph, characterized in that, include: Obtain the power system's documentation and data files, and generate a power system knowledge graph based on the entity categories and attributes corresponding to the data card types identified from the documentation, and the entity relationships derived from analyzing the card co-occurrence patterns and field reference relationships in the data files. Each independent data card in the data file is parsed, and each independent data card is converted into a corresponding hyperedge in combination with the power system knowledge graph. The hyperedge is then connected to all entity nodes involved in the corresponding card to form a power system multi-relationship knowledge hypergraph. The power system multivariate relationship knowledge hypergraph is converted into a power system bipartite graph and stored. When a query command is received, entity nodes that match the key entities in the query command and semantically related hyperedge nodes are retrieved in the bipartite graph of the power system. After bidirectional expansion to construct a context subgraph, the graph is input into the language model to generate query feedback results.

2. The method according to claim 1, characterized in that, The data card types include AC line cards, bus cards, fault cards, generator bus cards, and switch operation cards; Each independent data card in the data file is parsed, and each independent data card is converted into a corresponding hyperedge using the power system knowledge graph. The hyperedge is then connected to all entity nodes involved in the corresponding card, including: For the data card of the AC line card, the first bus physical node, the last bus physical node and the line parameter attribute node are connected by a hyperedge; For the data card of the bus card, the bus physical node and the voltage level attribute node are connected by a hyperedge; For the data card that is the fault card, the fault bus entity node, the fault type attribute node and the associated switch operation entity node are connected by a hyperedge; For a data card that is a generator bus card, the generator bus physical node, the power generation attribute node, and the terminal voltage attribute node are connected by a hyperedge; For data cards that are switch operation cards, the switch entity node, operation type attribute node, and operation time attribute node are connected by a hyperedge.

3. The method according to claim 1, characterized in that, The power system multivariate relational knowledge hypergraph is converted into a power system bipartite graph, including: The entity nodes of the power system multi-relationship knowledge hypergraph are used as the first type of nodes in the power system bipartite graph. Each of the superedges in the power system multivariate relation knowledge hypergraph is used as a second type of node in the power system bipartite graph; For each entity node involved in the formation of the hyperedge, a connection edge is established with the corresponding hyperedge node in the power system bipartite diagram.

4. The method according to claim 1, characterized in that, The process of constructing the context subgraph through bidirectional expansion includes: Starting from the matched entity node, find all directly connected candidate hyperedge nodes; Starting from the semantically related hyperedge node, find all directly connected associated entity nodes; The candidate superedge nodes, associated entity nodes, and their interconnections are merged into a context subgraph.

5. The method according to claim 1, characterized in that, Also includes: By analyzing the co-occurrence patterns of different types of data cards in the data file, the event types are summarized. The attribute dimensions of the hyperedge and the range rules of the associated entities are defined according to the event type. The attribute dimensions include the event triggering conditions and the event duration, and the range rules of the associated entities include the device type and parameter type involved in the event.

6. The method according to claim 3, characterized in that, Retrieving entity nodes and semantically related hyperedge nodes that match the key entities in the query command from the bipartite diagram of the power system includes: Parse and extract the key entities from the query command; In the first type of nodes of the power system binary diagram, entity nodes corresponding to the key entities are retrieved based on entity identifier matching; The query command is converted into a vector form, and the semantic similarity with each hyperedge node in the power system bipartite diagram is calculated. Hyperedge nodes with semantic similarity greater than a preset threshold are identified as semantically related hyperedge nodes.

7. A power system query device based on a knowledge hypergraph, characterized in that, include: The knowledge graph generation module is used to obtain the power system's explanatory documents and data files, and generate a power system knowledge graph based on the entity categories and attributes corresponding to the data card types identified from the explanatory documents, and the entity associations summarized by analyzing the card co-occurrence patterns and field reference relationships in the data files. The knowledge hypergraph construction module is used to parse each independent data card in the data file, combine it with the power system knowledge graph to convert each independent data card into a corresponding hyperedge, and connect the hyperedge to all entity nodes involved in the corresponding card to form a power system multi-relationship knowledge hypergraph. The bipartite graph conversion module is used to convert the power system multi-relationship knowledge hypergraph into a power system bipartite graph for storage; The system query feedback module is used to retrieve entity nodes and semantically related hyperedge nodes that match the key entities in the query command when a query command is received in the power system bipartite graph. After bidirectional expansion to construct a context subgraph, the module inputs the subgraph into a language model to generate query feedback results.

8. A power system query device based on a knowledge hypergraph, characterized in that, Including memory and processor; The memory is used to store programs; The processor is configured to execute the program to implement each step of the power system query method based on a knowledge hypergraph as described in any one of claims 1-6.

9. A readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements each step of the power system query method based on a knowledge hypergraph as described in any one of claims 1-6.

10. A computer program product, comprising a computer program, characterized in that, The computer program is executed by the processor to perform the steps of the power system query method based on a knowledge hypergraph as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Power data query method and device based on knowledge graph and electronic equipment

    CN116010570A

  • Knowledge graph platform supporting data integration analysis and visualization of power system

    CN119248937A

  • Electric power semantic large model adaptive data query and dynamic response method and system

    CN119474321A