Power load prediction method, system and device and storage medium

By constructing temporal, meteorological, and spatial topological features, and combining dynamic time warping distance and collaborative spatiotemporal graph attention networks with lightweight gradient boosters, the problem of insufficient accuracy and generalization ability in existing power load forecasting technologies is solved, achieving high-precision load forecasting and personalized analysis.

CN121860106APending Publication Date: 2026-04-14BEIJING SHU INTELLIGENT CARBON TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-12
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing power load forecasting methods struggle to effectively capture complex spatiotemporal nonlinear characteristics and lack the ability to model individualized power consumption patterns of different users, resulting in insufficient forecast accuracy and limited generalization ability.

Method used

By acquiring users' historical power load sequence data, cleaning and outlier processing are performed to construct temporal, meteorological, and spatial topological features. Dynamic time-normalized distance is used for cluster analysis to classify users into different load pattern categories. Finally, a spatiotemporal graph attention network and a lightweight gradient booster are combined to perform prediction.

Benefits of technology

It significantly improves the accuracy and generalization ability of power load forecasting, supports multi-time granularity forecasting, and provides more reliable decision support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121860106A_ABST
    Figure CN121860106A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of power supply, and particularly provides a power load prediction method, system and device and a storage medium, and the method comprises the steps: obtaining historical power load sequence data of a user, and carrying out the cleaning and abnormal value processing of the historical power load sequence data; constructing a feature set based on the processed data, wherein the feature set comprises time sequence features, meteorological features and spatial topology features; based on the dynamic time warping distance, carrying out clustering analysis on the standardized load sequences of the users, and dividing the users into different load mode categories; taking the load mode category to which the user belongs as a classification feature, and adding the classification feature into the feature set; and inputting the enhanced feature set into a fusion prediction model, wherein the model generates a final power load prediction value through a cooperative work space-time diagram attention network and a lightweight gradient elevator. Through multi-model fusion and dynamic clustering, the comprehensive performance of power load prediction is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power supply technology, specifically relating to a power load prediction method, system, device, and storage medium. Background Technology

[0002] Electricity load forecasting is a crucial link in ensuring the safe, stable, and economical operation of the power system. With the large-scale integration of renewable energy and the opening of the electricity market, the randomness and uncertainty of load sequences have significantly increased, placing higher demands on forecast accuracy. Traditional forecasting methods, such as time series models, machine learning, and deep learning methods, mostly rely on single models. While each has its advantages, they generally suffer from limitations: they either struggle to effectively capture complex spatiotemporal nonlinear characteristics or lack the ability to model personalized electricity consumption patterns of different users, resulting in insufficient accuracy and limited generalization ability when dealing with diverse load scenarios. Therefore, there is an urgent need for an advanced solution that can deeply integrate multi-source information, accurately identify load patterns, and adaptively perform forecasting. Summary of the Invention

[0003] In view of the above-mentioned shortcomings of the prior art, the present invention provides a power load forecasting method, system, device and storage medium to solve the above-mentioned technical problems.

[0004] In a first aspect, the present invention provides a method for predicting electricity load, comprising: Obtain the user's historical power load sequence data, and clean and process outliers from the historical power load sequence data; A feature set is constructed based on the processed data, which includes time-series features, meteorological features, and spatial topological features; Based on the dynamic time-warped distance, cluster analysis is performed on the standardized load sequences of users to classify users into different load pattern categories; the load pattern category to which a user belongs is added as a classification feature to the feature set; The enhanced feature set is input into a fusion prediction model, which generates the final power load forecast through a collaborative spatiotemporal graph attention network and a lightweight gradient booster.

[0005] In one optional implementation, the user's historical electricity load sequence data is obtained, including: Read historical electricity load data from smart meters or electricity consumption information collection systems, for at least two years, on a daily basis, with each day containing 96 monitoring points. The acquired data should include at least the following: Historical load values: Time-series load data with a granularity of 15 minutes or less; User attributes: User ID, industry type, and power consumption; Time stamp: A timestamp accurate to the minute, and a weekday, weekend, or holiday marker derived from that timestamp.

