A power data fusion method and system based on knowledge graph

Through the knowledge graph-based power data fusion method, using the BERT-NER model and Bayesian inversion framework, the integration and dynamic change problems of multi-source heterogeneous power data are solved, efficient data fusion and accurate state inversion are achieved, and the intelligent management of the power system is supported.

CN120493189BActive Publication Date: 2025-09-19CHENGDU UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510990256.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-18
Publication Date
2025-09-19
Estimated Expiration
2045-07-18

AI Technical Summary

Technical Problem

Existing technologies are unable to efficiently integrate multi-source heterogeneous power data, and are unable to effectively express and mine the complex correlation relationships between data. Traditional static graph embedding methods are also difficult to capture the dynamic changes of power data and cannot meet the modern power system's requirements for real-time and dynamic data.

Method used

A power data fusion method based on knowledge graph is adopted. Entity recognition and relationship extraction are performed through the BERT-NER model. Time series vectors are generated by combining the neural network model. High-precision inversion is performed using the Bayesian inversion framework to achieve missing data recovery and error correction, thereby enhancing the self-healing ability of the knowledge graph.

Benefits of technology

It achieves the effective fusion of multi-source heterogeneous power data, improves the accuracy of entity recognition and the integration of time series information, enhances the precision of power system state inversion and the efficiency of knowledge graph update, and provides comprehensive and accurate decision support for the intelligent management of power systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120493189B_ABST
    Figure CN120493189B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for fusion of electric power data based on a knowledge graph, belonging to the field of electric power data processing. The method comprises: collecting multi-source electric power data, pre-processing the collected multi-source electric power data, and outputting the pre-processed standardized data; converting the data into structured entity and relationship triples, and outputting a graph structure containing entities, relationships, and temporal information between the entities; generating a time series vector for each entity in the graph structure, integrating the graph structure and time series information into a low-dimensional vector space, using the knowledge graph as prior knowledge, performing high-precision inversion of the power system state, realizing missing data recovery and error correction, and updating and correcting the entity attributes and relationships in the knowledge graph according to the system state output by the inversion. The present invention overcomes the problem of low efficiency of traditional rule-based data processing methods when processing multi-source heterogeneous data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of power data processing, and in particular to a power data fusion method and system based on knowledge graph. Background Art

[0002] As power systems become increasingly complex and intelligent, the data generated in these systems is multi-source, heterogeneous, and massive. This data includes telemetry, telesignaling, remote control, equipment parameter tables, grid topology data, meteorological data, historical load data, and market transaction data, encompassing every stage of power generation, transmission, transformation, distribution, and consumption. The accumulation and widespread application of multi-source, heterogeneous data presents new challenges and opportunities for data management, analysis, and decision-making in the power industry. Currently, power system data processing and knowledge management primarily rely on traditional rule-based data processing and simple statistical analysis methods, such as those based on relational databases or specialized models. These methods struggle to efficiently integrate multi-source, heterogeneous data and cannot effectively represent and mine complex inter-data relationships, hindering the high-level analysis and application of spatiotemporal big data. Furthermore, traditional static graph embedding methods struggle to capture the dynamic changes in power data and lack effective mechanisms for integrating time series information, failing to meet the real-time and dynamic data requirements of modern power systems.

[0003] To address these issues, an analysis method is urgently needed that can effectively integrate multi-source heterogeneous power data, accurately identify entities, accurately extract relationships, and integrate time series information. This method should be able to uniformly manage and deeply mine all types of data in the power system, constructing a comprehensive and accurate power knowledge graph, and thus providing strong support for intelligent management of the power system. Summary of the Invention

[0004] One of the purposes of the present invention is to provide a power data fusion method based on knowledge graph to solve the problem in the existing technology that it is difficult to efficiently integrate multi-source heterogeneous data and cannot well express and mine the complex correlation relationships between data.

[0005] The present invention is implemented through the following technical solution, a power data fusion method based on knowledge graph, comprising the following steps: S100, collecting multi-source power data, pre-processing the collected multi-source power data, and outputting the pre-processed standardized data; S200, converting the standardized data into structured entity and relationship triples, building the skeleton of the knowledge graph, using the BERT-NER model to realize entity recognition, and combining the neural network model to recognize and classify named entities from text or structured data, realize the extraction of relationships, and output a graph structure containing entities, relationships and temporal information between the two; S300, generating a time series vector for each entity in the graph structure, integrating the graph structure and time series information into the low-dimensional vector space, the time series vector is an embedding vector containing structure, relationship and time series characteristics, by introducing The encoding mechanism of time information enables the generated embedding vector to reflect the state and behavior pattern of the entity at different time steps, and capture the structural relationship, time series changes and periodic patterns between entities in the power system; S400, using the knowledge graph as prior knowledge, through the Bayesian inversion framework, the power system state is inverted with high precision to achieve missing data recovery and error correction. The Bayesian-based inversion framework integrates the prior information of the knowledge graph into the inversion framework, guides the inversion process by constructing a prior distribution, and combines the knowledge graph to achieve data fusion and enhance inversion capabilities; S500, according to the system state output by the inversion framework, updates and corrects the entity attributes and relationships in the knowledge graph, and associates them with specific devices and nodes in the knowledge graph through entity recognition in S200 to identify new knowledge.

[0006] Furthermore, multi-source power data includes massive heterogeneous data from power generation, transmission, transformation to distribution and consumption, including structured data and unstructured data. Among them, structured data includes: telemetry, telesignaling, remote control, equipment parameter tables, power grid topology data, meteorological data, historical load data and market transaction data; unstructured data includes: operation and maintenance logs, fault reports, dispatch instructions, procedures and system texts, video surveillance data and audio data.

[0007] Furthermore, preprocessing includes: data cleaning and timestamp alignment, wherein data cleaning removes data noise through the LOF algorithm and standardizes the denoised data. The physical quantity is divided by the selected reference value through normalization to obtain a dimensionless relative value, eliminating the dimension effect; timestamp alignment is used to convert timestamps from different data sources into a unified format, interpolate or resample the data according to the preset time granularity, and ensure that all data points have corresponding values ​​at the same time point. For unstructured data, the event time is extracted from the text and associated with the time series data such as telemetry, telesignaling and remote control.

