A knowledge graph-based power cost prediction method and system
By constructing a knowledge graph of electricity costs and performing hierarchical graph neural network operations, the problem that existing electricity cost prediction methods cannot accurately quantify the contribution of transmission links is solved, realizing accurate prediction and dynamic adaptation of electricity costs, and improving the accuracy and interpretability of prediction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- STATE GRID ENERGY RES INST CO LTD
- Filing Date
- 2026-04-23
- Publication Date
- 2026-05-29
AI Technical Summary
Existing electricity cost forecasting methods fail to accurately quantify the contribution of different transmission links to end-user costs, resulting in insufficient accuracy and interpretability of forecast results. In particular, they cannot meet the decision-making needs for refined electricity cost management when facing policy adjustments and fuel price fluctuations.
A knowledge graph-based method for predicting electricity costs is constructed. By building a four-layer cost transmission hierarchy structure consisting of fuel cost layer, power generation cost layer, transmission and distribution cost layer, and terminal cost layer, the formation mechanism of electricity costs in the industrial chain is explicitly embedded into the knowledge graph. The transmission weight is calculated using physical loss coefficient, transmission time delay parameter, and policy intervention intensity coefficient. The message passing operation of the graph neural network is performed along the hierarchical structure to generate embedded features, which are then input into the prediction network to output the electricity cost prediction results.
It enables accurate quantification of the terminal cost of different transmission links, improves the accuracy and interpretability of power cost forecasting, and can identify cost changes in key transmission paths and time periods, dynamically adapting to changes in the power system.
Smart Images

