Enhanced generation method and system for active safety coping strategy of power grid event

By constructing a knowledge graph for safety response in power grid events and applying large language models to generate response strategies, and screening them according to safety constraint rules, the inefficiency problem caused by artificial experience dependence in power grid events is finally solved, and the generation of fast and effective optimal response strategies is achieved.

CN119578620APending Publication Date: 2025-03-07STATE GRID NINGXIA ELECTRIC POWER CO
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411636829.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-15
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

The prior art relies on manual experience in the proactive safety response strategies for grid events, resulting in inefficiency and inadequacy, making it difficult to quickly generate optimal control strategies to deal with failures in complex grid environments.

Method used

By building a knowledge graph for security response of power grid events, using large language models to generate multiple response strategies, and filtering out the most appropriate strategies based on security constraint rules to achieve automated optimal response strategy generation.

Benefits of technology

It improves the generation speed and efficiency of active and safe response decision-making in power grid events, enables relevant knowledge to be electronic, structured and systematic, and provides stronger support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119578620A_ABST
    Figure CN119578620A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of power system network security, and particularly discloses a power grid event active security coping strategy enhancement generation method and system, and the method comprises the following steps: constructing a security constraint rule based on a power grid fault coping strategy; constructing a power grid event safety coping knowledge graph; generating a plurality of coping strategies for the fault problem by using the constructed power grid event safety coping knowledge graph; and according to the constructed security constraint rule, screening out the most suitable coping strategy from the coping strategies. According to the power grid event active safety coping strategy enhanced generation method and system provided by the invention, the power grid event safety coping knowledge graph is constructed, the power grid event fault coping strategy is actively generated, and the generated coping strategy can be optimized to obtain the optimal coping strategy; therefore, low efficiency and defects caused by adjustment depending on artificial experience are avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of power system network security, and specifically relates to a method for enhancing the generation of active safety response strategies for power grid events, and also relates to a system for enhancing the generation of active safety response strategies for power grid events. Background Art

[0002] In the new power system based on ultra-high voltage AC / DC hybrid power grid, dispatchers at all levels face the risk of unknown failures at any time during real-time operation, posing a major threat to the security of the power grid. Therefore, with the development of new power systems and the substantial increase in the proportion of renewable energy power generation, it is urgent to carry out research on key technologies for digital generation of active safety control decisions for dispatching and risk prevention and control throughout the process.

[0003] Currently, the business of proactive safety response strategies for power grid events is carried out manually. With the increasing scale of the power grid and the access of large-scale intermittent renewable energy, the types and numbers of dispatch objects are growing exponentially. The traditional dispatch decision-making mechanism that relies on dispatchers to conduct manual dispatch based on experience and the "Operation Manual" will become unsustainable.

[0004] Therefore, in the face of large-scale renewable energy grid connection and complex power grid environment, in order to achieve safe operation of the power grid, it is necessary to quickly provide the optimal control strategy under power grid failure scenarios. Summary of the invention

[0005] In order to solve the deficiencies in the prior art, the present invention provides a method and system for enhancing the generation of active safety response strategies for power grid events. By constructing a knowledge graph for safe response to power grid events, power grid event fault response strategies are actively generated, and the generated response strategies can be optimized to obtain the optimal response strategies, thereby avoiding the inefficiency and deficiencies caused by relying on manual experience adjustment.

[0006] The present invention adopts the following technical solution.

[0007] In a first aspect, the present invention provides a method for enhancing the generation of active safety response strategies for power grid events, comprising the following steps: constructing safety constraint rules based on power grid fault response strategies; constructing a knowledge graph for safety response to power grid events; generating multiple response strategies for fault problems using the constructed knowledge graph for safety response to power grid events; and selecting the most appropriate response strategy from multiple response strategies based on the constructed safety constraint rules.

[0008] Preferably, the construction of safety constraint rules based on the power grid fault response strategy includes constructing line flow constraints, node power constraints, voltage constraints, energy storage constraints, and line capacity constraints.

[0009] Preferably, the construction of the knowledge graph for safe response to power grid events includes the following steps: collecting fault handling plans in management methods and dispatching systems as source data; selecting the large language model to be used, and dividing the source data into several text blocks based on the selected large language model; identifying and extracting element instances in each text block, summarizing and integrating them to form graph elements, and generating corresponding element summaries for the extracted graph elements; modeling the extracted graph elements to form a homogeneous undirected weighted graph, and dividing it into several node communities; using the generated element summary to generate a community summary corresponding to each node community, and adding each community summary to the context window of the large language model to complete the construction of the knowledge graph.