[0008] Furthermore, using the BERT-NER model to achieve entity recognition includes: fine-tuning the BERT-NER model to improve the model's accuracy in identifying power entities, and the fine-tuning includes the following steps: S210, manually annotating text data in multi-source power data, annotating each power entity and its boundaries to construct a NER annotation dataset in the power field; S220, adding a classification layer above the output layer of BERT, using the annotated power dataset for end-to-end training, optimizing model parameters, and enabling the model to accurately identify power entities.

[0009] Furthermore, the time series vector is calculated as follows:

[0010] ,in, For nodes In the time section Embedding vector of ; ReLU is the symbol of the rectified linear unit function, is the neighbor node, is the set of neighbor nodes of node v; is the attention coefficient, is the learning weight matrix at time section t, is the embedding vector of the neighbor node at the previous time section t-1, is the weight parameter, is the cosine, is the cycle length.

[0011] Furthermore, the Bayesian-based inversion framework is constructed by the following steps: S410, extracting key state variables from the knowledge graph, modeling the electrical state of each node at each time section, and obtaining a state vector of the power system, wherein the state vector is represented by the following formula:

[0012] , where t is the time section; i is the node; N is the total number of nodes; T is the total time section; is the state vector, is the voltage amplitude, is the voltage phase angle, is the active power, is reactive power; S420, in order to reasonably estimate the uncertainty of the observation data, by constructing an observation model, extracting the actual observable data from the state vector, establishing the relationship between the state variables of the system and the actual measured observation data, and thus inferring the optimal estimate of the system state, the observation model is expressed by the following formula:

[0013] ,in, is the observation data vector, is the observation noise, is the observation operator, which means extracting information related to the observation data from the state vector;

[0014] S430. Extract prior knowledge from the graph structure of the knowledge graph and construct a prior model, the prior model including: a power flow equation constraint for describing how the power system achieves balance under given network topology, node voltage, and injected power; hard constraints extracted from the graph structure of the knowledge graph, describing the physical operating limits and safe operating specifications of various equipment in the power system; and spatiotemporal smoothing constraints based on the temporal and spatial correlation of the state variables of the power system. The change of the power system state at adjacent time points is smooth. The spatiotemporal smoothing constraints are used to maintain the continuity of the power system state in time and space, avoiding unreasonable jumps in the system state in a short time or within a small range; the constraints are converted into a priori probability distribution to construct a priori model expressed in a probabilistic manner, which is expressed by the following formula:

[0015] ,in, is the prior model, It is proportional to, is the power flow constraint term, is the boundary constraint, is the smoothness constraint;

[0016] S440. Finally, since the posterior distribution is a combination of data and prior information, it is obtained by calculating the product of the likelihood function and the prior distribution. After taking the logarithm of the likelihood function and the prior distribution, the logarithmic posterior distribution is obtained. By maximizing the logarithmic posterior distribution, the system state is solved. The observed data, prior knowledge and physical constraints are combined to obtain the most realistic state estimate. The process of maximizing the posterior probability is equivalent to minimizing the negative logarithm.

[0017] By converting the posterior distribution into a negative logarithmic form, an inversion objective function containing a polynomial core is obtained as follows:

[0018] ,

[0019] subject to ,in, Indicates that the function reaches its minimum value. is the predicted value obtained by calculation, is the covariance matrix of the observation error, is the weight of the physical field constraint term, is the physical field of the system, is the covariance matrix of the physical field error; is a graph embedding term used to combine the state variables with the prior information of graph embedding; Embed the weights of the constraints for the graph; is the basis function related to graph embedding, is the expected value associated with the basis function; is the device hard constraint, where is the device parameter matrix, is the minimum value of the device parameter; The maximum value of the device parameter.

[0020] Furthermore, the power flow equation constraint can be expressed as follows:

[0021] ,

[0022] in, is the voltage amplitude of the jth node at time section t; is the set of all nodes; is the conductance between nodes i and j, is the voltage phase angle difference between node i and node j, is the susceptance between nodes i and j, is the allowable error term in the active power equation, is the allowed error term of the reactive power equation. In this embodiment, these two error terms conform to Gaussian distribution; By introducing the nonlinear power flow equations as soft constraints, we hope that the inverted state will satisfy these equations as much as possible, but allow certain deviations, which are measured by error terms.

[0023] Furthermore, hard constraints include:

[0024] Voltage amplitude limit: ,in, is the lower limit of the voltage amplitude, is the upper limit of the voltage amplitude; power injection limit: , Among them, is the upper limit of active power, The upper limit of reactive power; line flow limitation: ,in, is the current on node i and node j, is the rated current.

[0025] Furthermore, the logarithmic form can be expressed as follows:

[0026] ,

[0027] Where, Represents the observation matching term, which is used to penalize the difference between the observed value and the model prediction value. The larger the difference, the smaller the value of this term, which ultimately leads to a smaller overall logarithmic posterior probability; and Represents the power flow residual term. These two terms come from the logarithm of the power flow constraint term in the prior distribution and are used to penalize the deviation between the actual injected power and the power flow calculated from the voltage. These deviations should be as small as possible to satisfy the physical power flow equation. The smaller the model error, the heavier the penalty and the stricter the power flow equation. It represents the time smoothing term, which is the time part after taking the logarithm of the spatiotemporal smoothing term in the prior distribution. It is used to penalize the change of state variables between adjacent time sections. The larger the change, the heavier the penalty, resulting in a smaller logarithmic posterior probability. The spatial smoothing term comes from the spatial part of the logarithm of the spatiotemporal smoothing term in the prior distribution, which penalizes the state of node i and its electrically adjacent nodes. The greater the difference, the heavier the penalty. Represents a constant term. Usually, after taking the logarithm of the probability density function, some constant terms that are independent of the state vector will appear. These constant terms can be ignored in the maximization or minimization process because they do not affect the extreme points of the objective function.

