Power grid data knowledge graph completion method and system based on steady-state model rule

By preprocessing power grid data and using a knowledge graph completion method based on steady-state model rules, and by optimizing missing data using discriminant functions and power flow equations, the problems of low efficiency and low accuracy in power grid data processing are solved, and efficient and accurate completion and optimized operation of power grid data are achieved.

CN120144827BActive Publication Date: 2025-12-30STATE GRID JIANGSU ELECTRIC POWER CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510201010.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-24
Publication Date
2025-12-30
Estimated Expiration
2045-02-24

AI Technical Summary

Technical Problem

Existing power grid data completion methods rely on rule-based reasoning and numerical simulation, which suffer from low data processing efficiency and low completion accuracy. Furthermore, machine learning and deep learning methods require high computational costs and complex model designs, making it difficult to handle real-time data and complex relationships in power grid operation.

Method used

By preprocessing the grid reference steady-state data, using a set of discriminant functions to filter valid data, constructing a knowledge graph of steady-state model rules, and combining power flow equations and variational inference methods, missing data is optimized and supplemented to ensure data consistency and accuracy.

Benefits of technology

This improves the completeness and accuracy of power grid data, ensures that the supplemented electrical parameters conform to the actual operating rules of the power grid, optimizes power grid operation and decision support, and enhances the reliability and stability of the power grid.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120144827B_ABST
    Figure CN120144827B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on steady-state model rule power grid data knowledge graph completion method and system, it is related to power grid data processing technical field, method includes: to power grid benchmark steady-state data is preprocessed and is screened, effective data subset is obtained using discriminant function screening, and according to entity and relationship form initial triple set, define knowledge graph structure and storage form, for node and edge add attribute information;Equation set of power flow is constructed, define optimization problem to minimize power flow equation residual, iteration optimization is carried out using variational inference method, complete missing electrical parameter, integrate the parameter after completion, update node, form complete power grid data knowledge graph, verify and consistency check, ensure data logic consistency and accuracy.By optimizing power flow equation, complete missing electrical parameter, improve data integrity and accuracy, to provide more accurate information for power grid operation, improve the operation efficiency, reliability and stability of 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 grid data processing technology, specifically to a method and system for completing a power grid data knowledge graph based on steady-state model rules. Background Technology

[0002] As power systems continue to expand and become more complex, grid operation and management face increasing challenges. The operational data, equipment parameters, and relationships within the power grid are vast, and how to efficiently process, manage, and utilize this data has become a critical issue that urgently needs to be addressed in the power sector. Traditional data management and analysis methods typically rely on structured data storage and simple rule-based reasoning, making it difficult to detect problems in grid operation in a timely manner and hindering the implementation of in-depth analysis and prediction based on big data and artificial intelligence.

[0003] Data completion and knowledge graph construction for power grids are key to solving this problem. Knowledge graphs, as a graphical data structure, can organically combine various entities in the power grid and the complex relationships between them, providing a more comprehensive and flexible representation of power grid data. Existing power grid data completion methods mainly rely on rule-based reasoning and numerical simulation. While these methods can improve data completeness to some extent, they still face problems such as low data processing efficiency and low completion accuracy.

[0004] Currently, although there are some methods for power grid data completion based on machine learning and deep learning, most of these methods rely on large amounts of labeled data or complex model training, which often require high computational costs and complex model design. Furthermore, they still pose significant challenges in processing some real-time data and complex relationships in power grid operation. Summary of the Invention

[0005] In view of the shortcomings of the prior art described above, the purpose of this invention is to provide a method and system for completing the knowledge graph of power grid data based on steady-state model rules, so as to solve the above-mentioned technical problems.

[0006] To achieve the above objectives, the present invention provides the following technical solution:

[0007] Firstly, a method for completing a knowledge graph of power grid data based on steady-state model rules includes:

[0008] After preprocessing the grid reference steady-state data, the validity of each data point is evaluated using a set of discriminant functions. A subset of valid data is then selected. Based on the subset of valid data, the corresponding entities and the relationships between entities are obtained. The entities are the basic units that constitute the power system network, and the relationships between entities are the electrical connections and interactions between different units in the grid. The entities and relationships are combined to form an initial set of triples.

[0009] The entities in the initial set of triples are set as nodes of the knowledge graph, the relationships between entities are set as edges of the knowledge graph, the specific electrical parameters of entities and relationships are mapped to the knowledge graph, and corresponding attribute information is added to the nodes and edges in the knowledge graph.