[0010] Preferably, the element instances in the text block include: entities, relationships and declared covariates; after identifying and extracting the element instances from the text block, the entities and relationships of the text block are converted into nodes and edges in the graph elements; and a large language model is used to generate corresponding element summaries for the extracted graph elements.

[0011] Preferably, using the generated element summary, a community summary corresponding to each node community is generated, including the following steps: generating a summary of the lowest subcommunity in the node community; generating summaries of higher-level communities in the node community layer by layer; until a summary is generated for each community.

[0012] Preferably, when generating the summary of the lowest subcommunity in the node community, the element summary is added to the context window of the large language model in descending order of the combined source node and target node degrees.

[0013] Preferably, when generating summaries of higher-level communities in a node community, if the number of element summaries exceeds the limit of the context window, the subcommunities are ranked in descending order of the element summary token length, and the shorter subcommunity summaries are iteratively replaced with their associated longer element summaries until they fit the context window size.

[0014] Preferably, the method of utilizing the constructed power grid event safety response knowledge graph to generate multiple response strategies for fault problems includes the following steps: when a power grid event fault occurs, inputting the fault problem into the large language model used by the constructed power grid event safety response knowledge graph; utilizing the constructed power grid event safety response knowledge graph to generate multiple response strategies for the input fault problem from multiple relevant angles through divided node communities.

[0015] Preferably, the process of generating multiple response strategies for fault problems by using the constructed safety response knowledge graph and obtaining the most appropriate active safety response strategy for power grid events according to the constructed safety constraint rules is expressed as the following formula:

[0016]

[0017] Among them, G represents the constructed knowledge graph, q represents the input fault problem, A represents all possible response strategies generated by the model for the fault problem, and a represents each possible response strategy generated by the model for the fault problem. ′ It indicates the most appropriate response strategy generated by the model for this fault problem.

[0018] In the second aspect, the present invention provides a system for enhancing the generation method of active safety response strategies for power grid events using the aforementioned method, the system comprising: an input module, a data acquisition module, a knowledge graph construction module and a screening module; the input module is used to input power grid event fault problems; the data acquisition module is used to collect fault handling plans in management methods and dispatching systems; the knowledge graph construction module is used to generate active safety response strategies for power grid events based on the input power grid event fault problems; the screening module is used to screen out the most appropriate response strategy from multiple response strategies based on the constructed safety constraint rules.

[0019] The beneficial effect of the present invention is that, compared with the prior art, the method and system for enhancing the active safety response strategy for power grid events proposed by the present invention solves the inefficiency and shortcomings brought about by the traditional reliance on manual experience adjustment. Based on the knowledge graph technology, a knowledge graph in the field of power grid event safety response strategy is constructed to achieve a significant reduction in the scope of power grid event generation. This can not only further improve the speed of generating safety response decisions, but also enable the relevant theoretical and empirical knowledge in the field of active safety response strategy for power grid events to be digitized, structured, and systematized. This systematic processing method helps to better understand and apply this knowledge, and provides strong support for active safety response to power grid events.

[0020] In addition, by constructing a knowledge graph for power grid event safety response based on graphRAG, node community division is performed in the process of constructing the knowledge graph, and a hierarchical community summary is generated for each node community. Then, the power grid event active safety response strategy generation module generates strategies from different angles, thereby improving the efficiency and reliability of generation. At the same time, the present invention also constructs security constraint rules, and uses the constructed security constraint rules to screen and optimize the generated response strategies, thereby obtaining the optimal response strategy. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 It is a flow chart of a method for enhancing generation of active safety response strategies for power grid events in the present invention;

[0022] Figure 2 It is a schematic diagram of the process of constructing a knowledge graph for safe response to power grid events based on graphRAG in the present invention;

[0023] Figure 3 It is a flow chart of generating active safety response strategies for power grid events using the constructed power grid event safety response knowledge graph in the present invention. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical scheme and advantages of the present invention clearer, the technical scheme of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. The embodiments described in this application are only part of the embodiments of the present invention, not all of them. Based on the spirit of the present invention, other embodiments obtained by ordinary technicians in this field without creative work are all within the scope of protection of the present invention.