[0028] Furthermore, the power flow constraint term is expressed as follows:

[0029] ,

[0030] in, is the symbol of the natural exponential function; is the model error of the power flow equation, is the theoretical active power function, Represents the theoretical active power calculated based on state variables; is the theoretical reactive power function, Represents the theoretical reactive power calculated based on state variables; is the state vector at time section t.

[0031] Furthermore, the boundary constraint is expressed as follows:

[0032] This constraint is used to ensure that the operating state of the device complies with physical limitations and prevent the device from operating under conditions beyond the design range.

[0033] Furthermore, the smoothness constraint is expressed as follows:

[0034] ,in, is the time covariance matrix, is the covariance matrix of the space, is the matrix transpose symbol, is the vector of state variables of node i at all time sections.

[0035] On the other hand, the present invention provides a power data fusion system based on a knowledge graph, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the power data fusion method based on the knowledge graph as described above is implemented.

[0036] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0037] 1. The present invention preprocesses and standardizes multi-source power data, and adopts the BERT-NER model and LSTM+CRF model for entity recognition and relationship extraction, thereby achieving effective fusion of multi-source heterogeneous power data and overcoming the problem of low efficiency of traditional rule-based data processing methods in processing multi-source heterogeneous data.

[0038] 2. By introducing local neighborhood aggregation and periodic time coding mechanisms, the present invention generates an embedding vector for each entity that contains structural, relational, and temporal characteristics, effectively integrating the temporal information of power data and solving the problem that traditional static graph embedding methods are difficult to capture the dynamic changes of power data.

[0039] 3. The present invention adopts a Bayesian-based inversion framework for high-precision inversion. By integrating the prior information of the knowledge graph into the Bayesian framework, it realizes the recovery of missing data and correction of errors, thereby improving the accuracy of power system state inversion.

[0040] 4. The present invention automatically identifies and updates the entity attributes and relationships in the knowledge graph through in-depth analysis and intelligent parsing of the inversion results, thereby enhancing the modifiability and self-healing capabilities of the knowledge graph, overcoming the problem of low knowledge graph update efficiency in the existing technology, and realizing deep integration and intelligent analysis of multi-source heterogeneous power data, providing comprehensive and accurate decision-making support for the intelligent management of the power system, which has important practical value and promotion and application prospects. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, constitute a part of this application, and do not constitute a limitation of the embodiments of the present invention. In the drawings:

[0042] Figure 1 This is a flow chart of the method provided in Example 1 of the present invention.

[0043] Figure 2 This is the timing of the method provided in Example 1 of the present invention.

[0044] Figure 3 Flowchart of the Bayesian inversion framework provided in Example 1 of the present invention. DETAILED DESCRIPTION

[0045] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings herein can be arranged and designed in various different configurations.

[0046] Example 1

[0047] Traditional rule-based data processing and simple statistical analysis methods are difficult to efficiently integrate multi-source heterogeneous data, and cannot well express and mine the complex correlation relationships between data, which restricts the high-level analysis and application of spatiotemporal big data. In addition, existing static graph embedding methods are difficult to capture the dynamic changes of power data, lack an effective time series information integration mechanism, and cannot meet the modern power system's requirements for real-time and dynamic data. At the same time, existing knowledge graph construction methods have problems in data preprocessing, such as data cleaning, data integration, and data transformation, which affect the quality and accuracy of knowledge graphs. In order to solve the above problems, this embodiment discloses a power data fusion method based on knowledge graphs. Figure 1 : shows the overall method flow chart of this embodiment, Figure 2 The overall method timing diagram in this embodiment is shown. Figure 1 It can be seen that this embodiment includes the following steps:

[0048] Step 1: Collect multi-source power data from the power system, preprocess the collected multi-source power data, and then output the preprocessed standardized data, which is used as input for entity extraction.

[0049] In this embodiment, the multi-source power data contains a large amount of heterogeneous data generated from power generation, transmission, transformation, distribution, and consumption. Specifically, it can contain structured data and unstructured data.

[0050] Structured data includes: telemetry, including real-time monitoring data such as generator output, line power, voltage, current, frequency, transformer active / reactive power, and busbar voltage. Telesignaling, including discrete state variables such as circuit breaker status (closed / open), switch status, protection action signals, and accident alarm signals. Remote control, including control instructions such as circuit breaker opening and closing operations and voltage-regulating transformer tap adjustment. Equipment parameter tables, including static attribute information such as rated voltage, rated current, impedance, capacity, year of operation, commissioning date, and geographic coordinates for equipment such as transformers, circuit breakers, lines, and generators. Grid topology data, including the connection relationships and topological structure between grid components (such as busbars, lines, transformers, and generators). Meteorological data, including temperature, humidity, wind speed, wind direction, and rainfall, directly impacts power load and renewable energy generation output. Historical load data, including actual power load data at different time granularities (such as hours, days, months, and years). Market transaction data, including power market prices, transaction volumes, and transaction entities.

[0051] Unstructured data includes: Operation and maintenance logs, which include records of equipment operating status, maintenance processes, abnormal events, etc., and are often in text form. Fault reports, which include text reports that detail the time, location, cause, phenomenon, handling process, and results of the fault, and may contain images and videos. Dispatch instructions, which include operating instructions issued by dispatchers, are often in text or voice form. Procedural and system texts, which include documents such as power system operating procedures, maintenance manuals, and safety regulations. Video surveillance data, which includes video data from substation and line inspections. Audio data, which includes equipment operating sounds and alarm sounds.

[0052] In this embodiment, data cleaning is a key step in preprocessing, improving data quality. Specifically, for the power data in this embodiment, outliers can be identified by first calculating the density of a data point relative to its neighbors using the LOF algorithm. Points with significantly lower density than their neighbors are considered outliers. This eliminates erroneous readings caused by sensor failures, transmission errors, or transient interference, ensuring the accuracy of subsequent analysis and modeling.

