A power consumption prediction method, system, device and medium

CN122951037APending Publication Date: 2026-10-20STATE GRID ZHEJIANG ELECTRIC POWER CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610908552.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-23
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

然而,这类方法往往将用户视为孤立的个体,忽略了用户之间、行业之间复杂的关联关系和相互影响,导致预测结果往往出现系统性偏差,无法满足精细化管理和精准财务预测的需求

Benefits of technology

1)本发明通过构建包含历史用电量、行业属性及地理位置的异构关系图,并引入图神经网络进行跨节点的消息传递与聚合,能够精准捕捉用电主体间的复杂关联影响,生成表征耦合关系的耦合向量,从而突破了传统预测方法仅依赖单一用户时序数据的局限性,有效提升了在数据波动剧烈或结构复杂场景下的预测鲁棒性。进一步地,通过在专家子网络中引入PatchTST模型对初始预测值进行非线性修正,利用其对时序数据分块嵌入与位置编码的能力,能够深度挖掘用电行为中的局部模式与长期依赖关系,显著增强了模型对用电趋势拐点与周期性变化的拟合精度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

This invention discloses a method, system, device, and medium for electricity consumption prediction. The method includes: constructing basic time-series features based on historical electricity consumption data of various electricity users in a target area to generate initial electricity consumption prediction values; constructing a heterogeneous relationship graph based on the industry attributes, geographical location attributes, and similarity of electricity consumption behavior of the electricity users; performing cross-node message passing and aggregation on the heterogeneous relationship graph to generate coupling vectors; fusing multi-level user tags, basic time-series features, and coupling vectors; inputting the generated target prediction feature vector into an integrated prediction model; mining multi-dimensional correlation information in the target prediction feature vector; and performing nonlinear correction on the initial electricity consumption prediction values ​​based on the multi-dimensional correlation information to obtain the electricity consumption prediction results for the target area. This invention achieves a dual improvement in the accuracy and stability of electricity consumption prediction, thereby enhancing the accuracy and interpretability of electricity revenue prediction in complex scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of big data analytics, and in particular to a method, system, device, and medium for predicting electricity consumption. Background Technology

[0002] In the current electricity market environment, electricity consumption forecasting is the core basis for power grid companies to make business decisions and manage risks.

[0003] Existing electricity consumption forecasting methods primarily rely on statistical patterns in historical electricity consumption, specifically through time series analysis or regression models. However, these methods often treat users as isolated individuals, ignoring the complex relationships and mutual influences between users and industries. This leads to systematic biases in the forecast results, failing to meet the needs of refined management and accurate financial forecasting. Summary of the Invention

[0004] This invention provides a method, system, device, and medium for predicting electricity consumption, in order to improve the accuracy of electricity consumption prediction.

[0005] To address the aforementioned technical problems, this invention provides a method for predicting electricity consumption, comprising: Obtain historical electricity consumption time-series data for each electricity consumer in the target area, and construct basic time-series features based on the historical electricity consumption time-series data to generate initial predicted electricity consumption values; Based on the industry attributes, geographical location attributes, and similarity of electricity consumption behavior of the electricity users, a heterogeneous relationship graph is constructed. Then, based on a graph neural network, cross-node message passing and aggregation are performed on the heterogeneous relationship graph to generate a coupling vector representing the association and influence between the electricity users. Extract multi-level user tags from the electricity user entity, and fuse the multi-level user tags, the basic time-series features, and the coupling vector to construct a target prediction feature vector; The multidimensional correlation information in the target prediction feature vector is mined based on the pre-trained ensemble prediction model, and the initial predicted value of electricity consumption is nonlinearly corrected based on the multidimensional correlation information to obtain the predicted electricity consumption result of the target area.

[0006] As one preferred embodiment, the integrated prediction model is configured as a sparse gated hybrid expert prediction network, which includes a routing resolution module and multiple expert subnetworks. The nonlinear correction of the initial predicted electricity consumption based on the multidimensional correlation information includes: The matching degree between the target prediction feature vector and each expert sub-network is calculated based on the routing parsing module, and the gating activation weight is determined based on the matching degree. Based on the target expert subnetwork corresponding to the gated activation weight sparse activation, the power consumption correction amount of the target area is obtained; The initial predicted electricity consumption value is superimposed with the corrected electricity consumption value to obtain the predicted electricity consumption result for the target area.

[0007] As one preferred embodiment, after obtaining the electricity consumption prediction results for the target area, the method further includes: Extract the gating activation weights output by the routing parsing module, and determine the dominant prediction factors based on the ranking of the gating activation weights; Obtain the key user nodes and propagation paths associated with the dominant prediction factor in the heterogeneous relationship graph; The dominant predictive factors, key user nodes, and propagation paths are input into a preset natural language generation template to generate attribution explanation information characterizing the reasons for changes in electricity consumption.