[0025] like Figure 1 As shown, embodiment 1 of the present invention provides a method for enhancing the generation of active safety response strategies for power grid events. First, based on the power grid fault response strategy, safety constraint rules are generated, a fault scenario is given, and the power grid safety and equipment reliability indicators under the scenario are quantitatively modeled. On the basis of considering the power output range and system network topology under the fault scenario, the safety constraint rules generated by the power grid fault response strategy are constructed to ensure that the generated strategy meets both actual needs and is feasible. Then, a power grid event safety response knowledge graph based on graphRAG is constructed. Then, a community detection algorithm (such as the Leiden algorithm) is used to divide the graph into node communities that are closer to each other, and a summary is generated for each node community to help the model better understand the overall structure and semantics of the graph. Next, based on the constructed safety response knowledge graph, the main safety response strategy generation module for power grid events is generated, using the community summary generated by each node community, each community answers the input fault problem, and gives multiple feasible solutions. Finally, the most suitable partial community solution is selected, and the most suitable safety response strategy is summarized and constructed, thereby realizing the intelligent generation of active safety prevention and control strategy plans for power grid events.

[0026] Specifically, the method for enhancing the generation of active safety response strategies for power grid events includes the following steps:

[0027] Step 1: Construct safety constraint rules based on power grid fault response strategy.

[0028] This step is based on the power grid fault scenario, and quantitative modeling is performed for indicators such as power grid security and equipment reliability in this scenario. In the modeling process, key factors such as power output range and system network topology in the fault scenario are fully considered. By constructing the security constraint rules generated by the power grid event safety response strategy, it can be determined whether the power system can meet various operating constraints under the generated event safety response strategy, ensuring that the generated strategy is both in line with actual needs and feasible. The specific constraint rules are as follows:

[0029] (1) Line flow constraints

[0030]

[0031]

[0032] Where, t represents the time; P ij,t , Q ij,t They represent the active and reactive components of the branch power flow connecting nodes i and j at time t respectively; g ij 、b ij Respectively represent the branch conductance and susceptance connecting nodes i and j; v i,t represents the voltage amplitude of node i at time t; v j,t represents the voltage amplitude of node j at time t; θ ij,t represents the phase angle difference between nodes i and j at time t; L represents the power grid line; T represents the day-ahead dispatching period. By constructing line power flow constraints, the accuracy of the AC power flow linearization formula can be improved, and it can be used as a reference for the subsequent optimization of unit adjustment.

[0033] Furthermore, in extreme disaster scenarios, the main network line is at risk of failure. After a serious failure occurs, load transfer and restoration of the faulty path are often adopted. Therefore, the Big M method is used to improve the above constraints:

[0034]

[0035] Where M is a large constant, with a range of about 10 6 -10 9 , to ensure that when line ij fails, the voltage amplitude and phase angle of the nodes at both ends will not be forced to be equal; is a 0-1 variable. In extreme scenarios, the switching state of line ij does not change during the entire day-ahead scheduling cycle. "1" indicates normal operation, otherwise it indicates a fault.

[0036] (2) Node power constraints

[0037]

[0038]

[0039] Where P ii,t , Q ii,t They represent the active component and reactive component of the grounding branch of node i at time t respectively; L represents the power grid line; g ii 、b iiThey represent the conductance and susceptance of the grounding branch of node i respectively; B is the set of all electric energy storage systems; W, P, G represent the set of wind power, photovoltaic power, and thermal power respectively; N represents the node; P p,i,t represents the output of the motor group i at the node at time t; They represent the charging power and discharging power of the motor group at node i at time t respectively; P d,i,t , Q d,i,t They represent the active and reactive power demands of node i at time t respectively; is a 0-1 variable; represents the active item of node i at time t; It represents the reactive power of node i at time t. Since reactive power can be adjusted locally by switching capacitors and reactances, the reactive power adjustment upper limit Q is set here. d,max .

[0040] (3) Voltage Constraint

[0041] v min ≤v i,t ≤v max (11)

[0042] θ min ≤θ ij,t ≤θ max (12)

[0043] In the formula, v max 、v min Respectively represent the upper and lower limits of the node voltage amplitude; θ max ,θ min They represent the upper and lower limits of the node voltage phase angle difference respectively.

[0044] (4) Energy storage constraints

[0045]

[0046] 0≤E b,t ≤E b,max (18)