[0053] After denoising, the data is normalized. In this embodiment, per-unit normalization is performed by dividing each physical quantity (voltage, current, power, impedance, etc.) by a selected reference value (e.g., reference voltage or reference power) to obtain dimensionless relative values, thereby eliminating dimensionality effects. This per-unit normalization eliminates dimensionless differences in the data, reducing the impact on subsequent data analysis and model training, and making different features comparable.

[0054] Finally, the cleaned data is timestamped and aligned, converting timestamps from different data sources to a unified format. The data is then interpolated or resampled according to a preset time granularity (such as seconds, minutes, or hours) to ensure that all data points have corresponding values ​​at the same point in time. For unstructured data, event times can be extracted from text and associated with time series data such as telemetry, telesignaling, and telecontrol.

[0055] It's important to note that in this implementation, data cleansing ensures that data from different data sources can be accurately correlated and integrated based on a common time dimension. Furthermore, time alignment combines power data from different time series with non-time series equipment parameters and event reports for multi-dimensional comprehensive analysis, revealing deeper underlying connections. Furthermore, precise time alignment helps quickly locate all relevant data corresponding to the time of the fault, accelerating the investigation and analysis of the cause.

[0056] Step 2: Convert the cleaned, standardized data into structured entity and relationship triplets to construct the knowledge graph skeleton. The BERT-NER model is used to identify entities in the standardized data. Combined with a neural network model, this model identifies and classifies meaningful named entities from text or structured data, enabling relationship extraction. The final output is a graph structure containing entities, relationships, and the temporal information between them. The graph structure is typically organized in the form of (head entity, relationship, tail entity, timestamp) or (entity, attribute, attribute value, timestamp).

[0057] In this example, the BERT-NER model is fine-tuned using a dataset specifically labeled for the power sector, enabling the model to better understand the context of the power sector and improve its accuracy in identifying power entities. Specifically, the fine-tuning includes: 1) manually labeling power text data (such as operation and maintenance logs, fault reports, dispatch instructions, and equipment descriptions) to clearly identify various power entities and their boundaries, thereby constructing a labeled NER dataset for the power sector. 2) By adding a classification layer (e.g., a linear layer for sequence labeling) above the BERT output layer and then performing end-to-end training using the labeled power sector dataset, the model parameters are optimized, enabling it to accurately identify power entities.

[0058] Specifically, the goal of relationship extraction is to identify semantic relationships between entities, thereby forming triples (entity-relationship-entity or entity-attribute-value) in the knowledge graph. In this embodiment, the semantic relationships between entities can be identified from heterogeneous data through the LSTM+CRF (long short-term memory network + conditional random field) neural network model to complete relationship extraction. Compared with traditional rule matching methods, neural network models can better capture complex and implicit relationships and have stronger generalization capabilities. In this embodiment, LSTM can be used to encode entity context information, while CRF is used for sequence labeling in the output layer to identify relationship types.

[0059] Finally, cross-validation is combined to ensure high accuracy (≥95%) for entity recognition and relationship extraction, thus guaranteeing the quality of the generated knowledge graph. Specifically, k-fold cross-validation can be used to validate entity recognition and relationship extraction. This involves randomly dividing the dataset into k mutually exclusive subsets (folds). In each iteration, k-1 subsets are selected as the training set, and the remaining subset is used as the test set. This is repeated k times, each time selecting a different subset as the test set. Ultimately, the model's performance metric is the average of these k test results, resulting in a more stable and reliable model performance evaluation.

[0060] Step 3: Through the steps in step 2, a basic graph structure for the power knowledge graph is generated. However, power data not only contains entities and relationships but also typically has strong temporal characteristics. For example, the real-time changes in telemetered, telesignaled, and remotely controlled data, as well as the occurrence time of fault events, have strong temporal characteristics. Traditional static graph embedding methods have difficulty capturing these dynamic changes.

[0061] Therefore, in this embodiment, by generating a time series vector for each entity, the graph structure and time series information are integrated into the low-dimensional vector space, so that subsequent analysis and reasoning can simultaneously utilize the structure and time information. In other words, by mapping the constructed knowledge graph and its time series information to the low-dimensional vector space, the disadvantage of the traditional static graph embedding method that it is difficult to capture the dynamic changes of power data is changed, so that efficient computing and machine learning models can utilize dynamic power data.

[0062] In this embodiment, time-series-based graph embedding generates an embedding vector for each entity that contains structural, relational, and temporal characteristics through local neighborhood aggregation and periodic time encoding. By introducing a mechanism for encoding time information, the generated embedding vector can reflect the state and behavior pattern of the entity at different time steps. These embedding vectors can capture the complex structural relationships, temporal changes, and periodic patterns between entities (such as nodes and devices) in the power system. This provides reliable prior input for the subsequent inversion steps. By using the embedding vector as the input of the inversion framework (especially the graph embedding constraint term in the core equation), powerful prior information is provided for the inversion. This helps to quickly identify dynamic characteristics such as operating state changes, load fluctuations, and event evolution of power equipment during the inversion process.

[0063] Specifically, time-series-based graph embedding can generate a time-series vector for each entity through the following formula:

[0064] ,

[0065] in, is the embedding vector of node v at time section t; ReLU is the symbol of the rectified linear unit function, is the neighbor node, is the set of neighbor nodes of node v; The attention coefficient measures the importance of neighbor nodes to the current node when aggregating neighbor information. The larger the value of the coefficient, the greater the influence of the neighbor node on the embedding of the current node in the time section. This coefficient is usually learned through a self-attention mechanism, allowing the model to dynamically focus on more important neighbors. is the learnable weight matrix at time section t, which is a parameter of a neural network that can be learned through the training process and used to embed the neighbor nodes Perform a linear transformation to better aggregate into the representation of the current node; is the embedding vector of the neighbor node at the previous time section t-1, which is used to characterize temporal dependency. That is, the state (embedding) of the node at the current time depends not only on its current neighbors, but also on the states of the neighbors at the past moments, which is used to capture the dynamic evolution of the power system state. is a weight parameter used to adjust the importance of time encoding in the total embedding, is the cosine, is the cycle length; It is a time encoder that uses a periodic function (cosine function) to capture the periodic changes in the power system state, especially the periodicity of the power load. The time section t is mapped to a periodic feature space, so that the model can distinguish different times of the day (for example, peak load and valley load) and capture their periodic patterns.

