Knowledge representation method and driving system based on power grid artificial intelligence simulation analysis

By using the SPO knowledge representation model and knowledge-driven system, the problems of difficult knowledge representation and high degree of human involvement in power grid digital simulation analysis are solved, realizing intelligent and automated adjustment of power grid analysis and improving the efficiency and accuracy of power grid analysis.

CN115659608BActive Publication Date: 2026-06-26HARBIN INST OF TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HARBIN INST OF TECH
Filing Date
2022-10-08
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing digital simulation analysis methods for power grids suffer from difficulties in knowledge representation, making it hard to unify qualitative and quantitative knowledge in modeling. Furthermore, they involve a high degree of human intervention and cannot achieve automated adjustments without human intervention.

Method used

We adopt a knowledge representation method based on power grid artificial intelligence simulation analysis. Through the SPO knowledge representation model and knowledge-driven system, we formally define the power grid state and operation. Combining qualitative and quantitative, correlation and reasoning knowledge, we construct a knowledge graph and design feature recognition, state query, action query and execution modules to achieve automated adjustment.

Benefits of technology

It realizes intelligent and automated adjustment of power grid digital simulation analysis, reduces human intervention, and improves the efficiency and accuracy of power grid analysis. The success rate of verification on the CEPRI-36 node system reached 83.78%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115659608B_ABST
    Figure CN115659608B_ABST
Patent Text Reader

Abstract

The application relates to the field of power simulation analysis, and relates to a knowledge representation method and a driving system based on power grid artificial intelligence simulation analysis.The application is used for solving the problems of difficult construction of a knowledge driving model and high artificial participation caused by difficult knowledge representation in the current power grid analysis method.The application comprises the following steps: defining a current state of a power grid and an operation needed for modifying the power grid; performing knowledge representation on power grid digital simulation analysis knowledge; the knowledge driving system based on the power grid artificial intelligence simulation analysis comprises the following modules: a feature recognition module: reading a power grid data file, judging whether the power grid data file meets a feature node expression in a knowledge graph; a state query and matching module: receiving a feature set to judge a current power grid state; an action query module: matching the power grid state and an action, and matching the action to form a state action set; and an action execution module: modifying parameters in the power grid data file.The application is used for knowledge representation and data modification of the power grid.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power simulation analysis, and in particular to a knowledge representation method and driving system based on power grid artificial intelligence simulation analysis. Background Technology

[0002] Power system simulation analysis, as an important tool for power grid planning, design, and dispatching, encompasses steady-state analysis, dynamic analysis, and transient analysis. Unlike general simulation analysis, digital simulation analysis of power systems focuses on applications such as power flow, optimal power flow, and voltage stability calculations. Essentially, it involves solving mathematical problems based on given operating conditions using simulation calculations. However, due to the massive scale and complexity of simulation results, current methods primarily rely on manual analysis and adjustment of various simulation tasks, a time-consuming and labor-intensive process. Operators observe the results obtained from power grid data simulation calculations, formulate corresponding adjustment strategies based on experience, and repeat simulation calculations until the results meet the requirements.

[0003] The development of knowledge graphs has provided new opportunities for knowledge modeling methods in power grid digital simulation analysis. Resource Description Framework (RDF), based on the Semantic Web, is a unified standard provided by the W2C on top of XML. It is an ontology language for knowledge representation, primarily describing entities / resources. Essentially, it is a data model composed of nodes and labeled edges between them. Based on graph representation, RDF can conveniently describe the relationships between entities. The relationships described by RDF are essentially binary relations between entities, but since complex relationships can be described by decomposing them into multiple groups of binary relations, the RDF data model is also a fundamental model. Generally, binary relations in RDF are represented as follows: Figure 2The SPO triple form shown is typically referred to as a statement, or a knowledge entry in a knowledge graph, where a (h,r,t) triple satisfying this form is called a statement. Here, h and t represent the head and tail entities, respectively, and r represents the relationship between the head and tail entities. A knowledge graph is a structured dataset with an ontology as its schema layer. It is compatible with the RDF model and is essentially a semantic network composed of nodes and edges. Nodes represent concepts or entities, and edges represent relationships between nodes. Generally, a knowledge graph can be divided into a schema layer and a data layer: the schema layer is higher than the data layer and is used to represent refined knowledge. It is generally used through an ontology library to express, organize, and manage knowledge. Furthermore, the ontology is the conceptual template of the structured knowledge base, and its logic and specifications are used to constrain the relationships between its corresponding entities. The data layer mainly consists of a series of facts, which are described by triples, such as <entity 1, relation, entity 2>. Knowledge is stored in the graph database in units of facts. Based on this, knowledge graphs can effectively model the relationships between entities through graph structures, where entities are represented as points in the graph, and the relationships between entities are represented as edges in the graph.

[0004] Currently, using knowledge graphs for knowledge modeling in power grid digital simulation analysis faces several challenges: First, the knowledge required for power grid digital simulation analysis needs to combine qualitative and quantitative knowledge. Mainstream knowledge graph research focuses on qualitative relationships between entities, while power grid digital simulation analysis often requires quantitative knowledge to modify and check specific power grid parameters, such as "checking whether the voltage value of the PV node is between 0.9 and 1.1." This simultaneous involvement of qualitative and quantitative knowledge makes unified knowledge modeling difficult. Second, power grid simulation calculations have unique characteristics. Not only is power grid data temporal, but different operations also have a sequential order and a certain logical structure. However, current knowledge graphs lack temporal relationships and logical structure, hindering knowledge modeling in power grid digital simulation analysis. Furthermore, the power grid digital simulation analysis process involves numerous parameters and operations, requiring the selection of appropriate knowledge from a vast amount of data to drive adjustments. Moreover, each adjustment stage requires knowledge-based decision-making, making complete human intervention impossible. Therefore, current power grid digital simulation analysis suffers from difficulties in knowledge representation and a high degree of human involvement. Summary of the Invention