[0008] As one preferred option, after obtaining the historical electricity consumption time-series data of each electricity user in the target area, the following is also included: Data repair is performed on the historical electricity consumption time-series data; wherein the data repair process includes: For the non-continuous missing data in the historical electricity consumption time series data, K-nearest neighbor statistical imputation is used for local reconstruction; For the continuous missing data in the historical electricity consumption time series data, a generative adversarial network is used to complete the time series data.

[0009] As one preferred embodiment, the step of performing cross-node message passing and aggregation on the heterogeneous relationship graph based on a graph neural network to generate coupling vectors representing the correlation and influence between the various electricity-consuming entities includes: The features of neighboring nodes of each electricity-consuming entity node are aggregated into a message vector based on the aggregation function; wherein, for homogeneous neighboring nodes in the heterogeneous relationship graph, the average value of the neighboring features is calculated using the mean aggregation function; for heterogeneous neighboring nodes in the heterogeneous relationship graph, the weight of each neighboring node is calculated using the attention mechanism, and a weighted sum is performed based on the weight. The features of the electricity-consuming node in the previous layer are concatenated with the message vector, and a new feature of the current layer is generated by a multilayer perceptron and a nonlinear activation function, which serves as the coupling vector.

[0010] As one preferred embodiment, the extraction of multi-level user tags from the electricity user further includes: If the electricity user is a cold-start user, then obtain several observation data of the cold-start user; The observed data are decoupled in the frequency domain based on deep Fourier transform to obtain a deep independent basis representation; In the preset discrete electrical prototype codebook, search for the prototype vector that is closest to the deep independent basis representation to generate the initial cold start representation; The multi-level user tags, the basic temporal features, the coupling vector, and the cold start initial representation are fused to construct the target prediction feature vector.

[0011] As one preferred embodiment, before mining the multidimensional correlation information in the target prediction feature vector based on the pre-trained ensemble prediction model, the method further includes: The ensemble prediction model is subjected to lightweight compression, wherein the lightweight compression method includes: The redundant parameters in the integrated prediction model whose contribution to the output is less than a preset threshold are removed using pruning techniques; And / or, using quantization techniques to convert the floating-point parameters of the integrated prediction model into low-precision integer parameters; And / or, use knowledge distillation techniques to transfer knowledge from a large-parameter teacher model to a small-parameter student model.

[0012] Another aspect of the present invention provides an electricity consumption prediction system, characterized in that it includes: The acquisition module is used to acquire historical electricity consumption time-series data of each electricity consumer in the target area, and to construct basic time-series features based on the historical electricity consumption time-series data to generate an initial predicted value of electricity consumption. The construction module is used to construct a heterogeneous relationship graph based on the industry attributes, geographical location attributes and similarity of electricity consumption behavior of the electricity users, and to perform cross-node message passing and aggregation on the heterogeneous relationship graph based on graph neural network to generate coupling vectors that represent the correlation and influence between the electricity users. The fusion module is used to extract multi-level user tags of the electricity user entity, and fuse the multi-level user tags, the basic time-series features, and the coupling vector to construct a target prediction feature vector; The prediction module is used to mine multidimensional correlation information in the target prediction feature vector based on a pre-trained ensemble prediction model, and to perform nonlinear correction on the initial predicted value of electricity consumption based on the multidimensional correlation information to obtain the predicted electricity consumption result of the target area.

[0013] Another embodiment of the present invention provides an electricity consumption prediction device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the electricity consumption prediction method as described above.

[0014] In another embodiment of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program, wherein when the device containing the computer-readable storage medium executes the computer program, the power consumption prediction method described above is implemented.

[0015] Compared with the prior art, the beneficial effects of the present invention are at least one of the following: 1) This invention constructs a heterogeneous relationship graph containing historical electricity consumption, industry attributes, and geographical location, and introduces a graph neural network for cross-node message passing and aggregation. This enables the accurate capture of complex correlations between electricity-consuming entities, generating coupling vectors that represent the coupling relationships. This overcomes the limitations of traditional prediction methods that rely solely on single-user time-series data, effectively improving prediction robustness in scenarios with drastic data fluctuations or complex structures. Furthermore, by introducing the PatchTST model into the expert sub-network to perform nonlinear correction on the initial predicted values, and utilizing its ability to embed and encode time-series data in blocks, this invention can deeply mine local patterns and long-term dependencies in electricity consumption behavior, significantly enhancing the model's fitting accuracy for inflection points and periodic changes in electricity consumption trends.