[0010] Electrical parameters of nodes and lines are extracted from the knowledge graph to construct a set of power flow equations describing the steady-state operation of the power grid. The power flow equations are then transformed into an optimization problem with the objective function of minimizing the residuals of the power flow equations. The optimization problem is solved using variational inference methods, and the global optimum is approximated through iterative optimization. After the optimization process converges, the estimated values ​​of voltage amplitude and voltage phase angle are extracted from the variational distribution to fill the corresponding missing data in the knowledge graph.

[0011] The missing electrical parameters are integrated and supplemented, the nodes in the knowledge graph are updated, a complete power grid data knowledge graph is formed, and the updated knowledge graph is stored after verification and consistency checks.

[0012] Preferably, preprocessing of the power grid reference steady-state data includes:

[0013] The original steady-state data of the power grid reference is format-converted and noise-removed, and denoted as dataset D = {d1, d2, ..., d...} N}, where N is the number of data entries in the dataset, and each data entry d i It includes electrical parameter records, which are numerical parameters, including voltage amplitude, voltage phase angle, active power injection, and reactive power injection.

[0014] As a preferred option, define a discriminant function. Used to evaluate each data point d i The validity of each data d i ,calculate The discriminant functions include a non-empty detection function, a range compliance detection function, and a duplicate / conflict detection function. When SF(d) i If the value of ) is one, the data is considered valid, saved, and a subset of valid data is input; otherwise, it is discarded.

[0015] In the discriminant function In the code, the non-empty detection function is used to detect whether the electrical parameter is empty. When it is empty, it is recorded as zero, and when it is not empty, it is recorded as one.

[0016] The range compliance detection function is used to detect whether electrical parameters are within the preset specified range. When they are not within the preset specified range, they are recorded as zero, and when they are within the preset specified range, they are recorded as one.

[0017] The duplicate collision detection function is used to detect whether electrical parameters have duplicate conflicting data at the same timestamp. When duplicate conflicting data exists, it is recorded as zero, and when no duplicate conflicting data exists, it is recorded as one.

[0018] As a preferred approach, electrical parameters of nodes and lines are extracted from the knowledge graph to construct a set of power flow equations describing the steady-state operation of the power grid. This set of equations is then transformed into an optimization problem, including:

[0019] Suppose the knowledge graph contains N nodes, let V i and θ i Let Y represent the voltage magnitude and voltage phase angle of node i, respectively. For each line l connecting node i and node j, its admittance is Y. ij =G ij +jB ij The power flow equations describing the steady-state operation of the power grid are as follows: Among them, P i For the active power injection at node i, Q i For reactive power injection at node i, G ij Let B be the conductance of the line between node i and node j. ij Let be the susceptance of the line between node i and node j;

[0020] The objective of the optimization problem is defined as minimizing the residuals of the power flow equations, and the objective function J is defined as follows:

[0021]

[0022] Preferably, the optimization problem is solved using a variational inference method, which approximates the global optimum through iterative optimization, including:

[0023] Define a variational distribution q(V,θ,E,R) to approximate the posterior distribution p(V,θ,E,R|D), where V represents the voltage amplitude, θ represents the voltage phase angle, E represents the entity set, R represents the relation set, and D is the dataset.

[0024] Construct a variational lower bound: L(q) = E q [logp(D,V,θ,E,R)]-E q [logq(V,θ,E,R)], where L(q) is the variational lower bound, logp(D,V,θ,E,R) is the joint log-likelihood, representing the joint log probability of dataset D and latent variables V,θ,E,R, and logq(V,θ,E,R) is the log probability of the approximate distribution, representing the log probability of the latent variables under the approximate distribution q, and E... q [·] represents the expected value of the joint log-likelihood and the log probability of the approximate distribution under the variational distribution q(V,θ,E,R); the optimization objective is: max q L(q);

[0025] The gradient ascent method is used to iteratively optimize the variational lower bound and update the variational parameters until the convergence condition is met.

[0026] As a preferred approach, the variational lower bound is iteratively optimized, and the variational parameters are updated, including:

[0027] In each iteration t, the variational parameters are updated according to the following formula: Where, φ (t) Let η be the variational parameters at the t-th iteration. Specifically, the variational parameters include the voltage magnitude V, the voltage phase angle θ, the entity set E, and the relation set R, where η is the learning rate. The variational lower bound L(q) (t) Regarding the variational parameter φ (t) The gradient;

[0028] The convergence condition is: |L(q) (t+1) )-L(q (t) )|<∈1 and Wherein, ∈1 is the first threshold and ∈2 is the second threshold.

[0029] Preferably, the updated knowledge graph is verified and its consistency is checked, including the verification of business rules and the compliance testing of the range of supplemented electrical parameters, so that the updated knowledge graph conforms to the actual logic and constraints of power grid operation. The business rules specifically include one or more of the following: power balance rules, voltage stability rules, and line power transmission restriction rules.