[0005] The purpose of this invention is to address the problems of current power grid analysis methods, such as difficulties in knowledge representation leading to difficulties in constructing knowledge-driven models, and high levels of human involvement. Therefore, this invention proposes a knowledge representation method and driving system based on power grid artificial intelligence simulation analysis.

[0006] Knowledge representation methods based on power grid artificial intelligence simulation analysis specifically include:

[0007] Step 1: Define the current state of the power grid and the operations that need to be modified during the power grid simulation analysis process;

[0008] Step 11: Define the current state of the power grid during the power grid simulation analysis process, as follows:

[0009] S(P(L1,L2,…Ln),R(LP1,LP2,…) (1)

[0010] Where P() and R() refer to the input and output parts of the simulation calculation, respectively, L is the parameter matrix representing the electrical parameters of the power grid, 1,..,n are the parameter matrix labels of the electrical parameters of the power grid, n is any integer, and LP is the result matrix obtained through simulation calculation;

[0011] Steps 1 and 2: Define the operations that require modification of the power grid during the power grid simulation analysis:

[0012] a(Lo(n,r,c),V) (2)

[0013] Where Lo(n,r,c) refers to the specific position of the parameter that needs to be modified in the parameter matrix L, n refers to the label of the parameter matrix in the current state S of the power grid, r and c refer to the r-th row and c-th column of the parameter matrix that need to be modified in the adjustment operation, respectively, and V is the value of the parameter after modification, i.e. the target value.

[0014] Step 2: Use the definitions obtained in Step 1 to represent the knowledge of power grid digital simulation analysis.

[0015] Furthermore, the LP in step one includes: convergence flag, bus, AC line voltage, and power;

[0016] Furthermore, the knowledge representation of the power grid digital simulation analysis knowledge obtained in step one in step two includes the following steps:

[0017] Step Two: Represent the adjustment process using knowledge representation.

[0018] <State>→<Action>→<Action> (4)

[0019] <Action> → <Subsequent State> → <State> (5)

[0020] Step 22: Define the object and target value as the basic attributes of the action to represent the knowledge of the adjustment operation that modifies the power grid parameters.

[0021] <Action> → <Object> → <Object> (6)

[0022] <Action> → <Target> → <Target Value> (7)

[0023] Steps two and three: Represent the program call operation using knowledge representation.

[0024] <Action> → <Command> → <Command> (8)

[0025] Step 24: Represent the operation of calling dynamic link libraries using knowledge representation:

[0026] <Action>→<Function Call>→<Function> (9).

[0027] The knowledge-driven system based on power grid artificial intelligence simulation analysis includes: a feature recognition module, a status query and matching module, an action query module, and an action execution module;

[0028] The feature recognition module is used to read power grid data files and determine whether the power grid data files satisfy the text expression of feature nodes in the knowledge graph. If they satisfy the text expression of feature nodes, the power grid data files have the required features and the module returns True. If the read power grid data files do not have the required features, the module returns False. All power grid data files that return True are combined into a feature dataset.

[0029] The text expressions of feature nodes in the knowledge graph are in a fixed form consisting of variables, constants, and operators.

[0030] The knowledge graph is constructed based on knowledge representation methods;

[0031] The status query and matching module is used to receive the feature set generated by the feature recognition module, and then determine the current power grid status by querying and matching the correspondence between features and status. It assigns different weights to all power grid statuses, sorts all power grid statuses from largest to smallest according to their weights, and inputs the status with the largest weight into the action query module.

[0032] The action query module is used to search for actions in the knowledge graph that match the power grid state input by the state query and matching module, and to form a state action set by all the matched actions. Then, it searches for the constraint conditions that match each action in the state action set in the knowledge graph, modifies the state action set to form an optional action set A. If A is empty, the termination state is reached. If A is not empty, A is input into the action execution module.

[0033] The action execution module is used to modify parameters in the power grid data file or call programs and dynamic link libraries according to the operations in the optional action set A.

[0034] Furthermore, the knowledge graph is constructed in the following manner:

[0035] S1. Represent the think tank knowledge using knowledge representation methods, and then use name-value as the corresponding part of the connection-content in the triple obtained after knowledge representation;

[0036] S2. Preprocess the think tank knowledge processed by S1 to obtain preprocessed knowledge;

[0037] Preprocessing operations include: removing garbled information and removing problematic information;

[0038] S3. A semantic-based power knowledge extraction algorithm extracts entities and relationships from the preprocessed knowledge to obtain a knowledge graph.

[0039] Furthermore, the feature recognition module is used to read power grid data files and determine whether the power grid data files satisfy the textual expression of feature nodes in the knowledge graph. If they satisfy the textual expression of feature nodes, the power grid data file has the required features and returns True; if the read power grid data does not have the required features, it returns False. All power grid data files that return True are combined into a feature dataset, specifically:

[0040] First, determine whether the variable in the text expression of the feature node is a power grid parameter. If it is a power grid parameter, query the knowledge graph to find the specific location of the power grid parameter in the power grid data file, and then obtain the specific value of the parameter according to the row and column. Then, determine whether the value of the power grid parameter satisfies the text expression of the feature node. If it does, return True; otherwise, return False.

[0041] If it is not a power grid parameter, the variable value returned by the call is first stored in memory. Then, the specific value of the variable is read from memory. Then, the text expression of the feature node is used to determine whether the specific value of the variable satisfies the text expression of the feature node. If it does, True is returned; otherwise, False is returned.

[0042] Furthermore, the state query and matching module receives the feature set generated by the feature recognition module, then determines the current power grid state by querying and matching the correspondence between features and states, assigns different weights to all power grid states, sorts all power grid states in descending order of weight, and inputs the state with the highest weight into the action query module. Specifically:

[0043] First, a non-fuzzy matching method is used in the knowledge graph to match the features in the feature set with the power grid state to obtain the power grid state that matches the features in the feature set.

[0044] The power grid status includes: the current power grid status and the subsequent power grid status;

[0045] Then, a weighted method is used to manually assign different weights to the matched power grid state;

[0046] Finally, the matched power grid states are sorted from largest to smallest according to their weights, and the power grid state with the largest weight is input into the action query module.

[0047] Furthermore, the action query module is used to search for actions in the knowledge graph that match the power grid state input by the state query and matching module, and to form a state action set by all matched actions. Then, it searches for constraints in the knowledge graph that match each action in the state action set, and modifies the state action set to form an optional action set A, including the following steps:

[0048] First, search the knowledge graph for actions that match the power grid status input by the status query and matching module;

[0049] Then, the matched actions are assigned different weights, and the matched actions are sorted from largest to smallest according to their weights. The sorted action set is the state action set.

[0050] Finally, the constraints that match the state-action set are queried in the knowledge graph, and the state-action set is modified according to the constraints. The modified state-action set is the optional action set A.

[0051] Furthermore, the action execution module is used to modify parameters in the power grid data file or call programs and dynamic link libraries according to the operations in the optional action set A, specifically as follows:

[0052] First, obtain the relationships between actions in the optional action set: <action> → <has action> → <action>;

[0053] Then, based on the relationships between the actions in the optional action set, the operation of modifying the power grid data file, calling the program's command, or calling the function of the dynamic link library is completed.

[0054] The specific steps for modifying the power grid data file based on the relationships between actions in the optional action set are as follows: query the operation object corresponding to the action in the optional action set A in the knowledge graph, then determine the position of the parameter to be modified in the power grid data file, then query the target value of the action in the knowledge graph, then modify the parameter of the power grid data file according to the target value, and finally execute all actions in A in order of weight to complete the modification operation of the data file.

[0055] Furthermore, the step of performing function call operations on the dynamic link library based on the relationships between actions in the optional action set specifically involves:

[0056] The function call expression is parsed to obtain the library to be called, the function name, and the parameters. Then, the function is called through the interface between programming languages ​​to complete the function call operation for the dynamic link library.

[0057] The beneficial effects of this invention are as follows:

[0058] This invention first addresses the unique challenges of the power grid digital simulation analysis and adjustment process by formally defining the adjustment process and simulating manual analysis and adjustment through state transitions and actions. To address the diversity of human experience knowledge, a SPO knowledge representation model is designed to model the adjustment process, operations, and program calls, unifying knowledge representation while combining qualitative and quantitative, associative and logical knowledge. This solves the problem of difficulty in knowledge representation leading to difficulties in constructing knowledge-driven models. The modular knowledge-driven framework of this invention enables intelligent power grid digital simulation analysis, allowing the entire analysis and adjustment process to be automated without human intervention. This invention extracts knowledge from a knowledge base using a knowledge extraction algorithm and performs knowledge cleaning, utilizing the Neo4j graph database to visualize the constructed power grid digital simulation analysis knowledge graph. The effectiveness and feasibility of the knowledge-driven model are verified on an improved CEPRI-36 node system. Attached Figure Description

[0059] Figure 1 Example diagram for modeling the core triples of SPO knowledge representation;

[0060] Figure 2 Diagram of the SPO ternary assembly.

[0061] Figure 3 A comparison chart of artificial digital simulation analysis and knowledge-driven methods for power grids.

[0062] Figure 4 Adjust the framework diagram for knowledge-driven digital simulation analysis of power grids.

[0063] Figure 5 A flowchart of a knowledge extraction algorithm for think tanks.

[0064] Figure 6 Example diagram of knowledge cleaning for incorrect knowledge.

[0065] Figure 7 Knowledge graph for power grid simulation analysis (partial).

[0066] Figure 8 This is a diagram of a knowledge base system.

[0067] Figure 9 A schematic diagram of automatic convergence adjustment for power flow calculation.

[0068] Figure 10 To show how the results change with data volatility;

[0069] Figure 11 A schematic diagram illustrating part of the process of manually adjusting tidal currents;

[0070] Figure 12 Adjust the empirical knowledge graph for non-convergence calculation of power flow. Detailed Implementation

[0071] Due to the diversity and specificity of empirical knowledge in power grid digital simulation analysis, it is necessary to design a unified knowledge representation format that can express the simulation analysis process, power grid status, and specific operational behaviors, while also considering compatibility with simulation calculation programs. Through formal knowledge representation, qualitative and quantitative knowledge, as well as temporal and logical knowledge from human experience are combined, enabling the knowledge to be directly used for power grid digital simulation analysis and adjustment.

[0072] Power flow convergence adjustment is an important aspect of power grid digital simulation analysis. Taking a specific adjustment process of power flow convergence adjustment as an example, such as... Figure 11 The operators used a power flow calculation program to determine whether the power flow calculated based on the current grid parameters had converged. If the power flow did not converge, they checked the parameter data, such as whether the generator turns ratio met the requirements. During the data check, they found that a certain balancing machine had exceeded its limit, indicating that there was an active power imbalance in the current area. Based on experience, they then balanced the active power in the area and increased the output of the relevant generators.

[0073] The above-mentioned artificial simulation analysis process can be viewed as a series of state transitions, mainly consisting of three elements: current grid parameters, expert operations, and simulation calculation program. The current grid parameters satisfying certain data characteristics are defined as the grid being in a certain state; expert operations are defined as actions that modify certain specific electrical parameters; and the simulation calculation program is considered as a function f: S→S'. Therefore, a formal definition of the power grid digital simulation analysis problem is given:

[0074] Definition 1: Given an initial power grid state S0 and a set of optional actions A that satisfy the constraints, after the operator selects action a from A based on experience and executes it, the power grid state changes to S0. t Based on this state, the calculation result S is obtained through f. r Repeat this process until S. r It belongs to the target state set, that is, it has reached the convergence state. The following will explain it in conjunction with specific implementation methods.

[0075] Specific Implementation Method 1: This implementation method is based on the knowledge representation method of power grid artificial intelligence simulation analysis, such as... Figure 1 As shown, it includes the following steps:

[0076] Step 1: Define the current state of the power grid and the operations for modifying power grid parameters during the power grid simulation analysis process:

[0077] Step 11: Define the current state of the power grid:

[0078] In the process of power grid digital simulation analysis, many situations require modification of the same parameters for adjustment, which means that these situations share certain commonalities, i.e., they have similar data characteristics. Therefore, these situations with similar data characteristics are defined as states. Based on the characteristics of the simulation calculation program, the current state of the power grid is defined as:

[0079] S(P(L1,L2,…Ln),R(LP1,LP2,…) (1)

[0080] Where P and R refer to the input and output parts of the simulation program PSASP, respectively; L is the parameter matrix representing the electrical parameters of the power grid; 1, ..., n are the parameter matrix labels of the electrical parameters of the power grid, where n is any integer; and LP is the result matrix calculated by the simulation program.

[0081] L1, L2, ..., Ln represent the topology, parameters, and other data information of components such as buses and AC lines. Similarly, LP represents the result matrix obtained after L is calculated by the simulation program. Each LP includes convergence flags, voltage, power, and other data information of buses and AC lines.

[0082] Steps 1 and 2: Define the operations for modifying power grid parameters:

[0083] Expert experience and knowledge are primarily reflected in modifying the current grid parameters so that the simulation program can obtain a convergent solution based on the new grid parameters. Therefore, this parameter modification operation is defined as an action. It should be noted that the adjustment may involve more than one operation, or multiple adjustment operations may be performed simultaneously. Therefore, based on state representation, an action in the adjustment process is defined as:

[0084] a(Lo(n,r,c),V) (2)

[0085] Where a() is the action, Lo(n,r,c) refers to the specific position of the parameter to be modified in the parameter matrix L, n refers to the label of a parameter matrix in the state S (such as L1), r and c refer to the r-th row and c-th column of the parameter matrix respectively, and V represents the value of the parameter at the specified position after modification, i.e., the target value.

[0086] Furthermore, in practical engineering applications, the range of parameter values ​​that need to be modified is not unlimited; therefore, there are constraints that restrict the modification of these parameters. Thus, it is necessary to add a knowledge representation of the constraints to construct a set of optional actions A(a1,a2,...,a...) that satisfy the constraints. n For example, when increasing the active power of a region, if the parameters of a certain generator cannot be modified, then its corresponding action a(L(L5,2,*),*) cannot be in A.

[0087] Step 2: Using the definitions from Step 1 regarding the current state of the power grid and the operations for modifying power grid parameters, represent the knowledge from the digital simulation analysis of the power grid:

[0088] Step Two: Represent the adjustment process using knowledge representation.

[0089] Since the adjustment process of power grid digital simulation analysis can be viewed as a series of processes from a certain power grid state to a new power grid state through a series of related parameter modification operations, definition (3) is used to formally represent the manual process of power grid simulation analysis adjustment. Here, "state" refers to a type of data abstraction representing the current state of the power grid, which has similar characteristics. Similarly, "action" refers to a type of abstraction representing parameter modification operations, which corresponds to the operation of operators modifying relevant parameters to change the state of the power grid during the manual adjustment process. Therefore, through the "state-action-state" triple, a set of data reflecting the state of the power grid can be transformed into another set of data reflecting the state of the power grid through specific data modification actions.

[0090] <State>→<Action>→<State> (3)

[0091] However, in practical applications, the predicate of a simple "state-action-state" triple can only express limited operational information. Therefore, while adhering to the SPO structure of the knowledge graph, this triple is equivalent to two basic triples:

[0092] <State>→<Action>→<Action> (4)

[0093] <Action> → <Subsequent State> → <State> (5)

[0094] Step 22: Define the object and target value as the basic attributes of the action to represent the knowledge of the adjustment operation that modifies the power grid parameters.

[0095] <Action> → <Object> → <Object> (6)

[0096] <Action> → <Target> → <Target Value> (7)

[0097] In this system, the "Action" node refers to the name or label of a specific operation; the "Object" node refers to the grid parameters that need to be modified during the analysis and adjustment process, such as "convergence flag" and "generator active power." The "Target Value" node refers to the modified value of the corresponding grid parameters after the action is executed. The target value can be a fixed constant or a fixed-form expression.

[0098] Steps two and three: Represent the program call operation using knowledge representation.

[0099] To distinguish between a simple parameter modification operation and a program call operation, a "is" attribute is defined as a relation for differentiation. Additionally, the relation "has command" connects the action and the command used to call the specific executable program; the basic triple is represented as follows:

[0100] <Action> → <Command> → <Command> (8)

[0101] Step Two Four: In addition to adjusting the data stored in files, operators also manipulate the data stored in memory. This requires calling dynamic link libraries, hence the design of corresponding basic triples:

[0102] <Action> → <Function Call> → <Function> (9)

[0103] In this step, during the manual adjustment process of power grid digital simulation analysis, on the one hand, many operations do not actually require manual adjustment by operators, such as power grid parameter checks. Power grid parameter checks essentially verify the rationality of electrical parameters in the power grid, ensuring that certain important parameters do not exceed limits. These operations are usually handled by fixed computer programs, eliminating the need for manual modification after the verification. On the other hand, some operations cannot be performed manually, such as power flow calculations. During the manual convergence adjustment process of power flow calculations, operators must recalculate the power flow after each parameter modification to determine whether the new power flow state has converged, ensuring the effectiveness of the parameter modifications. This calculation process generally involves calling relevant simulation calculation programs. Therefore, in addition to knowledge modeling of manual adjustment operations, the compatibility of program call content and knowledge graphs is also considered.

[0104] This implementation takes into account the compatibility of simulation calculation programs. Through formal knowledge representation, it combines qualitative and quantitative knowledge of human experience, as well as temporal and logical knowledge, so that the knowledge can be directly used for power grid digital simulation analysis and adjustment.

[0105] Specific Implementation Method Two: This implementation method, based on the knowledge-driven system of power grid artificial intelligence simulation analysis, is implemented using the knowledge representation method of power grid artificial intelligence simulation analysis. Figure 4As shown, it includes: a feature recognition module, a status query and matching module, an action query module, and an action execution module;

[0106] The feature recognition module is used to read power grid data files and determine whether the power grid data files satisfy the text expression of feature nodes in the knowledge graph. If they satisfy the text expression of feature nodes, the power grid data files have the required features and the module returns True. If the read power grid data files do not have the required features, the module returns False. All power grid data files that return True are combined into a feature dataset.

[0107] The feature nodes in the knowledge graph are fixed-form expressions composed of variables, constants, and operators. Their return value is True or False, indicating whether the power grid data has a certain feature. For example, in the feature expression "convergence flag > 0", the "convergence flag" is queried through the knowledge graph to find the specific position of the parameter in the parameter matrix, and then the specific value of the parameter is obtained according to the row and column.

[0108] The status query and matching module is used to receive the feature set generated by the feature recognition module, and then determine the current power grid status by querying and matching the correspondence between features and status. It assigns different weights to all power grid statuses, sorts all power grid statuses from largest to smallest according to their weights, and inputs the status with the largest weight into the action query module.

[0109] The action query module is used to search for actions in the knowledge graph that match the power grid state input by the state query and matching module, and to form a state action set by all the matched actions. Then, it searches for the constraint conditions that match each action in the state action set in the knowledge graph, modifies the state action set to form an optional action set A. If A is empty, the termination state is reached. If A is not empty, A is input into the action execution module.

[0110] The action execution module is used to modify parameters in the power grid data file or call programs and dynamic link libraries according to the operations in the optional action set A.

[0111] This implementation method involves knowledge and experience regarding power flow convergence: Power flow calculation non-convergence is mainly caused by data errors, power imbalance, etc., and power imbalance is further divided into active and reactive power imbalance. Generally, power flow calculation non-convergence caused by data errors is due to abnormal parameters such as power factor, voltage, and tap changer ratio, which are outside the normal range. Power flow calculation non-convergence caused by active power imbalance is because the maximum transmission power of inter-regional tie lines is limited. Active power balance in a region needs to be handled by a balancing machine; if the balancing machine's capacity is exceeded, an active power imbalance problem will occur, leading to power flow calculation non-convergence. Power flow calculation non-convergence caused by reactive power imbalance is due to reactive power deficits in substations, converter stations, etc., within the region.

[0112] In actual large power grid power flow calculations that fail to converge and require manual adjustment, operators typically first check the data to eliminate the influence of erroneous data, then perform active power balance adjustments, followed by reactive power balance adjustments. Every few adjustment steps, a power flow calculation is performed to assess the convergence or divergence of the results. A typical adjustment method involves... Figure 12 The information is provided in the text.

[0113] The main goal of active power balancing is to ensure that the power of inter-regional communication channels does not exceed limits while maintaining active power balance between generators and loads. Specific adjustment methods include: 1) reducing transmission power by increasing or decreasing the number of generators operating at the transmitting and receiving ends when inter-regional exchange power exceeds limits; 2) increasing generator output when the active power output of the balancing machine exceeds its own capacity; and 3) switching generators on and off to balance their active power output when generator active power output exceeds limits. Reactive power balancing is generally more difficult to adjust because the location of reactive power imbalance is hard to pinpoint precisely. Therefore, it is only possible to estimate the reactive power deficit or check the reactive power compensation at some key locations, and then balance it by switching capacitors and reactors. Another method is to add PV nodes to allow power flow calculations to converge and identify reactive power deficits, then switch capacitors and reactors, and finally set the PV nodes back to PQ nodes to achieve reactive power balance.