[0047] In the formula, They represent the charging power and discharging power of the energy storage at time t respectively; is a 0-1 variable, representing the charging and discharging status of the energy storage at time t; Respectively represent the maximum charging power and discharging power of the energy storage; E b,t Represents the capacity of the electrical energy storage at time t; η b represents the working efficiency of electric energy storage; Δt represents the time interval; E b,max Indicates the maximum capacity of electrical energy storage; E b,0 Indicates the initial capacity of electrical energy storage; E b,1 Indicates the capacity of the electrical energy storage at time 1; Eb,T Represents the capacity of electric energy storage during a day-ahead dispatch cycle.

[0048] (5) Line capacity constraints

[0049] (P ij,t ) 2 +(Q ij,t ) 2 ≤(S ij,max ) 2 (19)

[0050] In the formula, S ij,max Indicates the upper limit of line transmission capacity.

[0051] Step 2: Construct a knowledge graph for power grid event safety response based on graphRAG (hereinafter referred to as knowledge graph).

[0052] Specifically, in the process of decision-making on abnormal power grid dispatching and accident handling, it is usually necessary to consider relevant control requirements and management regulations such as power grid stability regulations, dispatching management details, and power grid safety accident procedures. These knowledge have the following characteristics: diverse sources, multiple data types, complex interactions, and it is impossible to quantify their impact on power grid abnormalities and fault handling decisions by building mathematical models. Knowledge graph is a technical method that uses a graph model to describe knowledge and model the relationship between all things in the world. It is essentially a computable model of the relationship between things. Its basic purpose is to establish direct relationships between knowledge to facilitate rapid search and decision-making. Compared with knowledge representation technologies such as frameworks, production rules, and semantic networks, knowledge graphs use more standardized and standard conceptual models, ontology terms, and grammatical formats to model and describe data in knowledge representation, and enhance the relationship between data through semantic links, so it is more suitable for application scenarios with multiple sources of knowledge, high search accuracy, and the need to use knowledge to assist decision-making analysis.

[0053] like Figure 2 As shown, step 2 includes the following steps:

[0054] Step 2.1. Determine the large language model (LLM) to be used.

[0055] This is the basis for subsequent steps. The large language model selected by the present invention is the Zhipu large model. The Zhipu large model is comparable to GPT-4 in Chinese processing capabilities. It has higher practicality and accuracy for Chinese users. It has faster reasoning speed, supports higher concurrency, and greatly reduces the cost of reasoning.

[0056] Step 2.2: Divide the source data into text chunks so that the large language model can process the text more effectively.

[0057] Step 2.2 includes the following steps:

[0058] Step 2.2.1, collect management methods and fault handling plans in the dispatching system as source data.

[0059] Specifically, part of the source data comes from relevant control requirements and management regulations such as power grid stability regulations, dispatching management rules, and power grid safety accident procedures, and the other part comes from the on-site dispatching management system.

[0060] Step 2.2.2: Divide the long text of the source data into text blocks of appropriate size.

[0061] This step is to ensure that each text block can be efficiently processed by the large language model during subsequent processing. Considering that the context window of the large language model is limited and can usually only accommodate 2048 tokens, splitting the text into smaller blocks can more effectively utilize the processing power of the large language model. However, although longer text blocks can reduce the number of calls to the large language model, thereby improving processing efficiency and reducing costs, they may cause a decrease in recall rate in the longer context window of the large language model. This means that the instances may not be fully extracted, resulting in omissions.

[0062] In order to solve this problem, the present invention needs to select a suitable length to divide the source document into blocks. After comprehensive consideration and empirical analysis, the text is finally divided into sequences of 1024 tokens. Such a length can not only ensure that the large language model will not exceed the limit of its context window during processing, but also reduce the problem of decreased recall rate caused by too long text to a certain extent.

[0063] Through this blocking strategy, while ensuring processing efficiency, the accuracy and completeness of instance extraction are improved as much as possible, laying the foundation for subsequent knowledge graph construction.

[0064] Step 2.3: Identify and extract element instances in each text block, and summarize and integrate them to form graph elements.

[0065] Specifically, after the source document is segmented, element instances are accurately identified and extracted from each text block, including entities, relationships, and related declaration covariates, and the entities and relationships of the text block are converted into nodes and edges in the graph elements. Among them, entities include: plant, power generation equipment, power generation line, fault name; relationships include fault type, corresponding response actions, and response sequence. When a fault occurs, the large language model will combine the entities, relationships, summaries, and input questions in the knowledge graph to generate corresponding countermeasures.