[0030] Secondly, a power grid data knowledge graph completion system based on steady-state model rules includes:

[0031] The initial triplet set construction module is used to preprocess the grid reference steady-state data, evaluate the validity of each data point using a set of discriminant functions, filter out a subset of valid data, and obtain the corresponding entities and relationships between entities based on the subset of valid data. The entities are the basic units that constitute the power system network, and the relationships between entities are the electrical connections and interactions between different units in the grid. The entities and relationships are combined to form the initial triplet set.

[0032] The knowledge graph construction module is used to set the entities in the initial triplet set as nodes of the knowledge graph, set the relationships between entities as edges of the knowledge graph, map the specific electrical parameters of entities and relationships to the knowledge graph, and add corresponding attribute information to the nodes and edges in the knowledge graph.

[0033] The missing data completion module is used to extract electrical parameters of nodes and lines from the knowledge graph, construct a set of power flow equations describing the steady-state operation of the power grid, transform the set of power flow equations into an optimization problem, the optimization problem takes minimizing the residuals of the power flow equations as the objective function, and uses variational inference to solve the optimization problem. The global optimal solution is approximated through iterative optimization. After the optimization process converges, the estimated values ​​of voltage amplitude and voltage phase angle are extracted from the variational distribution to fill in the corresponding missing data in the knowledge graph.

[0034] The knowledge graph update and storage module is used to integrate and complete missing electrical parameters, update nodes in the knowledge graph, form a complete power grid data knowledge graph, and store the updated knowledge graph after verification and consistency checks.

[0035] Thirdly, the present invention also provides a computer device, comprising: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, wherein when the programs are executed by the processors, they implement the steps of the power grid data knowledge graph completion method based on steady-state model rules as described in the first aspect of the present invention.

[0036] Fourthly, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the power grid data knowledge graph completion method based on steady-state model rules as described in the first aspect of the present invention.

[0037] Compared with the prior art, the present invention has the following beneficial effects:

[0038] (1) Improve the completeness and accuracy of power grid data: By preprocessing and screening the benchmark steady-state data of the power grid, and combining the set of discriminant functions to evaluate the validity of the data, the high quality of the input data is ensured. Using this data screening method, invalid, erroneous or abnormal data can be effectively eliminated, providing accurate basic data for subsequent knowledge graph completion, thereby improving the completeness and accuracy of the power grid data knowledge graph;

[0039] (2) Intelligent Completion of Missing Power Grid Data: By constructing a set of nonlinear power flow equations related to the steady-state operation of the power grid and introducing knowledge graph embedding vectors to enhance the constraints of the power flow equations, this invention can derive and complete missing electrical parameters based on existing data. Through the steady-state model rule (power flow constraint) data completion process, it ensures that the completed voltage amplitude, phase angle, and other parameters conform to the physical laws of actual power grid operation, avoiding data problems such as voltage exceeding limits and power imbalance that do not conform to the normal steady-state operation of the power grid. By applying variational inference methods, optimization problems can be solved efficiently, approximating the global optimal solution. This method can accurately complete electrical parameters while ensuring data consistency, greatly improving the completeness of power grid data;

[0040] (3) Optimizing power grid operation and decision support: By supplementing missing electrical parameters in power grid data, the completed knowledge graph contains complete electrical parameters that conform to steady-state rules. A comprehensive power grid data knowledge graph can provide more accurate and comprehensive information for intelligent decision-making such as power grid operation monitoring, fault diagnosis, and load forecasting. This not only improves the operating efficiency of the power grid but also helps power grid managers make more accurate decisions, thereby enhancing the reliability and stability of the power grid. Attached Figure Description

[0041] Figure 1 This is a flowchart illustrating a power grid data knowledge graph completion method based on steady-state model rules, as shown in an embodiment of the present invention.

[0042] Figure 2 This is a schematic diagram of a knowledge graph of power grid data as shown in an embodiment of the present invention. Detailed Implementation

[0043] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.

[0044] Reference Figure 1 An embodiment of the present invention provides a method for completing a power grid data knowledge graph based on steady-state model rules, comprising the following steps:

[0045] Step S1: Preprocess and screen the grid reference steady-state data, evaluate the validity of the grid reference steady-state data using a set of discriminant functions, screen to obtain a subset of valid data, and combine entities and relationships according to the entities corresponding to the valid data to form an initial set of triples.