[0114] Specific implementation method three: The knowledge graph is constructed in the following way:

[0115] S1. Represent the knowledge in the think tank using the method described in Specific Implementation Method 1, and then use name-value as the corresponding part of the connection-content in the triple:

[0116] The single statement in value is treated as one of the entities rather than an extracted object;

[0117] S2. Preprocess the unified knowledge to obtain preprocessed knowledge:

[0118] The preprocessing includes: data cleaning and removal of problematic knowledge;

[0119] The data cleaning process involves removing garbled characters.

[0120] The removal of problematic knowledge employs the TransE method to determine the correctness of knowledge and removes problematic knowledge.

[0121] TransE treats entities and relations as two separate matrices. After training the model with knowledge, it takes a vector from each matrix and performs L1 or L2 operations. If the resulting vector is approximately equal to the other vector in the entity matrix, the knowledge is considered more likely to be correct. If the result differs significantly from the vector in the entity matrix, it is considered erroneous. This method removes erroneous knowledge from the knowledge graph, ensuring its effectiveness. An example of error cleaning is shown below. Figure 6 As shown.

[0122] S3. Use a semantic-based power knowledge extraction algorithm to extract entities and relations from the preprocessed knowledge to obtain triple knowledge in the form of a knowledge graph. The pseudocode of the algorithm is shown in Table 1.