[0066] Step 4: Use the generated knowledge graph as prior knowledge to perform high-precision inversion of the power system state through a Bayesian-based inversion framework to achieve missing data recovery and error correction.

[0067] The Bayesian-based inversion framework in this embodiment is a spatiotemporal constrained Bayesian inversion model, which integrates the prior information of the knowledge graph into the Bayesian framework, guides the inversion process by constructing a prior distribution, and uses the knowledge graph to achieve data fusion and enhance inversion capabilities. The reason why it is based on the Bayesian algorithm is that the Bayesian algorithm is naturally suitable for integrating prior knowledge and perfectly matches the positioning of the knowledge graph. By converting the knowledge graph data into a prior distribution, it has more physical meaning and flexibility than a simple regularization term. At the same time, since power data is often accompanied by noise and missing values, the Bayesian algorithm can naturally quantify uncertainty and provide a posterior distribution of state variables, rather than just a single estimated value, which has a strong effect on risk assessment and decision making. And by uniformly modeling observation errors, model errors and prior constraints, the robustness of the model to noise and missing data can be enhanced.

[0068] Figure 3 The flowchart of the Bayesian inversion framework in this embodiment is shown. It can be seen from the figure that the Bayesian inversion framework can be constructed through the following steps:

[0069] 1) Extract key state variables from the knowledge graph to model the electrical state of each node at each time section, obtaining the state vector of the power system, which is used to understand the dynamic behavior of the system. This state vector can be expressed as follows:

[0070] ,

[0071] Among them, t is the time section; i is the node; N is the total nodes; T is the total time section; is the state vector. In this embodiment, each node i has four state variables at each time segment t: voltage amplitude , voltage phase angle , active power and reactive power . The entire state vector is a real vector of dimensions 4 × N × T. By integrating the four state variables into a single large vector, subsequent mathematical modeling and optimization are facilitated. In the Bayesian inversion framework, the ultimate goal is to estimate this complete state vector, thereby obtaining the most accurate and comprehensive estimate of all key physical quantities of the power system at all times. This state vector will become the core variable in all subsequent observation models, prior models, and optimization problems.

[0072] is the voltage amplitude, which represents the voltage amplitude (per unit value) of the i-th node in the power system at time section t. The voltage amplitude is one of the important parameters for measuring the power transmission capacity of the power system. Too high or too low voltage amplitude will have an adverse effect on power transmission, affecting the stability of the system and the safety of the equipment. is the voltage phase angle, which represents the voltage phase angle of the i-th node at time section t. The voltage phase angle describes the phase position of the voltage waveform and its value range is , which is the voltage phase of a cycle, represents the phase difference of current transmitted in the power system. It is one of the key factors in power flow and power transmission. The difference in phase angle is the fundamental reason for the generation of current and also affects the flow of active and reactive power. The change in voltage phase angle reflects the energy flow and system stability in the power network. Controlling the phase angle is the key to achieving system optimization and stability. is the active power, which represents the active power of the i-th node at time section t. It is the power actually transmitted and utilized in the power system and is used to do actual work. Active power is the core part of power transmission and affects the load and scheduling of the power grid. is the reactive power, which represents the reactive power of the i-th node at time section t. It is used to establish and maintain the electromagnetic field and is mainly related to the voltage regulation of the power system. Reactive power cannot do actual work, but it is crucial to maintaining the voltage stability of the system.

[0073] 2) Due to the large number of nodes and state variables in the power system, it is usually impossible to directly observe all state variables of each node. At the same time, due to the influence of measurement errors and environmental noise, the observation data always has a certain error. In order to reasonably estimate the uncertainty of the observation data, the noise covariance matrix is ​​needed to further quantify this uncertainty. To this end, it is necessary to construct an observation model to extract the actual observable data from the state vector. In this way, the relationship between the state variables of the system and the actual measured observation data is established. Using the observation model, the optimal estimate of the system state can be inferred based on the observation data and the noise model. In this embodiment, the observation model can be expressed by the following formula:

[0074] ,

[0075] in, is the observation data vector, which contains part of the data measured from the power system; In this embodiment, it is assumed that the observation noise conforms to the Gaussian distribution, that is, ,in means the mean is 0 and the covariance is G Gaussian noise, Gis the covariance matrix, which is used to describe the correlation between observation noises. In most cases, the noises are independent, so G It is a diagonal matrix that represents the noise variance of each observation data. Each element in the diagonal matrix corresponds to the noise variance of each observation data. is the observation operator, which extracts information related to the observation data from the state vector. Specifically, the observation operator converts the state vector into the corresponding observation data. For example, if the observation operator only extracts the voltage amplitude and voltage phase angle of node i, we can get: .

[0076] 3) Extract prior knowledge from the graph structure of the knowledge graph, provide regularization and constraints for the core optimization problem, and build a priori models to obtain physically reasonable and stable solutions when the observation data is incomplete or noisy.

[0077] In this embodiment, the prior model includes:

[0078] The power flow equation constraint describes how the power system reaches equilibrium given the network topology, node voltages (magnitude and phase angle), and injected power. This power flow equation constraint can be expressed as follows:

[0079] ,

[0080] in, is the voltage amplitude of the jth node at time section t; is the set of all nodes; is the conductance between nodes i and j, is the voltage phase angle difference between node i and node j, is the susceptance between nodes i and j, is the allowable error term in the active power equation, is the allowed error term of the reactive power equation. In this embodiment, these two error terms conform to Gaussian distribution; By introducing the nonlinear power flow equations as soft constraints, we hope that the inverted state will satisfy these equations as much as possible, but allow certain deviations, which are measured by error terms.