[0046] Power grid reference steady-state data is typically acquired in real time by various monitoring devices, including SCADA systems, smart meters, and sensors. These devices record the operating status parameters of various components of the power grid, including generators, transformers, transmission lines, and distribution networks. Since different devices and systems may use different data formats, it is necessary to convert the raw data to a standardized representation for easier subsequent processing and analysis. Furthermore, the raw data may be subject to various interferences during acquisition, resulting in noise that needs to be removed. Noise removal improves the signal-to-noise ratio, ensuring the accuracy and reliability of the data.

[0047] According to an embodiment of the present invention, the preprocessing and filtering of the power grid reference steady-state data in step S1 specifically includes: format conversion and noise removal of the original power grid reference steady-state data. The data after format conversion and noise removal is defined as dataset D = {d1, d2, ..., d...} N}, where each data d i The system includes records of electrical parameters, which are numerical parameters including voltage amplitude, voltage phase angle, active power injection, and reactive power injection. Specifically, voltage amplitude describes the magnitude of the voltage and reflects the voltage level at each node in the power grid; voltage phase angle represents the phase angle of the voltage, and the phase angle difference is an important factor determining the direction of active power flow, reflecting the phase relationship of voltages in the power grid; active power injection represents the injection or consumption of active power by an entity, with positive values ​​indicating power injection and negative values ​​indicating power consumption, determining the total active power supply of the system and affecting the power balance and operating efficiency of the power grid; reactive power injection represents the injection or consumption of reactive power by an entity, and reactive power is used to maintain the voltage level, with positive values ​​indicating reactive power injection and negative values ​​indicating reactive power consumption, affecting the voltage regulation and system stability of the power grid.

[0048] Power grid steady-state data contains key electrical parameters such as voltage amplitude, voltage phase angle, active power injection, and reactive power injection. The accuracy and completeness of this data directly impact power grid monitoring, analysis, and optimization. Therefore, a rigorous validity assessment of the raw data is essential to eliminate invalid or erroneous data and ensure the quality of dataset D. This is crucial for systematically evaluating each data point d. iTo ensure the effectiveness of the data quality detection, this invention introduces multiple discrimination functions, each targeting different data quality issues. Specifically, these include a non-empty detection function, a range compliance detection function, and a duplicate / conflict detection function. The non-empty detection function checks whether the electrical parameter is empty; it is recorded as zero when empty and as one when not empty. The range compliance detection function checks whether the electrical parameter is within a preset specified range; it is recorded as zero when outside the preset range and as one when within the preset range. The duplicate / conflict detection function checks whether there are duplicate conflicting data for the electrical parameter at the same timestamp; it is recorded as zero when duplicate conflicting data exists and as one when no duplicate conflicting data exists.

[0049] According to an embodiment of the present invention, evaluating the validity of the power grid reference steady-state data using a set of discriminant functions in step S1 includes: defining the discriminant functions. Used to evaluate each data point d i The validity of each data d i ,calculate The discriminant functions include a non-empty detection function, a range compliance detection function, and a duplicate / conflict detection function. When SF(d) i If the value of ) is one, the data is considered valid, saved, and a subset of valid data is input; otherwise, it is discarded. In the discrimination function... In the middle, the non-empty detection function detects data d. i The function checks for null values ​​(missing data) in the electrical parameters to ensure that all electrical parameters in each data record are filled, avoiding analysis errors caused by missing data. A null value is output as 0 (indicating a data problem), otherwise 1 is output. The range compliance check function checks the data d. i The function checks whether the electrical parameters are within the preset range to ensure they are within a reasonable operating range and prevent abnormal values ​​from affecting the analysis results. If the parameters are outside the range, the output is 0 (indicating a data problem); otherwise, the output is 1. A duplicate / conflict detection function checks the data d. i This invention checks for duplicate or conflicting data records at the same timestamp, avoiding multiple contradictory records at the same timestamp and ensuring data consistency and uniqueness. If duplicates or conflicts are found, the output is 0 (indicating a data problem); otherwise, it outputs 1. By introducing a set of discriminant functions, this invention automates data evaluation and cleaning, reducing manual processing workload and human error, and improving data processing efficiency.

[0050] As an example, data d1: voltage amplitude is 220kV (within range), voltage phase angle is 30° (within range), active power injection is +500MW (within range, positive value indicates power injection), reactive power injection is -200MVar (within range, negative value indicates power consumption), all parameters are not empty and there is no duplicate conflicting data, SF(d1)=1*1*1*1*1=1, the data is determined to be valid.

[0051] As another example, data d2: voltage amplitude is null (empty value, does not meet the non-empty detection), voltage phase angle is 90° (within the range), active power injection is -300MW (within the range, negative value indicates power consumption), reactive power injection is +100MVar (within the range, positive value indicates power injection), but there is duplicate conflicting data (same timestamp, different parameters), then SF(d2)=0*1*1*1*0=0, and the data is determined to be invalid.