[0066] This process aims to extract structured information from unstructured text data, especially to deeply explore and clearly label entities and their relationships. Therefore, a large language model prompt is used to assist in completing this task.

[0067] In view of the large scale and intricate structure of power grid incident safety response data, the present invention adopts a strategy of optimized prompts and multi-round collection, specifically optimizing the prompt words input into the large language model, completing the optimized prompts by modifying and improving the prompt word sentences, and performing multiple rounds of element instance extraction on the text block through the large language model. This strategy is designed to encourage the large language model to deeply explore the implicit information in the text, even the tiny details that may have been overlooked in the previous extraction rounds. In this way, it is ensured that even when processing large blocks of text, high-quality extraction results can be maintained, effectively avoiding the problem of incomplete or inaccurate knowledge graph construction due to missing key information.

[0068] The large language model technology is used to extract instances from the segmented text. These instances include entities and relations in the text. The large language model also describes the entities and relations in detail. After identifying the entities and relations, the large language model is used to summarize and integrate them to form a more complete knowledge structure.

[0069] Step 2.4: Generate corresponding element summaries for the extracted graph elements.

[0070] After successfully extracting entities and relationships from the source text, the present invention further leverages the power of large language models to generate meaningful summary information. These summaries not only capture the information directly presented in the source text, but also reveal potential relationships and statements that are not directly mentioned in the source text, thereby greatly enriching the depth and breadth of the knowledge graph in the field of power grid incident safety response.

[0071] The embodiment of the present invention adopts a further strategy: using a large language model to deeply analyze and integrate the matching instance combinations, a detailed description text is generated for each graph element. This process not only ensures the comprehensiveness and accuracy of the summary information, but also makes the description of each graph element more specific, which is convenient for subsequent knowledge integration and analysis.

[0072] Step 2.5: Model the extracted graph elements into a homogeneous undirected weighted graph and divide it into several node communities.

[0073] Specifically, in the process of constructing the knowledge graph, the elements identified in the previous step are modeled as a homogeneous undirected weighted graph. In this graph, entity nodes are closely connected through relationship edges, and the weights of the edges reflect the normalized values ​​of the detected relationship instances, which makes the structure of the graph both intuitive and rich in information.

[0074] In order to deeply explore the intrinsic structure of the graph, this paper systematically introduces a community detection algorithm, which aims to divide the graph into multiple, hierarchical node regions that are more closely connected to each other, namely, node communities. Within these communities, the connections between nodes are much stronger than their connections with external nodes, thus revealing the potential group structure and association patterns in the data.

[0075] In a preferred but non-limiting embodiment of the present invention, among many community detection algorithms, the present invention selects the Leiden algorithm, which is known for its excellent performance and high efficiency, especially when processing large-scale graph data, it can accurately restore the hierarchical community structure of the graph. This hierarchical division method not only covers all nodes of the graph in a mutually exclusive and collectively exhaustive manner, but also realizes the "divide and conquer" of complex graph structures, greatly improving the quality and efficiency of global summaries.

[0076] Step 2.6: Use the generated element summary to generate a community summary corresponding to each node community, add each community summary to the context window of the large language model, and complete the construction of the security response knowledge graph.

[0077] After building the node communities, we further create detailed summaries for each community. These summaries are not only extremely meaningful in understanding the overall structure and semantics of the dataset, but also help us explore the corpus in depth and discover hidden topics without specific question orientation.

[0078] The present invention pays special attention to the practicality of these community summaries in answering global queries. In order to generate these summaries, an iterative method is adopted. First, the subcommunity at the bottom of the node community constructed by the Leiden algorithm, i.e., the summary of the leaf-level community, is generated. In this process, the element summaries of the leaf-level community (including nodes, edges and covariates) are given priority and added to the context window of the large language model one by one until the token length limit is reached. When adding element summaries, the descending order of the combined source node and target node degrees is followed to ensure that the most important information can be preferentially included in the summary. Among them, the degree of the source node refers to the number of edges connected to the source node, and the degree of the target node refers to the number of edges connected to the target node.