[0016] 2) This invention integrates multi-level user labels with coupled vectors generated by graph neural networks. The model effectively absorbs common patterns in group electricity consumption behavior while fully utilizing individual user characteristics. This ensures that the final electricity consumption prediction not only aligns with individual historical trends but also conforms to the dynamic evolution logic of the overall power grid load. The overall scheme achieves a dual improvement in prediction accuracy and stability through multi-stage collaborative optimization of initial prediction, graph structure modeling, and nonlinear correction, providing highly reliable data support for power dispatch and load management. Attached Figure Description

[0017] Figure 1 This is a flowchart illustrating the electricity consumption prediction method in one embodiment of the present invention. Figure 2 This is a structural block diagram of an electricity consumption prediction system in one embodiment of the present invention; Figure 3 This is a structural block diagram of an electricity consumption prediction device in one embodiment of the present invention; Figure label: Among them, 11 is the acquisition module; 12 is the construction module; 13 is the fusion module; 14 is the prediction module; 21 is the processor; and 22 is the memory. 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 embodiments of the present invention, and not all embodiments. The purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0019] In the description of this invention, the terms "first," "second," "third," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined with "first," "second," "third," etc., may explicitly or implicitly include one or more of that feature. In the description of this invention, unless otherwise stated, "a plurality of" means two or more.

[0020] In the description of this invention, it should be noted that, unless otherwise defined, all technical and scientific terms used in this invention have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in this specification is for the purpose of describing specific embodiments only and is not intended to limit the invention. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0021] One embodiment of the present invention provides a method for predicting electricity consumption. For details, please refer to [link / reference]. Figure 1 , Figure 1 The diagram shown is a flowchart of a power consumption prediction method according to one embodiment of the present invention, which includes steps S1-S4: S1: Obtain historical electricity consumption time-series data for each electricity user in the target area, and construct basic time-series features based on the historical electricity consumption time-series data to generate initial predicted electricity consumption values.

[0022] In this embodiment, the historical electricity consumption time-series data of each electricity user in the target area is first acquired. This data typically originates from an electricity marketing system or an electricity information collection system and includes, but is not limited to, user IDs, timestamps, and corresponding active power values. After acquiring the raw data, the system performs preliminary cleaning and alignment processing, removing obvious outliers (such as negative or out-of-range values) and uniformly resampling data from different sampling frequencies into a regularized sequence within a fixed time window (such as 15 minutes or 1 hour) to construct the foundation dataset for subsequent analysis.

[0023] It should be noted that in actual power business scenarios, historical electricity consumption time-series data often suffers from varying degrees of missing information, known as "holes," due to communication interruptions, meter malfunctions, or data transmission packet loss. Based on different missing patterns, this embodiment categorizes missing data into "non-continuous missing data" (i.e., randomly discrete missing points) and "continuous missing data" (i.e., data loss within a continuous time period). For these two different data quality degradation scenarios, this embodiment proposes a differentiated repair strategy.

[0024] Specifically, for non-continuous missing data in historical electricity consumption time-series data, this embodiment employs K-Nearest Neighbors Imputation for local reconstruction. Preferably, the system first searches for the K most similar "neighbor" samples in the complete dataset based on the statistical characteristics of the time series (such as mean, variance) or the proximity of timestamps. Subsequently, the missing values ​​are filled using the mean or weighted average of the electricity consumption at the corresponding time points of these K neighbor samples. This statistically based local reconstruction method effectively preserves the random fluctuation characteristics of the data and is suitable for repairing the loss of isolated data points caused by momentary communication failures.

[0025] Furthermore, for continuously missing data in historical electricity consumption time-series data (e.g., data missing for several hours or days due to prolonged device offlineness), traditional linear interpolation or mean imputation can disrupt the temporal dependencies and periodic trends of the data. Therefore, this embodiment employs a Generative Adversarial Network (GAN) for time-series completion. Preferably, a deep neural network architecture including a generator and a discriminator is constructed. The generator is responsible for learning the joint probability distribution of the original electricity consumption data and generating synthetic data fragments that conform to this distribution; the discriminator is responsible for distinguishing between synthetic data and real historical data. Through a minimization-maximum game process, the generator can generate complete data that conforms to the historical data distribution while maintaining the trend characteristics and fluctuation structure of the original data. This repair method based on a generative deep learning model can effectively solve the problem of model input failure caused by long-term data loss.

[0026] After completing the above data repair process, the system constructs basic time-series features based on the repaired time-series data. The specific implementation process includes: performing sliding window slicing on the time-series data to extract statistical features such as historical mean, variance, maximum, and minimum values, as well as periodic frequency domain features extracted through Fourier transform. Subsequently, a lightweight initial prediction network (such as a linear regression model or a simple LSTM network) is used to initially fit the repaired data, generating initial predicted electricity consumption values. These initial predicted values ​​serve as the baseline input for subsequent integrated prediction models, providing a stable starting point for subsequent nonlinear corrections.