[0006] In an optional implementation, the historical power load sequence data is cleaned and outlier processed, including: For randomly missing data points, time-aware linear interpolation or seasonally adjusted linear interpolation is used to fill them. For consecutive missing data segments, the average load of other users in the same cluster during the same period or the load curve of similar days is used to fill the gaps. Outliers are identified using either the statistical 3σ principle or the model-based isolated forest algorithm, and then corrected using the moving median of the time window before and after the outlier.

[0007] In an optional implementation, a feature set is constructed based on the processed data, including: Constructing time-series features includes extracting lagged features from historical time points, calculating rolling statistical features for the past 24 hours or 7 days, and converting hours within a day and days within a week into sine / cosine cyclic codes. Constructing meteorological features: This includes standardizing temperature and humidity, and creating features that reflect cumulative effects, such as the average temperature over the past 3 days; Constructing spatial topology features includes converting power grid partitioning information into classification embedding vectors, and constructing a graph structure based on geographical distance between users or power grid topology connections, where the edge weights of the graph are calculated by the reciprocal of the distance or a Gaussian kernel function.

[0008] In one optional implementation, cluster analysis is performed on the standardized load sequences of users based on dynamic time warping distance to classify users into different load pattern categories, including: Select the load sequence for each user within a typical cycle and perform standardization processing; The distance between every two user load sequences is calculated using a dynamic time warping algorithm to form a distance matrix; The dynamic time-normalized distance matrix is ​​input into the K-Shape clustering algorithm or hierarchical clustering algorithm to perform the clustering process, thereby dividing users into K different load pattern categories; For each cluster obtained after clustering, the dynamic time-warped centroid of all user load sequences within that cluster is calculated to serve as the representative load pattern for that cluster.

[0009] In an optional implementation, the enhanced feature set is input into a fusion prediction model that generates the final electricity load forecast through a collaborative spatiotemporal graph attention network and a lightweight gradient booster, including: Spatiotemporal feature extraction and prediction sub-step: The feature set containing user nodes, spatial adjacency relationships and historical load is input into the spatiotemporal graph attention network; the network processes the feature set through its internal graph attention layer and temporal convolutional layer, and outputs a spatiotemporal fusion feature vector; then, the spatiotemporal fusion feature vector is input into a fully connected output layer to generate a first prediction result; Nonlinear modeling and prediction sub-step: The spatiotemporal fusion feature vector is concatenated with time series features and meteorological features, and then input into the lightweight gradient booster model, which outputs a second prediction result. The result fusion sub-step involves taking a weighted average of the first and second prediction results and using the resulting value as the final power load prediction.

[0010] In an optional implementation, a weighted average is performed on the first prediction result and the second prediction result, including: The spatiotemporal fusion feature vector is input into a lightweight meta-learning network, which outputs fusion weights for the first prediction result and the second prediction result in real time based on the current input feature context. The first prediction result and the second prediction result are weighted and averaged using the fusion weights. The lightweight meta-learning network is a small feedforward neural network that generates dynamic weights in the following way: Network structure: The input layer of the meta-learning network receives the spatiotemporal fusion feature vector, passes through one or more fully connected hidden layers, undergoes a nonlinear transformation, and finally generates two scalar values ​​through an output layer; Weight normalization: The two scalar values ​​are input into the Softmax function for normalization, so that the sum of the two is 1. The normalized results are the real-time fusion weights of the first prediction result and the second prediction result, respectively. Network training: The parameters of the meta-learning network are jointly trained end-to-end with the spatiotemporal graph attention network and the lightweight gradient booster model. The training objective is to minimize the loss function between the final predicted value after weighted averaging and the actual load value.

[0011] Secondly, the present invention provides a power load forecasting system, comprising: The data acquisition module is used to acquire the user's historical power load sequence data and to clean and process outliers in the historical power load sequence data. The feature extraction module is used to construct a feature set based on the processed data, the feature set including time series features, meteorological features and spatial topological features; The pattern recognition module is used to perform cluster analysis on the standardized load sequences of users based on dynamic time warping distance, and classify users into different load pattern categories; the load pattern category to which a user belongs is added as a classification feature to the feature set; The model prediction module is used to input the enhanced feature set into a fusion prediction model, which generates the final power load prediction value through a collaborative spatiotemporal graph attention network and a lightweight gradient booster.

[0012] Thirdly, a device is provided, comprising: Memory used to store power load forecasting programs; A processor is configured to implement the steps of the power load forecasting method as provided in the first aspect when executing the power load forecasting program.