[0123] Table 1 Semantic-based power knowledge extraction algorithm

[0124]

[0125] In this embodiment, the think tank knowledge base is the Electric Power Research Institute's (EPI) encyclopedia of power system knowledge, covering various types of knowledge within the power system. However, the knowledge is stored as structured data, and the data volume is enormous, making it difficult to manually decompose it into triples that satisfy the knowledge representation format. Therefore, to obtain more usable knowledge, a semantic-based power knowledge extraction algorithm was designed to extract entities and relationships from the EPI think tank. The process of the think tank knowledge extraction algorithm is as follows: Figure 5 As shown.

[0126] Specific Implementation Method 3: The feature recognition module is used to read power grid data files and determine whether the power grid data files satisfy the textual expression of feature nodes in the knowledge graph. If they satisfy the textual expression of feature nodes, the power grid data file has the required features and returns True; if the read power grid data does not have the required features, it returns False. All power grid data files that return True are combined into a feature dataset, specifically:

[0127] Determine whether the variable in the text expression of the feature node is a power grid parameter. If so, query the knowledge graph to find the specific location of the power grid parameter in the power grid data file, i.e., the parameter matrix, and then obtain the specific value of the parameter according to the row and column.

[0128] If it is not a power grid parameter, then it is a temporary variable returned by a program call. The variable value returned by the call is first stored in memory, then the specific value of the temporary variable is read from memory, and then the specific value of the temporary variable is substituted into the text expression of the feature node for parsing and calculation to obtain the return value of the feature expression and to determine whether the power grid data meets the feature.