[0081] Extracted from the graph structure of the knowledge graph, these constraints describe the physical operating limits and safe operating specifications of various devices (such as generators, transformers, and lines) in the power system. Specific constraints may include:

[0082] Voltage amplitude limit:

[0083] ,

[0084] in, is the lower limit of the voltage amplitude, is the upper limit of the voltage amplitude.

[0085] Power injection limits:

[0086] ,

[0087] in, is the upper limit of active power, The upper limit of reactive power.

[0088] Line flow restrictions:

[0089] ,

[0090] in, is the current on node i and node j, is the rated current.

[0091] Given the temporal and spatial correlation of power system state variables, spatiotemporal smoothing constraints require that changes in the power system state between adjacent time points should be smooth. Specifically, changes in the power system state should not be too drastic, as the system's physical quantities should not fluctuate significantly within a short period of time. Furthermore, the electrical quantities at adjacent nodes should be similar. For example, the voltage amplitudes and phase angles of adjacent nodes should not differ significantly. In other words, the transition between electrical quantities such as voltage and current should be smooth. Spatiotemporal smoothing constraints maintain the continuity of the power system state in both time and space, preventing unreasonable jumps in the system state within a short period of time or within a small range. This reflects the stability and continuity of the power system.

[0092] Finally, the constraints in the prior model are converted into a prior probability distribution, thus forming an overall prior model. This model is based on the physical and technical constraints obtained from the knowledge graph (KG) and expresses the impact of these constraints on the system state in a probabilistic way. The specific probability distribution form is as follows:

[0093] ,

[0094] in, is the prior model, Indicates proportional to.

[0095] Furthermore, the boundary constraint is expressed as follows:

[0096] ,

[0097] in, is the symbol of the natural exponential function; is the model error of the power flow equation, is the theoretical active power function, Represents the theoretical active power calculated based on state variables; is the theoretical reactive power function, Represents the theoretical reactive power calculated based on state variables; is the state vector at time slice t. This formula models the deviation from the power flow equation using a Gaussian distribution, ensuring that the system state is consistent with the actual power flow (the power calculated from the power flow equation).

[0098] Boundary constraints are used to model the physical limitations of the device and can be expressed as follows:

[0099] ,

[0100] In other words, this constraint ensures that the device's operating state complies with physical limitations, preventing the device from operating under conditions outside its design range. In this way, the system state is prevented from exceeding the capabilities of the actual device, ensuring system safety.

[0101] ,

[0102] in, is the time covariance matrix, is the spatial covariance matrix. The elements in the covariance matrix describe the correlation between state variables at different time points or at different spatial locations. If the state variables at two time points or between two nodes are very similar (smooth), then the corresponding covariance matrix elements will be large. On the contrary, if they can change independently, the covariance will be small. is the matrix transpose symbol, is the vector of state variables of node i at all time sections.

[0103] 4) Finally, according to Bayes' theorem, the posterior distribution is a combination of data and prior information, which can be expressed as follows:

[0104] ,

[0105] The posterior distribution formula given by Bayes' theorem is obtained by calculating the product of the likelihood function and the prior distribution. For the convenience of calculation, the logarithmic form is usually used. After taking the logarithm, we get the form of the logarithmic posterior distribution as shown below:

[0106] .

[0107] It should be noted that: in the above formula, Represents the observation matching term, which is used to penalize the difference between the observed value and the model prediction value. The larger the difference, the smaller the value of this term, which ultimately leads to a smaller overall logarithmic posterior probability; and Represents the power flow residual term. These two terms come from the logarithm of the power flow constraint term in the prior distribution and are used to penalize the deviation between the actual injected power and the power flow calculated from the voltage. These deviations should be as small as possible to satisfy the physical power flow equation. The smaller the model error, the heavier the penalty and the stricter the power flow equation. It represents the time smoothing term, which is the time part after taking the logarithm of the spatiotemporal smoothing term in the prior distribution. It is used to penalize the change of state variables between adjacent time sections. The larger the change, the heavier the penalty, resulting in a smaller logarithmic posterior probability. The spatial smoothing term comes from the spatial part of the logarithm of the spatiotemporal smoothing term in the prior distribution, which penalizes the state of node i and its electrically adjacent nodes. The difference between the states of , if the difference is greater, the heavier the penalty; const represents the constant term. Usually after the probability density function takes the logarithm, there are usually some constant terms that are independent of the state vector. These constant terms can be ignored in the maximization or minimization process because they do not affect the extreme points of the objective function.

[0108] In order to find the most likely system state, we maximize the logarithmic posterior distribution and get the following formula:

[0109] ,

[0110] in, is the system state of the final inversion output, The state feasible region formed by the device parameter boundaries is used to represent the physical and technical limitations of the system state.

[0111] In other words, this Bayesian inversion framework uses Bayes' theorem to calculate the posterior distribution and maximizes the logarithmic posterior distribution to determine the most likely system state. Using a formula in the logarithmic posterior form, it combines observational data, prior knowledge, and physical constraints (such as power flow and smoothing constraints) to ultimately obtain the most realistic state estimate. Maximizing the posterior probability is equivalent to finding the optimal system state through an optimization algorithm, ensuring that the system state is consistent with both the observational data and the physical constraints and prior knowledge.

[0112] According to the formula for maximizing the logarithmic posterior distribution, the posterior distribution is the product of the likelihood function and the prior distribution. In the maximum a posteriori (MAP) framework, maximizing this posterior distribution is equivalent to minimizing its negative logarithm. By converting the posterior distribution into a logarithmic form, we finally obtain an optimization objective function containing a polynomial. Our goal is to minimize the negative logarithmic posterior, that is:

[0113] ,

[0114] The final core inversion objective function is as follows:

[0115]

[0116] ,