[0013] Fourthly, a computer-readable storage medium is provided, on which an electricity load forecasting program is stored, which, when executed by a processor, implements the steps of the electricity load forecasting method provided in the first aspect.

[0014] The beneficial effects of this invention are as follows: the power load forecasting method, system, device, and storage medium provided by this invention effectively improve the overall performance of power load forecasting through multi-model fusion and dynamic clustering. Its beneficial effects are: First, by combining spatiotemporal graph attention networks and LightGBM, it possesses both spatiotemporal feature capture and complex nonlinear relationship modeling capabilities, significantly improving prediction accuracy; second, based on dynamic time warping load pattern clustering and feature enhancement, it achieves personalized and accurate predictions for different electricity consumption behaviors; third, the model has the ability to quickly adapt to new users through a meta-learning mechanism, enhancing generalization and practicality; finally, this method supports multi-time granularity forecasting and provides uncertainty quantification, providing more reliable and comprehensive decision support for power grid dispatching and virtual power plant operation. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 This is a schematic flowchart of a method according to an embodiment of the present invention.

[0017] Figure 2 This is a schematic block diagram of a system according to an embodiment of the present invention.

[0018] Figure 3This is a schematic diagram of the structure of a device provided in an embodiment of the present invention. Detailed Implementation

[0019] To enable those skilled in the art to better understand the technical solutions of this invention, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this invention.

