Power grid operation control method and system based on knowledge graph rule extraction
By matching real-time power grid data with fault case maps, dynamic pruning and fault probability scoring are performed to construct an executable decision tree and generate dispatch instructions. This solves the problems of delayed fault response and low computational efficiency in power grid operation and management, and realizes the real-time and intelligent improvement of power grid operation.
Patent Information
- Application Number
- CN202511687394.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-18
- Publication Date
- 2026-02-10
AI Technical Summary
Existing power grid operation and management methods are difficult to adapt to the dynamic needs of complex power grids. They suffer from delayed fault response, insufficient targeting of dispatch strategies, low efficiency of full knowledge graph computation, insufficient targeting of key entity screening, and weak system adaptive evolution capability.
By matching real-time power grid data with fault case maps, unmatched data identifiers are generated, dynamic pruning and fault probability scoring are performed, an executable decision tree is constructed, dispatch instructions are generated, and the fault case map is updated.
It has improved the real-time performance, accuracy, and adaptability of power grid operation, enhanced the ability to handle complex and new types of faults, and strengthened the level of intelligence in power grid operation and management.
Smart Images

Figure CN121504053A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of power grid dispatch and control technology, and in particular relates to a power grid operation management and control method and system based on knowledge graph rule extraction. Background Technology
[0002] With the continuous expansion of the power system and the increasing proportion of renewable energy grid connection, the power grid operation status exhibits complex characteristics of multivariability, strong coupling, and dynamics. The volume of real-time power grid operation data has surged, making the technical needs for rapid fault diagnosis, precise scheduling, and risk prediction increasingly urgent. However, existing power grid operation and management methods, such as traditional control modes based on human experience or fixed thresholds, are no longer suitable for the dynamic operation needs of complex power grids, resulting in problems such as delayed fault response and insufficient targeting of scheduling strategies. Therefore, to improve the level of intelligent control, the industry has gradually adopted a method based on historical fault case matching. This method can directly reuse successfully matched historical scheduling strategies by comparing real-time power grid data with preset fault cases. It has a certain degree of effectiveness in known fault scenarios, but when encountering new faults or complex operating conditions not included in historical cases, the matching success rate drops significantly, making it impossible to quickly generate effective control strategies, and exhibiting obvious limitations in adaptability.
[0003] In recent years, knowledge graph technology has been gradually applied to the field of power grid management due to its powerful entity relationship modeling and knowledge representation capabilities. By constructing a knowledge graph of power grid equipment entities, operating attributes, and fault relationships, it provides structured knowledge support for fault analysis. However, existing power grid management solutions based on knowledge graphs still have key technical bottlenecks: First, the full power grid knowledge graph contains massive entities and relationships, which leads to redundant computation when directly used for real-time data processing, resulting in low processing efficiency and difficulty in meeting the time requirements of real-time power grid management; Second, for new faults without matching historical cases, there is a lack of scientific methods to accurately screen key fault-related entities from the knowledge graph, and the subsequent extraction of association rules and construction of decision models are not targeted enough; Third, existing solutions do not form a closed-loop mechanism for fault handling and case updates, and new fault handling experience cannot be added to the case library in a timely manner, resulting in weak adaptive evolution capabilities of the system. Summary of the Invention
[0004] Therefore, it is necessary to provide a power grid operation and control method and system based on knowledge graph rule extraction to address the above-mentioned technical problems, aiming to improve the real-time performance, accuracy and adaptability of power grid operation and control, and enhance the ability to handle complex and new faults.
[0005] Firstly, this application provides a power grid operation and control method based on knowledge graph rule extraction, including:
[0006] A real-time data subgraph is constructed based on real-time power grid data. The real-time data subgraph is matched with the historical fault subgraph in the fault case map. If the matching result is successful, the historical scheduling strategy corresponding to the historical fault subgraph is output. Otherwise, an unmatched data identifier is generated.
[0007] By using unmatched data identifiers and real-time power grid data, a dynamic pruning process is performed on the preset full power grid knowledge graph to obtain a simplified graph. Each entity in the simplified graph is then scored for fault probability. Based on the scoring results, key entities are selected to obtain a set of key entities.
[0008] The association rule set is generated based on the key entity set, and the rule decision tree is constructed based on the association rule set to obtain an executable decision tree.
[0009] Fault analysis and processing are performed based on executable decision trees and real-time power grid data to generate dispatch instructions. The fault case map is then updated based on the unmatched data identifiers, dispatch instructions, and real-time power grid data to obtain the updated fault case map.
[0010] In one embodiment, a pre-defined full power grid knowledge graph is dynamically pruned using unmatched data identifiers and real-time power grid data to obtain a simplified graph, including:
[0011] Based on real-time power grid data, weight allocation processing is performed on the entity attributes in the real-time power grid data to obtain an attribute weight set.
[0012] Based on the attribute weight set, calculate the attribute difference degree between entities in real-time power grid data and entities in the full power grid knowledge graph;
[0013] Entities with attribute differences greater than a preset difference threshold are identified as differential entities, and the differential entities and their associated edges are deleted to obtain a simplified graph.
[0014] In one embodiment, each entity in the simplified atlas is subjected to a failure probability score, and key entities are selected based on the score results to obtain a key entity set, including:
[0015] Based on real-time power grid data and historical operating data of entities in the simplified map, the historical fault frequency, attribute fluctuation and number of adjacent faulty devices are calculated for each entity in the simplified map. The weighted sum of the historical fault frequency, attribute fluctuation and number of adjacent faulty devices is calculated to obtain the fault probability score of the entity.
[0016] Based on the fault probability score, the entities in the simplified atlas are sorted in descending order to obtain an ordered list of entities.
[0017] Select the first K entities from the ordered entity list to obtain the key entity set, where K is a positive integer.
[0018] In one embodiment, association rule generation is performed based on a set of key entities to obtain an association rule set, and a rule decision tree construction process is performed based on the association rule set to obtain an executable decision tree, including:
[0019] Calculate the dynamic support threshold based on the number of entities in the key entity set;
[0020] Within the scope of the key entity set, frequent itemset mining is performed on the entity combinations in the key entity set to obtain frequent itemsets that meet the dynamic support threshold.
[0021] A set of association rules is obtained by generating association rules based on frequent itemsets.
[0022] Based on the confidence and lift of each rule in the association rule set, the product of the confidence and lift is calculated for each rule in the association rule set to obtain the rule priority of the corresponding rule;
[0023] Based on rule priority, the rules in the association rule set are sorted in descending order to obtain an ordered rule list;
[0024] Based on an ordered list of rules, the antecedent attributes of the highest priority rule are used as branch nodes, and the consequent fault types of the highest priority rule are used as leaf nodes, and an executable decision tree is recursively constructed.
[0025] In one embodiment, fault analysis and processing are performed based on an executable decision tree and real-time power grid data to generate scheduling instructions, including:
[0026] Based on the entity attribute values in real-time power grid data, the branch nodes of the executable decision tree are traversed, and the entity attribute values are matched with the preset attribute conditions in the branch nodes to determine the branch path that meets the attribute conditions.
[0027] Follow the branch path to reach the leaf node and obtain the fault type corresponding to the leaf node;
[0028] Based on the fault type and the preset fault-scheduling mapping relationship, the scheduling policy corresponding to the fault type is retrieved and the scheduling instruction is generated.
[0029] In one embodiment, the fault case map is updated based on the unmatched data identifier, dispatch instructions, and real-time power grid data to obtain an updated fault case map, including:
[0030] Based on the unmatched data identifier and real-time power grid data, the abnormal attribute values in the real-time power grid data corresponding to the unmatched data identifier are extracted, and the entities corresponding to the abnormal attribute values are taken as the fault-dominant entities.
[0031] Based on the scheduling instructions and the fault-dominant entity, generate a triplet of handling actions containing the fault-dominant entity, the handling relationship, and the scheduling instructions.
[0032] Based on the abnormal attribute values and fault-dominant entities in real-time power grid data, generate a trigger condition triplet containing the fault-dominant entity, triggering relationship, and abnormal attribute values.
[0033] The fault case map is updated based on the action triplet and the trigger condition triplet to obtain the updated fault case map.
[0034] In one embodiment, the dynamic support threshold is calculated using the following formula:
[0035]
[0036] in, For dynamic support threshold, As the baseline support, The number of entities in the key entity set. As the baseline number of entities, The attenuation coefficient is... , This represents the average degree of the key entity set, which is the number of associated edges for each entity in the key entity set. The maximum entity degree of the entire power grid knowledge graph. The standard deviation of the historical failure frequency of critical entities is used to define the critical entity cluster. The standard deviation is the baseline.
[0037] Secondly, this application also provides a power grid operation and control system based on knowledge graph rule extraction, including:
[0038] The case matching and identifier generation module is used to construct a real-time data subgraph based on real-time power grid data, and to match the real-time data subgraph with the historical fault subgraph in the fault case map. If the matching result is successful, the historical scheduling strategy corresponding to the historical fault subgraph is output; otherwise, an unmatched data identifier is generated.
[0039] The graph pruning and entity filtering module is used to dynamically prune the preset full power grid knowledge graph using unmatched data identifiers and real-time power grid data to obtain a simplified graph. The module then performs fault probability scoring on each entity in the simplified graph and selects key entities based on the scoring results to obtain a key entity set.
[0040] The rule extraction and decision tree construction module is used to generate association rules based on the key entity set to obtain an association rule set, and to construct an executable decision tree based on the association rule set.
[0041] The fault prediction, scheduling, and graph update module is used to perform fault analysis and processing based on executable decision trees and real-time power grid data, generate scheduling instructions, and update the fault case graph according to the unmatched data identifiers, scheduling instructions, and real-time power grid data to obtain the updated fault case graph.
[0042] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the first aspect.
[0043] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the first aspect.
[0044] The aforementioned power grid operation and control method and system based on knowledge graph rule extraction firstly, through matching real-time power grid data with a fault case graph, quickly reuses successfully matched historical scheduling strategies. It can also generate unmatched data identifiers when matching fails, avoiding the shortcomings of traditional manual or fixed-threshold control methods, such as delayed response and low efficiency in handling known faults. Secondly, it dynamically prunes the entire power grid knowledge graph using unmatched data identifiers and real-time power grid data, obtaining a simplified graph and then selecting key entities through scoring. This effectively solves the problems of low efficiency in redundant computation of the entire graph and insufficient targeting in key entity selection. Furthermore, it extracts association rules based on the key entity set and constructs an executable decision tree, overcoming the shortcomings of traditional rule extraction (broad scope) and weak adaptability of decision models. Finally, it generates scheduling instructions based on the executable decision tree and real-time power grid data, and updates the fault case graph using unmatched data identifiers. This effectively solves the problems of lack of control strategies for new faults and lack of system self-evolution capabilities, significantly improving the real-time performance of power grid operation and control and the accuracy of fault handling. Attached Figure Description
[0045] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0046] Figure 1 A flowchart of a power grid operation and control method based on knowledge graph rule extraction, provided as an exemplary embodiment of the present invention;
[0047] Figure 2 A flowchart of a method for obtaining an updated fault case map is provided as an exemplary embodiment of the present invention;
[0048] Figure 3 This is a schematic diagram of a power grid operation and control system based on knowledge graph rule extraction, provided as an exemplary embodiment of the present invention. Detailed Implementation
[0049] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0050] In one embodiment, such as Figure 1 As shown, a power grid operation and management method based on knowledge graph rule extraction is provided. This embodiment illustrates the application of this method to a terminal. It is understood that this method can also be applied to a server, and further to a system including both a terminal and a server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0051] S101: Construct a real-time data subgraph based on real-time power grid data, and match the real-time data subgraph with the historical fault subgraph in the fault case map. If the matching result is successful, output the historical scheduling strategy corresponding to the historical fault subgraph; otherwise, generate an unmatched data identifier.
[0052] Specifically, most faults in power grid operation are repetitive, such as transformer overheating and line overload. Their corresponding historical handling strategies have been proven effective in practice, and direct matching and reuse can avoid repetitive complex calculations and meet the real-time requirements of power grid management. However, unmatched scenarios often correspond to new faults or complex operating conditions, such as cascading fluctuations caused by new energy grid integration, requiring further analysis. Therefore, unmatched data identifiers can be generated to distinguish between the two types of scenarios. Illustratively, real-time power grid data and fault case maps can be obtained first. Real-time power grid data includes the real-time operating attributes (current, voltage, temperature, vibration values, etc.) of various devices within the power grid (such as transformers, circuit breakers, and lines) and the connection relationships between devices (such as the topological connection between lines and transformers, and the association between protection devices and protected equipment). The fault case map is a pre-constructed structured knowledge set containing a triplet of equipment entity-fault relationship-handling strategy corresponding to historical fault scenarios, such as "transformer-overheating fault-load reduction scheduling". During the matching process, a real-time data subgraph can be constructed based on real-time power grid data. This subgraph retains only valid equipment entities and their relationships under the current operating state, and then calculates the matching degree between this real-time data subgraph and each historical fault subgraph in the fault case map. This matching degree calculation comprehensively considers the attribute similarity of equipment entities and the overlap of relationship paths between entities. For example, the attribute similarity of equipment entities includes the degree of deviation between the real-time transformer temperature and the transformer temperature in historical faults; the smaller the deviation, the higher the attribute similarity. The overlap of relationship paths between entities includes the degree of consistency between the topological path of "line-circuit breaker-transformer" in the real-time power grid and the topological path in historical faults. A preset matching degree threshold, such as 0.8, can then be used to determine if a match has occurred. If the matching degree is greater than or equal to this threshold, it indicates that the current fault and historical fault characteristics are highly consistent, and the scheduling strategy corresponding to the historical fault can be directly output to ensure that the fault is responded to within seconds or minutes. If the matching degree is less than this threshold, an unmatched data identifier is generated. This identifier is associated with abnormal attribute information in the current real-time power grid data, which can help narrow down the analysis scope for subsequent steps.
[0053] S102: By using unmatched data identifiers and real-time power grid data, the preset full power grid knowledge graph is dynamically pruned to obtain a simplified graph. Each entity in the simplified graph is then scored for fault probability. Based on the scoring results, key entities are selected to obtain a set of key entities.
[0054] Specifically, the full power grid knowledge graph contains all power grid equipment (including normally operating equipment and non-associated equipment) and a large number of relationships. If directly used for unmatched scenario analysis, the excessive amount of irrelevant data would lead to excessively long computation times, failing to meet the real-time management and control requirements of the power grid. However, unmatched data is identified by its association with the current abnormal attributes of the power grid. Based on this identification and real-time power grid data pruning, entities related to abnormal attributes, such as transformers and associated lines corresponding to abnormal temperatures, can be accurately preserved, significantly reducing the data size. Furthermore, entities in the simplified graph are scored for fault probability to assess their correlation with the current fault, thereby accurately locating entities with a high degree of correlation with the fault, providing core objects for subsequent association rule extraction.
[0055] S103: Generate association rules based on the key entity set to obtain an association rule set, and construct an executable decision tree based on the association rule set.
[0056] Specifically, entities in the key entity set are highly correlated with the current fault, and their attribute combinations often directly point to specific fault types. By extracting the association rules between these attribute combinations and fault types, a correspondence between attribute features and fault types can be established. Furthermore, since decision trees have the structured characteristics of "branch judgment and leaf node output results," by constructing association rules into decision trees, abstract rules can be transformed into processes that the power grid management system can directly traverse and execute, avoiding logical confusion when applying rules.
[0057] S104: Perform fault analysis and processing based on the executable decision tree and real-time power grid data, generate dispatch instructions, and update the fault case map according to the unmatched data identifier, dispatch instructions and real-time power grid data to obtain the updated fault case map.
[0058] Specifically, the executable decision tree already contains the corresponding logic of attribute conditions and fault types. By traversing the decision tree with real-time power grid data, the current fault type can be quickly located, avoiding the time-consuming problem of multi-model simultaneous calculation in traditional fault prediction. Furthermore, for new faults that do not correspond to matching scenarios, a mature fault feature-scheduling strategy correspondence has been formed after processing the generated scheduling instructions. By supplementing this to the fault case map, it can be directly matched and reused when the same fault is encountered in the future, realizing the self-evolution of the system.
[0059] The above method firstly addresses the issues of delayed fault response and insufficient targeting of dispatch strategies in traditional management and control models by matching real-time power grid data with fault case graphs. Secondly, it dynamically prunes the entire power grid knowledge graph based on unmatched data identifiers and real-time data to obtain a simplified graph and extract key entities, thus solving the problem of low processing efficiency caused by redundant calculations of the entire graph and improving the real-time performance of fault analysis. Furthermore, it extracts association rules from the key entity set and constructs a rule decision tree, solving the problems of insufficient targeting of new fault association rule extraction and decision models, and enhancing the ability to respond to new types of faults. Finally, it predicts faults and generates dispatch instructions based on executable decision trees and real-time data, while simultaneously updating the fault case graph, solving the problem of the inability to accumulate and update fault handling experience in a timely manner, and significantly enhancing the intelligence level of power grid operation and management.
[0060] In one embodiment, a simplified knowledge graph is obtained by dynamically pruning a pre-defined full power grid knowledge graph using unmatched data identifiers and real-time power grid data, including:
[0061] Based on real-time power grid data, weight allocation processing is performed on the entity attributes in the real-time power grid data to obtain an attribute weight set.
[0062] Based on the attribute weight set, calculate the attribute difference degree between entities in real-time power grid data and entities in the full power grid knowledge graph;
[0063] Entities with attribute differences greater than a preset difference threshold are identified as differential entities, and the differential entities and their associated edges are deleted to obtain a simplified graph.
[0064] Specifically, real-time power grid data contains various attributes of entities, such as current, voltage, temperature, vibration frequency, and insulation resistance. However, the degree of influence of different attributes on fault determination varies significantly. For example, for transformer entities, abnormal winding temperature and load current are often directly associated with faults (e.g., overheating may cause insulation damage), while slight fluctuations in casing humidity contribute little to fault determination. Therefore, this embodiment assigns differentiated weights to attributes to avoid the defect of misjudgment caused by interference from non-critical attributes in subsequent difference degree calculations. Illustratively, the entropy weight method can be used for weight calculation. First, the dispersion of the attribute values of each entity in the real-time power grid data is statistically analyzed. The larger the dispersion of attribute values, the stronger the ability of the attribute to distinguish fault states, the smaller the corresponding entropy value, and the larger the weight. Conversely, the smaller the dispersion of attribute values (e.g., casing humidity is basically stable under normal circumstances), the larger the entropy value, and the smaller the weight. This calculation process yields weight values for each entity attribute, such as current (0.35), temperature (0.3), vibration frequency (0.2), insulation resistance (0.1), and casing humidity (0.05), forming an attribute weight set. This weight set highlights the attributes that play a crucial role in fault diagnosis, preventing non-critical attributes from dominating subsequent difference calculations.
[0065] Specifically, in the current unmatched fault scenario, the core attribute values of entities in real-time power grid data (such as transformers exhibiting abnormalities) differ significantly from those of unrelated entities in the full graph (such as remote lines operating normally) compared to those of related entities (such as lines associated with the abnormal transformer). This difference can be quantified by calculating the attribute difference using weighted averages to distinguish entity relationships. For example, the entity pairs to be calculated can be determined first, using entities with abnormal attributes in real-time power grid data (such as transformers with overcurrent associated with unmatched data identifiers) as a benchmark. All entities in the full power grid knowledge graph are then traversed to form entity pairs of real-time abnormal entities and graph entities. For each entity pair, the difference value of its corresponding attributes can be calculated. For example, if the real-time transformer current is 1.5 times the rated value and the current of a line in the graph is 1.0 times the rated value, the difference value of the current attribute is 0.5. Multiplying this difference value by the weight of the corresponding attribute in the attribute weight set yields the weighted difference value. Finally, summing the weighted difference values of all attributes gives the comprehensive attribute difference degree of the entity pair. This calculation process avoids misjudgments caused by differences in a single attribute, ensuring the accuracy of the difference calculation.
[0066] Furthermore, irrelevant entities can be filtered out by setting a preset difference threshold. This threshold can be determined based on engineering experience and historical data from power grid operation, such as setting it to 0.3. When the comprehensive attribute difference between a certain graph entity and a real-time abnormal entity is greater than 0.3, it indicates that the core attributes of the graph entity deviate too much from the current fault characteristics, and it can be determined as a difference entity unrelated to the current unmatched fault. Subsequently, the difference entity and all its associated edges can be deleted simultaneously to ensure the topological integrity and relevance of the simplified graph. Through the above dynamic pruning process, the computation time for subsequent fault probability scoring and association rule extraction can be significantly reduced, meeting the real-time requirements of power grid management. Moreover, the entities retained in the simplified graph are all highly correlated with the core attributes of the current unmatched fault, avoiding the pitfall of "indiscriminately processing all entities" in subsequent analysis, and ensuring the accuracy of subsequent key entity screening and rule extraction.
[0067] In one embodiment, each entity in the simplified atlas is subjected to a failure probability score, and key entities are selected based on the score results to obtain a key entity set, including:
[0068] Based on real-time power grid data and historical operating data of entities in the simplified map, the historical fault frequency, attribute fluctuation and number of adjacent faulty devices are calculated for each entity in the simplified map. The weighted sum of the historical fault frequency, attribute fluctuation and number of adjacent faulty devices is calculated to obtain the fault probability score of the entity.
[0069] Based on the fault probability score, the entities in the simplified atlas are sorted in descending order to obtain an ordered list of entities.
[0070] Select the first K entities from the ordered entity list to obtain the key entity set, where K is a positive integer.
[0071] Specifically, while the simplified fault map has removed irrelevant entities, it still contains some "related but low-risk" entities. These entities contribute little to fault determination. Fault probability scoring can further quantify the fault correlation of each entity, ensuring that the selected key entities are the core objects of fault analysis. Furthermore, single-dimensional indicators cannot comprehensively reflect the fault risk of an entity. For example, looking only at historical fault frequency may miss entities that are "experiencing anomalies for the first time but are currently in extremely poor condition"; looking only at current attribute fluctuations may ignore entities that have experienced historically high-frequency faults but are currently only slightly abnormal and have potential risks; and looking only at the number of adjacent faulty devices may misjudge entities that are "normal in their own condition but affected by adjacent devices." Therefore, a comprehensive assessment requires a combination of all three. Illustratively, based on real-time power grid data and historical operating data of entities in the simplified fault map, the historical fault frequency, attribute fluctuations, and number of adjacent faulty devices can be calculated for each entity in the simplified fault map. The fault probability score for that entity can then be obtained by weighted summing these three factors. This can be achieved by combining the characteristics of power grid operation with the calculation of various indicators. For example, for historical fault frequency, historical fault records of the entity can be extracted from the entity's historical operation data stored in the simplified map, such as the number of transformer over-temperature faults and line short-circuit faults within a preset historical period. Dividing these by the total operating time of the entity yields the historical fault frequency per unit time. For attribute fluctuation, core operating attributes of the entity, such as transformer temperature and line current, can be selected to calculate the deviation rate between the actual value and the rated value of the attribute in the real-time power grid data. If the entity has multiple core attributes, the maximum value of the deviation rate of each attribute can be taken to ensure that the most severe anomalies are captured. For the number of adjacent faulty devices, the number of devices directly connected to the entity and whose attribute fluctuation exceeds a preset anomaly threshold (e.g., 20%) can be counted based on the topological relationship of the simplified map.
[0072] Furthermore, after obtaining the three basic indicators, a fault probability score can be calculated through weighted summation. The weight allocation can be set according to the priority of power grid management, typically with the current state being the most important (attribute fluctuations directly reflect whether an entity is currently abnormal), followed by historical risk (high-frequency fault entities have a higher probability of fault recurrence), and then correlation impact (adjacent faults are only indirect risks). For example, the weight of attribute fluctuation can be set to 0.5, historical fault frequency to 0.3, and the number of adjacent fault devices to 0.2 (the weights sum to 1). Through this calculation process, each entity receives a standardized score between 0 and 1, with higher scores indicating stronger fault risk and correlation. Based on the fault probability scores obtained above, the entities in the simplified graph can be sorted in descending order using methods such as quicksort or bubble sort to obtain an ordered entity list. The order of this list directly reflects the fault risk priority of the entities. Finally, the top K entities can be selected from the ordered entity list to obtain the key entity set. The value of K can be determined by considering the power grid scale, the fault impact range, and the computational efficiency of subsequent rule extraction. For example, for small substations (with 10-20 entities in the simplified diagram), K can be 5-8 to ensure coverage of all high-risk entities. Furthermore, the value of K can be verified using historical data, such as by statistically analyzing the contribution of the top K high-risk entities in past faults to fault determination, ensuring a contribution ≥90%. For instance, if a simplified power grid diagram contains 60 entities, and the fault risk scores of the first 12 entities in the ordered list are all ≥0.3, and these 12 entities have contributed 92% to fault determination in similar past faults, then K=12 can be selected, and the first 12 entities in the ordered list can be used as the key entity set.
[0073] In one embodiment, association rule generation is performed based on a set of key entities to obtain an association rule set, and a rule decision tree construction process is performed based on the association rule set to obtain an executable decision tree, including:
[0074] Calculate the dynamic support threshold based on the number of entities in the key entity set;
[0075] Within the scope of the key entity set, frequent itemset mining is performed on the entity combinations in the key entity set to obtain frequent itemsets that meet the dynamic support threshold.
[0076] A set of association rules is obtained by generating association rules based on frequent itemsets.
[0077] Based on the confidence and lift of each rule in the association rule set, the product of the confidence and lift is calculated for each rule in the association rule set to obtain the rule priority of the corresponding rule;
[0078] Based on rule priority, the rules in the association rule set are sorted in descending order to obtain an ordered rule list;
[0079] Based on an ordered list of rules, the antecedent attributes of the highest priority rule are used as branch nodes, and the consequent fault types of the highest priority rule are used as leaf nodes, and an executable decision tree is recursively constructed.
[0080] Specifically, if the support threshold for association rules is fixed, differences in the size of the key entity set, the tightness of entity associations, and the frequency of historical failures can lead to problems such as "excessively high support with few key entities, resulting in no rules to mine, and excessively low support with many key entities, leading to rule redundancy." Therefore, it is necessary to dynamically adjust the support threshold to adapt to the characteristics of the current key entity set, ensuring a balance between the accuracy and comprehensiveness of rule extraction.
[0081] As an illustration, the dynamic support threshold can be calculated first based on the number of entities in the key entity set, using the following formula:
[0082]
[0083] in, For dynamic support threshold, As the baseline support, The number of entities in the key entity set. As the baseline number of entities, The attenuation coefficient is... , This represents the average degree of the key entity set, which is the number of associated edges for each entity in the key entity set. The maximum entity degree of the entire power grid knowledge graph. The standard deviation of the historical failure frequency of critical entities is used to define the critical entity cluster. The standard deviation is the baseline.
[0084] In the above formula, the benchmark support Determined based on experience in the power grid field, for example, a value of 0.3 represents the minimum support required to determine frequent itemsets in a baseline scenario. Attenuation coefficient. This can be used to control the degree to which the number of entities diminishes the support level; for example, it can be set to 0.5. The maximum entity degree of the full power grid knowledge graph... This refers to the maximum number of associated edges for a single entity in the full graph, for example, 20, and can be determined by... The item reflects the degree of association between key entity sets; the closer the association (…), the higher the degree of association (…). The larger the number of entities, the higher the support threshold can be, thus avoiding rule redundancy when entities are too closely associated.
[0085] Specifically, frequent itemsets refer to combinations of entity attributes that appear more or less frequently in key entity scenarios than or equal to the dynamic support threshold. The set. Illustratively, an improved Apriori algorithm can be used to first generate 1-itemsets (attribute conditions of a single entity, such as transformer A overheating), that is, by calculating their support (the proportion of times this attribute condition appears in the key entity scenarios out of the total number of scenarios), and then filtering out items with support ≥ the dynamic support threshold. The 1-itemsets are then generated. 2-itemsets (e.g., "Transformer A is overheated and line B is overloaded") are then generated based on the 1-itemsets. Support is calculated and filtered, and so on, until no higher-order itemsets can be generated. This allows for the filtering of frequent itemsets, which have sufficient frequency of occurrence in the current key entity scenario to lay the foundation for the effectiveness of association rules.
[0086] Specifically, association rules can be generated based on frequent itemsets to obtain an association rule set. The form of antecedent → consequent (e.g., transformer A overheating → winding fault), where the antecedent is the attribute combination of the frequent itemset, and the consequent is the corresponding fault type. Furthermore, two key indicators, confidence and lift, can be calculated to obtain the rule priority of the corresponding rule. The confidence level reflects the accuracy of the rule, and its calculation formula is as follows:
[0087]
[0088] In the above formula, Y is the antecedent of the association rule, and Y is the consequent of the association rule, which is the rule that simultaneously satisfies the antecedent. The confidence level is obtained by dividing the itemset support of the consequent Y by the itemset support of only the antecedent X. The lift reflects the relevance of the rule, and its calculation formula is:
[0089]
[0090] In the above formula, the confidence level of the rule is used. In addition to the support for subsequent Y appearing alone, we can obtain the lift score. A score greater than 1 indicates that the rule has a positive correlation and is not a random association.
[0091] Specifically, based on the confidence and lift of each rule in the association rule set, the product of confidence and lift can be calculated for each rule. The larger this product, the higher the priority of the rule should be used in the decision-making process; that is, the higher the rule priority. Based on the rule priority, all rules can be arranged in descending order of priority to form an ordered rule list. This allows for prioritizing high-priority rules when constructing the decision tree, avoiding interference from low-priority rules in the decision-making logic.
[0092] Based on the ordered rule list, an executable decision tree can be recursively constructed by using the antecedent attribute of the highest priority rule as a branch node and the consequent fault type of the highest priority rule as a leaf node. For example, taking the first rule in the ordered rule list as the root node, if the antecedent of the rule contains a single attribute condition (e.g., transformer A current > 1.2I rated current), then this attribute condition is used as the branch judgment condition of the root node. If the antecedent contains multiple attribute conditions, then the most distinguishing attribute (e.g., current, as current exceeding the limit is often a direct manifestation of a fault) is selected as the root node, and subsequent branches process other attributes. The leaf nodes of the root node are the consequent fault types of the rule (e.g., winding fault). The next rule in the ordered rule list can then be processed. If the attribute condition of the rule's antecedent can form a continuous judgment with the constructed branch node (e.g., line B current > 1.1 times rated current), then a new branch node can be added under the corresponding branch. If the attribute condition of the rule's antecedent does not conflict with existing branches, then a new branch is added. The above process is recursively repeated until all rules are mapped into the decision tree and branches with the same antecedent attributes are merged, ultimately forming a well-structured and directly executable decision tree. Based on this decision tree, subsequent fault types can be quickly and accurately located by traversing it, providing a clear basis for generating subsequent scheduling instructions and significantly improving the efficiency and accuracy of fault handling.
[0093] In one embodiment, fault analysis and processing are performed based on an executable decision tree and real-time power grid data to generate scheduling instructions, including:
[0094] Based on the entity attribute values in real-time power grid data, the branch nodes of the executable decision tree are traversed, and the entity attribute values are matched with the preset attribute conditions in the branch nodes to determine the branch path that meets the attribute conditions.
[0095] Follow the branch path to reach the leaf node and obtain the fault type corresponding to the leaf node;
[0096] Based on the fault type and the preset fault-scheduling mapping relationship, the scheduling policy corresponding to the fault type is retrieved and the scheduling instruction is generated.
[0097] Specifically, an executable decision tree is a structured representation of association rules, where the attribute conditions of its branch nodes directly correspond to the critical operating thresholds of power grid equipment. Therefore, by traversing the decision tree and matching attribute conditions, the real-time operating status of the power grid can be compared one by one with preset fault characteristics, ensuring the logic and consistency of fault type determination. For example, entity attribute values from real-time power grid data, such as the real-time current and temperature of transformers, and the real-time load rate and voltage of lines, can be obtained first, and the structure of the executable decision tree can be defined. The traversal process can then start from the root node, comparing the real-time entity attribute values with the attribute conditions of the root node. If the condition is met, the path continues downwards along that branch; otherwise, it enters another branch of the root node (if it exists) or directly enters the next level branch node. For example, if the root node of the executable decision tree is "Transformer A current > 1.2 times rated?", and the real-time current is 1.3 times the rated current, the condition is met, so the path continues to the next branch node "Transformer A temperature > 90℃?". If the real-time temperature is 85℃, which does not meet the condition, the process can continue to the subsequent nodes under this branch (e.g., "Line B current > 1.1 times rated current?") until a leaf node is reached. Through this node-by-node matching process, it is possible to determine which combinations of attribute conditions the current power grid operating state meets, thereby identifying a unique branch path and providing a path basis for fault type determination.
[0098] Furthermore, the leaf nodes of the executable decision tree represent the final mapping of fault types. Each leaf node is associated with a unique fault type (such as winding deformation fault or line overload fault), and the process of reaching a leaf node along a branch path can be viewed as a derivation process of attribute condition combination → fault type. Therefore, the fault type corresponding to the leaf node reached along the branch path is the current fault type of the power grid. Since the scheduling strategy for power grid faults is type-dependent (different fault types require different handling methods), and the preset fault-scheduling mapping relationship is a fault type-handling action lookup table verified by power grid operation practice, this mapping relationship can be directly retrieved based on the fault type to match the corresponding scheduling strategy and convert the strategy into an executable scheduling instruction. This table can be indexed by the fault type to associate with the corresponding scheduling strategy. Through the above process, the traversal and matching of the executable decision tree enables rapid deduction of real-time data into fault types, avoiding the subjectivity and lag of manual analysis. The direct retrieval of the fault-scheduling mapping relationship ensures accurate matching of scheduling instructions, enabling targeted handling of faults immediately after they are identified. This significantly improves the response speed and handling effectiveness of power grid faults, ensuring the stability and safety of power grid operation.
[0099] In one embodiment, such as Figure 2As shown, the fault case map is updated based on the unmatched data identifiers, dispatch instructions, and real-time power grid data, resulting in an updated fault case map, including:
[0100] S201: Based on the unmatched data identifier and real-time power grid data, extract the abnormal attribute values in the real-time power grid data corresponding to the unmatched data identifier, and take the entity corresponding to the abnormal attribute value as the fault-dominant entity;
[0101] S202: Based on the scheduling instructions and the fault-dominant entity, generate a triplet of handling actions containing the fault-dominant entity, the handling relationship, and the scheduling instructions;
[0102] S203: Based on the abnormal attribute values and fault-dominant entities in real-time power grid data, generate a trigger condition triplet containing the fault-dominant entity, triggering relationship, and abnormal attribute values;
[0103] S204: Update the fault case map based on the action triplet and the trigger condition triplet to obtain the updated fault case map.
[0104] Specifically, the unmatched data identifier marks a new type of fault. The associated real-time power grid data must contain abnormal attributes that cause the fault, such as equipment overcurrent or overtemperature. The entities corresponding to these abnormal attributes are the source of the fault, i.e., the fault-initiating entity. Therefore, we can first locate the corresponding abnormal attribute values in the real-time power grid data through the unmatched data identifier and determine the entity to which these abnormal attributes belong (e.g., transformer A). This entity is then taken as the fault-initiating entity, thus clarifying the core entity and abnormal characteristics of the new fault case. Furthermore, since the core of the fault case graph is the entity-relationship-action triplet structure, the action triplet must clearly define "who (fault-initiating entity) - how to be handled (action relationship) - what the action instruction is (dispatch instruction)". Therefore, the dispatch instruction can then be broken down into action actions directly associated with the fault-initiating entity. For example, if the dispatch instruction is "to transfer the load from line B to line D and forcibly trip circuit breaker C", and the fault-initiating entity is line B, the action triplet can be constructed as "line B - load transfer - transfer to line D".
[0105] Furthermore, the trigger condition triplet needs to clearly define "who (fault-dominant entity) - what is abnormal (triggering relationship) - the degree of abnormality (abnormal attribute value)". Based on this trigger condition triplet, when the same entity with the same abnormal attribute appears in the real-time power grid data, it can be determined as a similar fault and a corresponding handling strategy can be matched. Illustratively, abnormal attribute values can be associated with the fault-dominant entity to construct a triggering relationship. For example, if the fault-dominant entity is line B, and the abnormal attribute value is "current 1.3 times rated current", then the trigger condition triplet would be "line B - overcurrent - current 1.3 times rated current". If a temperature abnormality also exists (e.g., line B temperature 85℃, but not exceeding the limit, which is a secondary abnormality), it can be included in the triplet as a supplementary feature, but the primary triggering condition must be clearly defined as overcurrent. Finally, the graph can be updated by injecting the handling action triplet and the trigger condition triplet into the storage structure of the original fault case graph. The original fault case graph can be stored based on a graph database, with each triplet corresponding to a node and edge in the graph. Furthermore, after injection, the indexing and retrieval mechanisms of the graph need to be updated to ensure that when similar new cases appear in the future, the corresponding processing strategies can be retrieved.
[0106] Based on the same inventive concept, such as Figure 3 As shown, this application also provides a power grid operation management system 300 based on knowledge graph rule extraction for implementing the power grid operation management method based on knowledge graph rule extraction described above. The solution provided by this system is similar to the implementation scheme described in the above method. Therefore, the specific limitations of one or more power grid operation management system embodiments based on knowledge graph rule extraction provided below can be found in the limitations of the various method embodiments above, and will not be repeated here. The system includes:
[0107] The case matching and identification generation module 301 is used to construct a real-time data subgraph based on real-time power grid data, and to match the real-time data subgraph with the historical fault subgraph in the fault case map. If the matching result is successful, the historical scheduling strategy corresponding to the historical fault subgraph is output; otherwise, an unmatched data identifier is generated.
[0108] The graph pruning and entity filtering module 302 is used to dynamically prune the preset full power grid knowledge graph using unmatched data identifiers and real-time power grid data to obtain a simplified graph. It then performs fault probability scoring on each entity in the simplified graph and selects key entities based on the scoring results to obtain a key entity set.
[0109] The rule extraction and decision tree construction module 303 is used to generate association rules based on the key entity set to obtain an association rule set, and to construct a rule decision tree based on the association rule set to obtain an executable decision tree;
[0110] The fault prediction scheduling and graph update module 304 is used to perform fault analysis and processing based on the executable decision tree and real-time power grid data, generate scheduling instructions, and update the fault case graph according to the unmatched data identifier, scheduling instructions and real-time power grid data to obtain the updated fault case graph.
[0111] In one exemplary embodiment, the present invention also provides a computer device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the power grid operation and control method based on knowledge graph rule extraction of this application. A multi-core processor is preferred to improve the system's parallel processing capability. The memory provides sufficient temporary storage space to support program execution and data processing. The memory capacity should be large enough to accommodate large amounts of data and computational tasks.
[0112] In one exemplary embodiment, the present invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the power grid operation control method based on knowledge graph rule extraction of this application. The computer-readable storage medium may include: a read-only memory, a random access memory (RAM), a solid-state drive (SSD), or an optical disc, etc.
[0113] The above-described embodiments are merely illustrative of several implementation methods of the embodiments of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the embodiments of this application, and these modifications and improvements all fall within the protection scope of the embodiments of this application.
Claims
1. A power grid operation and control method based on knowledge graph rule extraction, characterized in that, The method includes: A real-time data subgraph is constructed based on real-time power grid data. The real-time data subgraph is then matched with historical fault subgraphs in the fault case map. If the matching result is successful, the historical scheduling strategy corresponding to the historical fault subgraph is output. Otherwise, an unmatched data identifier is generated. Using the unmatched data identifiers and the real-time power grid data, the preset full power grid knowledge graph is dynamically pruned to obtain a simplified graph. Each entity in the simplified graph is then scored for fault probability. Based on the scoring results, key entities are selected to obtain a set of key entities. Based on the set of key entities, association rules are generated to obtain an association rule set, and based on the association rule set, a rule decision tree is constructed to obtain an executable decision tree. Based on the executable decision tree and the real-time power grid data, fault analysis and processing are performed to generate scheduling instructions. The fault case map is then updated according to the unmatched data identifier, the scheduling instructions, and the real-time power grid data to obtain an updated fault case map.
2. The method according to claim 1, characterized in that, The process of dynamically pruning the preset full power grid knowledge graph using the unmatched data identifiers and the real-time power grid data to obtain a simplified graph includes: Based on the real-time power grid data, the entity attributes in the real-time power grid data are weighted to obtain an attribute weight set. Based on the attribute weight set, calculate the attribute difference degree between entities in the real-time power grid data and entities in the full power grid knowledge graph; Entities with attribute differences greater than a preset difference threshold are identified as differential entities, and the differential entities and their associated edges are deleted to obtain the simplified graph.
3. The method according to claim 1, characterized in that, The process involves performing a fault probability scoring on each entity in the simplified atlas, selecting key entities based on the scoring results, and obtaining a key entity set, including: Based on the real-time power grid data and the historical operating data of entities in the simplified map, for each entity in the simplified map, the historical fault frequency, attribute fluctuation amount and the number of adjacent faulty devices are calculated, and the weighted sum of the historical fault frequency, attribute fluctuation amount and the number of adjacent faulty devices is calculated to obtain the fault probability score of the entity. Based on the fault probability score, the entities in the simplified graph are sorted in descending order to obtain an ordered entity list. The first K entities are selected from the ordered entity list to obtain the key entity set, where K is a positive integer.
4. The method according to claim 1, characterized in that, The step of generating association rules based on the key entity set to obtain an association rule set, and then constructing an executable decision tree based on the association rule set, includes: Calculate the dynamic support threshold based on the number of entities in the key entity set; Within the scope of the key entity set, frequent itemset mining is performed on the entity combinations in the key entity set to obtain frequent itemsets that satisfy the dynamic support threshold. The association rule set is obtained by performing association rule generation processing based on the frequent itemset; Based on the confidence and lift of each rule in the association rule set, the product of the confidence and lift is calculated for each rule in the association rule set to obtain the rule priority of the corresponding rule; Based on the rule priority, the rules in the association rule set are sorted in descending order to obtain an ordered rule list; Based on the ordered rule list, the antecedent attribute of the highest priority rule is used as a branch node, and the consequent fault type of the highest priority rule is used as a leaf node, and the executable decision tree is recursively constructed.
5. The method according to claim 1, characterized in that, The step of performing fault analysis and processing based on the executable decision tree and the real-time power grid data to generate scheduling instructions includes: Based on the entity attribute values in the real-time power grid data, the branch nodes of the executable decision tree are traversed, and the entity attribute values are matched with the preset attribute conditions in the branch nodes to determine the branch path that satisfies the attribute conditions. Arrive at the leaf node along the branch path and obtain the fault type corresponding to the leaf node; Based on the fault type and the preset fault-scheduling mapping relationship, the scheduling strategy corresponding to the fault type is retrieved, and the scheduling instruction is generated.
6. The method according to claim 1, characterized in that, The step of updating the fault case map based on the unmatched data identifier, the scheduling instruction, and the real-time power grid data to obtain an updated fault case map includes: Based on the unmatched data identifier and the real-time power grid data, the abnormal attribute value in the real-time power grid data corresponding to the unmatched data identifier is extracted, and the entity corresponding to the abnormal attribute value is taken as the fault-dominant entity. Based on the scheduling instruction and the fault-dominant entity, a triplet of handling actions is generated, which includes the fault-dominant entity, the handling relationship, and the scheduling instruction. Based on the abnormal attribute values in the real-time power grid data and the fault-dominant entity, a trigger condition triplet containing the fault-dominant entity, the triggering relationship, and the abnormal attribute values is generated. The fault case map is updated based on the action triplet and the trigger condition triplet to obtain the updated fault case map.
7. The method according to claim 4, characterized in that, The dynamic support threshold is calculated using the following formula: in, The dynamic support threshold is... As the baseline support, The number of entities in the key entity set. As the baseline number of entities, The attenuation coefficient is... , The average degree of the key entity set is the number of associated edges for each entity in the key entity set. The maximum entity degree of the entire power grid knowledge graph. The standard deviation of the historical failure frequency of the critical entities in the critical entity set is given. The standard deviation is the baseline.
8. A power grid operation and control system based on knowledge graph rule extraction, characterized in that, The system includes: The case matching and identifier generation module is used to construct a real-time data subgraph based on real-time power grid data, and to match the real-time data subgraph with the historical fault subgraph in the fault case map. If the matching result is successful, the historical scheduling strategy corresponding to the historical fault subgraph is output; otherwise, an unmatched data identifier is generated. The graph pruning and entity filtering module is used to dynamically prune the preset full power grid knowledge graph using the unmatched data identifier and the real-time power grid data to obtain a simplified graph. It then performs fault probability scoring on each entity in the simplified graph and selects key entities based on the scoring results to obtain a key entity set. The rule extraction and decision tree construction module is used to perform association rule generation processing based on the key entity set to obtain an association rule set, and to perform rule decision tree construction processing based on the association rule set to obtain an executable decision tree; The fault prediction scheduling and graph update module is used to perform fault analysis and processing based on the executable decision tree and the real-time power grid data, generate scheduling instructions, and update the fault case graph according to the unmatched data identifier, the scheduling instructions and the real-time power grid data to obtain the updated fault case graph.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.