[0129] Specific Implementation Method Four: The state query and matching module receives the feature set generated by the feature recognition module, then determines the current power grid state by querying and matching the correspondence between features and states in the knowledge graph, assigns different weights to all power grid states, sorts all power grid states in descending order of weight, and inputs the state with the highest weight into the action query module, specifically:

[0130] First, a non-fuzzy matching method is used in the knowledge graph to match the features in the feature set with the power grid status;

[0131] Then, a weighted method is used to assign different weights to the states matched by each feature;

[0132] The weights are included in the established knowledge graph;

[0133] The matched state includes: the current state and subsequent states;

[0134] Then, all power grid states are sorted from largest to smallest according to their weight, and the state with the largest weight is input into the action query module.

[0135] Specific Implementation Method Five: The action query module receives the status from the status query module and searches for the action corresponding to the status in the knowledge graph to form a set of selectable actions, specifically:

[0136] First, search the knowledge graph for actions that match the power grid status input by the status query and matching module;

[0137] Then, the weights of the actions corresponding to the states obtained from the received state query module are sorted to obtain a set of state actions;

[0138] Then, the matched actions are assigned different weights, and the matched actions are sorted from largest to smallest according to their weights. The sorted action set is the state action set.

[0139] Finally, query the constraints in the knowledge graph that match the state-action set, and modify the state-action set according to the constraints. The modified state-action set is the optional action set A. If A is empty, that is, there is no action that matches the state, it is considered that the adjustment has failed and the termination state is reached.