[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.

[0021] The power load forecasting method provided in this embodiment of the invention is executed by a computer device, and correspondingly, the power load forecasting system runs in the computer device.

[0022] Figure 1 This is a schematic flowchart illustrating a method according to an embodiment of the present invention. Wherein, Figure 1 The implementing entity can be a power load forecasting system. Depending on different requirements, the order of the steps in this flowchart can be changed, and some steps can be omitted.

[0023] like Figure 1 As shown, the method includes: S1. Obtain the user's historical power load sequence data, and perform cleaning and outlier processing on the historical power load sequence data; S2. Construct a feature set based on the processed data, the feature set including time-series features, meteorological features and spatial topological features; S3. Based on the dynamic time-warped distance, perform cluster analysis on the standardized load sequences of users to classify users into different load pattern categories; add the load pattern category to which a user belongs as a classification feature to the feature set; S4. Input the enhanced feature set into a fusion prediction model, which generates the final power load forecast through a collaborative spatiotemporal graph attention network and a lightweight gradient booster.

[0024] In one embodiment of the present invention, based on step S1, the following will provide a possible embodiment and describe its specific implementation in a non-limiting manner.

[0025] The system reads historical data in batches from smart meters (AMIs) deployed on the user side or from the power grid company's unified electricity consumption information collection system via a data interface. To ensure the sufficiency of model training, the historical data read spans no less than two years.

[0026] The specific specifications and content of the historical power load sequence data are as follows: Historical load values: The core data is time-series load data, with a granularity of 15 minutes, meaning it contains data from 96 consecutive monitoring points per day, thus forming a high-precision load curve. The data is recorded in floating-point format, with the unit being kilowatts (kW).

[0027] User attributes: To enable user classification and personalized analysis, and to obtain user attribute information associated with each load record, at least the following should be included: User ID: Used to uniquely identify different users.

[0028] Industry type: Recorded in the form of classification labels, such as "industrial", "commercial", "residential", etc., to distinguish electricity consumption behavior patterns.

[0029] Electricity capacity: User contract capacity measured in kilovolt-amperes (kVA) is a key indicator reflecting the scale of user electricity consumption.

[0030] Time stamps: Each load data point corresponds to a timestamp accurate to the minute. Based on this timestamp, the system will derive key time period markers through programmed processing, especially weekday, weekend, and holiday markers. These markers are crucial for capturing the periodic impact of social activities on electricity consumption patterns.

[0031] During the data preprocessing stage, the acquired historical power load sequence data undergoes rigorous cleaning and outlier removal. The specific implementation process is as follows: Data cleaning and missing value imputation: The system first detects missing data points and then uses different imputation strategies based on the missing data pattern: For randomly missing data points, the system employs a time-aware interpolation method. Specifically, linear interpolation is prioritized, using the nearest valid data points before and after the missing point for calculation and filling. For load data exhibiting clear daily or weekly periodicity, a seasonally adjusted linear interpolation method is used, which involves linearly adjusting the data based on the same periodic data (such as the same time of the previous day or the same time of the previous week) to better maintain the periodic characteristics of the load curve.

[0032] For continuously missing data segments (e.g., data loss for several hours due to equipment failure), simple interpolation methods are no longer applicable. The system utilizes the results of previous user load pattern clustering (see the clustering analysis steps of this invention) to select load sequences from other normal users within the same cluster belonging to the target user during the same time period, calculate their average values, and fill the gaps. If no data is available for the same period, the load curve of a historically similar day for that user (e.g., Tuesday, which is a weekday) is used as a template for filling. This method effectively reconstructs the overall electricity consumption pattern for the missing period.

[0033] Outlier detection and correction: To eliminate abnormal data caused by measurement errors or sudden interference, the system performs the following steps: Outlier identification: A dual strategy is employed for detection.

[0034] Based on the statistical 3σ principle: calculate the mean (μ) and standard deviation (σ) of the load series, and preliminarily identify data points falling outside the interval (μ-3σ, μ+3σ) as outliers.

[0035] Model-based Isolation Forest Algorithm: At the same time, the unsupervised isolation forest algorithm is used to detect load sequences. This algorithm can effectively identify "isolated points" that are significantly different from the mainstream data patterns, and is especially suitable for discovering local anomalies and complex anomalies.

[0036] The results of the two methods are combined to form the final list of outliers.

[0037] Outlier Correction: Instead of simply deleting identified outliers, the system employs a data smoothing strategy for correction. Specifically, a fixed-length time window (e.g., 6 data points before and after the outlier, totaling 1.5 hours) is defined, centered on the outlier. The moving median of the valid data within this window is calculated and used to replace the original outlier. This method effectively resists the interference of the outliers themselves, smoothing the data while preserving the true trend of the original sequence to the greatest extent possible.

[0038] In one embodiment of the present invention, based on step S2, the following will provide a possible embodiment and describe its specific implementation in a non-limiting manner.

[0039] The system automatically generates three types of time-series features based on the time dependency of the load data: Lag characteristics: Load values ​​from historical time points are extracted programmatically as features. Key lag steps include: T-1, T-2, ..., T-96 (representing the same time the previous day and earlier), and T-672 (representing the same time the previous week), in order to capture the recent and cyclical patterns of load.

[0040] Rolling statistical characteristics: Calculates statistics within a sliding time window. The system sets two core windows: 24 hours (short-term) and 7 days (long-term), and calculates their mean, standard deviation, maximum and minimum values ​​on a rolling basis to describe the short-term fluctuations and long-term trends of the load.

[0041] Time periodicity encoding: To transform time variables with cyclical characteristics, such as "hours within a day" and "days within a week," into continuous features that the model can understand, the system performs sine / cosine encoding. For example, for the hour variable, two new features are generated: sin(2π*hour / 24) and cos(2π*hour / 24). This encoding can seamlessly express the temporal proximity of "23:00 and 01:00".

[0042] Meteorological feature construction: The system integrates meteorological data to construct key environmental features affecting the load. Standardization: Z-score standardization is performed on continuous meteorological variables such as temperature and humidity to eliminate the influence of dimensions.

[0043] Cumulative effect characteristics: To reflect the lagged effects of meteorological conditions, the system creates features such as "average temperature of the past 3 days" and "daily temperature difference" to capture the cumulative effects of sustained high temperatures or sudden temperature changes on air conditioning loads.

[0044] Spatial topology feature construction: To capture spatial relationships between users, the system constructs the following features: Spatial label embedding: Categorical variables such as "power grid zones" (e.g., provincial grids, municipal grids) are transformed into low-dimensional dense continuous vectors through a trainable embedding layer, enabling the model to learn the potential electricity consumption characteristics of different zones.

[0045] Graph structure construction: Node and edge definition: Each user is defined as a graph node. Graph edges are constructed based on the geographical distance between users or the power grid topology connections imported from a GIS system.

[0046] Edge weight calculation: Edge weights are used to quantify the strength of the association between nodes. If based on geographical distance, the reciprocal of the weight (1 / distance) or the Gaussian kernel function (exp(-distance)) is used. 2 / σ 2 The calculation is performed so that the closer the user is, the greater the connection weight.

[0047] In one embodiment of the present invention, based on step S3, the following will provide a possible embodiment and describe its specific implementation in a non-limiting manner.

[0048] S301. Data Preparation and Standardization The system first selects the complete load sequence of each user within a typical period (such as one week) as the analysis object. To ensure that the clustering effect is not affected by the absolute amount of electricity consumption, the load sequence of each user is Z-score standardized, that is, the sequence mean is subtracted and then divided by the sequence standard deviation, so as to convert it into a standard normal distribution with a mean of 0 and a standard deviation of 1, thereby focusing on comparing the morphological similarity of the load curves.

[0049] S302. Distance Matrix Calculation To accurately measure the similarity of load curves of different users on the time axis, the system employs the Dynamic Time Warping (DTW) algorithm to calculate the distance between every two user sequences. DTW effectively handles the differences in the "scaling" and "translation" of electricity consumption behavior over time by finding the optimal nonlinear alignment path between two sequences. The system iterates through all user pairs, calculates the DTW distance between each pair, and finally forms an N×N symmetric distance matrix (N is the total number of users).

[0050] S303. Clustering Execution The DTW distance matrix calculated above is input into the improved K-Shape clustering algorithm. The K-Shape algorithm is designed specifically for time series data. It optimizes the clustering results by iteratively calculating and updating the alignment of the sequence with the cluster centers (shape-based). The system determines the optimal number of clusters K using evaluation methods such as the silhouette coefficient method, and finally divides all users into K different load pattern categories (e.g., "morning peak", "evening peak", "stable", "intermittent", etc.).

[0051] S304. Representative Pattern Generation For each clustered category, the system calculates the DTW centroid of the standardized load sequences for all users within that category. The DTW centroid is a representative sequence that minimizes the sum of its DTW distances to all other sequences within the category, best reflecting the typical electricity consumption patterns of that user category. The K DTW centroid curves output by the system serve as visual representations of the K load pattern categories, providing an intuitive basis for subsequent personalized predictions and analyses.

[0052] Dynamic Time Warping (DTW) centroid, also known as sequence averaging, aims to find a central sequence that represents a group of morphologically similar time series that may have temporal misalignments. This invention employs a classic iterative optimization algorithm—DTW Barycenter Averaging (DBA)—for calculation. The specific implementation steps are as follows: Initialize the central sequence: A standard load sequence of users is randomly selected from the target cluster as the initial candidate center sequence C.

[0053] Alternative: To accelerate convergence, the arithmetic mean of all sequences within the class at each time point can be calculated to obtain an initial average sequence as C.

[0054] Iterative refinement: Repeat the following steps until the central sequence C converges (i.e., the change in C between two adjacent iterations is less than a preset threshold) or the maximum number of iterations is reached: a. Alignment Phase: Using the DTW algorithm, each user load sequence S within the category is aligned. i Align with the current center sequence C. This process will be performed for each pair of sequences (S). i C) Find an optimal curved path P i This path indicates S i Each point should correspond to which (or which) point of C.