[0027] S2: Based on the industry attributes, geographical location attributes, and similarity of electricity consumption behavior of the electricity users, a heterogeneous relationship graph is constructed. Then, based on the graph neural network, cross-node message passing and aggregation of the heterogeneous relationship graph are performed to generate coupling vectors that represent the correlation and influence between the electricity users.

[0028] To overcome the shortcomings of existing technologies that rely solely on the time-series data of a single user for prediction, neglecting the complex relationships between users and industries, a feature coupling method based on heterogeneous relationship graphs is proposed. This method aims to generate coupling vectors that can characterize the influence of external environment and user interaction by constructing a graph structure containing multi-dimensional attributes and utilizing graph neural networks (GNNs) to mine the topological relationships hidden behind massive numbers of users.

[0029] Specifically, the first step is to construct a heterogeneous relationship graph based on the industry attributes, geographical location attributes, and similarity of electricity consumption behavior of the electricity users. Preferably, "user nodes," "industry category nodes," "geographical location nodes (such as substations or meteorological zones)," and "external influencing factor nodes (such as electricity pricing policies)" in the power system are mapped to heterogeneous nodes in the graph. It should be noted that the edges in the heterogeneous relationship graph are not of a single type, but include edges based on the similarity of historical load curves (representing similar electricity consumption behavior), edges based on upstream and downstream linkages in the industrial chain (representing industry transmission), edges based on geographical proximity, and edges based on the same applicable electricity pricing rules. This construction method unifies multi-source heterogeneous information into a single topological space, laying the structural foundation for subsequent message transmission.

[0030] Furthermore, based on graph neural networks, cross-node message passing and aggregation are performed on the aforementioned heterogeneous relationship graph to generate coupling vectors representing the correlation and influence between various electricity users. In this embodiment, a hybrid aggregation strategy is proposed to address the problem of complex neighbor node types and varying influence weights in the heterogeneous graph. The specific implementation process is as follows: First, the neighbor node features of each electricity user node are aggregated into message vectors based on an aggregation function. Among them, for homogeneous neighbor nodes in the heterogeneous relationship graph (such as other users belonging to the "textile industry"), since their attribute distribution is relatively consistent, the mean aggregation function is used to calculate the average value of the neighbor features, thereby smoothing noise and extracting common patterns of similar users.

[0031] Furthermore, for heterogeneous neighbor nodes in the heterogeneous relationship graph (such as "weather nodes" connected to the target user or "upstream supplier nodes" from different industries), since the influence of different types of nodes on the target user varies greatly, an attention mechanism is employed. Preferably, by calculating the attention coefficients between the target node and each heterogeneous neighbor node, the weights of each neighbor node are automatically learned and assigned. Subsequently, the features of the heterogeneous neighbor nodes are weighted and summed based on these dynamically calculated weights. This differentiated aggregation method, which distinguishes between homogeneous and heterogeneous nodes, ensures both computational efficiency and accurately captures the key influence information of cross-type nodes.

[0032] After feature aggregation, the generated message vector is concatenated or weighted and fused with the features of the electricity-consuming entity node in the previous layer. The fused feature vector is then input into a multilayer perceptron (MLP). It should be noted that this MLP contains at least one hidden layer and a nonlinear activation function (such as ReLU or Sigmoid). Through nonlinear transformation, the model can map low-dimensional local connectivity information to a high-dimensional semantic space, thereby generating new features for the current layer. Finally, this new feature is output as a coupling vector representing the influence of the electricity-consuming entity on the surrounding complex environment and related users, for use by subsequent prediction models.

[0033] S3: Extract multi-level user tags of the electricity user entity, and fuse the multi-level user tags, basic time series features and coupling vectors to construct the target prediction feature vector.

[0034] To further improve the model's predictive robustness when facing newly connected users, users with sparse data, or users with abrupt changes in electricity consumption behavior, this embodiment proposes a target prediction feature construction method that integrates multi-level user labels and frequency domain decoupled features. This method aims to address the technical shortcomings of existing technologies, such as the inability of models to extract effective features and large prediction biases due to insufficient historical samples for new users (cold start problem). By introducing vector quantization and deep Fourier transform, this embodiment can generate stable initial representations for users with only a small amount of observation data.

[0035] Specifically, the first step is to extract multi-level user tags for electricity users. Preferably, a multi-level user tag system is constructed based on user voltage level, electricity consumption category, electricity price industry classification, meter reading cycle category, and key user role identifier. These tags are usually discrete categorical data, which the system will encode using one-hot encoding or embedding to transform them into low-dimensional dense vector representations. Subsequently, this tag representation is preliminarily concatenated or weighted and fused with the basic time-series features (such as statistical features, historical means, etc.) generated in step S1 and the coupling vector (features representing graph structure associations) generated in step S2. It should be noted that the above fusion process aims to unify user static attributes, historical dynamic behaviors, and group association influences into the same semantic space, forming a preliminary feature foundation.