[0140] Specific Implementation Method Six: The action execution module is used to modify relevant parameters of the power grid data file or call relevant programs or dynamic link libraries to execute according to the specific operations in the optional action set A, specifically as follows:

[0141] First, obtain the relationships between actions in the optional action set: <action> → <has action> → <action>;

[0142] Then, based on the relationships between the actions in the set of optional actions, the operation to modify the power grid data file, the operation to call the program command, or the operation to call the function of the dynamic link library are completed:

[0143] Modifying the power grid data file: The action execution module queries the "object" of an action in the optional action set A, then determines the location of the parameter to be modified in the data file, then queries the "target value" of the action in the knowledge graph, and then modifies the parameters of the power grid data file according to the target value. After executing all actions in A in order of weight, the modification operation of the data file is completed.

[0144] The target value is similar to the feature expression;

[0145] For command invocation operations of the program: the action execution module transmits the command to the existing operating system for execution and returns the result;

[0146] For function calls to dynamic link libraries, the action execution module parses the function call expression to obtain the library, function name, and parameters to be called, and then calls it through the interface between programming languages ​​to complete the function call operation for the dynamic link library.

[0147] Example 1: Knowledge representation of power grid data was performed according to the method described in Specific Implementation 1, and the results are shown in Table 2;

[0148] Table 2 Knowledge Representation SPO Examples

