Power grid data knowledge graph completion method and system based on steady-state model rule
Through the grid data knowledge graph completion method based on steady-state model rules, problems such as low grid data processing efficiency and low completion accuracy in the existing technology are solved, and efficient and accurate grid data completion and optimized grid operation are achieved.
Patent Information
- Application Number
- CN202510201010.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-24
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2045-02-24
AI Technical Summary
The existing power grid data completion methods have problems such as low data processing efficiency and low completion accuracy, especially when dealing with real-time data and complex relationships.
The grid data knowledge graph completion method based on steady-state model rules is adopted. By pre-processing and screening the grid reference steady-state data, the data validity is evaluated using the discriminant function set, the initial triple set is constructed, the knowledge graph is formed, and the missing data is complemented by the system of flow equations and variational inference methods.
It improves the integrity and accuracy of power grid data, intelligently completes the missing data in the power grid, optimizes the operation and decision-making support of power grid, and improves the reliability and stability of the power grid.
Smart Images

Figure CN120144827A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power grid data processing, and in particular to a method and system for completing a knowledge graph of power grid data based on steady-state model rules. Background Art
[0002] As the scale of power systems continues to expand and become more complex, grid operation and management are facing increasing challenges. The operating data, equipment parameters and the relationships between them involved in the power grid are very large. How to efficiently process, manage and utilize these data has become an important issue that needs to be solved in the power sector. Traditional data management and analysis methods usually rely on structured data storage and simple rule reasoning, which makes it difficult to detect problems in grid operation in a timely manner and difficult to achieve in-depth analysis and prediction based on big data and artificial intelligence.
[0003] The completion of power grid data and the construction of knowledge graphs are the key to solving this problem. As a graphical data structure, knowledge graphs can organically combine various entities in the power grid and the complex relationships between them, providing a more comprehensive and flexible way to represent power grid data. Existing power grid data completion methods mainly rely on rule-based reasoning and numerical simulation. Although these methods can improve the integrity of data to a certain extent, they still face problems such as low data processing efficiency and low completion accuracy.
[0004] At present, although there are some power grid data completion methods based on machine learning and deep learning, most of these methods rely on a large amount of labeled data or complex model training, often requiring high computing costs and complex model design, and there are still great challenges in processing some real-time data and complex relationships in power grid operation. Summary of the invention
[0005] Based on the above-mentioned shortcomings of the prior art, the purpose of the present invention is to provide a method and system for completing a power grid data knowledge graph based on steady-state model rules to solve the above-mentioned technical problems.
[0006] To achieve the above object, the present invention provides the following technical solutions:
[0007] In a first aspect, a method for completing a knowledge graph of power grid data based on steady-state model rules includes:
[0008] After preprocessing the grid benchmark steady-state data, the validity of each piece of data is evaluated using a set of discriminant functions, and a valid data subset is screened to obtain corresponding entities and relationships between entities based on the valid data subset. 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 grid. The entities and relationships are combined to form an initial triplet set;
[0009] Set the entities in the initial triple set as the nodes of the knowledge graph, set the relationships between the entities as the edges of the knowledge graph, map the specific electrical parameters of the entities and relationships into the knowledge graph, and add corresponding attribute information to the nodes and edges in the knowledge graph;
[0010] Extract the electrical parameters of the nodes and lines from the knowledge graph, construct a power flow equation set describing the steady-state operation of the power grid, transform the power flow equation set into an optimization problem, the optimization problem takes minimizing the residual of the power flow equation as the objective function, and use the variational inference method to solve the optimization problem, approximate the global optimal solution through iterative optimization, after the optimization process converges, extract the estimated values of the voltage magnitude and voltage phase angle from the variational distribution, and fill in the corresponding missing data in the knowledge graph;
[0011] Integrate the complemented missing electrical parameters, update the nodes in the knowledge graph, form a complete power grid data knowledge graph, and store it after verifying and checking the consistency of the updated knowledge graph.
[0012] Preferably, the preprocessing of the power grid benchmark steady-state data includes:
[0013] Perform format conversion and noise removal on the power grid benchmark original steady-state data, denoted as the data set D = {d 1 , d 2 ,..., d N}, where N is the number of data in the data set, and each data d i contains electrical parameter records, and the electrical parameters are numerical parameters, including voltage magnitude, voltage phase angle, active power injection, and reactive power injection.
[0014] Preferably, define a discriminant function for evaluating the validity of each data d i . For each data d i , calculate where the discriminant function includes a non-empty detection function, a range compliance detection function, and a duplicate conflict detection function. When the value of SF(d i ) is one, determine that the data is valid, save it, and input the valid data subset; otherwise, eliminate it;
[0015] In the discriminant function , the non-empty detection function is used to detect whether the electrical parameters are empty. When they are empty, record them as zero, and when they are not empty, record them as one;
[0016] The range compliance detection function is used to detect whether the electrical parameters are within the preset specified range. When they are not within the preset specified range, record them as zero, and when they are within the preset specified range, record them as one;
[0017] The repeated conflict detection function is used to detect whether there are repeated conflict data in the electrical parameters at the same timestamp. When there are repeated conflict data, it is recorded as zero, and when there is no repeated conflict data, it is recorded as one.
[0018] Preferably, electrical parameters of nodes and lines are extracted from the knowledge graph, and a power flow equation set describing the steady-state operation of the power grid is constructed. Transforming the power flow equation set into an optimization problem includes:
[0019] Suppose the knowledge graph contains N nodes, let V i and θ i respectively represent the voltage amplitude and voltage phase angle of node i. For each line l connecting node i and node j, its admittance is Y ij = G ij + jB ij . The power flow equation set describing the steady-state operation of the power grid is: Among them, P i is the active power injection of node i, Q i is the reactive power injection of 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;
[0020] Define the objective of the optimization problem as minimizing the residual of the power flow equation. The optimization objective function J is defined as follows:
[0021]
[0022] Preferably, the variational inference method is used to solve the optimization problem, and the global optimal solution is approximated through iterative optimization, including:
[0023] Define the 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 set of entities, R represents the set of relationships, and D is the data set;
[0024] 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 the data set D and the 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. E q [·] is 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] Using the gradient ascent method, iteratively optimize the variational lower bound, update the variational parameters until the convergence condition is satisfied.
[0026] Preferably, iteratively optimize the variational lower bound and update the variational parameters, including:
[0027] At each iteration t, update the variational parameters according to the following formula: where φ (t) is the variational parameter at the t-th iteration. The variational parameters specifically include the voltage amplitude V, voltage phase angle θ, entity set E, and relationship set R. η is the learning rate. is the gradient of the variational lower bound L(q (t) ) with respect to the variational parameter φ (t) ;
[0028] The convergence condition is: |L(q (t+1) ) - L(q (t) )| < ∈ 1 and where ∈ 1 is the first threshold, and ∈ 2 is the second threshold.
[0029] Preferably, verifying and consistency checking the updated knowledge graph includes verifying business rules and detecting compliance with the range of electrical parameters to be complemented, so that the updated knowledge graph conforms to the actual logic and constraint conditions of power grid operation. The business rules specifically include one or more of the power balance rule, voltage stability rule, and line power transmission limit rule.
[0030] In a second aspect, a power grid data knowledge graph completion system based on steady-state model rules includes:
[0031] An initial triple set construction module, which is used to preprocess the power grid benchmark steady-state data, evaluate the validity of each piece of data using a discriminant function set, screen out an effective data subset, obtain corresponding entities and relationships between entities according to the effective data subset. The entity is the basic unit constituting the power system network, and the relationship between entities is the electrical connection and interaction between different units in the power grid. Combine the entities and relationships to form an initial triple set;
[0032] A knowledge graph construction module, which is used to set the entities in the initial triple set as the nodes of the knowledge graph, set the relationships between entities as the edges of the knowledge graph, map the specific electrical parameters of the entities and relationships into 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 the electrical parameters of nodes and lines from the knowledge graph, construct a power flow equation set describing the steady-state operation of the power grid, transform the power flow equation set into an optimization problem, the optimization problem takes minimizing the residual of the power flow equation as the objective function, and uses the variational inference method to solve the optimization problem, and approximates the global optimal solution through iterative optimization. After the optimization process converges, the estimated values of the voltage amplitude and voltage phase angle are extracted from the variational distribution to fill the corresponding missing data in the knowledge graph;
[0034] The knowledge graph update and storage module is used to integrate the completed missing electrical parameters, update the nodes in the knowledge graph, form a complete power grid data knowledge graph, and perform verification and consistency check on the updated knowledge graph before storage.
[0035] In a third aspect, the present invention further provides a computer device, including: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and when the program is executed by the processor, it implements the steps of the method for completing the power grid data knowledge graph based on the steady-state model rules as described in the first aspect of the present invention.
[0036] In a fourth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the method for completing the power grid data knowledge graph based on the 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 integrity and accuracy of power grid data: Through the preprocessing and screening of the power grid benchmark steady-state data, combined with the discriminant function set to evaluate the data validity, the high quality of the input data is ensured. Using this data screening method, invalid, incorrect or abnormal data can be effectively removed, providing accurate basic data for subsequent knowledge graph completion, thereby improving the integrity and accuracy of the power grid data knowledge graph;
[0039] (2)Intelligent completion of missing power grid data: By constructing a non-linear power flow equation set related to the steady-state operation of the power grid and introducing knowledge graph embedding vectors to enhance the constraint conditions of the power flow equation, the present invention can deduce and complete the missing electrical parameters based on the existing data. Through the data completion process of the steady-state model rules (power flow constraints), it is ensured that the completed parameters such as voltage amplitude and phase angle conform to the physical laws of the actual operation of the power grid, and data problems such as voltage over-limit and power imbalance that do not conform to the normal steady-state operation of the power grid can be avoided. By applying the variational inference method, the optimization problem can be efficiently solved to approximate the global optimal solution. This method can accurately complete the electrical parameters while ensuring data consistency, greatly improving the integrity of the power grid data;
[0040] (3)Optimizing power grid operation and decision support: By completing the missing electrical parameters in the power grid data, the completed knowledge graph contains complete electrical parameters that conform to the steady-state rules. The complete 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 can not only improve the operation efficiency of the power grid but also help power grid managers make more accurate decisions, enhancing the reliability and stability of the power grid. Description of the Drawings
[0041] Figure 1 It is a flowchart of the method for completing the power grid data knowledge graph based on the steady-state model rules shown in the embodiments of the present invention;
[0042] Figure 2 It is a schematic diagram of a partial knowledge graph of power grid data shown in the embodiments of the present invention. Detailed Embodiments
[0043] The technical solutions of the present invention will be further described below in conjunction with the drawings and embodiments.
[0044] Refer to Figure 1 , in an embodiment of the present invention, a method for completing the power grid data knowledge graph based on the steady-state model rules includes the following steps:
[0045] Step S1: Preprocess and screen the power grid reference steady-state data, evaluate the effectiveness of the power grid reference steady-state data using a discriminant function set, screen to obtain a valid data subset, and combine the entities and the relationships between the entities according to the valid data to form an initial triple set.
[0046] Grid reference steady-state data is usually collected in real time by various monitoring devices, including SCADA systems, smart meters, and sensors. These devices record the operating state parameters of various components of the 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 format of the original data to unify the data representation for subsequent processing and analysis. In addition, since the original data may be affected by various interferences during the collection process, resulting in noise in the data, it is necessary to remove it. By removing the noise, the signal-to-noise ratio of the data is improved, ensuring the accuracy and reliability of the data.
[0047] According to an embodiment of the present invention, in step S1, the grid reference steady-state data is preprocessed and screened, specifically including: converting the format of the original grid reference steady-state data and removing noise. The data after format conversion and noise removal is defined as a data set D = {d 1 , d 2 ,..., d N}, where each data d i contains electrical parameter records. The electrical parameters are numerical parameters, including voltage amplitude, voltage phase angle, active power injection, and reactive power injection. Specifically, the voltage amplitude describes the magnitude of the voltage and reflects the voltage level of each node in the grid; the voltage phase angle represents the phase angle of the voltage, and the phase angle difference is an important factor determining the flow direction of active power and reflects the phase relationship of the voltage in the grid; the active power injection represents the active power injection or consumption of an entity, with a positive value indicating power injection and a negative value indicating power consumption, which determines the total active power supply of the system and affects the power balance and operating efficiency of the grid; the reactive power injection represents the reactive power injection or consumption of an entity, and reactive power is used to maintain the voltage level, with a positive value indicating reactive power injection and a negative value indicating reactive power consumption, which affects the voltage regulation of the grid and the stability of the system.
[0048] 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 integrity of these data directly affect the monitoring, analysis, and optimization of the grid. Therefore, it is necessary to strictly evaluate the validity of the original data, remove invalid or incorrect data, and ensure the quality of the data set D. In order to systematically evaluate each data d iTo verify the validity, the present invention introduces multiple discriminant functions, each of which is used to detect different data quality problems. Specifically, it includes a non-empty detection function, a range compliance detection function, and a duplicate conflict detection 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 parameter is within the preset specified range. When it is not within the preset specified range, it is recorded as zero; when it is within the preset specified range, it is recorded as one. The duplicate conflict detection function is used to detect whether there are duplicate conflict data for the electrical parameter at the same timestamp. When there are duplicate conflict data, it is recorded as zero; when there are no duplicate conflict data, it is recorded as one.
[0049] According to an embodiment of the present invention, in step S1, a set of discriminant functions is used to evaluate the validity of the power grid reference steady-state data, including: defining a discriminant function for evaluating each piece of data d i of the validity. For each piece of data d i , calculate wherein, the discriminant function includes a non-empty detection function, a range compliance detection function, and a duplicate conflict detection function. When the value of SF(d i ) is one, it is determined that the data is valid, saved, and input into the valid data subset; otherwise, it is eliminated. In the discriminant function , the non-empty detection function detects whether there is a null value, that is, missing data, in the electrical parameter of the data d i , so as to ensure that all electrical parameters of each data record are filled, avoid analysis errors caused by missing data, output 0 (indicating that there is a problem with the data) when it is a null value, otherwise output 1; the range compliance detection function detects whether the electrical parameter in the data d i is within the preset specified range, which is used to ensure that the electrical parameter is within a reasonable operating range and prevent abnormal values from affecting the analysis result. Output 0 (indicating that there is a problem with the data) when it exceeds the range, otherwise output 1; the duplicate conflict detection function detects whether there are duplicate or conflicting data records for the data d i at the same timestamp, avoiding multiple conflicting data records at the same timestamp and ensuring the consistency and uniqueness of the data. Output 0 (indicating that there is a problem with the data) when there are duplicate conflicts, otherwise output 1. The present invention realizes automatic data evaluation and cleaning by introducing a set of discriminant functions, reduces the workload of manual processing and human errors, and improves the data processing efficiency.
[0050] As an example, the data d 1: The voltage amplitude is 220 kV (within the range), the voltage phase angle is 30° (within the range), the active power injection is +500 MW (within the range, positive value indicates power injection), the reactive power injection is -200 MVar (within the range, negative value indicates power consumption), all parameters are non-empty, and there is no duplicate conflict data, SF(d 1 ) = 1 * 1 * 1 * 1 * 1 = 1, and the data is determined to be valid.
[0051] As another example, for data d 2 : The voltage amplitude is null (null value, does not meet the non-empty detection), the voltage phase angle is 90° (within the range), the active power injection is -300 MW (within the range, negative value indicates power consumption), the reactive power injection is +100 MVar (within the range, positive value indicates power injection), but there are duplicate conflict data (same timestamp, different parameters), then SF(d 2 ) = 0 * 1 * 1 * 1 * 0 = 0, and the data is determined to be invalid.
[0052] After screening by the discriminant function set, an effective data subset is obtained. The data set (such as voltage amplitude, voltage phase angle) is associated with the corresponding power grid entities (such as substations, generators, loads, etc.). Power grid entities are the basic units that make up the power system network, also known as power grid nodes; each entity in the power grid interacts through electrical connections and works together according to specific voltage and power flow directions to achieve the effective transmission, distribution, and control of electric energy. For example, the values of voltage amplitude and voltage phase angle can be mapped to the corresponding entity (such as a power grid node) as its attribute information, and each node of the power grid is also assigned specific electrical parameters. The relationships between entities (such as voltage, power flow, etc.) are presented in the form of edges in the knowledge graph. For example, the power flow relationship between a certain 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, according to the entities corresponding to the effective data and the relationships between the entities, the entities and relationships are combined to form an initial triple set, denoted as T = {(e i , e j , r ij ) | e i , e j ∈ E, r ij ∈ R}, where T is the initial triple set, e i is the i-th entity, e j is the j-th entity, r ij is the relationship between entity e i and e j , E is the entity set, and R is the relationship set.
[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 triple set of the knowledge graph. Each triple consists of an entity, a relationship, and an attribute value (such as voltage magnitude, voltage phase angle, etc.).
[0054] Step S2: Define the structure and storage form of the knowledge graph according to the initial triple set, and add corresponding attribute information to the nodes and edges in the knowledge graph.
[0055] According to the embodiments of the present invention, the entities in the initial triple set are set as the nodes of the knowledge graph, the relationships between the entities are set as the edges of the knowledge graph, the specific electrical parameters of the entities and relationships are mapped into the knowledge graph, and corresponding attribute information is added to the nodes and edges in the knowledge graph. For a reference example diagram of the knowledge graph Figure 2 。
[0056] Step S3: Construct a power flow equation set that describes the steady-state operation of the power grid, define an optimization problem to minimize the residual of the power flow equation, use the variational inference method to solve the optimization problem, approximate the global optimal solution through iterative optimization, extract the optimization results, and complete the missing electrical parameters in the knowledge graph.
[0057] In the power system, power flow calculation is an important tool for analyzing the voltage distribution, active power, and reactive power flow of the power grid under steady-state operating conditions. The power flow equation set is based on the electrical parameters of nodes and lines, establishes the balance equations of active power and reactive power, and describes the steady-state operation of the power grid. According to the embodiments of the present invention, the electrical parameters of nodes and lines are extracted from the knowledge graph to establish a power flow equation set that describes the steady-state operation of the power grid.
[0058] Specifically, assume that the knowledge graph contains N nodes, let V i and θ i 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 , and the power flow equation set that describes the steady-state operation of the power grid is as follows: Among them, P i is the active power injection of node i, Q i is the reactive power injection of 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.
[0059] Transform the power flow equations into an optimization problem, aiming 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 the missing data. Minimizing the optimization objective function means minimizing the residuals of the power flow equations. Since the power flow equations are usually non-linear, directly solving them may face computational complexity and convergence problems. Therefore, variational inference method is used to solve the optimization problem.
[0060] According to an embodiment of the present invention, define the optimization objective function J as the sum of squares of the residuals of the power flow equations, in the following form:
[0061]
[0062] Use the variational inference method to solve the optimization problem. Variational inference is a Bayesian inference method for approximating 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 an index in variational inference to measure the closeness between the approximate distribution and 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, first define the variational distribution q(V, θ, E, R) 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 the dataset 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, and E q [·] is 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] Use the gradient ascent method to iteratively optimize the variational lower bound, and gradually update the parameters of the variational distribution until the convergence condition is satisfied. The gradient ascent method is an optimization algorithm for maximizing the objective function. By iteratively updating the parameters along the direction of the gradient of the objective function, the value of the objective function is gradually increased. By minimizing the residuals of the power flow equations, it is ensured that the supplemented electrical parameters are highly consistent with the actual power grid operation state, improving the accuracy and reliability of the data. Specifically, at each iteration t, update the variational parameters in the following way: where φ (t)is the variational parameter at the t-th iteration, η is the learning rate, is the variational lower bound L(q (t) ) with respect to the variational parameter φ (t) . The variational parameters specifically include the voltage amplitude V, the voltage phase angle θ, the entity set E, and the relationship set R. Since only the voltage amplitude V and the voltage phase angle θ are numerical parameters, when iteratively optimizing the variational lower bound, only the voltage amplitude V and the voltage phase angle θ are updated using the gradient ascent method to iteratively optimize the variational lower bound and update the variational parameters until the convergence condition is met. According to an embodiment of the present invention, the convergence condition is: |L(q (t+1) ) - L(q (t) )| < ∈ 1 and where ∈ 1 is the first threshold, and ∈ 2 is the second threshold.
[0066] 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.
[0067] S4: Integrate the complemented 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 an embodiment of the present invention, verifying and checking the consistency of the updated knowledge graph includes verifying business rules and detecting the compliance of the range of the complemented electrical parameters to ensure that the updated knowledge graph conforms to the actual logic and constraint conditions of power grid operation. Specifically, during the construction and update of the knowledge graph, especially after complementing the missing electrical parameters, it is necessary to ensure that the updated knowledge graph is not only complete in data but also conforms to the actual logic and constraint conditions of power grid operation. Business rules refer to the norms and constraint conditions that must be followed during 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 operation logic of the power grid; through strict business rule verification and range compliance detection, it is ensured that the data in the knowledge graph is accurate, complete, and consistent, significantly improving the quality and reliability of the data set, ensuring that the electrical parameters are within a reasonable range, preventing system instability or failures caused by abnormal data, and improving the overall stability and security of the power grid.
[0069] Furthermore, the business rules specifically include power balance rules, voltage stability rules, and line power transmission limit rules. Power balance rules: At any point in time, the total power generation of the power grid should be equal to the total load power, plus any power losses or the power output of energy storage systems, that is, the power flow within the power grid must meet the requirements of power balance; Voltage stability rules: The voltage magnitudes of each node in the power grid must be maintained within a specified stable range, not exceeding ±5% of the rated voltage; Line power transmission limit rules: The transmission power of any line in the power grid cannot exceed its rated power capacity.
[0070] Finally, the knowledge graph that has passed verification and consistency checking is 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 embodiment, the present invention also provides a power grid data knowledge graph completion system based on steady-state model rules, including:
[0072] An initial triple set construction module, which is used to preprocess the power grid reference steady-state data, evaluate the effectiveness of each piece of data using a discriminant function set, filter out an effective data subset, obtain corresponding entities and the relationships between entities based on the effective data subset, where the entity is the basic unit that constitutes the power system network, and the relationship between entities is the electrical connection and interaction between different units in the power grid. Combine the entities and relationships to form an initial triple set;
[0073] A knowledge graph construction module, which is used to set the entities in the initial triple set as the nodes of the knowledge graph, set the relationships between entities as the edges of the knowledge graph, map the specific electrical parameters of the entities and relationships into the knowledge graph, and add corresponding attribute information to the nodes and edges in the knowledge graph;
[0074] A missing data completion module, which is used to extract the electrical parameters of nodes and lines from the knowledge graph, construct a power flow equation set that describes the steady-state operation of the power grid, transform the power flow equation set into an optimization problem, where the optimization problem takes minimizing the residual of the power flow equation as the objective function, and uses variational inference method to solve the optimization problem. Approximate the global optimal solution through iterative optimization. After the optimization process converges, extract the estimated values of voltage magnitude and voltage phase angle from the variational distribution to fill in the corresponding missing data in the knowledge graph;
[0075] A knowledge graph update and storage module, which is used to integrate the completed missing electrical parameters, update the nodes in the knowledge graph to form a complete power grid data knowledge graph, and store the updated knowledge graph after verification and consistency checking.
[0076] It should be understood that the power grid data knowledge graph completion system based on the steady-state model rules in the embodiments of the present invention can implement all the technical solutions in the above method embodiments. The functions of its respective functional modules can be specifically implemented according to the methods in the above method embodiments, and the specific implementation process can refer to the relevant descriptions in the above embodiments, which will not be elaborated here.
[0077] The present invention also provides a computer device, including: one or more processors; a memory; and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the one or more processors, and when the programs are executed by the processors, the steps of the method for completing the power grid data knowledge graph based on the steady-state model rules as described above are implemented.
[0078] The present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method for completing the power grid data knowledge graph based on the steady-state model rules as described above are implemented.
[0079] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a device (system), a computer device, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program codes.
[0080] The present invention is described with reference to the flowchart of the method according to the embodiments of the present invention. It should be understood that each process in the flowchart and the combination of processes in the flowchart can be implemented by computer program instructions. These computer program instructions can be provided to the processors of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processors of the computer or other programmable data processing devices generate a device for implementing the functions specified in Figure 1 one process or multiple processes.
[0081] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the functions specified in Figure 1 one process or multiple processes.
[0082] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus, causing a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process, such that the instructions executed on the computer or other programmable apparatus provide steps for implementing the functions specified in one or more of the processes Figure 1 or steps of a process.
Claims
1. A method for completing a knowledge graph of power grid data based on steady-state model rules, characterized in that: The following steps are involved: After preprocessing the grid benchmark steady-state data, the validity of each piece of data is evaluated using a set of discriminant functions, and a valid data subset is screened to obtain corresponding entities and relationships between entities based on the valid data subset. 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 grid. The entities and relationships are combined to form an initial triplet 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, the specific electrical parameters of the entities and the relationships are mapped to the knowledge graph, and corresponding attribute information is added to the nodes and edges in the knowledge graph; The electrical parameters of nodes and lines are extracted from the knowledge graph, and a group of power flow equations describing the steady-state operation of the power grid is constructed. The group of power flow equations is converted into an optimization problem, wherein the optimization problem takes minimizing the residual of the power flow equation as the objective function, and the variational inference method is used to solve the optimization problem. The global optimal solution is approached through iterative optimization. After the optimization process converges, the estimated values of the voltage amplitude and voltage phase angle are extracted from the variational distribution to fill the corresponding missing data in the knowledge graph. Integrate and complete the missing electrical parameters, update the nodes in the knowledge graph, form a complete power grid data knowledge graph, and store the updated knowledge graph after verification and consistency check.
2. The method according to claim 1, characterized in that Preprocessing of the grid benchmark steady-state data includes: The grid benchmark original steady-state data is converted and noise is removed, which is recorded as data set D = {d1, d2, ..., d N }, where N is the number of data in the data set, and each data d i Contains electrical parameter records, where the electrical parameters are numerical parameters, including voltage amplitude, voltage phase angle, active power injection, and reactive power injection.
3. The method according to claim 1, characterized in that: The discriminant function set is used to evaluate the validity of each piece of data and filter out a subset of valid data, including: Define the discriminant function To evaluate each data d i The effectiveness of i ,calculate Among them, the discriminant functions include non-empty detection function, range compliance detection function and repeated conflict detection function. When SF(d i ) is one, the data is considered valid, saved, and a valid data subset is input; otherwise, it is discarded; In the discriminant function In , 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; The range compliance detection function is used to detect whether the electrical parameters are within the preset prescribed range. When they are not within the preset prescribed range, they are recorded as zero, and when they are within the preset prescribed range, they are recorded as one; The duplicate conflict detection function is used to detect whether the electrical parameters have duplicate conflicting data at the same time stamp. When duplicate conflicting data exists, it is recorded as zero, and when duplicate conflicting data does not exist, it is recorded as one.
4. The method according to claim 1, characterized in that: The electrical parameters of nodes and lines are extracted from the knowledge graph, and the power flow equations describing the steady-state operation of the power grid are constructed. The power flow equations are transformed into optimization problems, including: Assume that the knowledge graph contains N nodes, let V i and θ i They represent the voltage amplitude 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: Among them, P i is the active power injection of node i, Q i is the reactive power injection of node i, G ij is the conductance of the line between node i and node j, B ij is the susceptance of the line between node i and node j; The goal of the optimization problem is to minimize the residual of the power flow equation. The optimization objective function J is defined as follows:
5. The method according to claim 4, characterized in that The optimization problem is solved by using a variational inference method, and the global optimal solution is approached through iterative optimization, including: Define the 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 relationship set, and D is the data set; Construct 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, which represents the joint log-probability of the dataset D and the latent variables V,θ,E,R, logq(V,θ,E,R) is the log-probability of the approximate distribution, which represents the log-probability of the latent variable under the approximate distribution q, and E q [·] is 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 goal is: max q L(q); The gradient ascent method is used to iteratively optimize the variational lower bound and update the variational parameters until the convergence conditions are met.
6. The method according to claim 5, characterized in that Iteratively optimize the variational lower bound and update the variational parameters, including: At each iteration t, the variational parameters are updated according to the following formula: Among them, φ (t) is the variational parameter at the tth iteration, which specifically includes the voltage amplitude V, the voltage phase angle θ, the entity set E and the relationship set R, η is the learning rate, is the variational lower bound L(q (t) ) about the variational parameter φ (t) The gradient of The convergence condition is: |L(q (t+1) )-L(q (t) )|<∈1 and Among them, ∈1 is the first threshold and ∈2 is the second threshold.
7. The method according to claim 1, characterized in that Verification and consistency check of the updated knowledge graph include verification of business rules and range compliance detection of completed 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 power balance rules, voltage stability rules and line power transmission limitation rules.
8. A power grid data knowledge graph completion system based on steady-state model rules, characterized in that: include: An initial triplet set construction module is used to pre-process the grid benchmark steady-state data, evaluate the validity of each piece of data using a discriminant function set, screen out a valid data subset, and obtain corresponding entities and relationships between entities based on the valid data subset. The entities are basic units that constitute the power system network, and the relationships between entities are electrical connections and interactions between different units in the grid. The entities and relationships are combined to form an initial triplet set; A knowledge graph construction module is used to set the entities in the initial triple set as nodes of the knowledge graph, set the relationships between entities as edges of the knowledge graph, map the specific electrical parameters of the entities and relationships into the knowledge graph, and add corresponding attribute information to the nodes and edges in the knowledge graph; The missing data completion module is used to extract the electrical parameters of nodes and lines from the knowledge graph, construct a group of power flow equations describing the steady-state operation of the power grid, and transform the group of power flow equations into an optimization problem. The optimization problem takes minimizing the residual of the power flow equation as the objective function, and adopts a variational inference method to solve the optimization problem. The global optimal solution is approximated through iterative optimization. After the optimization process converges, the estimated values of the voltage amplitude and voltage phase angle are extracted from the variational distribution to fill the corresponding missing data in the knowledge graph; The knowledge graph update and storage module is used to integrate and complete the missing electrical parameters, update the nodes in the knowledge graph, form a complete power grid data knowledge graph, and store the updated knowledge graph after verification and consistency check.
9. A computer device, characterized in that: include: one or more processors; Memory; And one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and when the programs are executed by the processors, the steps of the power grid data knowledge graph completion method based on steady-state model rules as described in any one of claims 1-7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for completing the knowledge graph of power grid data based on steady-state model rules as described in any one of claims 1 to 7 are implemented.
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
Knowledge graph completion method and device, equipment, storage medium and program product
CN117909517A
Method and system for constructing flood discharge safety knowledge graph by combining machine learning with traditional mechanism model
CN117993495A
Knowledge graph neighborhood relation completion method and system related to power equipment, medium and processor
CN118917394A
Cited By
Multi-dimensional quality evaluation method, device and equipment for carbon footprint data and storage medium
CN120746395A