[0079] Next, the summaries of higher-level communities (i.e., higher-level communities) in the hierarchy constructed by the Leiden algorithm are generated layer by layer. If all element summaries fit within the token length limit of the context window, then the steps of the leaf-level community are continued and all element summaries within the community are summarized. If the number of element summaries exceeds the limit of the context window, the subcommunities need to be ranked in descending order of the element summary token length, and the associated longer element summaries are iteratively replaced with shorter subcommunity summaries until they fit the context window size.

[0080] Finally, a report-style summary is generated for each community. The generation of the summary is the core link in the construction of the knowledge graph. It not only helps to understand the local structure of the data set, but also grasps the global structure and semantics. In this way, the information contained in the knowledge graph of power grid event safety response can be understood more comprehensively and deeply.

[0081] Through this series of steps, the task of building a knowledge graph for safe response to power grid incidents through graphRAG was completed, and a meaningful summary was generated for each community.

[0082] Step 3: Generate a module for active safety response strategies for power grid events based on the constructed knowledge graph.

[0083] The present invention uses knowledge graph technology to construct a knowledge model in the field of power grid event safety response. Its fundamental purpose is to establish a direct relationship between various types of knowledge in the field of power grid event safety response and between knowledge and actual power grid operation, so as to facilitate the generation of knowledge response decisions and help dispatchers better respond to fault events. This process is expressed as follows:

[0084]

[0085] Among them, G represents the constructed security response knowledge graph, q represents the input fault problem, A represents all possible response strategies generated by the model for the fault problem, and a represents each possible response strategy generated by the model for the fault problem. ′ Indicates the most appropriate response strategy generated by the model for this fault problem.

[0086] The generation process of power grid event response strategy is as follows: Figure 3 As shown, the specific steps include:

[0087] Step 3.1: When a power grid fault occurs, the fault problem is input into the large language model used by the knowledge graph constructed in step 2.

[0088] Specifically, when a power grid failure occurs, the specific fault problem must first be input into the model, including key information such as the fault type, location, and impact range.

[0089] Step 3.2: Utilize the constructed knowledge graph and the divided node communities to generate countermeasures for the input fault problem from multiple relevant angles and provide multiple possible solutions.

[0090] Specifically, the security response knowledge graph contains a wealth of power grid failure cases, solutions, and related expert experience, which can quickly find cases or solutions similar to the current failure problem.

[0091] Step 3.3: Based on the generated security constraint rules, multiple possible solutions are screened to obtain the most appropriate response strategy.

[0092] After finding multiple possible solutions, they need to be screened according to actual constraints and rules. By screening the constraint rules, you can ensure that the final response strategy is feasible.

[0093] Step 3.4: Integrate and summarize the most appropriate strategies and feed them back to the operator.

[0094] After selecting appropriate response strategies, these strategies need to be integrated and summarized, which includes determining the implementation order of each strategy, coordinating conflicts between different strategies, and optimizing the overall response plan. Finally, the integrated response strategy is fed back to the operator to guide its implementation.

[0095] Embodiment 2 of the present invention provides a system for enhancing the generation method of active safety response strategies for power grid events using the embodiment 1, the system comprising: an input module, a data acquisition module, a knowledge graph construction module and a screening module;

[0096] The input module is used to input power grid event fault problems;

[0097] The data acquisition module is used to collect management methods and fault handling plans in the dispatching system;

[0098] The knowledge graph construction module is used to generate active safety response strategies for power grid events based on the input power grid event fault problems;

[0099] The screening module is used to screen out the most appropriate response strategy from multiple response strategies according to the constructed security constraint rules.

[0100] The beneficial effect of the present invention is that, compared with the prior art, the method and system for enhancing the active safety response strategy for power grid events proposed by the present invention solves the inefficiency and shortcomings brought about by the traditional reliance on manual experience adjustment. Based on the knowledge graph technology, a knowledge graph in the field of power grid event safety response strategy is constructed to achieve a significant reduction in the scope of power grid event generation. This can not only further improve the speed of generating safety response decisions, but also enable the relevant theoretical and empirical knowledge in the field of active safety response strategy for power grid events to be digitized, structured, and systematized. This systematic processing method helps to better understand and apply this knowledge, and provides strong support for active safety response to power grid events.

[0101] In addition, by constructing a knowledge graph for power grid event safety response based on graphRAG, node community division is performed in the process of constructing the knowledge graph, and a hierarchical community summary is generated for each node community. Then, the power grid event active safety response strategy generation module generates strategies from different angles, thereby improving the efficiency and reliability of generation. At the same time, the present invention also constructs security constraint rules, and uses the constructed security constraint rules to screen and optimize the generated response strategies, thereby obtaining the optimal response strategy.