[0117] in, Indicates that the function reaches its minimum value. is the predicted value obtained by calculation, is the covariance matrix of the observation error, which is used to represent the uncertainty of the observation data. is the weight of the physical field constraint term, is the physical field of the system (e.g. the residual of the power flow equation), which is a function of the state vector and represents the difference between the system state and the physical equation; is the covariance matrix of the physical field error, which represents the uncertainty of the constraint terms; is a graph embedding term used to combine the state variables with the prior information of graph embedding; is the weight of the graph embedding constraint, which is used to control the importance of the graph embedding constraint in the objective function; is the basis function related to graph embedding (such as node features in knowledge graph), is the expected value associated with the basis function. is the device hard constraint, where is the device parameter matrix, which is used to describe the hard constraint relationship of device parameters; is the minimum value of the device parameter; The maximum value of the device parameter.

[0118] It should be noted that by expanding the log-posterior, the objective function we obtain is equivalent to the formula for maximizing the log-posterior distribution. The optimization process involves minimizing the difference between the observed data and the model output (the observation matching term); minimizing the error in the physical field constraints (the physical field constraints term); and minimizing the consistency with the prior knowledge (the graph embedding constraints), while also satisfying the hard constraints of the device.

[0119] Step 5: Update and correct the entity attributes and relationships in the knowledge graph based on the corrected and restored system state x∗ output by the Bayesian inversion model.

[0120] The corrected and restored system state x∗ contains state variables such as voltage amplitude, phase angle, and injected power. Compared with the original observation data, the updated data is more accurate and is associated with specific devices and nodes in the knowledge graph through entity recognition in step 2, thereby identifying new knowledge.

[0121] Specifically, identifying newly added knowledge can be done by converting numerical inversion results into symbolic knowledge (entities and relationships). When the inversion results show that power injection in a certain area persists for a long time and does not conform to existing device definitions, it may indicate a new load node or distributed generation. Such situations can be identified using preset thresholds and pattern matching.

[0122] For example, if a node has a long-term high net injected power and is not marked as a generator or large user in the knowledge graph, it can be identified as a "potential new load node" or "distributed power access point" and assigned a temporary ID or recommended for manual confirmation. This requires defining the concept of "potential entity" in the knowledge graph and supporting the dynamic addition of its attributes.