[0149]

[0150]

[0151] Example 2: Based on the knowledge representation method proposed in Specific Implementation Method 1, through the knowledge extraction and convergence adjustment experience of the Electric Power Research Institute's think tank, and the survey of expert knowledge, 14,712 cleaned power flow adjustment-related triplet-form knowledge entries were compiled. This knowledge was stored and represented in the Neo4j graph database, constructing a visualized power flow convergence adjustment knowledge graph. Part of the knowledge graph is shown below. Figure 7 As shown.

[0152] The knowledge in power grid digital simulation analysis is incremental and needs continuous updating. Therefore, to visualize the knowledge in the knowledge base and facilitate CRUD operations by operators, a knowledge base management system was developed using PyQt5 to visualize and manage the knowledge. The relevant system interface is shown below. Figure 8 As shown. In addition, the knowledge base management system also provides functions such as batch operations by operators, knowledge export, and knowledge graph generation.

[0153] Example 3: To verify the effectiveness of the knowledge graph-driven framework proposed in Implementation Methods 2 to 6, a power flow calculation convergence adjustment case study was conducted on the improved CEPRI-36 node system. All code was compiled and run using Python, and the power flow calculation program was PSASP, independently developed by the China Electric Power Research Institute. The hardware platform for the case study was: Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz, 16GB RAM.

[0154] The improved CEPRI-36 node system comprises 8 generator sets, 26 AC buses, 36 bus nodes, 3 three-winding transformers, and 10 loads. To simulate different operating conditions in reality, power flow simulation calculations were performed by modifying the active and reactive power of a set of converged data loads and adjusting the operation of capacitors and reactors, generating 3,900 case results. Part of the automatic power flow adjustment process using a knowledge graph is as follows: Figure 9 As shown, the proposed knowledge-driven model was tested, and the test results are given in Table 3.

[0155] Table 3. Convergence results of the knowledge-driven power flow in the improved 36-node system.

[0156]

[0157] Table 3 shows that the adjustment success rate was 83.78%, indicating that the knowledge-driven model can effectively adjust non-convergent power flows without any human intervention. The degree of data modification also affects the adjustment results. Therefore, the proportion of power modification based on the convergent load is defined as data volatility to measure model performance. The automatic adjustment effect of the knowledge-driven model was tested by progressively increasing the data modification proportion. The adjustment results were... Figure 10 The figure provided compares the power grid artificial digital simulation analysis with the knowledge-driven method of this invention. Figure 3 As shown.

[0158] pass Figure 10 It's easy to see that the greater the data fluctuation, the more difficult the convergence adjustment becomes. However, while the adjustment time for the knowledge-driven model remains relatively constant, the success rate decreases. This is because the examples themselves are automatically generated by computer programs, inherently possessing a degree of randomness. Therefore, after manually adjusting some failed cases, it was found that for some examples with significant data fluctuations, manual adjustment to convergence was not successful in a short period of time, thus these examples were deemed unadjustable.

Claims