[0055] b. Update phase: Based on the alignment results of all sequences, update each point of the center sequence C.

[0056] For the j-th point on the central sequence C, find all user sequences S. i In the middle, through the DTW curved path P i With C j The set of all aligned points.

[0057] Calculate the arithmetic mean of all points in this set.

[0058] Update the value of the j-th point in the center sequence C with the calculated average value.

[0059] Output: When the iteration meets the termination condition, the final center sequence C is the DTW centroid of this load pattern category. This sequence minimizes the sum of its DTW distances to all other sequences within the category, thus most representatively characterizing the common electricity consumption behavior patterns of this type of user.

[0060] In one embodiment of the present invention, based on step S4, the following will provide a possible embodiment and describe its specific implementation in a non-limiting manner.

[0061] The fusion prediction model achieves high-precision load prediction by employing a collaborative spatiotemporal graph attention network (STGAT) and a lightweight gradient booster (LightGBM), and by introducing a meta-learning weight adaptive mechanism. The specific implementation process is as follows: S401. Overall Model Reasoning Process Step 1: Spatiotemporal Feature Extraction and Generation of First Prediction Result The feature set, including user node features, spatial adjacency matrix, and historical load sequences, is input into the Spatiotemporal Graph Attention Network (STGAT). This network processes the following sequentially: Spatial Dependency Capture: Through the Graph Attention Layer (GAT), each user node aggregates information about its spatial neighbors (based on geographical or topological relationships) and outputs a feature sequence containing spatial associations.