[0123] At the same time, the state variables obtained by inversion are themselves accurate measurements or corrections of equipment parameters or operating states. By adjusting the weights of the input parameters in the power flow equation, if the power residual obtained by inversion is large, or by comparing the voltage and current obtained by inversion with the actual measured values, it is found that the line impedance in the current knowledge graph (given by , If the data (decision) does not match and the deviation exceeds a preset threshold, it can be inferred that there may be actual deviation or modeling error in the line impedance. A rule-based or machine learning-based deviation detection module can also be designed. When significant deviations are detected, corresponding suggestions are generated. After automated verification or manual confirmation, these suggestions are converted into updates to the impedance value attributes of the line and the attribute-impedance relationship in the knowledge graph. This enhances the knowledge graph's modifiable and self-healing capabilities.

[0124] For example, if the inversion results indicate that a circuit breaker has been disconnected for a long time and the lines it connects to are electrically disconnected, a recommendation can be made to update the state of the connection relationship associated with the circuit breaker. Alternatively, in extreme cases, if a new temporary connection (such as an emergency power supply) is detected, the inversion results can be used to infer and recommend adding a new temporary connection relationship.

[0125] The identified new knowledge is converted into a standard triplet form, and the new relationships are verified using the power flow equation. In other words, the updated knowledge is re-substituted into the power flow equation or other electrical physics constraints to verify whether it still satisfies physical laws or significantly reduces inversion residuals. This ensures the quality of the knowledge graph and prevents erroneous inversion results from introducing noisy knowledge. Finally, the updated triplet list containing the structured information is output, which can be directly used to update the knowledge graph, completing the inversion update of the knowledge graph.

[0126] Example 2

[0127] In this embodiment, a power data fusion system based on knowledge graph is disclosed.

[0128] The power data fusion system in this embodiment generally includes:

[0129] A processor and a memory, wherein a computer program is stored in the memory. When the computer program is executed by the processor, the power data fusion method based on the knowledge graph as described in Example 1 can be implemented.

[0130] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A power data fusion method based on knowledge graph, characterized in that: The power data fusion method includes: S100, collecting multi-source power data, preprocessing the collected multi-source power data, and outputting the preprocessed standardized data; S200, converting the standardized data into structured entity and relationship triples, building a knowledge graph skeleton, using the BERT-NER model to implement entity recognition, and combining it with a neural network model to identify and classify named entities from text or structured data to extract relationships. Output a graph structure containing entities, relationships, and temporal information between them; S300, generate a time series vector for each entity in the graph structure, and integrate the graph structure and time series information into the low-dimensional vector space. The time series vector is an embedding vector containing structure, relationship and time series characteristics. By introducing the encoding mechanism of time information, the generated embedding vector reflects the state and behavior pattern of the entity at different time steps. Capturing the structural relationships, temporal variations, and periodic patterns among entities in the power system; S400 uses the knowledge graph as prior knowledge and performs high-precision inversion of the power system state through a Bayesian-based inversion framework to achieve missing data recovery and error correction. The Bayesian-based inversion framework integrates the prior information of the knowledge graph into the inversion framework, guides the inversion process by constructing a prior distribution, and combines the knowledge graph to achieve data fusion and enhance the inversion capability; S500: Update and modify the entity attributes and relationships in the knowledge graph based on the system status output by the inversion framework. And through the entity recognition in S200, it is associated with the specific devices and nodes in the knowledge graph to identify the newly added knowledge.

2. The power data fusion method based on knowledge graph according to claim 1 is characterized in that: The multi-source power data includes massive heterogeneous data from power generation, transmission, transformation, distribution and consumption, including structured data and unstructured data. Structured data includes: telemetered quantities, telesignaled quantities, remotely controlled quantities, equipment parameter tables, power grid topology data, meteorological data, historical load data, and market transaction data; Unstructured data includes: operation and maintenance logs, fault reports, dispatch instructions, procedures and regulations texts, video surveillance data, and audio data.

3. The power data fusion method based on knowledge graph according to claim 1 is characterized in that: The pretreatment includes: Data cleaning and timestamp alignment, where Data cleaning uses the LOF algorithm to remove data noise and standardizes the denoised data. The physical quantity is divided by the selected reference value through per-unit processing to obtain a dimensionless relative value and eliminate the dimension effect. Timestamp alignment is used to convert timestamps from different data sources into a unified format, interpolate or resample the data according to the preset time granularity, and ensure that all data points have corresponding values ​​at the same time point. For unstructured data, the time of event occurrence is extracted from the text and associated with the time series data such as telemetry, telesignaling and remote control.

4. The power data fusion method based on knowledge graph according to claim 1 is characterized in that: The method of using the BERT-NER model to realize entity recognition includes: fine-tuning the BERT-NER model to improve the accuracy of the model in recognizing power entities, The fine-tuning comprises the following steps: S210, manually annotating the text data in the multi-source power data, annotating each power entity and its boundary to construct a NER annotated dataset in the power field; S220. Add a classification layer on top of BERT’s output layer, perform end-to-end training using the labeled power dataset, optimize the model parameters, and enable the model to accurately identify power entities.

5. The power data fusion method based on knowledge graph according to claim 1 is characterized in that: The time series vector is calculated by the following formula: , in, For nodes In the time section Embedding vector of ; ReLU is the symbol of the rectified linear unit function, is the neighbor node, For nodes The set of neighbor nodes of is the attention coefficient, For the time section The learning weight matrix, is the embedding vector of the neighbor node at the previous time section t-1, is the weight parameter, is the cosine, is the cycle length.

6. The power data fusion method based on knowledge graph according to claim 1 is characterized in that: The Bayesian-based inversion framework is constructed through the following steps: S410: Extract key state variables from the knowledge graph, model the electrical state of each node at each time section, and obtain a state vector of the power system. The state vector is expressed by the following formula: , Among them, t is the time section; i is the node; N is the total nodes; T is the total time section; is the state vector, is the voltage amplitude, is the voltage phase angle, is the active power, is the reactive power; S420. To reasonably estimate the uncertainty of the observation data, an observation model is constructed to extract the actual observable data from the state vector, and the relationship between the state variables of the system and the actual measured observation data is established, thereby inferring the optimal estimate of the system state. The observation model is expressed by the following formula: , in, is the observation data vector, is the observation noise, is the observation operator, which means extracting information related to the observation data from the state vector; S430: Extract prior knowledge from the graph structure of the knowledge graph and construct a priori model, wherein the priori model includes: The power flow equations that describe how the power system achieves equilibrium given the network topology, node voltages, and injected power; Extracted from the graph structure of the knowledge graph, it describes the hard constraints of the physical operating limits and safe operating specifications of various equipment in the power system; According to the spatiotemporal smoothing constraints of the temporal and spatial correlation of the state variables of the power system, the changes of the power system state at adjacent time points are smooth. The spatiotemporal smoothing constraints are used to maintain the continuity of the power system state in time and space, avoiding unreasonable jumps in the system state in a short time or within a small range. The constraints are converted into a priori probability distribution, and a priori model expressed in a probabilistic way is constructed, which is expressed by the following formula: , in, is the prior model, It is proportional to, is the power flow constraint term, is the boundary constraint, is the smoothness constraint; S440. Finally, since the posterior distribution is a combination of data and prior information, it is obtained by calculating the product of the likelihood function and the prior distribution. After taking the logarithm of the likelihood function and the prior distribution, the logarithmic posterior distribution is obtained. By maximizing the logarithmic posterior distribution, solving the system state, combining the observation data, prior knowledge and physical constraints, we can get the most realistic state estimate. The process of maximizing the posterior probability is equivalent to minimizing the negative logarithm. By converting the posterior distribution into a negative logarithmic form, an inversion objective function containing a polynomial core is obtained as follows: , , in, Indicates that the function reaches its minimum value. is the predicted value obtained by calculation, is the covariance matrix of the observation error, is the weight of the physical field constraint term, is the physical field of the system, is the covariance matrix of the physical field error; is a graph embedding term used to combine the state variables with the prior information of graph embedding; Embed the weights of the constraints for the graph; is the basis function related to graph embedding is the expected value associated with the basis function; is the device hard constraint, where is the device parameter matrix, is the minimum value of the device parameter; The maximum value of the device parameter.

7. The power data fusion method based on knowledge graph according to claim 6 is characterized in that: The power flow constraint term is expressed by the following formula: , in, is the symbol of the natural exponential function; is the model error of the power flow equation, is the theoretical active power function, Represents the theoretical active power calculated based on state variables; is the theoretical reactive power function, Represents the theoretical reactive power calculated based on state variables; is the state vector at time section t.

8. The power data fusion method based on knowledge graph according to claim 6 is characterized in that: The boundary constraint is expressed as follows: , in, is the lower limit of the voltage amplitude, is the upper limit of the voltage amplitude; is the active power of the i-th node at time section t, is the upper limit of active power; is the reactive power of the i-th node at time section t, is the upper limit of reactive power; is the current on node i and node j, is the rated current; This constraint is used to ensure that the device operates within physical limitations and prevent the device from operating under conditions outside its design range.

9. The power data fusion method based on knowledge graph according to claim 6 is characterized in that: The smoothness constraint term is expressed as follows: , in, is the time covariance matrix, is the covariance matrix of the space, is the matrix transpose symbol, is the vector of state variables of node i at all time sections.

10. A power data fusion system based on knowledge graph, characterized in that: The power data fusion system includes: processor; A memory storing a computer program, which, when executed by a processor, implements the power data fusion method based on a knowledge graph as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Time sequence knowledge graph completion method based on time probability box embedding

    CN118014071A

  • Abnormality detection method and system for redundancy-eliminating perception multi-dimensional power utilization data fusion

    CN119885013A