[0052] After filtering using a set of discriminant functions, a subset of valid data is obtained. This dataset (e.g., voltage amplitude, voltage phase angle) is then associated with corresponding power grid entities (e.g., substations, generators, loads). Power grid entities are the basic units constituting a power system network, also known as power grid nodes. These entities interact through electrical connections, coordinating their work according to specific voltage and power flow directions to achieve efficient transmission, distribution, and control of electrical energy. For example, the values ​​of voltage amplitude and voltage phase angle can be mapped to corresponding entities (e.g., power grid nodes) as their attribute information, and each node in the power grid is also assigned specific electrical parameters. Relationships between entities (e.g., voltage, power flow direction) are represented in the knowledge graph as edges. For example, the power flow relationship between a generator and a transformer can be represented as an edge, and the attributes of this edge can include relevant electrical parameters such as active power injection and reactive power injection. Therefore, based on the entities corresponding to the valid data and the relationships between entities, entities and relationships are combined to form an initial set of triples, denoted as T = {(e i ,e j ,r ij )∣e i ,e j ∈E,r ij ∈R}, where T is the initial set of triples, e i For the i-th entity, e j For the j-th entity, r ij For entity e i and e j The relationship between entities is defined as E, where E is the set of entities and R is the set of relations.

[0053] In this way, the filtered valid data is not only retained, but also accurately mapped to the entities of the power grid and the relationships between them, forming a preliminary set of triples for the knowledge graph. Each triple consists of an entity, a relationship, and an attribute value (such as voltage amplitude, voltage phase angle, etc.).

[0054] Step S2: Define the structure and storage format of the knowledge graph based on the initial set of triples, and add corresponding attribute information to the nodes and edges in the knowledge graph.

[0055] According to an embodiment of the present invention, entities in the initial set of triples are set as nodes of the knowledge graph, relationships between entities are set as edges of the knowledge graph, specific electrical parameters of entities and relationships are mapped to the knowledge graph, and corresponding attribute information is added to the nodes and edges in the knowledge graph. (See the example diagram of the knowledge graph for reference.) Figure 2 .

[0056] Step S3: Construct a set of power flow equations describing the steady-state operation of the power grid, define the optimization problem to minimize the residuals of the power flow equations, solve the optimization problem using variational inference methods, approximate the global optimal solution through iterative optimization, extract the optimization results, and complete the missing electrical parameters in the knowledge graph.

[0057] In power systems, power flow calculation is an important tool for analyzing voltage distribution, active power, and reactive power flow under steady-state operating conditions. Power flow equations, based on the electrical parameters of nodes and lines, establish balance equations for active and reactive power to describe the steady-state operation of the power grid. According to an embodiment of the present invention, electrical parameters of nodes and lines are extracted from a knowledge graph to establish a set of power flow equations describing the steady-state operation of the power grid.

[0058] Specifically, suppose the knowledge graph contains N nodes, and let V i and θ i Let Y represent the voltage magnitude and voltage phase angle of node i, respectively. For each line l connecting node i and node j, its admittance is Y. ij =G ij +jB ij The power flow equations describing the steady-state operation of the power grid are as follows: Among them, P i For the active power injection at node i, Q i For reactive power injection at node i, G ij Let B be the conductance of the line between node i and node j. ij Let be the susceptance of the line between node i and node j.

[0059] The power flow equations are transformed into an optimization problem. The goal is to minimize the residuals of the power flow equations by adjusting the node voltage magnitudes and phase angles, thereby ensuring power balance and filling in missing data. Minimizing the objective function is equivalent to minimizing the residuals of the power flow equations. Since the power flow equations are typically nonlinear, direct solutions may face computational complexity and convergence issues. Therefore, variational inference methods are used to solve the optimization problem.

[0060] According to an embodiment of the present invention, the optimization objective function J is defined as the sum of squares of the residuals of the power flow equations, in the following form:

[0061]

[0062] Variational inference is employed to solve the optimization problem. Variational inference is a Bayesian inference method used to approximate complex posterior distributions. By optimizing an adjustable approximate distribution to make it as close as possible to the true posterior distribution, the variational lower bound is used in variational inference to measure how close the approximate distribution is to the true posterior distribution. By maximizing the variational lower bound, the approximate distribution q is made as close as possible to the true posterior distribution.

[0063] According to an embodiment of the present invention, a variational distribution q(V,θ,E,R) is first defined to approximate the posterior distribution p(V,θ,E,R|D);