[0062] Temporal Dependency Capture: The spatial feature sequences mentioned above are input into a temporal convolutional network (TCN), and its dilated causal convolutional structure is used to extract temporal patterns from long-term sequences.

[0063] Features and Predicted Output: The final output of the TCN is a spatiotemporal fusion feature vector containing spatiotemporal dependencies. This vector is then fed into a fully connected output layer, which maps the high-dimensional features to specific predicted values, which is the first prediction result.

[0064] Step 2: Nonlinear Modeling and Generation of Second Prediction Results The spatiotemporal fusion feature vector output by STGAT is concatenated with manually constructed time-series features (such as lag features and rolling statistical features) and meteorological features (such as temperature and humidity) to form a comprehensive hybrid feature vector. This hybrid feature vector is then input into the Lightweight Gradient Boosting Machine (LightGBM) model. LightGBM utilizes its powerful gradient boosting decision tree framework to focus on learning the complex nonlinear relationships and interaction effects between features and outputs a second prediction result.

[0065] Step 3: Adaptive Result Fusion Based on Meta-Learning Dynamic weight generation: To achieve adaptive fusion, the spatiotemporal fusion feature vector output by STGAT (serving as a highly abstract representation of the current prediction context) is input into a lightweight meta-learning network. This network is a small feedforward neural network with the following structure: Input layer: Receives the spatiotemporal fusion feature vector.

[0066] Hidden layers: contain one or more fully connected layers and use activation functions such as ReLU for nonlinear transformations.

[0067] Output layer: The final output consists of two unnormalized scalar values.

[0068] These two scalar values ​​are input into the Softmax function for normalization, so that the sum of the output values ​​is 1. The normalized result is the real-time fusion weights w1 and w2 for the current input sample (corresponding to the first and second prediction results, respectively).

[0069] Weighted fusion: Using weights generated by the meta-learning network, the two prediction results are weighted and averaged. The calculation formula is as follows:

[0070] in, This is the first prediction result. This is the second prediction result. This is the final predicted power load value of the system.

[0071] S402. Model Training Method The fusion prediction model employs an end-to-end joint training strategy. The parameters of the Spatiotemporal Graph Attention Network (STGAT), Lightweight Gradient Boosting Machine (LightGBM), and Meta-learning Network are jointly optimized.

[0072] Training objective: Minimize the loss function (e.g., mean squared error, MSE) between the final predicted value after weighted averaging and the actual load value.

[0073] Training Process: In each training iteration, forward propagation calculates the final prediction and loss, while backpropagation simultaneously updates all parameters of STGAT, LightGBM (which improves its own structure through gradients), and the meta-learning network. This joint training ensures that the entire system can work collaboratively. The meta-learning network learns to assign appropriate weights to the two base models based on different spatiotemporal contexts, thereby systematically improving the final prediction accuracy.

[0074] In some embodiments, the power load forecasting system may include multiple functional modules composed of computer program segments. The computer programs for each program segment in the power load forecasting system may be stored in the memory of a computer device and executed by at least one processor to perform (see details). Figure 1 (Description) The function of power load forecasting.

[0075] In this embodiment, the power load forecasting system can be divided into multiple functional modules according to the functions it performs, such as... Figure 2 As shown. The module referred to in this invention is a series of computer program segments that can be executed by at least one processor and perform a fixed function, and is stored in memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.

[0076] The data acquisition module is used to acquire the user's historical power load sequence data and to clean and process outliers in the historical power load sequence data. The feature extraction module is used to construct a feature set based on the processed data, the feature set including time series features, meteorological features and spatial topological features; The pattern recognition module is used to perform cluster analysis on the standardized load sequences of users based on dynamic time warping distance, and classify users into different load pattern categories; the load pattern category to which a user belongs is added as a classification feature to the feature set; The model prediction module is used to input the enhanced feature set into a fusion prediction model, which generates the final power load prediction value through a collaborative spatiotemporal graph attention network and a lightweight gradient booster.