[0036] Furthermore, considering the special case of cold-start users (i.e., new users or users with very little historical data), this embodiment introduces a cold-start initial characterization generation mechanism based on frequency domain decoupling. The specific implementation process includes: firstly, acquiring several observational data points of the cold-start user (e.g., short-sequence electricity consumption data from the most recent 1-3 days). Since this data is extremely limited, direct time-domain modeling is prone to overfitting. Therefore, this embodiment uses Deep Fourier Transform (DFT) to decouple the observational data in the frequency domain. Preferably, the short time series is transformed from the time domain to the frequency domain using Fourier Transform, and high-frequency components are filtered or truncated while low-frequency components representing periodic trends are retained, thereby extracting the "deep independent basis representation" of the user's electricity consumption behavior. This step can remove random noise from the short series and extract the most essential electricity consumption pattern basis.

[0037] Furthermore, within a pre-defined discrete electricity consumption prototype codebook, the system searches for the prototype vector that is closest to the deep independent basis representation. It should be noted that this prototype codebook is constructed during the model pre-training phase using frequency-domain basis clustering of massive historical user electricity consumption sequences, storing various typical electricity consumption patterns commonly found in power systems (such as unimodal, bimodal, and stationary patterns). By calculating cosine similarity or Euclidean distance, the system finds the most matching historical prototype in the codebook. Finally, this matching prototype vector is used as the initial representation of the cold-start user. This process is equivalent to "mapping" the sparse data of new users onto known typical patterns, greatly mitigating the uncertainty caused by data sparsity.

[0038] After completing the above steps, the multi-level user labels, basic temporal features, coupling vectors, and the newly generated cold-start initial representation are deeply fused. Specifically, the cold-start initial representation can be added as an additional feature dimension to the aforementioned feature vector, or the weights of each feature component can be adaptively adjusted through a gating network. The final output is a target prediction feature vector containing rich static attributes, dynamic temporal information, complex correlation effects, and typical pattern priors.

[0039] S4: Based on the pre-trained ensemble prediction model, multi-dimensional correlation information is mined from the target prediction feature vector, and the initial predicted electricity consumption value is nonlinearly corrected based on the multi-dimensional correlation information to obtain the electricity consumption prediction result of the target area.

[0040] In this embodiment, to overcome the problems of existing technologies where a single model cannot simultaneously take into account the differentiated electricity consumption patterns of key large industrial users and massive long-tail users, and where the model has poor interpretability and high deployment costs, an integrated prediction and lightweight deployment scheme based on a sparse gated hybrid expert network (MoE) is proposed. This method aims to mine multi-dimensional correlation information in the target prediction feature vector through a dynamic routing mechanism, achieving accurate nonlinear correction of the initial electricity consumption prediction value, while generating interpretable attribution information and ensuring efficient model operation in resource-constrained environments.

[0041] Specifically, before mining multidimensional correlation information from the target prediction feature vector based on the pre-trained ensemble prediction model, a lightweight model compression process is performed. Preferably, considering that the ensemble prediction model may contain a large number of parameters (such as Transformer layers and multiple expert networks), direct deployment would lead to high inference latency and large storage overhead. Therefore, this embodiment performs lightweight compression on the ensemble prediction model. Specifically, this includes: The pruning technique is used to remove redundant parameters in the ensemble prediction model whose contribution to the output is less than a preset threshold. For example, connections with weights whose absolute values ​​are close to zero are disconnected, while retaining the core topology. And / or, using quantization techniques to convert the floating-point parameters (such as FP32) of the integrated prediction model into low-precision integer parameters (such as INT8), and using linear mapping formulas to achieve parameter compression and computation acceleration; And / or, knowledge distillation techniques can be used to transfer knowledge from a large-parameter teacher model to a small-parameter student model. By minimizing the KL divergence of the teacher and student output distributions, the smaller model can approximate the predictive performance of the larger model. It should be noted that the above lightweighting methods can be used individually or in combination to significantly reduce model size and computational complexity while ensuring controllable loss of prediction accuracy.

[0042] Furthermore, multi-dimensional correlation information in the target prediction feature vector is mined based on a pre-trained ensemble prediction model (i.e., a sparse gated hybrid expert prediction network). In this embodiment, the ensemble prediction model includes a routing parsing module (Router) and multiple expert sub-networks (Experts).