[0064] Then construct the variational lower bound: L(q) = E q [logp(D,V,θ,E,R)]-E q [logq(V,θ,E,R)], where L(q) is the variational lower bound, logp(D,V,θ,E,R) is the joint log-likelihood, representing the joint log probability of dataset D and latent variables V,θ,E,R, and logq(V,θ,E,R) is the log probability of the approximate distribution, representing the log probability of the latent variables under the approximate distribution q, and E... q [·] represents the expected value of the joint log-likelihood and the log probability of the approximate distribution under the variational distribution q(V,θ,E,R); then the optimization objective is: max q L(q).

[0065] The gradient ascent method is employed to iteratively optimize the variational lower bound, gradually updating the parameters of the variational distribution until the convergence condition is met. Gradient ascent is an optimization algorithm used to maximize an objective function. By iteratively updating the parameters along the gradient of the objective function, the value of the objective function is gradually increased. By minimizing the residuals of the power flow equations, the completed electrical parameters are ensured to be highly consistent with the actual power grid operating state, improving the accuracy and reliability of the data. Specifically, in each iteration t, the variational parameters are updated in the following way: Where, φ (t)Let be the variational parameter at the t-th iteration, and η be the learning rate. The variational lower bound L(q) (t) Regarding the variational parameter φ (t) The gradient. The variational parameters specifically include voltage amplitude V, voltage phase angle θ, entity set E, and relation set R. Since only voltage amplitude V and voltage phase angle θ are numerical parameters, when iteratively optimizing the variational lower bound, only the voltage amplitude V and voltage phase angle θ are used for gradient ascent to iteratively optimize the variational lower bound, updating the variational parameters until the convergence condition is met. According to the embodiment of the present invention, the convergence condition is: |L(q (t+1) )-L(q (t) )|<∈1 and Wherein, ∈1 is the first threshold and ∈2 is the second threshold.

[0066] After the optimization process converges, the estimated values ​​of voltage amplitude and voltage phase angle are extracted from the variational distribution to fill the corresponding missing data in the knowledge graph.

[0067] S4: Integrate and complete the missing electrical parameters, update the nodes in the knowledge graph to form a complete power grid data knowledge graph, verify and check the consistency of the updated knowledge graph, and store it.

[0068] According to embodiments of the present invention, the verification and consistency check of the updated knowledge graph includes the verification of business rules and the range compliance check of the supplemented electrical parameters, ensuring that the updated knowledge graph conforms to the actual logic and constraints of power grid operation. Specifically, during the construction and updating of the knowledge graph, especially after supplementing missing electrical parameters, it is essential to ensure that the updated knowledge graph is not only data-complete but also conforms to the actual logic and constraints of power grid operation. Business rules refer to the norms and constraints that must be followed in the operation of the power system to ensure the safe, efficient, and reliable operation of the system. By verifying business rules, it is ensured that the data and relationships in the knowledge graph conform to the actual operating logic of the power grid; through rigorous business rule verification and range compliance checks, it is ensured that the data in the knowledge graph is accurate, complete, and consistent, significantly improving the quality and reliability of the dataset, ensuring that electrical parameters are within a reasonable range, preventing system instability or failures caused by data anomalies, and improving the overall stability and security of the power grid.

[0069] Furthermore, the specific business rules include power balance rules, voltage stability rules, and line power transmission restriction rules. Power balance rule: At any given time, the total generating power of the power grid should equal the total load power, plus any losses or power output from energy storage systems; that is, the power flow within the power grid must meet the power balance requirements. Voltage stability rule: The voltage amplitude at each node in the power grid must be maintained within the specified stable range, not exceeding ±5% of the rated voltage. Line power transmission restriction rule: The transmission power of any line in the power grid cannot exceed its rated power capacity.

[0070] Finally, the knowledge graphs that pass the verification and consistency checks are stored using a graph database or graph structure storage format to ensure efficient storage and query capabilities.

[0071] Based on the same technical concept as the method embodiments, the present invention also provides a power grid data knowledge graph completion system based on steady-state model rules, including:

[0072] The initial triplet set construction module is used to preprocess the grid reference steady-state data, evaluate the validity of each data point using a set of discriminant functions, filter out a subset of valid data, and obtain the corresponding entities and relationships between entities based on the subset of valid data. The entities are the basic units that constitute the power system network, and the relationships between entities are the electrical connections and interactions between different units in the grid. The entities and relationships are combined to form the initial triplet set.

[0073] The knowledge graph construction module is used to set the entities in the initial triplet set as nodes of the knowledge graph, set the relationships between entities as edges of the knowledge graph, map the specific electrical parameters of entities and relationships to the knowledge graph, and add corresponding attribute information to the nodes and edges in the knowledge graph.