[0077] Figure 3 The power load forecasting method provided in the embodiments of this application can be applied to devices. Those skilled in the art will understand that the device structure involved in the embodiments of this invention does not constitute a limitation on the device. A device may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. In the embodiments of this invention, the device includes, but is not limited to, laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the embodiments of this application described and / or claimed herein.

[0078] The device 300 may include a processor 310, a memory 320, and a communication unit 330. These components communicate via one or more buses. Those skilled in the art will understand that the server structure shown in the figure does not constitute a limitation of the present invention. It may be a bus topology or a star topology, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0079] The memory 320 can be used to store execution instructions of the processor 310. The memory 320 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. When the execution instructions in the memory 320 are executed by the processor 310, the device 300 is able to perform some or all of the steps in the above method embodiments.

[0080] The processor 310 serves as the control center of the storage device, connecting various parts of the electronic device via various interfaces and lines. It executes software programs and / or modules stored in the memory 320, and calls data stored in the memory to perform various functions of the electronic device and / or process data. The processor can be composed of integrated circuits (ICs), such as a single packaged IC or multiple packaged ICs with the same or different functions connected together. For example, the processor 310 may consist only of a central processing unit (CPU). In this embodiment of the invention, the CPU may have a single processing core or include multiple processing cores.

[0081] The communication unit 330 is used to establish a communication channel, enabling the storage device to communicate with other devices. It can receive user data sent by other devices or send user data to other devices.

[0082] The present invention also provides a computer storage medium, wherein the computer storage medium may store a program, which, when executed, may include some or all of the steps provided in the embodiments of the present invention. The storage medium may be a magnetic disk, an optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0083] Those skilled in the art will clearly understand that the techniques in the embodiments of the present invention can be implemented using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions in the embodiments of the present invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, or any other medium capable of storing program code. It includes several instructions to cause a computer device (which may be a personal computer, a server, or a second device, network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.

[0084] The same or similar parts between the various embodiments in this specification can be referred to mutually. In particular, the device embodiments are basically similar to the method embodiments, so the description is relatively simple, and the relevant parts can be referred to the description in the method embodiments.

[0085] In the embodiments provided by this invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative. For instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between systems or modules may be electrical, mechanical, or other forms.

[0086] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0087] In addition, the functional modules in the various embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.

[0088] Although the present invention has been described in detail with reference to the accompanying drawings and preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made to the embodiments of the present invention by those skilled in the art without departing from the spirit and essence of the invention, and such modifications or substitutions should all be within the scope of the present invention. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should also be covered within the protection scope of the present invention.

Claims

1. A method for predicting electricity load, characterized in that, include: Obtain the user's historical power load sequence data, and clean and process outliers from the historical power load sequence data; A feature set is constructed based on the processed data, which includes time-series features, meteorological features, and spatial topological features; Based on the dynamic time-warped distance, cluster analysis is performed on the standardized load sequences of users to classify users into different load pattern categories; the load pattern category to which a user belongs is added as a classification feature to the feature set; The enhanced feature set is input into a fusion prediction model, which generates the final power load forecast through a collaborative spatiotemporal graph attention network and a lightweight gradient booster.

2. The method according to claim 1, characterized in that, Obtain the user's historical power load sequence data, including: Read historical electricity load data from smart meters or electricity consumption information collection systems, for at least two years, on a daily basis, with each day containing 96 monitoring points. The acquired data should include at least the following: Historical load values: Time-series load data with a granularity of 15 minutes or less; User attributes: User ID, industry type, and power consumption; Time stamp: A timestamp accurate to the minute, and a weekday, weekend, or holiday marker derived from that timestamp.

3. The method according to claim 1, characterized in that, The historical power load sequence data is cleaned and outlier processed, including: For randomly missing data points, time-aware linear interpolation or seasonally adjusted linear interpolation is used to fill them. For consecutive missing data segments, the average load of other users in the same cluster during the same period or the load curve of similar days is used to fill the gaps. Outliers are identified using either the statistical 3σ principle or the model-based isolated forest algorithm, and then corrected using the moving median of the time window before and after the outlier.