[0102] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A method for enhancing the generation of active safety response strategies for power grid events, characterized in that: The following steps are involved: Construct safety constraint rules based on power grid fault response strategies; Construct a knowledge graph for safe response to power grid incidents; Use the constructed knowledge graph for safe response to power grid events to generate multiple response strategies for fault problems; According to the constructed safety constraint rules, the most appropriate response strategy is selected from multiple response strategies.

2. The method for enhancing generation of active safety response strategies for power grid events according to claim 1 is characterized in that: The safety constraint rules are constructed based on the power grid fault response strategy, including constructing line flow constraints, node power constraints, voltage constraints, energy storage constraints, and line capacity constraints.

3. The method for enhancing generation of active safety response strategies for power grid events according to claim 1 is characterized in that: The construction of the knowledge graph for safe response to power grid events includes the following steps: Collect management methods and fault handling plans in the dispatch system as source data; Select a large language model to be used, and divide the source data into a plurality of text blocks based on the selected large language model; Identify and extract element instances in each text block, summarize and integrate them to form graph elements, and generate corresponding element summaries for the extracted graph elements; The extracted graph elements are modeled into a homogeneous undirected weighted graph and divided into several node communities; Use the generated element summary to generate the community summary corresponding to each node community, add each community summary to the context window of the large language model, and complete the construction of the knowledge graph.

4. The method for enhancing generation of active safety response strategies for power grid events according to claim 3 is characterized in that: Examples of elements in the text block include: entities, relations, and declared covariates; After identifying and extracting element instances from the text block, the entities and relationships of the text block are converted into nodes and edges in the graph elements; A large language model is used to generate corresponding element summaries for the extracted graph elements.

5. The method for enhancing generation of active safety response strategies for power grid events according to claim 3 is characterized in that: The method of using the generated element summary to generate a community summary corresponding to each node community includes the following steps: Generate a summary of the lowest subcommunity in a node community; Generate a summary of higher-level communities in the node community layer by layer; Continue until a summary is generated for each community.

6. The method for enhancing generation of active safety response strategies for power grid events according to claim 5, characterized in that: When generating the summary of the lowest subcommunity in the node community, the element summaries are added to the context window of the large language model in descending order of the combined source node and target node degrees.

7. The method for enhancing generation of active safety response strategies for power grid events according to claim 5, characterized in that: When generating summaries of higher-level communities in a node community, if the number of element summaries exceeds the limit of the context window, the subcommunities are ranked in descending order of the element summary token length, and their associated longer element summaries are iteratively replaced with shorter subcommunity summaries until they fit the context window size.

8. The method for enhancing generation of active safety response strategies for power grid events according to any one of claims 1 to 3, characterized in that: The method of using the constructed power grid event safety response knowledge graph to generate multiple response strategies for fault problems includes the following steps: When a power grid event failure occurs, the fault problem is input into the large language model used by the constructed power grid event safety response knowledge graph; By utilizing the constructed knowledge graph for safe response to power grid events and dividing the node communities, multiple response strategies are generated for the input fault problems from multiple relevant angles.

9. The method for enhancing generation of active safety response strategies for power grid events according to any one of claims 1 to 3, characterized in that: The process of generating multiple response strategies for fault problems by using the constructed safety response knowledge graph and obtaining the most appropriate active safety response strategy for power grid events according to the constructed safety constraint rules is expressed as the following formula: Among them, G represents the constructed security response knowledge graph, q represents the input fault problem, A represents all possible response strategies generated by the model for the fault problem, and a represents each possible response strategy generated by the model for the fault problem. ′ Indicates the most appropriate response strategy generated by the model for this fault problem.

10. A system using the method for enhancing generation of active safety response strategies for power grid events as described in any one of claims 1 to 9, characterized in that: The system includes: an input module, a data collection module, a knowledge graph construction module and a screening module; The input module is used to input power grid event fault problems; The data acquisition module is used to collect management methods and fault handling plans in the dispatching system; The knowledge graph construction module is used to generate active safety response strategies for power grid events based on the input power grid event fault problems; The screening module is used to screen out the most appropriate response strategy from multiple response strategies according to the constructed security constraint rules.