1. A knowledge representation method based on power grid artificial intelligence simulation analysis, characterized in that... The specific process of the method is as follows: Step 1: Define the current state of the power grid and the operations that need to be modified during the power grid simulation analysis process; Step 11: Define the current state of the power grid during the power grid simulation analysis process, as follows: S (P (L1, L2, …Ln), R (LP1, LP2, …) (1) Where P() and R() refer to the input and output parts of the simulation calculation, respectively, L is the parameter matrix representing the electrical parameters of the power grid, 1,..,n are the parameter matrix labels of the electrical parameters of the power grid, n is any integer, and LP is the result matrix obtained through simulation calculation; Steps 1 and 2: Define the operations that require modification of the power grid during the power grid simulation analysis: a (Lo (n, r, c), V) (2) Where Lo (n, r, c) refers to the specific position of the parameter that needs to be modified in the parameter matrix L, n refers to the label of the parameter matrix in the current state S of the power grid, r and c refer to the r-th row and c-th column of the parameter matrix that need to be modified in the adjustment operation, respectively, and V is the value of the parameter after modification, i.e. the target value. Step 2: Represent the knowledge of power grid digital simulation analysis using the definitions obtained in Step 1, including the following steps: Step Two: Represent the adjustment process using knowledge representation. <State>→<Action>→<Action> (4) <Action> → <Subsequent State> → <State> (5) Step 22: Define the object and target value as the basic attributes of the action to represent the knowledge of the adjustment operation that modifies the power grid parameters. <Action> → <Object> → <Object> (6) <Action> → <Target> → <Target Value> (7) Steps two and three: Represent the program call operation using knowledge representation. <Action> → <Command> → <Command> (8) Step 24: Represent the operation of calling dynamic link libraries using knowledge representation: <Action>→<Function Call>→<Function> (9).

2. The knowledge representation method based on power grid artificial intelligence simulation analysis according to claim 1, characterized in that: The LP in step one includes: convergence flag, bus, AC line voltage, and power.

3. A knowledge-driven system based on power grid artificial intelligence simulation analysis, characterized in that: The system includes: a feature recognition module, a status query and matching module, an action query module, and an action execution module; The feature recognition module is used to read power grid data files and determine whether the power grid data files satisfy the text expression of feature nodes in the knowledge graph. If they satisfy the text expression of feature nodes, the power grid data files have the required features and the module returns True. If the read power grid data files do not have the required features, the module returns False. All power grid data files that return True are combined into a feature dataset. The text expressions of feature nodes in the knowledge graph are in a fixed form consisting of variables, constants, and operators. The knowledge graph is constructed based on the knowledge representation method described in claim 1; The status query and matching module is used to receive the feature set generated by the feature recognition module, and then determine the current power grid status by querying and matching the correspondence between features and status. It assigns different weights to all power grid statuses, sorts all power grid statuses from largest to smallest according to their weights, and inputs the status with the largest weight into the action query module. The action query module is used to search for actions in the knowledge graph that match the power grid state input by the state query and matching module, and to form a state action set by all the matched actions. Then, it searches for the constraint conditions that match each action in the state action set in the knowledge graph, modifies the state action set to form an optional action set A. If A is empty, the termination state is reached. If A is not empty, A is input into the action execution module. The action execution module is used to modify parameters in the power grid data file or call programs and dynamic link libraries according to the operations in the optional action set A.

4. The knowledge-driven system based on power grid artificial intelligence simulation analysis according to claim 3, characterized in that: The knowledge graph is constructed in the following way: S1. The knowledge of the think tank is represented using the knowledge representation method described in claim 1, and then the name-value is used as the corresponding part of the connection-content in the triple obtained after knowledge representation; S2. Preprocess the think tank knowledge processed by S1 to obtain preprocessed knowledge; Preprocessing operations include: removing garbled information and removing problematic information; S3. A semantic-based power knowledge extraction algorithm extracts entities and relationships from the preprocessed knowledge to obtain a knowledge graph.

5. The knowledge-driven system based on power grid artificial intelligence simulation analysis according to claim 4 or 3, characterized in that: The feature recognition module is used to read power grid data files and determine whether the power grid data files satisfy the textual expression of feature nodes in the knowledge graph. If they satisfy the textual expression of feature nodes, the power grid data file has the required features and returns True; if the read power grid data does not have the required features, it returns False. All power grid data files that return True are combined into a feature dataset, specifically: First, determine whether the variable in the text expression of the feature node is a power grid parameter. If it is a power grid parameter, query the knowledge graph to find the specific location of the power grid parameter in the power grid data file, and then obtain the specific value of the parameter according to the row and column. Then, determine whether the value of the power grid parameter satisfies the text expression of the feature node. If it does, return True; otherwise, return False. If it is not a power grid parameter, the variable value returned by the call is first stored in memory. Then, the specific value of the variable is read from memory. Then, the text expression of the feature node is used to determine whether the specific value of the variable satisfies the text expression of the feature node. If it does, True is returned; otherwise, False is returned.

6. The knowledge-driven system based on power grid artificial intelligence simulation analysis according to claim 5, characterized in that: The state query and matching module receives the feature set generated by the feature recognition module, then determines the current power grid state by querying and matching the correspondence between features and states. It assigns different weights to all power grid states, sorts them according to their weights from largest to smallest, and inputs the state with the highest weight into the action query module. Specifically: First, a non-fuzzy matching method is used in the knowledge graph to match the features in the feature set with the power grid state to obtain the power grid state that matches the features in the feature set. The power grid status includes: the current power grid status and the subsequent power grid status; Then, a weighted method is used to manually assign different weights to the matched power grid state; Finally, the matched power grid states are sorted from largest to smallest according to their weights, and the power grid state with the largest weight is input into the action query module.

7. The knowledge-driven system based on power grid artificial intelligence simulation analysis according to claim 6, characterized in that: The action query module is used to search for actions in the knowledge graph that match the power grid state input by the state query and matching module, and to form a state action set by all matched actions. Then, it searches for constraints in the knowledge graph that match each action in the state action set, and modifies the state action set to form an optional action set A, including the following steps: First, search the knowledge graph for actions that match the power grid status input by the status query and matching module; Then, the matched actions are assigned different weights, and the matched actions are sorted from largest to smallest according to their weights. The sorted action set is the state action set. Finally, the constraints that match the state-action set are queried in the knowledge graph, and the state-action set is modified according to the constraints. The modified state-action set is the optional action set A.

8. The knowledge-driven system based on power grid artificial intelligence simulation analysis according to claim 7, characterized in that: The action execution module is used to modify parameters in the power grid data file or call programs and dynamic link libraries according to the operations in the optional action set A, specifically: First, obtain the relationships between actions in the optional action set: <action> → <has action> → <action>; Then, based on the relationships between the actions in the optional action set, the operation of modifying the power grid data file, calling the program's command, or calling the function of the dynamic link library is completed. The specific steps for modifying the power grid data file based on the relationships between actions in the optional action set are as follows: query the operation object corresponding to the action in the optional action set A in the knowledge graph, then determine the position of the parameter to be modified in the power grid data file, then query the target value of the action in the knowledge graph, then modify the parameter of the power grid data file according to the target value, and finally execute all actions in A in order of weight to complete the modification operation of the data file.

9. The knowledge-driven system based on power grid artificial intelligence simulation analysis according to claim 8, characterized in that: The process of performing function calls to the dynamic link library based on the relationships between actions in the optional action set specifically involves: The function call expression is parsed to obtain the library to be called, the function name, and the parameters. Then, the function is called through the interface between programming languages ​​to complete the function call operation for the dynamic link library.