Power Grid Operation Control Method Based on Knowledge Graph Rule Extraction
By adopting knowledge graph-based association rule algorithms and pruning strategies in power grid fault prediction, the complexity of knowledge graphs and screening invalid data is solved, and the efficiency and accuracy of decision tree construction is improved.
Patent Information
- Application Number
- CN202510332305.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-20
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2045-03-20
AI Technical Summary
When the existing technology uses knowledge graphs and decision trees to predict power grid faults, the decision tree construction efficiency and accuracy are low, which affects fault prediction and grid scheduling efficiency.
The grid operation control method based on knowledge graph rules is adopted, and the knowledge graph information is processed in combination with the association rule algorithm of pruning strategy, so as to reduce complexity, filter invalid data, optimize the decision tree construction process, and optimize the information in the knowledge graph through similarity and failure probability reduction.
It improves the construction efficiency and accuracy of decision trees, enhances the efficiency and accuracy of fault prediction and grid scheduling, and ensures the safety and stability of grid operation.
Smart Images

Figure CN119853028B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power grid dispatching, and particularly to a power grid operation control method based on knowledge graph rule extraction. Background Art
[0002] At present, power grid operation data has the characteristics of diversity, massiveness, and real-time nature. The effective management and analysis of these data are crucial for the safe, stable, and efficient operation of the power grid. As a carrier capable of efficiently storing and querying complex relational data, the knowledge graph is suitable for representing the complex relationships between power grid equipment, operation states, fault modes, etc., and is often applied to the monitoring of power grid operation states. However, most of the existing knowledge graph applications focus on data display and simple queries, lacking in-depth data analysis and fault prediction means. Therefore, when using the knowledge graph for power grid operation state monitoring, the decision tree algorithm is often used in combination. By utilizing the classification ability of the decision tree and the knowledge representation ability of the knowledge graph, accurate fault prediction is jointly achieved to ensure the safety and reliability of power grid operation.
[0003] In the process of using the decision tree algorithm to construct a corresponding decision tree for fault prediction, it is necessary to select features in the knowledge graph and choose the features that have the greatest impact on the prediction results for constructing the decision tree. However, the knowledge graph has a large number of nodes and edges, and there are also complex relationships between the nodes. This leads to a large amount of invalid data being mixed in the process of constructing the corresponding decision tree based on the information contained in the knowledge graph, affecting the construction efficiency and accuracy of the decision tree, and further affecting the efficiency of subsequent fault prediction and power grid dispatching. Summary of the Invention
[0004] The object of the present invention is to overcome the drawback that in the process of combining the knowledge graph and the decision tree for fault prediction to achieve power grid dispatching in the prior art, due to the complexity of the knowledge graph, a large amount of invalid data is mixed in the construction process of the decision tree, greatly reducing the construction efficiency and accuracy of the decision tree, and further affecting the efficiency of subsequent fault prediction and power grid dispatching. A power grid operation control method based on knowledge graph rule extraction is provided. On the basis of constructing a decision tree based on the knowledge graph for fault prediction, the information in the knowledge graph participating in the construction of the decision tree is processed through an association rule algorithm combined with a pruning strategy to reduce the complexity of the knowledge graph, avoid interference from invalid data or data with low correlation degrees irrelevant to fault prediction to the construction of the decision tree, and before the information is processed by the association rule algorithm, the information in the knowledge graph is reduced and optimized through similarity and fault probability to improve the processing efficiency of the association rule algorithm for large data sets, further improve the construction efficiency and accuracy of the decision tree, thereby improving the efficiency and accuracy of subsequent fault prediction and power grid dispatching, and ensuring the safety and stability of power grid operation.
[0005] The object of the present invention is achieved by the following technical solutions:
[0006] A power grid operation control method based on knowledge graph rule extraction, comprising:
[0007] Obtain power grid operation data and identify the types of power grid operation data based on the knowledge graph;
[0008] When the type of power grid operation data is an unrecorded data type, calculate the similarity between the power grid operation data and the historical data in the knowledge graph, and screen and eliminate the invalid data in the knowledge graph according to the similarity calculation result;
[0009] Combined with the failure probability, select the rule extraction range from the knowledge graph after eliminating the invalid data, and obtain the rule extraction sub-graph for failure budget;
[0010] Combined with the pruning strategy, form the association rules of the rule extraction sub-graph according to the association rule algorithm, and perform association rule extraction according to the decision tree algorithm to establish a rule decision tree;
[0011] Based on the rule decision tree, perform failure budget according to the power grid operation data, and formulate corresponding power grid dispatching strategies for exception handling;
[0012] Update the failure case graph according to the power grid dispatching strategy, and when the type of power grid operation data is a recorded data type, perform failure budget and exception handling according to the failure case graph.
[0013] While performing failure budget using the knowledge graph and the decision tree algorithm, cooperate with the failure case graph to record the existing failure types, so as to quickly identify the failure types through the failure case graph, and then select the corresponding power grid dispatching strategy, avoiding repeated calculations for the same type of power grid operation data and optimizing the failure budget efficiency. When facing unrecorded failure types without corresponding failure case graphs, on the basis of constructing a decision tree based on the knowledge graph and performing failure budget through the decision tree, first perform association rule extraction on the knowledge graph according to the association rule algorithm combined with the pruning strategy, and then construct the corresponding decision tree according to the association rules to reduce the complexity of the knowledge graph and avoid interference from invalid data or data with low association degree irrelevant to the failure budget to the construction of the decision tree, improving the construction efficiency and accuracy of the decision tree. And before performing association rule extraction, first optimize the information in the knowledge graph through similarity and failure probability to improve the processing efficiency of the association rule algorithm for large data sets, enabling the association rule algorithm to adapt to the information processing of large-scale knowledge graphs, ensuring the accuracy and efficiency of the association rule algorithm for association rule extraction, so as to further improve the efficiency and accuracy of subsequent failure budget and power grid dispatching, and ensure the safety and stability of power grid operation.
[0014] Further, the identification of the power grid operation data type based on the knowledge graph includes:
[0015] Determine the data source of the power grid operation data, and combine the data source to determine the entity information, attribute information, and relationship information in the power grid operation data;
[0016] Match the entity information, attribute information, and relationship information of the power grid operation data with the knowledge graph in sequence;
[0017] When the entity information, attribute information, and relationship information all match the corresponding information in the knowledge graph, determine that the power grid operation data type is the recorded data type;
[0018] In other cases, determine that the power grid operation data type is the unrecorded data type.
[0019] Further, the calculation of the similarity between the power grid operation data and the historical data in the knowledge graph, and the screening and elimination of the invalid data in the knowledge graph according to the similarity calculation result include:
[0020] Obtain the historical update information and historical fault information of the knowledge graph, match the historical fault information with the historical update information, determine the update information corresponding to each fault, and set the weights of the entity information, attribute information, and relationship information based on the update information corresponding to each fault;
[0021] Take the entity information, attribute information, and relationship information corresponding to each entity as the similarity calculation target, and calculate the similarity between each entity in the knowledge graph and the power grid operation data in combination with the corresponding weights;
[0022] Screen out the entities with similarity lower than the preset similarity threshold, take the historical data corresponding to the screened entities in the knowledge graph as invalid data, and eliminate all invalid data in the knowledge graph.
[0023] Further, the combination of the fault probability, select the rule extraction range from the knowledge graph after eliminating the invalid data, and obtain the rule extraction sub-graph for fault budget, including:
[0024] Determine all entities in the knowledge graph after eliminating the invalid data, obtain the relationship information between each entity, and obtain all candidate rule extraction ranges according to the relationship information;
[0025] According to all entities in each candidate rule extraction range, obtain the entity update frequency, attribute fluctuation range, and relationship increase corresponding to each candidate rule extraction range;
[0026] Perform a fault probability score on each candidate rule extraction range based on the entity update frequency, attribute fluctuation range, and relationship increase, and calculate the comprehensive score of each candidate rule extraction range in combination with the similarity of the corresponding entity;
[0027] Extract the range according to the comprehensive scoring selection rule, set the extraction boundary according to the entities included in the rule extraction range, and obtain the rule extraction sub-graph for fault budgeting from the knowledge graph according to the extraction boundary.
[0028] Considering that the running efficiency of the association rule algorithm is directly related to the size of the dataset for rule extraction, the larger the dataset, the more frequent itemsets and candidate itemsets need to be traversed, and the running time of the association rule algorithm will also increase accordingly. Therefore, filter and eliminate the invalid information in the knowledge graph according to the similarity of the power grid operation data, reduce the interference of duplicate and useless itemsets in the association extraction process on the association rule extraction, and ensure the extraction efficiency of the association rule algorithm for association rules. Considering that multiple regions with similar lines or operation scenarios may be identified, further analyze the fault probability of each similar region according to the fluctuation of entity, attribute and relationship information, determine the region of the unrecorded power grid operation data with the most likely fault tendency, and then select the region of the knowledge graph closest to the corresponding scenario of the power grid operation data for subsequent rule extraction to ensure the efficiency and accuracy of the association rule extraction.
[0029] Furthermore, combining the pruning strategy, the association rules for forming the rule extraction sub-graph according to the association rule algorithm include:
[0030] Based on the entities, relationships and attributes in the rule extraction sub-graph, construct the corresponding transaction database;
[0031] Set the support threshold and scan the transaction database to obtain the items in all transactions and their occurrence times, and obtain the support of each item according to the corresponding occurrence times;
[0032] Filter out and delete the item sets with support less than the support threshold, and construct the initial frequent item set according to the remaining items;
[0033] Combining the pruning strategy, generate candidate item sets according to the initial frequent item set and calculate the corresponding support, and construct the next-level frequent item set according to the support of the candidate item sets;
[0034] Repeat the generation of candidate item sets and the construction of frequent item sets until all frequent item sets in the transaction database are exhausted;
[0035] Form the association rules of the rule extraction sub-graph based on the frequent item sets.
[0036] When performing association rule extraction based on the association rule algorithm, combine the pruning strategy to simplify the algorithm execution process and further optimize the extraction efficiency of the association rules.
[0037] Furthermore, performing association rule extraction according to the decision tree algorithm, and establishing the rule decision tree of the rule extraction sub-graph, including:
[0038] Generate the input features of the decision tree algorithm according to the formed association rules and their corresponding transactions, and select the root node according to the Gini coefficient;
[0039] Recursively construct the corresponding sub-nodes by calculating the corresponding Gini coefficient until the stop condition is met, and obtain the rule decision tree of the rule extraction sub-graph.
[0040] Furthermore, the extracting the association rules according to the decision tree algorithm and establishing the rule decision tree of the rule extraction sub-graph further includes:
[0041] Perform similarity search between nodes of the rule decision tree, and supplement the rules of the rule decision tree according to the search results.
[0042] Furthermore, the updating the fault case graph according to the power grid dispatching strategy includes:
[0043] Conduct causal reasoning by combining the power grid operation data and the corresponding power grid dispatching strategy, generate the corresponding accident plan, and update the fault case graph according to the accident plan.
[0044] Furthermore, the conducting causal reasoning by combining the power grid operation data and the corresponding power grid dispatching strategy and generating the corresponding accident plan includes:
[0045] Extract text features of the power grid dispatching strategy based on the pre-trained language representation model, and construct a causal graph according to the extracted text features;
[0046] Conduct causal reasoning according to the causal graph, construct an accident scenario according to the causal reasoning result, and generate a text description corresponding to the accident scenario in combination with the corresponding text features;
[0047] Generate an accident plan according to the accident scenario and the corresponding text description.
[0048] Furthermore, the updating the fault case graph according to the accident plan includes:
[0049] Create or select the corresponding fault node according to the accident plan, match the relevant nodes in the fault case graph according to the text description of the accident plan, and connect the fault node and the relevant nodes;
[0050] Create or select the cause node, impact node and measure node corresponding to the fault node according to the accident plan, and establish the connections between the cause node, impact node and measure node and the fault node respectively.
[0051] The beneficial effects of the present invention are:
[0052] (1)While performing fault budgeting using a knowledge graph and decision tree algorithm, record existing fault types in cooperation with a fault case graph, so as to quickly identify fault types through the fault case graph, and then select corresponding power grid dispatching strategies, avoiding repeated calculations for the same type of power grid operation data and optimizing the efficiency of fault budgeting. When facing unrecorded fault types without corresponding fault case graphs, first construct a decision tree based on the knowledge graph. On the basis of performing fault budgeting through the decision tree, first extract association rules from the knowledge graph according to the association rule algorithm combined with pruning strategies, and then construct a corresponding decision tree according to the association rules to reduce the complexity of the knowledge graph and avoid interference from invalid data or weakly associated data irrelevant to fault budgeting to the construction of the decision tree, improving the construction efficiency and accuracy of the decision tree. And before performing association rule extraction, first reduce and optimize the information in the knowledge graph through similarity and fault probability to improve the processing efficiency of the association rule algorithm for large data sets, enabling the association rule algorithm to adapt to the information processing of large-scale knowledge graphs, ensuring the accuracy and efficiency of the association rule algorithm for association rule extraction, so as to further improve the efficiency and accuracy of subsequent fault budgeting and power grid dispatching, and ensure the safety and stability of power grid operation.
[0053] (2)Screen and eliminate invalid information in the knowledge graph according to the similarity of power grid operation data, reducing the interference of duplicate and useless item sets in the association extraction process to the extraction of association rules, and ensuring the extraction efficiency of the association rule algorithm for association rules. Considering that multiple regions with similar lines or operation scenarios may be identified, further analyze the fault probability of each similar region according to the fluctuation of entity, attribute, and relationship information, determine the region of unrecorded power grid operation data with the most likely fault tendency, and then select the knowledge graph region closest to the corresponding scenario of the power grid operation data for subsequent rule extraction to ensure the efficiency and accuracy of association rule extraction. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 is a schematic flowchart of a process of the present invention;
[0055] Figure 2 is an overall flowchart of power grid operation control in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0056] The present invention will be further described below with reference to the drawings and embodiments.
[0057] Embodiment: A power grid operation control method based on knowledge graph rule extraction, as Figure 1 shown, includes:
[0058] Obtain power grid operation data and identify the types of power grid operation data based on the knowledge graph;
[0059] When the power grid operation data type is an unrecorded data type, calculate the similarity between the power grid operation data and the historical data in the knowledge graph, and screen and eliminate the invalid data in the knowledge graph according to the similarity calculation result;
[0060] Combined with the fault probability, select the rule extraction range from the knowledge graph after eliminating the invalid data, and obtain the rule extraction sub-graph for fault budget;
[0061] Combined with the pruning strategy, form the association rules of the rule extraction sub-graph according to the association rule algorithm, and perform association rule extraction according to the decision tree algorithm to establish a rule decision tree;
[0062] Based on the rule decision tree, perform fault budget according to the power grid operation data, and formulate corresponding power grid dispatching strategies for anomaly handling;
[0063] Update the fault case graph according to the power grid dispatching strategy, and when the power grid operation data type is a recorded data type, perform fault budget and anomaly handling according to the fault case graph.
[0064] The knowledge graph can organize data and the relationships between data through a graph structure, making data processing and analysis more intuitive and efficient. Therefore, in power grid dispatching, by constructing a knowledge graph, the relationships between entities are expressed in the form of a "graph" to better understand and process complex knowledge in the power system, thereby improving the intelligent level of dispatching decisions.
[0065] Among them, the knowledge graph mainly includes three basic parts: entities, relationships, and attributes. By extracting, integrating, and representing concepts, entities, events, and their relationships related to power grid dispatching, and further organizing them into a graphical structure, relevant information can be better extracted for subsequent power grid dispatching management.
[0066] Considering that most applications of the knowledge graph focus on data display and simple queries, further data mining and analysis methods are needed to identify and predict power grid operation anomalies to ensure the safety and reliability of power grid operation.
[0067] Moreover, according to the different entities it focuses on, the knowledge graph also includes various types. For example, the entity graph that mainly focuses on entities and the relationships between entities, and the fault graph that represents fault scenarios. In this embodiment, these two types of knowledge graph types are specifically applied, and the corresponding knowledge graph and fault case graph are constructed respectively to achieve efficient control of power grid operation.
[0068] Among them, for the knowledge graph of the entity graph type that mainly focuses on entities and the relationships between entities, its entities are extracted from data such as device information, operating status, and historical events collected from the power grid. The extracted entities include devices such as generators, transformers, and transmission lines, states such as voltage, current, and power factor, and events such as faults and repairs. The relationships are determined by the relationships between these entities, such as the connection relationships between devices, the corresponding relationships between states and devices, and the association relationships between events and devices or states. The attributes provide detailed descriptions of these entities, such as device models, state parameters, and event descriptions.
[0069] For the fault case graph of the fault graph type representing fault scenarios, its entities are the components of the device, performance characteristics, fault states, etc. The relationships describe the associations between these entities, such as the composition relationships between components, the corresponding relationships between performance characteristics and fault states, etc. The attributes provide detailed descriptions of these entities, such as the models of components, the specific values of performance characteristics, etc.
[0070] For the establishment of the above two graphs, the data required for establishment can be obtained through the power grid dispatching system. After completing the construction of the two graphs, the operation status of the power grid can be determined by matching the collected power grid operation data with the two graphs.
[0071] The fault case graph records the relevant information of the fault scenarios that have occurred. If the currently collected power grid operation data is the data that has been recorded, matching it with the fault case graph can quickly obtain the possible fault situations, without the need for analysis from scratch, optimizing the power grid management efficiency.
[0072] However, for the unrecorded data, it cannot be matched with the data recorded in the fault case graph or the knowledge graph, so the potential fault risks cannot be obtained, nor can it be determined whether it is in a normal operation state. This requires fault budgeting based on the current knowledge graph to timely respond to possible abnormal situations and reduce fault risks.
[0073] In this embodiment, the decision tree algorithm is specifically selected to classify and identify the power grid operation information reflected in the knowledge graph to achieve fault budgeting for power grid operation data.
[0074] Before that, it is necessary to first identify the types of the collected power grid operation data. Specifically, the identification of the power grid operation data types based on the knowledge graph includes:
[0075] Determine the data source of the power grid operation data, and combine the data source to determine the entity information, attribute information, and relationship information in the power grid operation data;
[0076] Match the entity information, attribute information, and relationship information of the power grid operation data with the knowledge graph in turn;
[0077] When the entity information, attribute information, and relationship information all match the corresponding information in the knowledge graph, determine that the power grid operation data type is the recorded data type;
[0078] In other cases, determine that the power grid operation data type is the unrecorded data type.
[0079] The power grid operation data can come from various links of the power system such as power generation, transmission, transformation, distribution, power consumption, and dispatching. By tracing its data source, the power grid operation data can be directly located to the corresponding power grid equipment or event, so as to determine its corresponding entity information, attribute information, and relationship information. Then, match it with the corresponding information recorded in the knowledge graph. If the match can be completed, it proves that the relevant data has been recorded in the knowledge graph and is the recorded data type; otherwise, it is the unrecorded data type.
[0080] For the power grid operation data of the recorded data type, quickly identify the fault type through the fault case graph, and then select the corresponding power grid dispatching strategy, which avoids the repeated calculation of the same type of power grid operation data and optimizes the fault budget efficiency.
[0081] For the power grid operation data of the unrecorded data type, it is necessary to combine the decision tree algorithm for fault budgeting. Before constructing the decision tree for fault budgeting, it is necessary to first extract the association rules from the knowledge graph according to the association rule algorithm combined with the pruning strategy to reduce the interference of invalid information irrelevant to the fault budgeting or information with low association degree on the construction of the decision tree, and improve the construction efficiency and accuracy of the decision tree.
[0082] Among them, rule extraction mainly includes three aspects: entity extraction, attribute extraction, and relationship extraction. Entity extraction is the first step of rule extraction, which can identify nouns or noun phrases with specific meanings from the text stored in the knowledge graph. These nouns or phrases usually represent specific objects or concepts in the real world, such as power grid equipment, power grid nodes, timestamps, etc. Attribute extraction is to further extract specific information or features associated with these entities after identifying the entities. These attributes describe certain aspects or characteristics of the entities, such as voltage level, current intensity, power value, etc. Relationship extraction is the last link of rule extraction, which aims to identify the associations or interactions between entities or between entities and attributes, including the connection relationships between devices (such as a transformer connected to a certain line), the logical relationships between attributes (such as the balance relationship between voltage and current), and the time series relationships (such as data changes at different time points), etc.
[0083] Specifically, the association rules extracted in this implementation are implications in the form of X→Y, where X and Y are respectively called the antecedent and consequent of the association rule. Specifically, the Apriori association rule algorithm is used to find the relationships between item sets in the database through an iterative method of layer-by-layer search to form association rules.
[0084] Among them, two parameters are involved in the operation process of the Apriori association rule algorithm, namely support and confidence. Support represents the frequency of the item set appearing in all transactions, and confidence represents the probability of the consequent item set appearing when the antecedent item set appears. The settings of support and confidence are directly related to the screening of frequent item sets and the generation of association rules by the Apriori association rule algorithm, and can be adjusted according to actual needs.
[0085] For the rule extraction results of the Apriori association rule algorithm, in addition to these two parameters, it is also affected by the data set on which the rule extraction is performed. The larger the data set, the more frequent item sets and candidate item sets need to be traversed. When the data set is large and sparse, the entire data set also needs to be scanned multiple times to find frequent item sets, and the running time of the association rule algorithm will increase accordingly.
[0086] Therefore, filter and eliminate invalid information in the knowledge graph according to the similarity of power grid operation data, reduce the interference of duplicate and useless item sets in the association extraction process on the association rule extraction, and ensure the extraction efficiency of the association rule algorithm for association rules. Even for large data sets, the association rule extraction can be efficiently and quickly realized, reducing the impact of the initial data volume on the running efficiency of the association rule algorithm.
[0087] Specifically, calculating the similarity between the power grid operation data and the historical data in the knowledge graph, and filtering and eliminating the invalid data in the knowledge graph according to the similarity calculation results includes:
[0088] Obtain the historical update information and historical fault information of the knowledge graph, match the historical fault information with the historical update information to determine the update information corresponding to each fault, and set the weights of entity information, attribute information, and relationship information based on the update information corresponding to each fault;
[0089] Taking the entity information, attribute information, and relationship information corresponding to each entity as the similarity calculation targets respectively, calculate the similarity between each entity in the knowledge graph and the power grid operation data in combination with the corresponding weights;
[0090] Filter out the entities with similarity lower than the preset similarity threshold, regard the historical data corresponding to the filtered entities in the knowledge graph as invalid data, and eliminate all invalid data in the knowledge graph.
[0091] If the similarity is calculated directly using one of the entity information, attribute information, and relationship information, it is inevitable to misjudge or miss similar entities. Therefore, starting from the ultimate goal of fault identification, when a fault occurs, the corresponding weights are assigned to the update probabilities of each type of information, and the similarities between each entity in the knowledge graph and the current power grid operation data are evaluated from multiple dimensions. For example, before and after a fault occurs, the update probability of entity information is small, while the update probabilities of attribute information and relationship information are large. Therefore, compared with attribute information and relationship information, a larger weight is set for entity information to avoid misjudging and missing similar entities.
[0092] Among them, the historical update information of the knowledge graph includes the change records of entities, attributes, and relationships, as well as the timestamps when these changes occurred. The historical fault information includes detailed information such as fault type, fault time, fault location, and affected equipment. The historical fault information can be aligned with the historical update information through timestamps to obtain the relevant update information before and after each fault occurs.
[0093] In this embodiment, corresponding similarity calculations can be performed through similarity calculation methods such as cosine similarity.
[0094] Moreover, considering that multiple regions with similar lines or operation scenarios may be identified simultaneously, the corresponding entity update frequency, attribute fluctuation range, and relationship increase are further extracted to determine the fault probability of the power grid operation data within each candidate rule extraction range. The similarity is combined to comprehensively score each candidate rule extraction range, so as to screen out the knowledge graph region with the highest similarity to the power grid operation data, further narrowing the scope of the knowledge graph participating in the decision tree construction, and ensuring the strong correlation between the data used in the decision tree construction process and the corresponding data of the power grid operation data fault budget.
[0095] Among them, combining the fault probability, selecting the rule extraction range from the knowledge graph after removing invalid data, and obtaining the rule extraction sub-graph for fault budget includes:
[0096] Determine all entities in the knowledge graph after removing invalid data, obtain the relationship information between each entity, and obtain all candidate rule extraction ranges according to the relationship information;
[0097] According to all entities within each candidate rule extraction range, obtain the entity update frequency, attribute fluctuation range, and relationship increase corresponding to each candidate rule extraction range;
[0098] Based on the entity update frequency, attribute fluctuation range, and relationship increase, perform a fault probability score on each candidate rule extraction range, and calculate the comprehensive score of each candidate rule extraction range in combination with the similarity of the corresponding entity;
[0099] Extract the range according to the comprehensive scoring selection rule, set the extraction boundary according to the entities included in the rule extraction range, and obtain the rule extraction sub-graph for fault budgeting from the knowledge graph according to the extraction boundary.
[0100] For the comprehensive score of each candidate rule extraction range, it can be obtained by weighted summation of the similarity and the fault probability. The weights of the similarity and the fault probability can also be adjusted according to actual needs. Select the candidate rule extraction range with the highest comprehensive score as the final rule extraction range. The selected rule extraction range contains the entity set most likely to extract useful rules.
[0101] Based on this entity set, the boundary entities of the rule extraction range can be determined, and thus according to the positions of the boundary entities on the knowledge graph, the rule extraction sub-graph containing this entity set can be obtained from the knowledge graph.
[0102] After obtaining the rule extraction sub-graph, combined with the pruning strategy, the association rules of the rule extraction sub-graph are formed according to the association rule algorithm, including:
[0103] Construct the corresponding transaction database based on the entities, relationships and attributes in the rule extraction sub-graph;
[0104] Set the support threshold and scan the transaction database to obtain all the items in the transactions and their occurrence times, and obtain the support of each item according to the corresponding occurrence times;
[0105] Filter out and delete the item sets with support less than the support threshold, and construct the initial frequent item set according to the remaining items;
[0106] Combined with the pruning strategy, generate candidate item sets according to the initial frequent item set and calculate the corresponding support, and construct the frequent item sets at the next level according to the support of the candidate item sets;
[0107] Repeat the generation of candidate item sets and the construction of frequent item sets until all the frequent item sets in the transaction database are exhausted;
[0108] Form the association rules of the rule extraction sub-graph based on the frequent item sets.
[0109] In order to ensure the normal operation of the Apriori association rule algorithm, the information in the rule extraction sub-graph needs to be converted into a processable data type first. Specifically, extract the entities, relationships and attributes in the rule extraction sub-graph and convert them into the form of a transaction database, where each transaction represents an entity or an entity set, and the items in the transaction represent the attributes or relationships related to this entity. Then, based on the generated transaction database, the Apriori association rule algorithm generates frequent item sets through the support threshold.
[0110] Among them, the support is set by the occurrence times of items and can be expressed as: Support(X) = Number of transactions containing item set X / Total number of transactions.
[0111] Considering that even if the scale of the knowledge graph for executing association rule extraction is restricted, due to the influence of the scale of power grid data, the data base for executing association rule extraction is still large. Therefore, based on the pruning strategy principle that if an item set is a frequent item set, then all its subsets are frequent item sets; if an item set is an infrequent item set, then all its supersets are infrequent item sets, the generation process of frequent item sets in the Apriori algorithm for association rules is optimized to reduce useless candidate item subsets, enabling the generation of the next-level candidate frequent item sets without pruning, thereby saving the running time of the algorithm and improving the mining efficiency.
[0112] Specifically, when constructing the initial frequent item set and candidate item set, the items or candidate item sets involved are constructed in ascending order, and the termination condition for the algorithm to exhaust is to determine whether all subsets of the generated candidate item sets are infrequent item sets, thus realizing the optimization of the generation process of frequent item sets in the Apriori algorithm for association rules.
[0113] Through the search for frequent item sets in the Apriori algorithm for association rules, information related to power grid operation data within the rule extraction sub-graph can be further extracted. To further realize the fault prediction for power grid operation data, the association rules further induced by the decision tree algorithm are used to generate readable rules and corresponding decision trees, and then the new power grid operation data is analyzed through the decision tree to realize fault prediction.
[0114] In this embodiment, the CART decision tree algorithm is specifically selected to construct the rule decision tree.
[0115] Specifically, the extraction of association rules according to the decision tree algorithm to establish the rule decision tree of the rule extraction sub-graph includes:
[0116] Generating the input features of the decision tree algorithm according to the formed association rules and their corresponding transactions, and selecting the root node according to the Gini coefficient;
[0117] Recursively constructing the corresponding sub-nodes by calculating the corresponding Gini coefficients until the stop condition is met, and obtaining the rule decision tree of the rule extraction sub-graph.
[0118] Through the formed association rules and their transactions, an input feature data set of the decision tree algorithm can be constructed, which includes the corresponding features of the association rules and the combined corresponding features of the items involved in their transactions.
[0119] By calculating the Gini coefficient of each feature in the input feature data set, the best feature is selected as the root node, where the root node is the feature with the smallest Gini coefficient in the input feature data set.
[0120] The input feature dataset is divided into different subsets based on the eigenvalue of the root node, and for each subset, the calculation of the Gini coefficient and the selection of the best feature are repeated to recursively construct the child nodes until the stopping condition is met, such as the size of the subset is less than the corresponding threshold, or the reduction in the Gini coefficient is less than the corresponding threshold, etc. After the recursion is completed, the value of the leaf node is set according to the features in the current subset to obtain the final rule decision tree.
[0121] The method of extracting association rules according to the decision tree algorithm to establish the rule decision tree of the rule extraction sub-graph also includes:
[0122] Perform similarity search between nodes of the rule decision tree, and supplement rules to the rule decision tree according to the search results.
[0123] To further improve the expressive ability and generalization ability of the rule decision tree, similarity search between nodes of the rule decision tree is performed through FAISS (Facebook AI Similarity Search). Before performing the similarity search, it is necessary to first extract features from the nodes of the rule decision tree, which can be the corresponding subset statistics or the Gini coefficient. Then, the extracted features are converted into vector form by means such as simple feature concatenation, using a feature hash function, or mapping the features to a high-dimensional space for use by FAISS.
[0124] During the similarity search process, it is necessary to first construct the corresponding index. In the creation of the index, a brute-force search method can be used. Then, for each node in the decision tree, the corresponding vector of its extracted features is used as the query vector to find the vector most similar to the query vector in the index. Based on the search results, it is judged whether new rules need to be added to cover additional data subsets or improve the existing classification results, and then the decision path in the decision tree is updated according to the judgment results to achieve rule supplementation.
[0125] The method of updating the fault case graph according to the power grid dispatching strategy includes:
[0126] Perform causal reasoning by combining power grid operation data and the corresponding power grid dispatching strategy to generate the corresponding accident plan, and update the fault case graph according to the accident plan.
[0127] Among them, the method of performing causal reasoning by combining power grid operation data and the corresponding power grid dispatching strategy to generate the corresponding accident plan includes:
[0128] Extract text features from the power grid dispatching strategy based on the pre-trained language representation model, and construct a causal graph according to the extracted text features;
[0129] Perform causal reasoning based on the causal graph, construct an accident scenario according to the causal reasoning result, and generate a text description corresponding to the accident scenario in combination with the corresponding text features;
[0130] Generate an accident preplan according to the accident scenario and the corresponding text description.
[0131] First, store and manage the information of causal relationships by constructing a causal graph, and then determine the current event set based on the current power grid operation data and power grid dispatching strategy, so as to realize the explanation and prediction of causal relationships according to the causal graph.
[0132] When constructing the causal graph, the causal relationships stored therein can be obtained by means of text feature extraction, and the forms of causal relationships are diverse, including causal relationships between noun words or phrases, between sentences or clauses, and between events. In this embodiment, the extraction of text features is specifically realized through a pre-trained BERT model, and then the analysis of causal relationships between the extracted text features is realized.
[0133] After extracting the text features, it is necessary to first define causal variables related to power grid operation according to actual needs, such as voltage stability, frequency deviation, or load demand, etc., and then construct a causal graph in combination with the specific text features extracted. The constructed causal graph can represent the dependence relationship and influence direction between each causal variable.
[0134] After construction, an appropriate causal reasoning algorithm can be selected according to the structure and characteristics of the causal graph, such as Bayesian network reasoning, structural equation model, etc. Input the extracted text features into the causal reasoning algorithm, and perform reasoning according to the causal graph to obtain the states and change trends of each causal variable.
[0135] Based on the results of causal reasoning, identify the key variables of the power grid accident corresponding to the current power grid operation data and power grid dispatching strategy, and then construct the corresponding accident scenario according to the states and change trends of the key variables.
[0136] Finally, use natural language generation technology, etc., in combination with the extracted text features and the results of causal reasoning, to generate a text description corresponding to the accident scenario. Among them, the text description includes at least the scenario characteristics and influence situation of the accident scenario. The accident preplan includes countermeasures for the generated accident scenario, such as adjusting the load, removing faulty equipment, etc., providing a data basis for the update of the fault case graph.
[0137] The updating of the fault case graph according to the accident preplan includes:
[0138] Create or select the corresponding fault node according to the accident preplan, match the relevant nodes in the fault case graph according to the text description of the accident preplan, and connect the fault node and the relevant nodes;
[0139] Create or select the cause node, impact node, and measure node corresponding to the fault node according to the accident plan, and establish the connections between the cause node, impact node, and measure node and the fault node respectively.
[0140] The fault case graph contains multiple fault nodes. Each fault node corresponds to a fault type, and each fault node includes the basic information of the fault, such as the fault name, fault code, fault description, etc. Considering that the causes of the same fault type may also be different, therefore, first obtain the basic information of the fault corresponding to the accident scenario through the accident plan, match it with the existing fault nodes, and judge whether there are fault nodes of the same fault type. If so, the corresponding fault node can be directly selected. If not, then correspond to the common fault node.
[0141] In addition to the fault nodes that record fault information, the fault case graph also includes other types of nodes representing other grid operation information such as equipment information. Through the text description of the accident plan, other nodes related to the fault node can be found in the fault case graph, such as equipment nodes, geographical location nodes, time nodes, etc. to establish connections. The connection relationship can be defined according to the situation described in the text. For example, connections can be established according to keywords such as "impact", "located in", or "occurred at".
[0142] For the fault causes, fault impact situations, and countermeasures mentioned in the accident plan, they can also be matched with the information stored in the fault case graph through the corresponding text description. If they already exist, the existing information can be directly applied to avoid duplication of nodes in the fault case graph. If not, the corresponding nodes are created.
[0143] Through the creation or update of fault nodes, related nodes, cause nodes, impact nodes, and measure nodes, the faults that may correspond to the current grid operation data are integrated into the fault case graph from various aspects such as fault causes, fault characteristics, and countermeasures. If the same type of data as the current grid operation data appears again later, the fault budget can be quickly executed, and efficient processing can be achieved in combination with the corresponding accident plan to ensure the safety and stability of the grid operation.
[0144] Considering that there are errors in the relevant data collected under abnormal grid conditions compared with those under normal operation conditions, and equipment replacement or adjustment may also occur after abnormal handling. If the knowledge graph is directly updated with the obtained grid operation data, it may cause deviations in the information in the knowledge graph. Therefore, after completing the abnormal handling, the knowledge graph is updated in combination with the corresponding abnormal handling results, that is, the adjusted grid situation, to ensure the accuracy of the content displayed in the knowledge graph and improve the control efficiency and accuracy of the grid.
[0145] In summary, the overall process of the grid operation control described in this embodiment is specifically as followsFigure 2 As shown, for the constructed power grid dispatching strategy, the corresponding exception handling can be realized through the way of human-machine cooperation.
[0146] The above-described embodiments are only a preferred solution of the present invention, and do not impose any form of limitation on the present invention. There are other variations and modifications without exceeding the technical solutions recorded in the claims.
Claims
1. A power grid operation control method based on knowledge graph rule extraction, characterized in that: include: Obtain power grid operation data and identify the type of power grid operation data based on the knowledge graph; When the power grid operation data type is an unrecorded data type, the similarity between the power grid operation data and the historical data in the knowledge graph is calculated, and invalid data in the knowledge graph is filtered and removed according to the similarity calculation result; Combined with the failure probability, select the rule extraction range from the knowledge graph that removes invalid data, and obtain the rule extraction sub-graph for fault budgeting; Combined with the pruning strategy, the association rules of the rule extraction sub-graph are formed according to the association rule algorithm, and the association rules are extracted according to the decision tree algorithm to establish a rule decision tree; Based on the rule decision tree, fault budget is made according to the power grid operation data, and corresponding power grid dispatch strategy is formulated to handle exceptions; Update the fault case map according to the power grid dispatching strategy, and perform fault budgeting and exception processing according to the fault case map when the power grid operation data type is the recorded data type; Also includes: Determine all entities in the knowledge graph after removing invalid data, obtain the relationship information between each entity, and obtain the extraction scope of all candidate rules based on the relationship information; According to all entities within the extraction range of each candidate rule, the entity update frequency, attribute fluctuation range and relationship increase rate corresponding to each candidate rule extraction range are obtained; The failure probability score of each candidate rule extraction range is scored based on the entity update frequency, attribute fluctuation range, and relationship increase, and the comprehensive score of each candidate rule extraction range is calculated based on the similarity of the corresponding entities; Select the rule extraction scope based on the comprehensive score, set the extraction boundary based on the entities included in the rule extraction scope, and obtain the rule extraction sub-graph for fault budgeting from the knowledge graph based on the extraction boundary; Extract entities, relationships, and attributes in the sub-graph based on rules and build the corresponding transaction database; Set the support threshold and scan the transaction database to obtain the items and their occurrence counts in all transactions, and obtain the support of each item based on the corresponding occurrence count; Filter out the item sets whose support is less than the support threshold and delete them, and construct the initial frequent item sets based on the remaining items; Combined with the pruning strategy, candidate item sets are generated based on the initial frequent item sets and the corresponding support is calculated. The next level of frequent item sets are constructed based on the support of the candidate item sets. Repeat the generation of candidate item sets and the construction of frequent item sets until all frequent item sets in the transaction database are exhausted; Extract association rules of subgraphs based on frequent item set formation rules; Generate the input features of the decision tree algorithm based on the formed association rules and their corresponding transactions, and select the root node based on the Gini coefficient; By calculating the corresponding Gini coefficient, the corresponding child nodes are recursively constructed until the stopping condition is met, and the rule decision tree of the rule extraction sub-graph is obtained; The nodes of the rule decision tree are searched for similarity between the nodes, and the rule decision tree is supplemented with rules according to the search results.
2. The power grid operation control method based on knowledge graph rule extraction according to claim 1 is characterized in that: The identifying of power grid operation data types based on the knowledge graph includes: Determine the data source of the power grid operation data, and determine the entity information, attribute information and relationship information in the power grid operation data based on the data source; Match the entity information, attribute information and relationship information of the power grid operation data with the knowledge graph in sequence; When the entity information, attribute information and relationship information all match the corresponding information in the knowledge graph, the power grid operation data type is determined to be a recorded data type; In other cases, the power grid operation data type is determined to be an unrecorded data type.
3. The power grid operation control method based on knowledge graph rule extraction according to claim 2 is characterized in that: The calculating the similarity between the power grid operation data and the historical data in the knowledge graph, and filtering and removing the invalid data in the knowledge graph according to the similarity calculation result, includes: Obtain historical update information and historical fault information of the knowledge graph, match the historical fault information with the historical update information, determine the update information corresponding to each fault, and set the weights of entity information, attribute information, and relationship information based on the update information corresponding to each fault; The entity information, attribute information and relationship information corresponding to each entity are used as similarity calculation targets respectively, and the similarity between each entity in the knowledge graph and the power grid operation data is calculated in combination with the corresponding weights; Filter out entities whose similarity is lower than the preset similarity threshold to filter out the historical data corresponding to the entity in the knowledge graph as invalid data, and eliminate all invalid data in the knowledge graph.
4. The power grid operation control method based on knowledge graph rule extraction according to claim 1 is characterized in that: The updating of the fault case map according to the power grid dispatching strategy includes: Causal reasoning is performed based on the grid operation data and the corresponding grid dispatching strategy to generate the corresponding accident plan, and the fault case map is updated according to the accident plan.
5. The power grid operation control method based on knowledge graph rule extraction according to claim 4 is characterized in that: The causal reasoning is performed by combining the power grid operation data and the corresponding power grid dispatching strategy to generate the corresponding accident plan, including: Extract text features of power grid dispatch strategy based on pre-trained language representation model, and build causal graph based on the extracted text features; Perform causal reasoning based on the causal graph, construct the accident scenario based on the causal reasoning results, and generate a text description corresponding to the accident scenario in combination with the corresponding text features; Generate accident plans based on accident scenarios and corresponding text descriptions.
6. The power grid operation control method based on knowledge graph rule extraction according to claim 5 is characterized in that: The updating of the fault case map according to the accident plan includes: Create or select the corresponding fault node according to the accident plan, match the relevant nodes in the fault case graph according to the text description of the accident plan, and connect the fault node and the relevant nodes; Create or select the cause node, impact node and measure node corresponding to the fault node according to the accident plan, and establish connections between the cause node, impact node and measure node and the fault node respectively.
Citation Information
Patent Citations
Method and device for constructing power grid dispatching fault processing knowledge graph
CN111860882A
Scheduling processing rule mining and generating method and system based on Apriori
CN114399177A
Power grid fault diagnosis method
CN116581882A
Power grid fault power protection maintenance plan making method, device, equipment and medium
CN118504939A