[0043] The process of nonlinearly correcting the initial electricity consumption forecast based on multidimensional correlation information specifically includes the following steps: First, the matching degree between the target predicted feature vector and each expert subnetwork is calculated based on the routing parsing module. Preferably, this matching degree is usually obtained by calculating the similarity score (such as inner product or weighted distance) between the feature vector and each expert parameter.

[0044] Subsequently, the gating activation weights are determined based on this matching degree. Specifically, using a Softmax or Top-K selection function, only the top K experts with the highest matching degree (e.g., K=1 or 2) are retained, and the weights of the remaining experts are reset to zero, thus achieving sparse activation. Based on these gating activation weights, the corresponding target expert sub-networks are sparsely activated. For example, a dedicated "large industrial expert model" is activated for "key large industrial users," and an "aggregated expert model" is activated for "general industrial and commercial users." These activated expert sub-networks perform nonlinear transformations on the input features and output the electricity consumption correction amount.

[0045] Finally, the initial electricity consumption forecast is superimposed with the corrected electricity consumption amount to obtain the final electricity consumption forecast for the target area. This "baseline + correction" residual structure allows the model to focus on learning complex nonlinear patterns that the initial forecast cannot cover.

[0046] After obtaining the electricity consumption forecast results for the target area, the process also includes a step of generating attribution explanation information. The specific implementation process is as follows: The gating activation weights output by the routing parsing module are extracted. These weights intuitively reflect the contribution of different experts (i.e., patterns in different industries or user types) to the final prediction. Based on the ranking of these gating activation weights, the dominant predictive factor is determined (e.g., if the weight of "chemical industry expert" is the highest, then the dominant factor is the electricity consumption trend of the chemical industry). Subsequently, the key user nodes and propagation paths associated with this dominant predictive factor in the heterogeneous relationship graph are obtained. For example, the neighboring nodes (such as upstream power supply nodes and downstream related enterprises) and their connecting edges of the chemical industry node are extracted using a graph traversal algorithm. Finally, the dominant predictive factor, key user nodes, and propagation paths are input into a preset natural language generation template to automatically generate attribution explanation information such as "This month's electricity revenue growth is mainly driven by the increase in electricity consumption in the chemical industry cluster, with the five key large users associated with it contributing the main increase." It should be noted that this process transforms the "black box" prediction of deep learning into explicit logic based on graph structure and weights, greatly improving the interpretability of the model.

[0047] This invention also provides a specific embodiment of a method for accurate calculation and closed-loop verification of electricity revenue based on multi-dimensional feature coupling, to illustrate the complete technical closed loop of this solution from "electricity prediction" to "electricity bill payment" in actual business scenarios and its beneficial effects.

[0048] Specifically, after obtaining the electricity consumption forecast results for the target area, this embodiment also includes a calculation step of converting the electricity consumption forecast value into the electricity revenue forecast value.

[0049] Preferably, considering that electricity revenue equals "electricity sales × electricity price," and that electricity prices often include complex nonlinear rules such as time-of-use pricing, tiered pricing, and power factor adjustment, this embodiment does not use simple multiplication but instead introduces a Gradient Boosting Regressor model for refined fitting. The specific implementation process is as follows: Electricity price data corresponding to the target area (including catalog price, peak-valley time-of-use pricing coefficient, power factor adjustment coefficient, etc.) is obtained, and the "electricity consumption prediction result" output by S4 is used as the core feature input. By training the Gradient Boosting Regressor model, the complex nonlinear mapping relationship between electricity consumption and electricity price factors is learned, thereby directly outputting a high-precision monthly or daily electricity revenue prediction value. This process effectively solves the technical problem of traditional methods that only predict electricity consumption but cannot accurately consider the impact of complex electricity price rules on the final revenue.

[0050] In the integrated prediction model described in S4, the preferred architecture of the expert sub-network is the PatchTST (PatchTime Series Transformer) model. The specific implementation process is as follows: When inputting the target prediction feature vector into each expert sub-network, the PatchTST model's block embedding mechanism is first used to divide the long sequence into multiple local segments (Patches), and their local temporal semantics are extracted. This architecture is particularly suitable for processing local fluctuation patterns in power time-series data, effectively overcoming the computational bottleneck of traditional long-series prediction models when dealing with long-period dependencies. Combined with the heterogeneous relational graph features constructed in S2, the PatchTST expert model can simultaneously capture local details in the time dimension and the correlation effects in the spatial dimension, thus providing a high-quality power prediction foundation for the Gradient Boosting Regressor, ultimately supporting high-precision electricity revenue prediction.

[0051] This invention is not limited thereto, and the specific hyperparameters of the GradientBoostingRegressor model (such as learning rate and tree depth) and the patch length of the PatchTST model are only preferred embodiments. In other embodiments, the electricity revenue calculation model can be replaced with other ensemble learning models (such as XGBoost), and PatchTST can also be replaced with advanced time series models such as Informer or Autoformer.