4. The method according to claim 3, characterized in that, A feature set is constructed based on the processed data, including: Constructing time-series features includes extracting lagged features from historical time points, calculating rolling statistical features for the past 24 hours or 7 days, and converting hours within a day and days within a week into sine / cosine cyclic codes. Constructing meteorological features: This includes standardizing temperature and humidity, and creating features that reflect cumulative effects, such as the average temperature over the past 3 days; Constructing spatial topology features includes converting power grid partitioning information into classification embedding vectors, and constructing a graph structure based on geographical distance between users or power grid topology connections, where the edge weights of the graph are calculated by the reciprocal of the distance or a Gaussian kernel function.

5. The method according to claim 1, characterized in that, Based on dynamic time warping distance, cluster analysis is performed on the standardized load sequences of users to classify users into different load pattern categories, including: Select the load sequence for each user within a typical cycle and perform standardization processing; The distance between every two user load sequences is calculated using a dynamic time warping algorithm to form a distance matrix; The dynamic time-normalized distance matrix is ​​input into the K-Shape clustering algorithm or hierarchical clustering algorithm to perform the clustering process, thereby dividing users into K different load pattern categories; For each cluster obtained after clustering, the dynamic time-warped centroid of all user load sequences within that cluster is calculated to serve as the representative load pattern for that cluster.

6. The method according to claim 1, characterized in that, The enhanced feature set is input into a fusion prediction model, which generates the final electricity load forecast through a collaborative spatiotemporal graph attention network and a lightweight gradient booster, including: Spatiotemporal feature extraction and prediction sub-step: The feature set containing user nodes, spatial adjacency relationships and historical load is input into the spatiotemporal graph attention network; the network processes the feature set through its internal graph attention layer and temporal convolutional layer, and outputs a spatiotemporal fusion feature vector; then, the spatiotemporal fusion feature vector is input into a fully connected output layer to generate a first prediction result; Nonlinear modeling and prediction sub-step: The spatiotemporal fusion feature vector is concatenated with time series features and meteorological features, and then input into the lightweight gradient booster model, which outputs a second prediction result. The result fusion sub-step involves taking a weighted average of the first and second prediction results and using the resulting value as the final power load prediction.

7. The method according to claim 6, characterized in that, The weighted average of the first prediction result and the second prediction result includes: The spatiotemporal fusion feature vector is input into a lightweight meta-learning network, which outputs fusion weights for the first prediction result and the second prediction result in real time based on the current input feature context. The first prediction result and the second prediction result are weighted and averaged using the fusion weights. The lightweight meta-learning network is a small feedforward neural network that generates dynamic weights in the following way: Network structure: The input layer of the meta-learning network receives the spatiotemporal fusion feature vector, passes through one or more fully connected hidden layers, undergoes a nonlinear transformation, and finally generates two scalar values ​​through an output layer; Weight normalization: The two scalar values ​​are input into the Softmax function for normalization, so that the sum of the two is 1. The normalized results are the real-time fusion weights of the first prediction result and the second prediction result, respectively. Network training: The parameters of the meta-learning network are jointly trained end-to-end with the spatiotemporal graph attention network and the lightweight gradient booster model. The training objective is to minimize the loss function between the final predicted value after weighted averaging and the actual load value.

8. A power load forecasting system, characterized in that, include: The data acquisition module is used to acquire the user's historical power load sequence data and to clean and process outliers in the historical power load sequence data. The feature extraction module is used to construct a feature set based on the processed data, the feature set including time series features, meteorological features and spatial topological features; The pattern recognition module is used to perform cluster analysis on the standardized load sequences of users based on dynamic time warping distance, and classify users into different load pattern categories; the load pattern category to which a user belongs is added as a classification feature to the feature set; The model prediction module is used to input the enhanced feature set into a fusion prediction model, which generates the final power load prediction value through a collaborative spatiotemporal graph attention network and a lightweight gradient booster.

9. A power load forecasting device, characterized in that, include: Memory used to store power load forecasting programs; A processor for implementing the steps of the power load forecasting method as described in any one of claims 1-7 when executing the power load forecasting program.

10. A computer-readable storage medium storing a computer program, characterized in that, The readable storage medium stores a power load forecasting program, which, when executed by a processor, implements the steps of the power load forecasting method as described in any one of claims 1-7.