[0074] The missing data completion module is used to extract electrical parameters of nodes and lines from the knowledge graph, construct a set of power flow equations describing the steady-state operation of the power grid, transform the set of power flow equations into an optimization problem, the optimization problem takes minimizing the residuals of the power flow equations as the objective function, and uses variational inference to solve the optimization problem. The global optimal solution is approximated through iterative optimization. After the optimization process converges, the estimated values ​​of voltage amplitude and voltage phase angle are extracted from the variational distribution to fill in the corresponding missing data in the knowledge graph.

[0075] The knowledge graph update and storage module is used to integrate and complete missing electrical parameters, update nodes in the knowledge graph, form a complete power grid data knowledge graph, and store the updated knowledge graph after verification and consistency checks.

[0076] It should be understood that the power grid data knowledge graph completion system based on steady-state model rules in the embodiments of the present invention can realize all the technical solutions in the above method embodiments. The functions of each functional module can be specifically implemented according to the methods in the above method embodiments. The specific implementation process can be referred to the relevant descriptions in the above embodiments, which will not be repeated here.

[0077] The present invention also provides a computer device, comprising: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, wherein when the programs are executed by the processors, they implement the steps of the power grid data knowledge graph completion method based on steady-state model rules as described above.

[0078] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the power grid data knowledge graph completion method based on steady-state model rules as described above.

[0079] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus (systems), computer devices, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0080] This invention is described with reference to a flowchart of a method according to embodiments of the invention. It should be understood that each step in the flowchart and combinations thereof can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, generate instructions for implementing the process. Figure 1 A device for a function specified in one or more processes.

[0081] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 The function specified in one or more processes.

[0082] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 Steps of a specified function in one or more processes.

Claims

1. A method for power grid data knowledge graph completion based on steady-state model rules, characterized in that, The method comprises the following steps: After preprocessing the power grid reference steady-state data, the validity of each piece of data is evaluated using a set of discriminant functions, and an effective data subset is screened out, the corresponding entities and the relationships between the entities are obtained from the effective data subset, the entities are the basic units that constitute the power system network, and the relationships between the entities are the electrical connections and interactions between different units in the power grid, the entities and the relationships are combined to form an initial triple set; The entities in the initial triple set are set as nodes of the knowledge graph, the relationships between the entities are set as edges of the knowledge graph, and the specific electrical parameters of the entities and the relationships are mapped into the knowledge graph, and the corresponding attribute information is added to the nodes and edges in the knowledge graph; The electrical parameters of the nodes and lines are extracted from the knowledge graph, a power flow equation set describing the steady-state operation of the power grid is constructed, the power flow equation set is converted into an optimization problem, the optimization problem takes minimizing the residual error of the power flow equation as an objective function, and a variational inference method is used to solve the optimization problem, the global optimal solution is approximated through iterative optimization, and after the optimization process converges, the estimated values of the voltage amplitude and the voltage phase angle are extracted from the variational distribution to fill in the corresponding missing data in the knowledge graph; The integrated and completed missing electrical parameters are used to update the nodes in the knowledge graph, a complete power grid data knowledge graph is formed, and the updated knowledge graph is stored after verification and consistency check.

2. The method of claim 1, wherein, The preprocessing of the power grid reference steady-state data comprises: The original steady-state data of the power grid reference is format-converted and noise-removed, and denoted as dataset D = {d1, d2, ..., d...} N }, where N is the number of data entries in the dataset, and each data entry d i It includes electrical parameter records, which are numerical parameters, including voltage amplitude, voltage phase angle, active power injection, and reactive power injection.

3. The method of claim 1, wherein, The validity of each piece of data is evaluated using a set of discriminant functions, and an effective data subset is screened out, which comprises: Definition of discriminant function For evaluating the validity of each piece of data d i , for each piece of data d i , calculate wherein the discriminant function comprises a non-empty detection function, a range compliance detection function and a repetition conflict detection function, when the value of SF(d i ) is one, it is determined that the data is valid, and the valid data subset is saved and input; otherwise, it is rejected; In the discriminant function The non-empty detection function is used to detect whether the electrical parameter is empty. When it is empty, it is recorded as zero. When it is not empty, it is recorded as one. The range compliance detection function is used to detect whether the electrical parameters are within the preset specified range, and when the electrical parameters are not within the preset specified range, it is recorded as zero, and when the electrical parameters are within the preset specified range, it is recorded as one; The repetition conflict detection function is used to detect whether there is repeated conflict data at the same timestamp, and when there is repeated conflict data, it is recorded as zero, and when there is no repeated conflict data, it is recorded as one.