[0052] The above embodiments, by constructing a closed-loop system of "feature extraction - graph association modeling - hybrid expert prediction - electricity revenue accounting", not only achieve accurate prediction of electricity consumption, but also realize highly reliable pre-simulation of the core operating indicators (electricity revenue) of power grid companies, providing solid data support for power companies to calculate electricity purchase costs, prepare financial budgets and assess risks.

[0053] Another embodiment of the present invention provides an electricity consumption prediction system; for details, please refer to [link to relevant documentation]. Figure 2 , Figure 2 The diagram shown illustrates a structural block diagram of an electricity consumption prediction system according to one embodiment of the present invention, which includes: The acquisition module 11 is used to acquire historical electricity consumption time series data of each electricity consumer in the target area, and to construct basic time series features based on the historical electricity consumption time series data to generate an initial predicted value of electricity consumption. The construction module 12 is used to construct a heterogeneous relationship graph based on the industry attributes, geographical location attributes and similarity of electricity consumption behavior of the electricity users, and to perform cross-node message passing and aggregation on the heterogeneous relationship graph based on a graph neural network to generate a coupling vector representing the association and influence between the electricity users. The fusion module 13 is used to extract multi-level user tags of the electricity user and fuse the multi-level user tags, the basic time-series features and the coupling vector to construct a target prediction feature vector; The prediction module 14 is used to mine multidimensional correlation information in the target prediction feature vector based on a pre-trained integrated prediction model, and to perform nonlinear correction on the initial predicted value of electricity consumption based on the multidimensional correlation information to obtain the electricity consumption prediction result of the target area.

[0054] Another embodiment of the present invention provides an electricity consumption prediction device; for details, please refer to [link to relevant documentation]. Figure 3 This is a structural block diagram of the electricity consumption prediction device provided in an embodiment of the present invention. The electricity consumption prediction device provided in this embodiment of the present invention includes a processor 21, a memory 22, and a computer program stored in the memory 22 and configured to be executed by the processor 21. When the processor 21 executes the computer program, it implements the steps as described in the above-described electricity consumption prediction method embodiment, for example... Figure 1 The steps S1 to S4 described above; or, when the processor 21 executes the computer program, it implements the functions of each module in the above-described device embodiments, such as the acquisition module 11.

[0055] For example, the computer program may be divided into one or more modules, which are stored in the memory 22 and executed by the processor 21 to complete the present invention. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in the power consumption prediction device.

[0056] The power consumption prediction device may include, but is not limited to, a processor 21 and a memory 22. Those skilled in the art will understand that the schematic diagram is merely an example of a power consumption prediction device and does not constitute a limitation on the device. It may include more or fewer components than illustrated, or combine certain components, or use different components. For example, the power consumption prediction device may also include input / output devices, network access devices, buses, etc.

[0057] The processor 21 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor. The processor 21 is the control center of the power consumption prediction device, connecting all parts of the device via various interfaces and lines.

[0058] The memory 22 can be used to store the computer program and / or modules. The processor 21 implements various functions of the power consumption prediction device by running or executing the computer program and / or modules stored in the memory 22 and calling the data stored in the memory 22. The memory 22 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created based on the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory 22 may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0059] If the module integrated into the electricity consumption prediction device 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, all or part of the processes in the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.

[0060] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0061] Accordingly, embodiments of the present invention provide a computer-readable storage medium, the computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform steps in the power consumption prediction method of the above embodiments, for example... Figure 1 Steps S1 to S4 as described above.

[0062] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.

Claims

1. A method for predicting electricity consumption, characterized in that, include: Obtain historical electricity consumption time-series data for each electricity consumer in the target area, and construct basic time-series features based on the historical electricity consumption time-series data to generate initial predicted electricity consumption values; Based on the industry attributes, geographical location attributes, and similarity of electricity consumption behavior of the electricity users, a heterogeneous relationship graph is constructed. Then, based on a graph neural network, cross-node message passing and aggregation are performed on the heterogeneous relationship graph to generate a coupling vector representing the association and influence between the electricity users. Extract multi-level user tags from the electricity user entity, and fuse the multi-level user tags, the basic time-series features, and the coupling vector to construct a target prediction feature vector; The multidimensional correlation information in the target prediction feature vector is mined based on the pre-trained ensemble prediction model, and the initial predicted value of electricity consumption is nonlinearly corrected based on the multidimensional correlation information to obtain the predicted electricity consumption result of the target area.