Figure CN122114289A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electricity cost prediction technology, and in particular to an electricity cost prediction method and system based on knowledge graphs. Background Technology
[0002] With the deepening of power market reform and the accelerated transformation of the energy structure, the composition of electricity costs is becoming increasingly complex, influenced by multiple factors such as fuel price fluctuations, generator unit efficiency, transmission and distribution network losses, and policy regulation. Accurately predicting electricity costs is of great significance for power generation companies to formulate bidding strategies, for grid companies to operate and dispatch electricity, and for electricity market trading decisions.
[0003] Existing methods for predicting electricity costs mainly include time series analysis, econometric models, and machine learning. Most of these methods treat electricity costs as regression relationships or time-series dependencies with influencing factors, failing to explicitly model the formation and transmission mechanisms of costs within the electricity industry chain. Therefore, existing prediction methods struggle to identify the step-by-step transmission process of electricity costs throughout the entire industry chain, from fuel procurement, power generation, transmission and distribution to end-user consumption. This results in insufficient modeling capabilities for cost formation mechanisms, especially when facing multi-source shocks such as policy adjustments and fuel price fluctuations. They cannot accurately quantify the contribution of different transmission links to end-user costs, and the accuracy and interpretability of the prediction results are insufficient to meet the decision-making needs for refined electricity cost management. Summary of the Invention
[0004] To address the problem of insufficient accuracy in prediction results due to the inability of existing technologies to accurately quantify the contribution of different transmission links to end-user costs, this invention provides a knowledge graph-based method and system for electricity cost prediction. By constructing a hierarchical cost transmission structure, the formation mechanism of electricity costs in the industry chain is explicitly embedded into the knowledge graph, achieving differentiated and accurate modeling of costs along the transmission path, and accurately quantifying the contribution of different transmission links to end-user costs. The specific technical solution is as follows: This application provides a knowledge graph-based method for predicting electricity costs, including: Acquire historical power data, which includes generation-side data, transmission and distribution-side data, consumption-side data, macroeconomic data, and policy text data; Based on the historical electricity data, an electricity cost knowledge graph is constructed; the electricity cost knowledge graph includes: The node set includes fuel type nodes, generator set nodes, power grid nodes, regional load nodes, electricity price component nodes, and policy nodes; A directed edge set, which includes multiple cost transmission directed edges, wherein the direction of each cost transmission directed edge is consistent with the transmission direction of electricity costs in the electricity industry chain, and each cost transmission directed edge is associated with a physical loss coefficient, a transmission time delay parameter, and a policy intervention intensity coefficient. The hierarchical structure, wherein the directed edges of the cost transmission form a hierarchical structure according to the power cost transmission path, the hierarchical structure includes: The fuel cost layer consists of first-type cost propagation directed edges from fuel type nodes to generator set nodes. The generation cost layer consists of second-type cost transmission directed edges from generator node to grid node; The transmission and distribution cost layer consists of directed edges of the third type of cost transmission from grid nodes to regional load nodes; The terminal cost layer consists of a fourth type of directed cost transmission edge, pointing from the regional load node to the electricity price component node. Along the direction of the hierarchical structure, the message passing operation of the graph neural network is executed layer by layer to generate the embedded features of each node; wherein, during the message passing process, for any cost transmission directed edge, the transmission weight of the cost transmission directed edge is calculated based on the physical loss coefficient, transmission time delay parameter and policy intervention intensity coefficient associated with the cost transmission directed edge, and the feature information of the source node is aggregated to the target node based on the transmission weight. The embedded features of the target node are input into the prediction network, and the power cost prediction result is output.
[0005] Preferably, during message transmission, for any directed edge of cost transmission, the transmission weight of the directed edge of cost transmission is calculated based on the physical loss coefficient, transmission delay parameter, and policy intervention intensity coefficient associated with the directed edge of cost transmission, specifically including: The first weight component is determined based on the physical loss coefficient of the directed edge of cost transmission, the second weight component is determined based on the transmission delay parameter of the directed edge of cost transmission, and the third weight component is determined based on the policy intervention intensity coefficient of the directed edge of cost transmission. The first weight component, the second weight component, and the third weight component are weighted and summed or multiplied to obtain the transmission weight of the directed edge of cost transmission.
[0006] Preferably, in the message passing operation of the graph neural network performed layer by layer along the direction of the hierarchical structure, when the feature information of the source node is passed to the target node along any cost-directed edge, the feature information of the source node is multiplied by a decay factor and then aggregated to the target node; The attenuation factor is determined based on the physical loss coefficient associated with the cost-transmitting directed edge and the transmission path length of the cost-transmitting directed edge in the hierarchical structure, and the attenuation factor decreases as the transmission path length increases.
[0007] Preferably, the message passing operation of the graph neural network is performed only along the direction of the hierarchical structure.
[0008] Preferably, the step of inputting the embedded features of the target node into the prediction network and outputting the electricity cost prediction result includes: The embedded features of the target node are fused with the cost time-series features extracted by the time-series feature extraction network to obtain fused features. The fused features are then input into a fully connected network to output the predicted power cost and the cost contribution decomposition results. The cost contribution decomposition results include the contribution values of the fuel cost layer, the power generation cost layer, the transmission and distribution cost layer, and the terminal cost layer.
[0009] Preferably, the cost contribution decomposition result is obtained by reverse tracing the transmission weights of each cost transmission directed edge.
[0010] Preferably, the cost contribution breakdown results further include: The marginal contribution trend of each cost transmission path corresponding to a directed edge within a preset time window; wherein, the marginal contribution trend is obtained by performing time-series analysis of the transmission weights of each directed edge along the time dimension, and is used to identify the key transmission paths that dominate cost changes in different time periods.
[0011] Preferably, the electricity cost prediction results include the predicted time-of-use electricity cost per unit area for each region and the ranking of the contribution of each cost transmission path corresponding to the directed edge of cost transmission to the terminal cost.
[0012] Preferably, the construction of the electricity cost knowledge graph further includes: In response to changes in the power system topology, the directed edge set and the hierarchical structure are dynamically updated.
[0013] This application also provides a knowledge graph-based electricity cost prediction system, including: The data acquisition module is used to acquire historical power data, which includes generation-side data, transmission and distribution-side data, power consumption-side data, macroeconomic data, and policy text data. The graph construction module is used to construct an electricity cost knowledge graph based on the historical electricity data. The electricity cost knowledge graph includes a node set, a directed edge set, and a hierarchical structure. The node set includes fuel type nodes, generator set nodes, grid nodes, regional load nodes, electricity price component nodes, and policy nodes. The directed edge set includes multiple cost transmission directed edges, the direction of which is consistent with the transmission direction of electricity costs in the electricity industry chain, and each cost transmission directed edge is associated with a physical loss coefficient, a transmission time delay parameter, and a policy intervention intensity coefficient. The hierarchical structure includes a fuel cost layer, a generation cost layer, a transmission and distribution cost layer, and a terminal cost layer. The feature extraction module is used to perform message passing operations of the graph neural network layer by layer along the direction of the hierarchical structure to generate embedded features of each node. In the message passing process, for any cost transmission directed edge, the transmission weight of the cost transmission directed edge is calculated based on the physical loss coefficient, transmission time delay parameter and policy intervention intensity coefficient associated with the cost transmission directed edge, and the feature information of the source node is aggregated to the target node according to the transmission weight. The prediction module is used to input the embedded features of the target node into the prediction network and output the electricity cost prediction result.
[0014] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention discloses a knowledge graph-based method and system for predicting electricity costs. By constructing a four-layer cost transmission hierarchy—fuel cost layer, power generation cost layer, transmission and distribution cost layer, and terminal cost layer—the formation mechanism of electricity costs in the industry chain is explicitly embedded into the knowledge graph, realizing the step-by-step cost transmission process. Furthermore, by associating physical loss coefficients, transmission time delay parameters, and policy intervention intensity coefficients with directed edges of cost transmission, and calculating transmission weights accordingly, differentiated and accurate modeling of costs along the transmission path is achieved, enabling accurate quantification of the contribution of different transmission links to terminal costs. Simultaneously, by limiting message passing operations in the graph neural network to only along the direction of the hierarchical structure and introducing a decay factor that decreases with the length of the transmission path, the message passing process conforms to the actual transmission law of electricity costs, avoiding information dissemination that does not conform to physical reality and improving the accuracy of electricity cost prediction. Attached Figure Description
[0015] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the accompanying drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn to scale.
[0016] Figure 1A flowchart of a knowledge graph-based electricity cost prediction method is provided for an embodiment of the present invention.
[0017] Figure 2 This is a schematic diagram of a knowledge graph-based power cost prediction system provided in an embodiment of the present invention. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] It should be understood that, when used in this specification, the terms “comprising” and “including” indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0020] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0021] It should also be further understood that the term "and / or" as used in this specification refers to any combination of one or more of the associated listed items, as well as all possible combinations, and includes such combinations.
[0022] Please refer to the following examples. Figure 1 and Figure 2 .
[0023] This application provides a knowledge graph-based method for predicting electricity costs, including: Step S1: Obtain historical power data, which includes generation-side data, transmission and distribution-side data, power consumption-side data, macroeconomic data, and policy text data; Data on the power generation side is obtained through the power dispatch system or the power generation enterprise information system, including the installed capacity, fuel consumption rate, power generation, grid connection price, carbon emission intensity, and equipment operating status of each generator unit.
[0024] Data on the transmission and distribution side is obtained through the power grid dispatching system, including the line transmission capacity, actual transmitted electricity, line loss rate, transmission and distribution price, and power grid topology of each voltage level power grid.
[0025] Electricity consumption data is obtained through power trading centers or load forecasting systems, including electricity load curves, electricity consumption structure, and end-user electricity prices for each region.
[0026] Macroeconomic data are obtained through statistical departments or economic databases, including GDP growth rate, consumer price index, industrial added value, and total energy consumption.
[0027] Policy text data were obtained from government websites, energy regulatory agency announcements, and industry reports, including electricity pricing policies, carbon trading policies, renewable energy subsidy policies, and rules for electricity market trading.
[0028] The collected multi-source data underwent cleaning, alignment, and normalization. Missing values were handled using interpolation or forward imputation; outliers were removed based on the three-standard-deviation principle or box plots; data alignment converted to a monthly scale across different frequencies; and normalization used minimum-maximum standardization to map the data to the zero-to-one range. Policy text data underwent natural language processing for word segmentation, entity recognition, and relation extraction, transforming it into structured data.
[0029] Step S2: Based on the historical electricity data, construct an electricity cost knowledge graph; the electricity cost knowledge graph includes: The node set includes fuel type nodes, generator set nodes, power grid nodes, regional load nodes, electricity price component nodes, and policy nodes; The fuel type nodes are divided according to fuel type, including coal nodes, natural gas nodes, oil fuel nodes, nuclear power fuel nodes, and new energy nodes. The associated attributes of each node include historical fuel price series, calorific value, carbon emission factor, and supply stability index. Generator unit nodes are divided according to specific generator units or power plants. The associated attributes of each node include installed capacity, unit type, efficiency curve, fixed operation and maintenance costs, variable operation and maintenance costs, historical series of grid-connected electricity prices, geographical location, and year of commissioning. The power grid nodes are divided according to voltage level and region. The associated attributes of each node include node type, rated capacity, actual transmitted power, line loss rate, transmission and distribution price, geographical location and the power grid company to which it belongs. Regional load nodes are divided according to administrative regions or load centers. The associated attributes of each node include annual electricity consumption, monthly electricity consumption, load curve, electricity consumption structure, regional GDP and population. Electricity price component nodes are divided according to the constituent elements of electricity price, including fuel cost component nodes, power generation cost component nodes, transmission and distribution cost component nodes, government fund nodes, tax nodes, and profit nodes. The associated attributes of each node include the historical price series and proportion of each component. Policy nodes are categorized by specific policy documents or policy types. The associated attributes of each node include policy name, release date, policy type, implementation period, policy strength value, and scope of impact. During node initialization, historical data is used as the initial feature vector for numerical attributes, one-hot encoding or embedding vector representation is used for categorical attributes, and a pre-trained language model is used to extract semantic feature vectors for textual attributes. Taking a policy node as an example, its initial feature vector is represented as follows: Among them, BERT ( ) represents the pre-trained language model encoder, and text represents the policy text content. is the dimension of the output vector.
[0030] A directed edge set, which includes multiple cost transmission directed edges, wherein the direction of each cost transmission directed edge is consistent with the transmission direction of electricity costs in the electricity industry chain, and each cost transmission directed edge is associated with a physical loss coefficient, a transmission time delay parameter, and a policy intervention intensity coefficient. Among them, the direction of the directed edge of cost transmission strictly follows the actual transmission path of electricity costs, from the fuel type node to the generator node, from the generator node to the grid node, from the grid node to the regional load node, and from the regional load node to the electricity price component node.
[0031] The physical loss coefficient characterizes the proportion of cost lost during transmission. The line loss rate of power grid transmission is directly used as the physical loss coefficient, while fuel transportation loss is used as the physical loss coefficient at the fuel cost layer edge, with a value ranging from zero to one. For power grid transmission paths, the physical loss coefficient... The calculation formula is: in, To reduce power consumption during transmission, This represents the total transmitted power.
[0032] The transmission lag parameter characterizes the time delay in the transmission of upstream cost changes to downstream costs. Coal price changes have a one- to three-month lag in transmission to coal-fired power generation costs, while electricity price policy adjustments have a one- to six-month lag in transmission to end-user electricity prices. The lag parameter is expressed in months. Based on correlation analysis of historical data, the following was determined: in, The Pearson correlation coefficient is used. For the upstream node at time The value to be transmitted, For downstream nodes at time The value to be transmitted, The value range is set based on actual experience with the power system; The policy intervention intensity coefficient characterizes the degree of policy intervention in the transmission path, and is determined comprehensively based on the policy strength value and the sensitivity of the link in which the intervention occurs. Policy intervention intensity parameters Represented as: in, The policy strength value is determined through semantic analysis of the policy text and detailed expert scoring. This represents the sensitivity coefficient of the relevant stage to the policy.
[0033] The hierarchical structure, wherein the directed edges of the cost transmission form a hierarchical structure according to the power cost transmission path, the hierarchical structure includes: The fuel cost layer consists of first-type cost propagation directed edges from fuel type nodes to generator set nodes. The generation cost layer consists of second-type cost transmission directed edges from generator node to grid node; The transmission and distribution cost layer consists of directed edges of the third type of cost transmission from grid nodes to regional load nodes; The terminal cost layer consists of a fourth type of directed cost transmission edge, pointing from the regional load node to the electricity price component node. Step S3: Along the direction of the layered structure, perform the message passing operation of the graph neural network layer by layer to generate the embedding features of each node; In the message transmission process, for any directed edge of cost transmission, the transmission weight of the directed edge of cost transmission is calculated based on the physical loss coefficient, transmission delay parameter and policy intervention intensity coefficient associated with the directed edge of cost transmission, and the feature information of the source node is aggregated to the target node based on the transmission weight. Message passing operations strictly follow the hierarchical structure, allowing information to be passed only from upstream to downstream levels, and prohibiting reverse propagation or cross-level jumps. The first round of message passing is from the fuel cost layer to the power generation cost layer, the second round is from the power generation cost layer to the transmission and distribution cost layer, and the third round is from the transmission and distribution cost layer to the terminal cost layer.
[0034] During message transmission, for any directed edge of cost transmission, the transmission weight of that directed edge is calculated based on the physical loss coefficient, transmission delay parameter, and policy intervention intensity coefficient associated with it. A first weight component is determined based on the physical loss coefficient, a second weight component based on the transmission delay parameter, and a third weight component based on the policy intervention intensity coefficient. The first, second, and third weight components are then weighted and summed or multiplied to obtain the transmission weight of the directed edge.
[0035] The transfer weights are calculated using a weighted summation method as follows: in, The physical loss coefficient, The normalized propagation delay parameter, This represents the intensity coefficient of policy intervention. , , Let be the weighting coefficient, satisfying .
[0036] Alternatively, the weights can be transferred using a product operation as follows: The two calculation methods can be selected according to the application scenario, or the optimal combination can be determined through model training.
[0037] The calculated transit weights, after being normalized by Softmax, are used for message aggregation. in, Weights are passed to normalization; Pointing to a node The set of neighboring nodes.
[0038] For the target node In its first The feature update formula for the layer is as follows: in, Pointing to a node The neighborhood group, For the source node at the th Features of the layer The normalized transit weights, and The first The learnable weight matrix and bias terms of the layer For nonlinear activation functions, modified linear units are used: The above update operations are performed layer by layer, after which... After layer message passing, the embedding features of each node are obtained. The embedding features of the terminal's bottom-level nodes are represented as follows: ,in Electricity price distribution nodes or regional negative nodes.
[0039] The transmission weight is calculated based on the physical loss coefficient, transmission time delay parameter, and policy intervention intensity coefficient of the directed edge association of cost transmission. It is used to characterize the relative importance of different transmission paths to the cost of the target node. The transmission weight reflects the transmission efficiency of the path itself, that is, how much upstream cost information can be effectively transmitted to the downstream in this segment of the path. Its calculation takes into account multiple factors such as loss, time delay, and policy intervention.
[0040] Step S4: Input the embedded features of the target node into the prediction network and output the electricity cost prediction result.
[0041] Specifically, the step of inputting the embedded features of the target node into the prediction network and outputting the electricity cost prediction result includes: The embedded features of the target node are fused with the cost time-series features extracted by the time-series feature extraction network to obtain fused features. The fused features are then input into a fully connected network to output the predicted power cost and the cost contribution decomposition results. The cost contribution decomposition results include the contribution values of the fuel cost layer, the power generation cost layer, the transmission and distribution cost layer, and the terminal cost layer.
[0042] Specifically, the cost contribution decomposition result is obtained by reverse tracing the transmission weights of each cost transmission directed edge.
[0043] The embedded features of the target node are fused with the cost time-series features extracted by the time-series feature extraction network to obtain the fused features. The time-series feature extraction network uses a long short-term memory network or a gated recurrent unit, takes historical electricity cost time-series data as input, and outputs a cost time-series feature vector. For the input sequence... The update process of the Long Short-Term Memory (LSTM) network is as follows: in, For a moment Input features; This is the hidden state from the previous moment; This represents the state of the memory unit from the previous moment; These are the input gate, forget gate, and output gate, respectively. For learnable parameters, , , , For the input weight matrix, , , , This is a cyclic weight matrix. , , , Bias term; () represents element-wise multiplication. The final output cost temporal feature vector is the hidden state at the last time step. .
[0044] Feature fusion is performed using a cross-attention mechanism or a combination of concatenation and fully connected layers. The embedded features of the target node are concatenated with the cost temporal feature vector and then input into a multilayer perceptron to obtain the fused features. The embedded features of the target node are then... With cost time series feature vector The fusion process employs a combination of splicing and fully connected layers: in, As a feature of fusion, This is a vector concatenation operation. and ReLU provides a learnable fusion matrix and bias terms. This is the activation function.
[0045] The fused features are input into a fully connected network, which outputs predicted electricity costs and cost contribution decomposition results. The cost contribution decomposition results include contributions from the fuel cost layer, generation cost layer, transmission and distribution cost layer, and terminal cost layer. These results are obtained by reverse-tracking the transmission weights of each directed edge in the cost transmission process.
[0046] Fusion features Input to a fully connected network, output predicted electricity costs. and cost contribution breakdown results These correspond to the contribution values of the fuel cost layer, power generation cost layer, transmission and distribution cost layer, and terminal cost layer, respectively: in, and To predict the parameters of the output layer, and The parameter output dimension of the contribution decomposition layer is four.
[0047] The cost contribution decomposition results are obtained by reverse tracing the transmission weights of each directed edge of cost transmission. The contribution value for the fuel cost layer is calculated as follows. The calculation method is as follows: in, The set of all transmission paths passing through the fuel cost layer. As a complete cost transmission path, For the directed edges of cost propagation along the path, The transit weight for this edge. As the attenuation factor, The initial characteristics of the path starting point, i.e., the fuel type node.
[0048] Similarly, the contribution value of the power generation cost layer can be calculated. Contribution value of transmission and distribution cost layer and terminal cost layer contribution value ,satisfy .
[0049] The prediction network is trained end-to-end. The loss function includes the mean squared error between the predicted and actual values, as well as the supervision loss or regularization term of the contribution decomposition results. Training uses an adaptive moment estimation optimizer with a learning rate of 0.001 and a batch size of 32. Training epochs are stopped early based on the performance on the validation set.
[0050] The prediction network is trained end-to-end, and the loss function is defined as follows: The first term is the mean squared error loss between the predicted and actual values. For the sample size, For the first The true cost value of each sample The first term is the predicted value; the second term is the supervision loss of the contribution decomposition results. The contribution decomposition vector for prediction. Label the vectors to represent the true contributions. This is the balance coefficient.
[0051] When true contribution labels are lacking, the second term is replaced with a regularization term, which constrains the sum of all contributions to equal the total cost. A power cost prediction method based on a knowledge graph according to the present invention constructs a four - layer cost conduction hierarchical structure of a fuel cost layer, a power generation cost layer, a transmission and distribution cost layer, and a terminal cost layer, explicitly embeds the formation mechanism of power cost in the industrial chain into the knowledge graph, and realizes the cost step - by - step conduction process; and by associating physical loss coefficients, conduction time - lag parameters, and policy intervention intensity coefficients with the cost conduction directed edges, and calculating transfer weights based on this, it realizes differential and accurate modeling of costs along the conduction path, and can accurately quantify the contribution degree of different conduction links to the terminal cost. At the same time, by restricting the message passing operation of the graph neural network to only proceed along the direction of the hierarchical structure, and introducing an attenuation factor that decays with the length of the conduction path, the message passing process conforms to the actual conduction law of power cost, avoids information propagation that does not conform to physical reality, and improves the accuracy of power cost prediction.
[0052] Specifically, in a preferred embodiment of the present application, when performing the message passing operation of the graph neural network layer - by - layer along the direction of the hierarchical structure, when the feature information of the source node is transmitted to the target node along any cost conduction directed edge, the feature information of the source node is multiplied by the attenuation factor and then aggregated to the target node; wherein, the attenuation factor is determined according to the physical loss coefficient associated with the cost conduction directed edge and the length of the conduction path where the cost conduction directed edge is located in the hierarchical structure, and the attenuation factor decreases as the length of the conduction path increases.
[0053] In the actual conduction process of power cost, when cost information is transmitted from the upstream link to the downstream link, it is not completely lossless transmission. Taking the conduction from fuel cost to power generation cost as an example, there are losses during the transportation of coal, and some fuels also generate losses during loading, unloading, and storage; taking the conduction from power generation cost to transmission and distribution cost as an example, there are line losses during the transmission of electricity, and the farther the transmission distance, the greater the losses; taking the conduction from transmission and distribution cost to terminal cost as an example, there are also losses in the distribution link, and the multi - level distribution network will accumulate losses. Based on this physical law, in this embodiment, an attenuation factor is introduced in the message passing process to simulate the loss effect generated by the cost accumulating with the path length during the conduction process. The attenuation factor is introduced because: a certain proportion of attenuation occurs for cost information on each conduction path segment, and the longer the conduction path, the greater the cumulative attenuation, and the less effective cost information is finally transmitted to the target node.
[0054] Among them, the calculation method of the attenuation factor is as follows: wherein, is the physical loss coefficient, is the length of the conduction path, that is, the number of segments passed from the cost conduction starting point to the current node, It is a learnable decay rate parameter used to control the severity of decay.
[0055] In this preferred embodiment, during the message passing process in the graph neural network, when the feature information of the source node is passed to the target node along the cost propagation directed edge, it is first multiplied by a decay factor, then multiplied by the propagation weight, and finally aggregated to the target node. Based on the target node... In its first The feature update formula for the layer is as follows: in, Pointing to a node The neighborhood group, For the source node at the th Features of the layer The normalized transit weights, As the attenuation factor, and The first The learnable weight matrix and bias terms of the layer For nonlinear activation functions, modified linear units are used: It should be noted that the attenuation factor is specifically used to model the loss effect caused by the accumulation of costs over the transmission path length. Its value depends only on the physical loss coefficient and the transmission path length, and is not directly affected by time lags or policy factors. The attenuation factor reflects the total loss in the cumulative transmission process, that is, how much effective component of upstream cost information remains after multiple levels of transmission. By first multiplying the feature information of the source node by the attenuation factor to reflect the remaining effective information after multiple levels of cumulative loss, and then multiplying it by the transmission weight to reflect the relative importance of that path segment in cost transmission. This order of attenuation followed by weighting is consistent with the actual transmission law of electricity costs. Through the synergistic effect of the attenuation factor and the transmission weight, the physical process of cost transmission and loss at each level in the industrial chain can be accurately modeled, making the message transmission process of the graph neural network more consistent with the actual formation mechanism of electricity costs, thereby improving the accuracy of medium- and long-term electricity cost forecasting.
[0056] Specifically, in a preferred embodiment of this application, the cost contribution breakdown result further includes: The marginal contribution trend of each cost transmission path corresponding to a directed edge within a preset time window; wherein, the marginal contribution trend is obtained by performing time-series analysis of the transmission weights of each directed edge along the time dimension, and is used to identify the key transmission paths that dominate cost changes in different time periods.
[0057] In the actual formation of electricity costs, the contribution of different transmission links to the final cost is not constant. Taking the fuel cost layer as an example, when international coal prices rise sharply, the contribution of the fuel cost layer to the final cost increases significantly, becoming a key link in driving cost changes. Therefore, this embodiment, based on the static cost contribution decomposition, further introduces marginal contribution trend analysis. By performing time-series analysis on the transmission weights of the directed edges of each cost transmission along the time dimension, it identifies the key transmission paths that drive cost changes in different time periods.
[0058] Marginal contribution ratio is used to characterize the degree to which a certain cost transmission path contributes to changes in terminal costs; that is, the proportion of the change in the cost contribution value of this path to the total cost change per unit time. Specifically, for the... Cost transmission path At any given moment marginal contribution The definition is as follows: By performing time-series analysis on the transmission weights along the time dimension, the changing trends of the marginal contribution of each transmission path are extracted. Specifically, the analysis method is as follows: For each directed edge of cost transmission The normalized transfer weight values of each time point within the historical time window are collected to form a time series. .
[0059] For a complete transmission path containing multiple directed edges of cost transmission The path contribution time series is obtained by accumulating and multiplying the transmission weights and attenuation factors of each edge on the path: in, For path At any moment Contribution For the path At any moment The transfer weight, For the path At any moment The attenuation factor.
[0060] For each transmission path The time-series rate of change of its contribution is calculated to reflect the marginal contribution of this path to cost changes: in, For path At any moment The rate of change of marginal contribution is positive, indicating that the contribution of the path is increasing, and negative, indicating that the contribution is decreasing.
[0061] Within each time window, all transmission paths are sorted according to the absolute value of the rate of change of marginal contribution. The path with the largest absolute value of the rate of change is the key transmission path that dominates cost changes during that time period. When multiple paths have similar rates of change, a comprehensive judgment can be made by combining the absolute values of the paths' contributions.
[0062] By introducing marginal contribution trend analysis, the static cost contribution is decomposed and expanded into a dynamic time series analysis, which improves the interpretability and decision support capability of the prediction results and solves the defect of existing technologies that cannot dynamically identify cost-dominant factors.
[0063] Specifically, the electricity cost prediction results include the time-of-use electricity cost prediction values for different regions and the ranking of the contribution of each cost transmission path corresponding to the directed edge of cost transmission to the terminal cost.
[0064] The time-of-use cost of electricity (TOU) forecasts for different regions are output separately for regional and time dimensions. The regional dimension is divided according to administrative regions, electricity market trading areas, or grid structures, with each region corresponding to a regional load node in the knowledge graph. The time dimension includes monthly, quarterly, or annual forecasts, set according to forecasting needs.
[0065] During the forecasting process, the embedded features of regional load nodes are decoded by the forecasting network to obtain the predicted levelized cost of electricity (LCOE) for that region at the forecast time point. For regions containing multiple electricity price components, the sum of the predicted values for each component node constitutes the complete LCOE for that region. The output format is a data table, a visualization chart, or an application programming interface (API) response, which can be used by external systems.
[0066] A cost transmission path refers to a complete directed path from a fuel type node to an electricity price component node or a regional load node, formed by multiple directed edges connecting them sequentially. The contribution scores of all paths are sorted in descending order, and the path with the highest score is the cost transmission path with the greatest impact on end-user costs. A contribution ranking is generated by sorting the contribution scores of all complete transmission paths in descending order. The top-ranked paths represent key transmission links with significant impact on end-user costs. Output formats include a ranking list, a visualization chart, or critical path identification results.
[0067] Specifically, in a preferred embodiment of this application, the construction of the electricity cost knowledge graph further includes: In response to changes in the power system topology, the directed edge set and the hierarchical structure are dynamically updated.
[0068] In practical implementation, for example, when a new generator unit is detected to be put into operation, a new generator unit node is created, and a directed cost transmission edge is established from the fuel type node to the generator unit, as well as a directed cost transmission edge from the generator unit node to the grid node. The physical loss coefficient, transmission time delay parameter, and policy intervention intensity coefficient of the edge are configured according to the fuel transportation method, inventory cycle, and policy subsidy status. When a generator unit is detected to be decommissioned or a grid line is shut down, all directed cost transmission edges related to that node are identified and deleted, and the node itself is also deleted. When a change in line loss rate is detected due to grid line expansion, the affected directed cost transmission edges are located, and their physical loss coefficients are updated. When an increase or decrease in cost transmission links is detected due to power market reforms, the hierarchical structure is adjusted, corresponding cost transmission layers are added or deleted, and the connection relationships between upstream and downstream levels are re-established.
[0069] Through a dynamic update mechanism, the knowledge graph remains consistent with the actual state of the power system, avoiding prediction biases caused by outdated knowledge graphs. New cost transmission paths, such as newly added generator units and power grid lines, are promptly incorporated, while paths corresponding to decommissioned equipment are promptly deleted, ensuring that the prediction model reflects the latest cost transmission patterns.
[0070] This application also provides a knowledge graph-based electricity cost prediction system, including: The data acquisition module is used to acquire historical power data, which includes generation-side data, transmission and distribution-side data, power consumption-side data, macroeconomic data, and policy text data. The graph construction module is used to construct an electricity cost knowledge graph based on the historical electricity data. The electricity cost knowledge graph includes a node set, a directed edge set, and a hierarchical structure. The node set includes fuel type nodes, generator set nodes, grid nodes, regional load nodes, electricity price component nodes, and policy nodes. The directed edge set includes multiple cost transmission directed edges, the direction of which is consistent with the transmission direction of electricity costs in the electricity industry chain, and each cost transmission directed edge is associated with a physical loss coefficient, a transmission time delay parameter, and a policy intervention intensity coefficient. The hierarchical structure includes a fuel cost layer, a generation cost layer, a transmission and distribution cost layer, and a terminal cost layer. The feature extraction module is used to perform message passing operations of the graph neural network layer by layer along the direction of the hierarchical structure to generate embedded features of each node. In the message passing process, for any cost transmission directed edge, the transmission weight of the cost transmission directed edge is calculated based on the physical loss coefficient, transmission time delay parameter and policy intervention intensity coefficient associated with the cost transmission directed edge, and the feature information of the source node is aggregated to the target node according to the transmission weight. The prediction module is used to input the embedded features of the target node into the prediction network and output the electricity cost prediction result.
[0071] The functional explanations of each module in this embodiment are the same as those of a knowledge graph-based electricity cost prediction method, and the technical effects are the same, so they will not be repeated here.
[0072] Those skilled in the art will recognize that the units of the various examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of the invention.
[0073] In the embodiments provided by the present invention, it should be understood that the division of units is only a logical functional division. In actual implementation, there may be other division methods, such as multiple units can be combined into one unit, one unit can be split into multiple units, or some features can be ignored.
[0074] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0075] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0076] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be covered within the scope of the specification of the present invention.
Claims
1. A knowledge graph-based method for predicting electricity costs, characterized in that, include: Acquire historical power data, which includes generation-side data, transmission and distribution-side data, consumption-side data, macroeconomic data, and policy text data; Based on the historical electricity data, an electricity cost knowledge graph is constructed; The electricity cost knowledge graph includes: The node set includes fuel type nodes, generator set nodes, power grid nodes, regional load nodes, electricity price component nodes, and policy nodes; A directed edge set, which includes multiple cost transmission directed edges, wherein the direction of each cost transmission directed edge is consistent with the transmission direction of electricity costs in the electricity industry chain, and each cost transmission directed edge is associated with a physical loss coefficient, a transmission time delay parameter, and a policy intervention intensity coefficient. The hierarchical structure, wherein the directed edges of the cost transmission form a hierarchical structure according to the power cost transmission path, the hierarchical structure includes: The fuel cost layer consists of first-type cost propagation directed edges from fuel type nodes to generator set nodes. The generation cost layer consists of second-type cost transmission directed edges from generator node to grid node; The transmission and distribution cost layer consists of directed edges of the third type of cost transmission from grid nodes to regional load nodes; The terminal cost layer consists of a fourth type of directed cost transmission edge, pointing from the regional load node to the electricity price component node. Along the direction of the hierarchical structure, the message passing operation of the graph neural network is executed layer by layer to generate the embedded features of each node; wherein, during the message passing process, for any cost transmission directed edge, the transmission weight of the cost transmission directed edge is calculated based on the physical loss coefficient, transmission time delay parameter and policy intervention intensity coefficient associated with the cost transmission directed edge, and the feature information of the source node is aggregated to the target node based on the transmission weight. The embedded features of the target node are input into the prediction network, and the power cost prediction result is output.
2. The knowledge graph-based electricity cost prediction method according to claim 1, characterized in that, During message transmission, for any directed edge of cost transmission, the transmission weight of the directed edge is calculated based on the physical loss coefficient, transmission delay parameter, and policy intervention intensity coefficient associated with the directed edge. Specifically, this includes: The first weight component is determined based on the physical loss coefficient of the directed edge of cost transmission, the second weight component is determined based on the transmission delay parameter of the directed edge of cost transmission, and the third weight component is determined based on the policy intervention intensity coefficient of the directed edge of cost transmission. The first weight component, the second weight component, and the third weight component are weighted and summed or multiplied to obtain the transmission weight of the directed edge of cost transmission.
3. The knowledge graph-based electricity cost prediction method according to claim 1, characterized in that, In the message passing operation of the graph neural network, which is performed layer by layer along the direction of the hierarchical structure, when the feature information of the source node is passed to the target node along any cost-directed edge, the feature information of the source node is multiplied by a decay factor and then aggregated to the target node. The attenuation factor is determined based on the physical loss coefficient associated with the cost-transmitting directed edge and the transmission path length of the cost-transmitting directed edge in the hierarchical structure, and the attenuation factor decreases as the transmission path length increases.
4. The knowledge graph-based electricity cost prediction method according to claim 1, characterized in that, The message passing operation of the graph neural network is performed only along the direction of the hierarchical structure.
5. The knowledge graph-based electricity cost prediction method according to claim 1, characterized in that, The process of inputting the embedded features of the target node into the prediction network and outputting the electricity cost prediction result includes: The embedded features of the target node are fused with the cost temporal features extracted by the temporal feature extraction network to obtain the fused features; The fused features are input into a fully connected network, and the predicted power cost and the cost contribution decomposition results are output. The cost contribution decomposition results include the contribution values of the fuel cost layer, the power generation cost layer, the transmission and distribution cost layer, and the terminal cost layer.
6. The knowledge graph-based electricity cost prediction method according to claim 5, characterized in that, The cost contribution decomposition result is obtained by reverse tracing the transmission weights of each cost transmission directed edge.
7. The knowledge graph-based electricity cost prediction method according to claim 5, characterized in that, The cost contribution breakdown results also include: The changing trend of the marginal contribution of each cost transmission path corresponding to the directed edge of cost transmission within a preset time window; The trend of marginal contribution change is obtained by performing time-series analysis on the transmission weights of each cost transmission directed edge along the time dimension, and is used to identify the key transmission paths that dominate cost changes in different time periods.
8. The knowledge graph-based electricity cost prediction method according to claim 1, characterized in that, The electricity cost prediction results include the time-of-use electricity cost prediction values for different regions and the ranking of the contribution of each cost transmission path corresponding to the directed edge of cost transmission to the terminal cost.
9. The knowledge graph-based electricity cost prediction method according to any one of claims 1-8, characterized in that, The construction of the electricity cost knowledge graph also includes: In response to changes in the power system topology, the directed edge set and the hierarchical structure are dynamically updated.
10. A knowledge graph-based electricity cost prediction system, characterized in that, include: The data acquisition module is used to acquire historical power data, which includes generation-side data, transmission and distribution-side data, power consumption-side data, macroeconomic data, and policy text data. The graph construction module is used to construct an electricity cost knowledge graph based on the historical electricity data. The electricity cost knowledge graph includes a node set, a directed edge set, and a hierarchical structure. The node set includes fuel type nodes, generator set nodes, grid nodes, regional load nodes, electricity price component nodes, and policy nodes. The directed edge set includes multiple cost transmission directed edges, the direction of which is consistent with the transmission direction of electricity costs in the electricity industry chain, and each cost transmission directed edge is associated with a physical loss coefficient, a transmission time delay parameter, and a policy intervention intensity coefficient. The hierarchical structure includes a fuel cost layer, a generation cost layer, a transmission and distribution cost layer, and a terminal cost layer. The feature extraction module is used to perform message passing operations of the graph neural network layer by layer along the direction of the hierarchical structure to generate embedded features of each node. In the message passing process, for any cost transmission directed edge, the transmission weight of the cost transmission directed edge is calculated based on the physical loss coefficient, transmission time delay parameter and policy intervention intensity coefficient associated with the cost transmission directed edge, and the feature information of the source node is aggregated to the target node according to the transmission weight. The prediction module is used to input the embedded features of the target node into the prediction network and output the electricity cost prediction result.