4. The method of claim 1, wherein, The electrical parameters of the nodes and lines are extracted from the knowledge graph, a power flow equation set describing the steady-state operation of the power grid is constructed, the power flow equation set is converted into an optimization problem, which comprises: Let the knowledge graph contain N nodes, let V i and θ i represent the voltage amplitude and voltage phase angle of node i respectively, and let Y ij =G ij +jB ij be the admittance of the line connecting node i and node j, and let the power flow equation set describing the steady-state operation of the power grid be: where P i is the active power injection at node i, Q i is the reactive power injection at node i, G ij is the conductance of the line between node i and node j, and B ij is the susceptance of the line between node i and node j. The objective of the optimization problem is defined to minimize the residual of the power flow equations, and the optimization objective function J is defined as follows:

5. The method of claim 4, wherein, The variational inference method is used to solve the optimization problem, and the global optimal solution is approximated through iterative optimization, which comprises: The variational distribution q(V, θ, E, R) is defined to approximate the posterior distribution p(V, θ, E, R|D), V represents the voltage amplitude, θ represents the voltage phase angle, E represents the entity set, R represents the relationship set, and D is the data set; Constructing the lower bound of the variation: L(q) = E q [logp(D, V, θ, E, R)] - E q [logq(V, θ, E, R)], where L(q) is the lower bound of the variation, logp(D, V, θ, E, R) is the joint log-likelihood, representing the joint log-probability of the data set D and the latent variables V, θ, E, R, logq(V, θ, E, R) is the log-probability of the approximate distribution, representing the log-probability of the latent variables under the approximate distribution q, E q [·] is the expectation value of the joint log-likelihood and the log-probability of the approximate distribution under the variational distribution q(V, θ, E, R); the optimization goal is: max q L(q); The gradient ascent method is used to iteratively optimize the variational lower bound, update the variational parameters, and stop until the convergence condition is met.

6. The method of claim 5, wherein, The variational lower bound is iteratively optimized, and the variational parameters are updated, which comprises: In each iteration t, the variational parameters are updated according to the following formula: Where, φ (t) Let η be the variational parameters at the t-th iteration. Specifically, the variational parameters include the voltage magnitude V, the voltage phase angle θ, the entity set E, and the relation set R, where η is the learning rate. The variational lower bound L(q) (t) Regarding the variational parameter φ (t) The gradient; The convergence condition is: |L(q (t+1) )-L(q (t) | <∈1 and where ∈1 is a first threshold value and ∈2 is a second threshold value.

7. The method of claim 1, wherein, The verification and consistency check of the updated knowledge graph comprises the verification of the business rules and the range compliance detection of the completed electrical parameters, so that the updated knowledge graph meets the actual logic and constraint conditions of the power grid operation, and the business rules specifically comprise one or more of the power balance rule, the voltage stability rule and the line power transmission limit rule. 8.A power grid data knowledge graph completion system based on steady-state model rules, characterized in that, It comprises: An initial triple set construction module is configured to evaluate the validity of each piece of data by using a set of discriminant functions after preprocessing the power grid benchmark steady-state data, to obtain a subset of valid data by screening, to obtain corresponding entities and relationships between entities according to the subset of valid data, wherein the entities are basic units constituting the power system network, and the relationships between entities are electrical connections and interactions between different units in the power grid, to combine the entities and the relationships to form an initial triple set; A knowledge graph construction module is configured to set the entities in the initial triple set as nodes of the knowledge graph, to set the relationships between the entities as edges of the knowledge graph, and to map the specific electrical parameters of the entities and the relationships to the knowledge graph, to add corresponding attribute information to the nodes and edges in the knowledge graph; A missing data completion module is configured to extract electrical parameters of nodes and lines from the knowledge graph, to construct a power flow equation set describing the steady-state operation of the power grid, to convert the power flow equation set into an optimization problem, to solve the optimization problem by using a variational inference method, to approximate a global optimal solution by iterative optimization, to extract estimated values of voltage amplitude and voltage phase angle from the variational distribution after the optimization process converges, and to fill in the corresponding missing data in the knowledge graph; A knowledge graph updating and storage module is configured to integrate the completed missing electrical parameters, to update the nodes in the knowledge graph, to form a complete power grid data knowledge graph, and to store the updated knowledge graph after verification and consistency check.

9. A computer device, comprising: comprise: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the programs, when executed by the processors, implement the steps of the power grid data knowledge graph completion method based on the steady-state model rule according to any one of claims 1-7.

10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer programs, when executed by the processors, implement the steps of the power grid data knowledge graph completion method based on the steady-state model rule according to any one of claims 1-7.

Citation Information

Patent Citations

  • Power distribution network CIM model information completion method and system based on knowledge graph

    CN113254669A

  • Power flow optimization method and device for power system fused with knowledge graph

    CN116345470A