2. The electricity consumption prediction method as described in claim 1, characterized in that, The integrated prediction model is configured as a sparse gated hybrid expert prediction network, which includes a routing parsing module and multiple expert subnetworks. The nonlinear correction of the initial predicted electricity consumption based on the multidimensional correlation information includes: The matching degree between the target prediction feature vector and each expert sub-network is calculated based on the routing parsing module, and the gating activation weight is determined based on the matching degree. Based on the target expert subnetwork corresponding to the gated activation weight sparse activation, the power consumption correction amount of the target area is obtained; The initial predicted electricity consumption value is superimposed with the corrected electricity consumption value to obtain the predicted electricity consumption result for the target area.

3. The electricity consumption prediction method as described in claim 2, characterized in that, After obtaining the electricity consumption prediction results for the target area, the process also includes: Extract the gating activation weights output by the routing parsing module, and determine the dominant prediction factors based on the ranking of the gating activation weights; Obtain the key user nodes and propagation paths associated with the dominant prediction factor in the heterogeneous relationship graph; The dominant predictive factors, key user nodes, and propagation paths are input into a preset natural language generation template to generate attribution explanation information characterizing the reasons for changes in electricity consumption.

4. The electricity consumption prediction method as described in claim 1, characterized in that, After obtaining the historical electricity consumption time-series data of each electricity user in the target area, the following is also included: Data repair is performed on the historical electricity consumption time-series data; wherein the data repair process includes: For the non-continuous missing data in the historical electricity consumption time series data, K-nearest neighbor statistical imputation is used for local reconstruction; For the continuous missing data in the historical electricity consumption time series data, a generative adversarial network is used to complete the time series data.

5. The electricity consumption prediction method as described in claim 1, characterized in that, The method of performing cross-node message passing and aggregation on the heterogeneous relationship graph based on a graph neural network to generate coupling vectors representing the correlation and influence between the various electricity-consuming entities includes: The features of neighboring nodes of each electricity-consuming entity node are aggregated into a message vector based on the aggregation function; wherein, for homogeneous neighboring nodes in the heterogeneous relationship graph, the average value of the neighboring features is calculated using the mean aggregation function; for heterogeneous neighboring nodes in the heterogeneous relationship graph, the weight of each neighboring node is calculated using the attention mechanism, and a weighted sum is performed based on the weight. The features of the electricity-consuming node in the previous layer are concatenated with the message vector, and a new feature of the current layer is generated by a multilayer perceptron and a nonlinear activation function, which serves as the coupling vector.

6. The electricity consumption prediction method as described in claim 1, characterized in that, The step of extracting the multi-level user tags of the electricity user also includes: If the electricity user is a cold-start user, then obtain several observation data of the cold-start user; The observed data are decoupled in the frequency domain based on deep Fourier transform to obtain a deep independent basis representation; In the preset discrete electrical prototype codebook, search for the prototype vector that is closest to the deep independent basis representation to generate the initial cold start representation; The multi-level user tags, the basic temporal features, the coupling vector, and the cold start initial representation are fused to construct the target prediction feature vector.

7. The electricity consumption prediction method as described in claim 1, characterized in that, Before mining the multidimensional correlation information in the target prediction feature vector based on the pre-trained ensemble prediction model, the method further includes: The ensemble prediction model is subjected to lightweight compression, wherein the lightweight compression method includes: The redundant parameters in the integrated prediction model whose contribution to the output is less than a preset threshold are removed using pruning techniques; And / or, using quantization techniques to convert the floating-point parameters of the integrated prediction model into low-precision integer parameters; And / or, use knowledge distillation techniques to transfer knowledge from a large-parameter teacher model to a small-parameter student model.

8. A power consumption prediction system, characterized in that, include: The acquisition module is used to acquire historical electricity consumption time-series data of each electricity consumer in the target area, and to construct basic time-series features based on the historical electricity consumption time-series data to generate an initial predicted value of electricity consumption. The construction module is used to construct a heterogeneous relationship graph based on the industry attributes, geographical location attributes and similarity of electricity consumption behavior of the electricity users, and to perform cross-node message passing and aggregation on the heterogeneous relationship graph based on graph neural network to generate coupling vectors that represent the correlation and influence between the electricity users. The fusion module is used to extract multi-level user tags of the electricity user entity, and fuse the multi-level user tags, the basic time-series features, and the coupling vector to construct a target prediction feature vector; The prediction module is used to mine multidimensional correlation information in the target prediction feature vector based on a pre-trained ensemble prediction model, and to perform nonlinear correction on the initial predicted value of electricity consumption based on the multidimensional correlation information to obtain the predicted electricity consumption result of the target area.

9. A power consumption prediction device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the power consumption prediction method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein when the device containing the computer-readable storage medium executes the computer program, it implements the power consumption prediction method as described in any one of claims 1 to 7.