Multi-level source load prediction method and system based on spatial-temporal distribution and typical scene
By employing a multi-level source-load prediction method based on spatiotemporal distribution and typical scenarios, and utilizing data cleaning, feature selection, clustering, and transfer learning to construct a spatiotemporal graph neural network model, the problem of data gaps and computational resource constraints in photovoltaic power generation and electricity load prediction is solved. This achieves high-precision, low-resource-consumption prediction and supports real-time scheduling and advanced applications of the distribution network.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-10
- Publication Date
- 2026-04-07
AI Technical Summary
Existing methods for forecasting photovoltaic power generation and electricity load face challenges such as data gaps, abnormal noise, high computational resource requirements, insufficient utilization of spatiotemporal characteristics, and small sample size, resulting in low prediction accuracy and difficulty in deployment in practical engineering.
A multi-level source-load prediction method based on spatiotemporal distribution and typical scenarios is adopted. Through data cleaning, feature selection, clustering and transfer learning, a spatiotemporal graph neural network model is constructed, and the model is trained and predicted using typical scenarios.
It improves prediction accuracy, reduces computational resource consumption, solves the small sample problem, enhances the universality and engineering applicability of the method, provides high-precision prediction results at multiple levels and time scales, and supports real-time scheduling and advanced applications of power distribution networks.
Smart Images

Figure CN121813342A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power system technology, and in particular to a multi-level source-load prediction method and system based on spatiotemporal distribution and typical scenarios. Background Technology
[0002] With a high proportion of distributed photovoltaic (PV) power being integrated into the distribution network, the randomness and volatility of its output greatly increase the difficulty of operating and controlling the distribution network. Accurate load and PV power generation forecasting (collectively referred to as "source-load forecasting") is a key technical support for ensuring the safe, reliable, and economical operation of the distribution network.
[0003] However, existing prediction methods face many challenges: 1) There are a lot of missing, anomalies and noise in the original photovoltaic power generation and electricity load data, which directly affects the input quality of the prediction model; 2) There are many prediction objects and large computational resource requirements. A distribution network area contains hundreds or thousands of transformer substations and feeders. If a prediction model is trained separately for each object, the computational cost and storage overhead will be huge, making it difficult to deploy in actual engineering; 3) Insufficient utilization of spatiotemporal characteristics. Traditional methods have failed to fully explore the complex coupling and correlation between sources and loads and in historical sequence data (time); 4) Small sample problem: For newly built transformer substations or those with a short data history, there is a lack of sufficient data to train a high-precision model.
[0004] Therefore, there is an urgent need for a multi-level source load prediction technology that can reduce computing resource consumption while efficiently improving model accuracy.
[0005] The information disclosed in this background section is intended only to enhance the understanding of the general background of the invention and should not be construed as an admission or in any way implying that the information constitutes prior art known to those skilled in the art. Summary of the Invention
[0006] This invention provides a multi-level source-load prediction method and system based on spatiotemporal distribution and typical scenarios, thereby effectively solving the problems in the background technology.
[0007] To achieve the above objectives, the technical solution adopted by this invention is: a multi-level source-load prediction method based on spatiotemporal distribution and typical scenarios, comprising the following steps: Historical photovoltaic power generation data, historical electricity load data, and corresponding meteorological and date-type data were collected. Outlier removal and missing value interpolation were performed on the raw data. The Pearson correlation coefficient and maximum mutual information coefficient between the processed data were calculated to screen out key influencing features. The key impact features are combined with the processed data to construct scene samples. An unsupervised clustering algorithm is used to cluster the scene samples, dividing the scene samples into several typical scene categories. A prediction model based on transfer learning and spatiotemporal graph neural network is constructed, and the model is trained using several of the aforementioned typical scene categories; For any target object to be predicted, its recent data and future weather forecasts are collected to determine its typical scenario category, and the corresponding trained prediction model is used to make a prediction, and prediction results at multiple time scales are output.
[0008] Furthermore, the outlier removal and missing value interpolation processing of the original data includes: The collected raw data underwent quality verification, and outliers were identified and removed using a sliding window statistical method combined with the Laida criterion. A KNN-based repair algorithm was then used to repair missing data. The KNN calculation formula is as follows: ; In the formula, The original measurement at time t; For window The mean; Let k be the k nearest neighbors of sample t in the feature space. As weight; Let t be the feature vector of sample t; To prevent the division by zero of minute quantities.
[0009] Furthermore, the Pearson correlation coefficient and maximum mutual information coefficient between the processed data are used to screen out key influencing features, including: Calculate the Pearson correlation coefficient and maximum mutual information coefficient between photovoltaic output, load, and various meteorological factors and date types to screen out key influencing characteristics. The formula for calculating the Pearson correlation coefficient is shown below: ; In the formula: For variables and The Pearson correlation coefficient between them ranges from 1 to 10. ; For characteristic variable sequences such as irradiance and temperature; The target variable sequence is such as photovoltaic output and load power; For characteristic variables The One observation value; For target variable The One observation value; For characteristic variables The sample mean; For target variable The sample mean; The total number of samples; Key influencing characteristics were identified: key characteristics of photovoltaic output include historical irradiance sequence, cloud cover, and temperature; key characteristics of load include historical load sequence, date type, holiday markers, and temperature.
[0010] Furthermore, the scene samples are clustered using an unsupervised clustering algorithm, dividing the scene samples into several typical scene categories, including: Principal component analysis (PCA) or T-distributed random neighborhood embedding (t-SNE) methods are used to reduce the dimensionality of the high-dimensional feature vectors of all samples to eliminate redundancy and highlight the main differences. Unsupervised clustering algorithms K-means++ or DBSCAN are used to cluster all scene samples after dimensionality reduction, dividing historical daily scenes into K typical scene categories.
[0011] Furthermore, the principal component analysis (PCA) calculation formula is as follows: ; In the formula, The original data matrix, For the sample size, For feature dimensions; The data matrix after centralization; for A column vector of all 1s; This is the mean vector of each feature; For the first Feature vectors of each sample; It is the covariance matrix; The total number of samples; principal components are obtained by analyzing... Obtained by eigenvalue decomposition; The t-SNE method calculation formula is as follows: ; In the formula: Let t-SNE be the objective function, which is minimized by gradient descent; KL divergence is the relative entropy, which measures the high-dimensional distribution. With low-dimensional distribution Differences; For samples in high-dimensional space and The joint probability is expressed in symmetric form. ; Samples in low-dimensional space and The joint probability is calculated using the t-distribution.
[0012] Furthermore, the objective calculation formula for the unsupervised clustering algorithm K-means++ is as follows: ; In the formula: The preset number of clusters; For the first Each cluster contains a set of sample indexes. ; For the first The centroid vector of each cluster; For the first The feature vector of each sample after dimensionality reduction by PCA / t-SNE; It is the Euclidean norm; This indicates that the partitioning and centroids of all clusters need to be optimized simultaneously; the objective function achieves clustering by minimizing the sum of squared distances from samples within a cluster to the centroid. The DBSCAN core point determination calculation is shown in the following formula: ; In the formula, The i-th sample point; by The set of samples within a neighborhood centered at a radius of ε; Number of samples in the neighborhood; Minimum number of points threshold.
[0013] Furthermore, the construction of a prediction model based on transfer learning and spatiotemporal graph neural networks, and the training of the model using several of the typical scene categories, includes: A hierarchical graph network is constructed based on the physical topology of the power distribution network. The calculation formula for the physical topology layer is as follows: ; In the formula: For nodes With nodes Similarity weights between them; This is an indicator function that takes the value 1 when the condition is true and 0 otherwise. Represents a node and There are connections in the electrical topology; For electrical membership edges; For nodes and Geographic or electrical distance between them; This is the distance attenuation parameter; They are nodes and Meteorological feature vectors; This is the scale parameter for the similarity of meteorological features; This is a similarity matrix with elements of . ; It is the identity matrix; For degree matrix, ; The adjacency matrix is the symmetric normalized adjacency matrix; A spatiotemporal graph neural network (ST-GNN) is constructed as the core prediction model, which includes: Use graph convolutional networks (GCN) or graph attention networks (GAT) to aggregate information about neighboring nodes and capture the spatial association characteristics between nodes. Gated recurrent units (GRU) or temporal convolutional networks (TCN) are used to learn the dynamic changes in the historical sequence data of each node and capture time-dependent characteristics. For each typical scenario, a high-performance ST-GNN model is trained as a pre-trained model. For feeder and transformer substation levels with less than a set amount of data, training is no longer started from scratch. Instead, the parameters of the grid-level pre-trained model are transferred over as the initial values for training the new model, and fine-tuning is performed using a small amount of data from a specific feeder or transformer substation.
[0014] Furthermore, the GCN spatial update calculation is shown in the following formula: ; In the formula: For the first The node feature matrix of the layer For the number of nodes, For the first The feature dimensions of the layer; For the first The node feature matrix of the layer; This is the original adjacency matrix. Represents a node and Connected; for The identity matrix is used to add self-loop connections; for The degree matrix, ; The adjacency matrix is the symmetric normalized adjacency matrix; For the first The learnable weight matrix of the layer; For the first Layer bias vector; It is a non-linear activation function; The GAT attention coefficient is calculated as follows: ; In the formula: For nodes The input feature vector, Input feature dimension; For neighboring nodes The input feature vector; For a shared linear transformation matrix, The transformed feature dimensions; This is a vector concatenation operation; This represents the learnable parameter vector for the attention mechanism; is the activation function for the rectified linear unit with leakage; For nodes To the neighbors The unnormalized attention score; For nodes The set of neighboring nodes, including itself; The normalized attention weights satisfy... ; It is an exponential function.
[0015] Furthermore, the one-dimensional convolution of the TCN is calculated as follows: ; In the formula, K is the kernel width; d is the dilation coefficient; For the first The channel vector of the layer at time t. For the first The linear transformation matrix shared by the layers. For the first The bias vector of the layer.
[0016] Furthermore, in the step of training a high-performance ST-GNN model as a pre-trained model for each typical scenario, the prediction loss function is minimized at the grid level as shown in the following equation: ; In the formula: This is the total loss function during the pre-training phase; Let be the set of all nodes in the graph; The total number of nodes; To predict the length of the time domain; For node indexing; The current moment; For nodes In the future The true value of the step; For nodes In the future The model predictions for each step; The set of all learnable parameters of the model; The squared L2 norm of the parameter is used as the weight decay term; This is the regularization coefficient, used to control the strength of the regularization term and suppress overfitting.
[0017] This invention also includes a multi-level source-load prediction system based on spatiotemporal distribution and typical scenarios, using the method described above. The system includes: The data acquisition unit is used to collect historical photovoltaic power generation data, historical electricity load data, and corresponding meteorological data and date-type data. It performs outlier removal and missing value interpolation on the raw data, calculates the Pearson correlation coefficient and maximum mutual information coefficient between the processed data, and selects key influencing features. The scene construction unit is used to combine the key impact features with the processed data to construct scene samples, and to use an unsupervised clustering algorithm to cluster the scene samples into several typical scene categories. The modeling and training unit is used to construct a prediction model based on transfer learning and spatiotemporal graph neural networks, and to train the model using several of the typical scene categories. The prediction unit is used to collect recent data and future weather forecasts for any prediction target object, determine its typical scenario category, make predictions using the corresponding trained prediction model, and output prediction results at multiple time scales.
[0018] The beneficial effects of this invention are as follows: It utilizes a spatiotemporal graph neural network to simultaneously capture the spatiotemporal evolution patterns of source and load data, resulting in more comprehensive modeling. Through scene clustering, it reduces the modeling problem of thousands of prediction objects to a modeling problem of a few typical scenarios, reducing the amount of model training and maintenance by more than 90%, and greatly saving computing and storage resources. Through transfer learning, it transfers the knowledge obtained from grid-level big data training to the feeder / substation level, enabling newly built or data-scarce nodes to obtain high-precision predictions, enhancing the universality and engineering applicability of the method. The high-precision prediction results provided at multiple levels and time scales can provide more reliable data support for the real-time scheduling and advanced applications of the distribution network, improving the grid's ability to absorb new energy and its operational safety level. Attached Figure Description
[0019] 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, the drawings described below are only some embodiments recorded in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a flowchart of the method of the present invention; Figure 2 A flowchart illustrating the specific steps; Figure 3 This is a schematic diagram of the system structure of the present invention; Figure 4 This is a schematic diagram of the structure of the computer device of the present invention. Detailed Implementation
[0021] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0022] like Figure 1 As shown: A multi-level source-load prediction method based on spatiotemporal distribution and typical scenarios includes the following steps: Historical photovoltaic power generation data, historical electricity load data, and corresponding meteorological and date-type data were collected. Outlier removal and missing value interpolation were performed on the raw data. The Pearson correlation coefficient and maximum mutual information coefficient between the processed data were calculated to screen out key influencing features. The key impact features are combined with the processed data to construct scene samples. An unsupervised clustering algorithm is used to cluster the scene samples, dividing the scene samples into several typical scene categories. A prediction model based on transfer learning and spatiotemporal graph neural network is constructed, and the model is trained using several of the aforementioned typical scene categories; For any target object to be predicted, its recent data and future weather forecasts are collected to determine its typical scenario category, and the corresponding trained prediction model is used to make a prediction, and prediction results at multiple time scales are output.
[0023] like Figure 2 As shown, the specific steps in this embodiment are as follows: (1) Data preprocessing and key feature extraction. This includes: multi-source data acquisition; data cleaning and repair; correlation analysis and feature engineering.
[0024] (1-1) Multi-source data acquisition. This includes: acquiring historical photovoltaic power generation data, historical electricity load data, and corresponding meteorological data (such as irradiance, temperature, humidity, cloud cover) and date-type data (such as weekdays and holidays) of the target area (grid, feeder, transformer area) from power distribution automation systems, electricity information acquisition systems, etc.
[0025] (1-2) Data Cleaning and Repair. The quality of the collected raw data was verified. Outliers were identified and removed using sliding window statistics (such as mean and variance) combined with the Laida criterion (3σ criterion). A KNN-based repair algorithm was used to repair missing data. The KNN weighted interpolation calculation is shown in formula (1): (1) in The original measurement at time t; For window The mean; Let k be the k nearest neighbors of sample t in the feature space. For weights; Let t be the feature vector of sample t; To prevent the division by zero of minute quantities.
[0026] (1-3) Correlation Analysis and Feature Engineering. Calculate the Pearson correlation coefficient and maximum mutual information coefficient between photovoltaic output, load, and various meteorological factors and date types to screen out key influencing features. For example, key features of photovoltaic output include historical irradiance sequences, cloud cover, and temperature; key features of load include historical load sequences, date types, holiday markers, and temperature. Construct a high-dimensional feature vector from the selected features. The Pearson correlation coefficient is calculated as shown in formula (2): (2) Among them: For variables and The Pearson correlation coefficient between them ranges from 1 to 10. ; For characteristic variable sequences (such as irradiance, temperature, etc.); For the target variable sequence (such as photovoltaic output, load power); For characteristic variables The One observation value; For target variable The One observation value; For characteristic variables The sample mean; For target variable The sample mean; The total number of samples.
[0027] (2) Clustering and dimensionality reduction of multi-level similar scenes. Feature extraction in this example includes: scene construction; feature dimensionality reduction and clustering; clustering results and applications.
[0028] (2-1) Scene Construction. For each prediction object (such as a transformer area, feeder, or grid), its daily photovoltaic / load time series data is combined with its corresponding key feature data to form a "daily scene" sample.
[0029] (2-2) Feature reduction and clustering.
[0030] (2-2-1) Principal component analysis (PCA) or t-SNE is used to reduce the dimensionality of the high-dimensional eigenvectors of all samples to eliminate redundancy and highlight the main differences. The calculation of principal component analysis (PCA) is shown in formula (3): (3) in The original data matrix, For the sample size, For feature dimensions; The data matrix after centralization; for A column vector of all 1s; This is the mean vector of each feature; For the first Feature vectors of each sample; It is the covariance matrix; The total number of samples. Principal components are derived from... The eigenvalues are obtained by eigenvalue decomposition, and the calculation is shown in formula (4).
[0031] (4) in: Let t-SNE be the objective function, which is minimized by gradient descent; KL divergence is a measure of high-dimensional distribution. With low-dimensional distribution Differences; For samples in high-dimensional space and The joint probability is expressed in symmetric form. ; Samples in low-dimensional space and The joint probability is calculated using the t-distribution.
[0032] (2-2-2) Unsupervised clustering algorithms (such as K-means++, DBSCAN) are used to cluster all scene samples after dimensionality reduction, and historical daily scenes are divided into K typical scene categories (such as "sunny high-load workday", "cloudy low-load holiday", etc.). The K-means target is calculated as shown in formula (5): (5) in: The preset number of clusters; For the first Each cluster contains a set of sample indexes. ; For the first The centroid vector of each cluster; For the first The feature vector of each sample after dimensionality reduction by PCA / t-SNE; It is the Euclidean norm; This indicates the need to simultaneously optimize the partitioning and centroids of all clusters. The objective function achieves clustering by minimizing the sum of squared distances from samples within a cluster to the centroid.
[0033] The calculation of the core point determination of DBSCAN is shown in formula (6): (6) in The i-th sample point; by The set of samples within a neighborhood centered at a radius of ε; Number of samples in the neighborhood; Minimum number of points threshold.
[0034] (2-3) Feature Dimensionality Reduction and Clustering. After clustering, it is no longer necessary to train a separate model for each prediction object. Instead, we only train models for the K typical scene categories mentioned above. When a new object needs to be predicted, we first determine its scene category and then call the corresponding scene prediction model, which greatly reduces the number of required models and achieves dimensionality reduction.
[0035] (3) Construct a prediction model based on transfer learning and spatiotemporal graph neural network, including: spatiotemporal graph structure definition; model architecture design; and model training strategy based on transfer learning.
[0036] (3-1) Definition of Spatiotemporal Graph Structure. A hierarchical graph network is constructed based on the physical topology of the distribution network (e.g., which feeder a transformer substation is connected to, and which grid the feeder belongs to). Nodes in the graph represent prediction objects at different levels (e.g., transformer substations, feeders), and edges represent electrical connections or affiliations between them. Each node contains its historical source load data and characteristic data. The physical topology layer is calculated as shown in formula (7): (7) in: For nodes With nodes Similarity weights between them; This is an indicator function that takes the value 1 when the condition is true and 0 otherwise. Represents a node and There are connections in the electrical topology; For electrical membership edges; For nodes and Geographic or electrical distance between them; This is the distance attenuation parameter; They are nodes and Meteorological feature vectors; This is the scale parameter for the similarity of meteorological features; This is a similarity matrix with elements of . ; It is the identity matrix; For degree matrix, ; It is the symmetric normalized adjacency matrix.
[0037] (3-2) Construct a spatiotemporal graphical neural network (ST-GNN) as the core prediction model. This model includes: (3-2-1) Spatial Dependency Modeling Module: Graph Convolutional Networks (GCN) or Graph Attention Networks (GAT) are used to aggregate information from neighboring nodes, effectively capturing the spatial correlation characteristics between nodes. For example, the load of a feeder is highly correlated with the sum of the loads of all its subordinate substations. The GCN spatial update calculation is shown in Equation (8): (8) in: For the first The node feature matrix of the layer For the number of nodes, For the first The feature dimensions of the layer; For the first The node feature matrix of the layer; This is the original adjacency matrix. Represents a node and Connected; for The identity matrix is used to add self-loop connections; for The degree matrix, ; The adjacency matrix is the symmetric normalized adjacency matrix; For the first The learnable weight matrix of the layer; For the first Layer bias vector; It is a non-linear activation function, usually ReLU or Tanh.
[0038] The GAT attention coefficient is calculated as shown in formula (9): (9) in: For nodes The input feature vector, Input feature dimension; For neighboring nodes The input feature vector; For a shared linear transformation matrix, The transformed feature dimensions; This is a vector concatenation operation; This represents the learnable parameter vector for the attention mechanism; For the activation function of the rectified linear unit with leakage, the negative slope is usually taken as 0.2; For nodes To the neighbors The unnormalized attention score; For nodes The set of neighboring nodes (including itself); The normalized attention weights satisfy... ; It is an exponential function.
[0039] (3-2-2) Gated recurrent units (GRUs) or temporal convolutional networks (TCNs) are used to learn the dynamic changes in the historical sequence data of each node and capture the time-dependent characteristics. The one-dimensional convolution calculation of TCN is shown in formula (10): (10) Where K is the kernel width; d is the dilation coefficient; For the first The channel vector of the layer at time t. For the first The linear transformation matrix shared by the layers. For the first The bias vector of the layer.
[0040] (3-3) Model training strategies based on transfer learning; (3-3-1) Pre-training. At the grid level with the richest data, a high-performance ST-GNN model is trained as a pre-trained model for each typical scenario (step 2) using its massive data. This step learns rich general spatiotemporal features. At the grid level, the prediction loss function is minimized as shown in formula (11): (11) in: This is the total loss function during the pre-training phase; Let be the set of all nodes in the graph; The total number of nodes; For the prediction time domain length (prediction steps); For node indexing; The current moment; For nodes In the future Step (moment) The true value of ); For nodes In the future The model predictions for each step; The set of all learnable parameters of the model; The L2 norm squared of the parameter (weight decay term); This is the regularization coefficient, used to control the strength of the regularization term and suppress overfitting; it is usually set to a certain value. to .
[0041] (3-3-2) Fine-tuning: For feeder and transformer substation levels with limited data, training is no longer done from scratch. Instead, the parameters of the pre-trained grid-level model (especially the parameters of the spatial graph convolutional layers, which have learned general spatial relationship patterns) are transferred over as the initial values for training the new model. Then, fine-tuning is performed using a small amount of data from the specific feeder or transformer substation, allowing the model to quickly adapt to that specific object. This effectively solves the prediction problem for objects with small data samples.
[0042] (4) Multi-timescale rolling prediction and output. This includes: model invocation; multi-scale prediction; result output and application.
[0043] (4-1) Model Invocation. For any target prediction object (such as a certain weather station area), first determine its typical scenario category on the prediction date based on its recent data and future weather forecast.
[0044] (4-2) Multi-scale prediction. Call the ST-GNN model corresponding to the scene category, which has been fine-tuned (for transformer / feeder) or pre-trained (for grid), input the latest time series data and features, and generate prediction results for multiple time scales such as ultra-short-term (15 minutes to 4 hours in the future) and short-term (24 hours to 72 hours in the future) in parallel or serially.
[0045] (4-3) Results Output and Application. The predicted results (photovoltaic output and load values for future periods) are output to the distribution network energy management system (EMS), distributed energy management system, etc., to support advanced application functions such as voltage control, power flow optimization, reactive power compensation, and demand response.
[0046] like Figure 3 As shown, this embodiment also includes a multi-level source-load prediction system based on spatiotemporal distribution and typical scenarios. Using the method described above, the system includes: The data acquisition unit is used to collect historical photovoltaic power generation data, historical electricity load data, and corresponding meteorological data and date-type data. It performs outlier removal and missing value interpolation on the raw data, calculates the Pearson correlation coefficient and maximum mutual information coefficient between the processed data, and selects key influencing features. The scene construction unit is used to combine key impact features with processed data to construct scene samples. An unsupervised clustering algorithm is used to cluster the scene samples and divide them into several typical scene categories. The modeling and training unit is used to build a prediction model based on transfer learning and spatiotemporal graph neural networks, and to train the model using several typical scene categories. The prediction unit is used to collect recent data and future weather forecasts for any prediction target object, determine its typical scenario category, make predictions using the corresponding trained prediction model, and output prediction results at multiple time scales.
[0047] This embodiment has the following significant advantages: (1) High prediction accuracy: The quality of input data is improved through rigorous data cleaning and correlation analysis; the spatiotemporal graph neural network is used to capture the spatiotemporal evolution of source load data, making the modeling more comprehensive.
[0048] (2) High computational efficiency and low resource consumption: By clustering scenarios, the modeling problem of thousands of prediction objects is reduced to the modeling problem of a few typical scenarios, which reduces the number of model training and maintenance by more than 90%, and greatly saves computing and storage resources.
[0049] (3) Solved the problem of small sample prediction: Through transfer learning, the knowledge obtained by training on grid-level big data is transferred to the feeder / station level, so that newly built or data-scarce nodes can also obtain high-precision prediction, which enhances the universality and engineering applicability of the method.
[0050] (4) Supporting precise control: The high-precision prediction results provided by the multi-level and multi-time scale can provide more reliable data support for the real-time scheduling and advanced applications of the power distribution network, and improve the power grid's ability to absorb new energy and its operational safety level.
[0051] Please see Figure 4 The diagram shows a structural schematic of a computer device provided in an embodiment of this application. An embodiment of this application provides a computer device 400, including a processor 410 and a memory 420. The memory 420 stores a computer program executable by the processor 410. When the computer program is executed by the processor 410, it performs the method described above.
[0052] This application embodiment also provides a storage medium 430, on which a computer program is stored, and the computer program is executed by a processor 410 to perform the above method.
[0053] The storage medium 430 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 Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0054] In the description of this invention, the terms "first" and "second" 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 as "first" or "second" may explicitly or implicitly include one or more of that feature. "A plurality of" means two or more, unless otherwise explicitly specified.
[0055] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0056] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Furthermore, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0057] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of the invention pertain.
[0058] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0059] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0060] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0061] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.
Claims
1. A multi-level source-load prediction method based on spatiotemporal distribution and typical scenarios, characterized in that, Includes the following steps: Historical photovoltaic power generation data, historical electricity load data, and corresponding meteorological and date-type data were collected. Outlier removal and missing value interpolation were performed on the raw data. The Pearson correlation coefficient and maximum mutual information coefficient between the processed data were calculated to screen out key influencing features. The key impact features are combined with the processed data to construct scene samples. An unsupervised clustering algorithm is used to cluster the scene samples, dividing the scene samples into several typical scene categories. A prediction model based on transfer learning and spatiotemporal graph neural network is constructed, and the model is trained using several of the aforementioned typical scene categories; For any target object to be predicted, its recent data and future weather forecasts are collected to determine its typical scenario category, and the corresponding trained prediction model is used to make a prediction, and prediction results at multiple time scales are output.
2. The multi-level source-load prediction method based on spatiotemporal distribution and typical scenarios according to claim 1, characterized in that, The outlier removal and missing value interpolation processing of the original data includes: The collected raw data underwent quality verification, and outliers were identified and removed using a sliding window statistical method combined with the Laida criterion. A KNN-based repair algorithm was then used to repair missing data. The KNN calculation formula is as follows: ; In the formula, The original measurement at time t; For window The mean; Let k be the k nearest neighbors of sample t in the feature space. As weight; Let t be the feature vector of sample t; To prevent the division by zero of minute quantities.
3. The multi-level source-load prediction method based on spatiotemporal distribution and typical scenarios according to claim 1, characterized in that, The calculated Pearson correlation coefficient and maximum mutual information coefficient between the processed data are used to screen out key influencing features, including: Calculate the Pearson correlation coefficient and maximum mutual information coefficient between photovoltaic output, load, and various meteorological factors and date types to screen out key influencing characteristics. The formula for calculating the Pearson correlation coefficient is shown below: ; In the formula: For variables and The Pearson correlation coefficient between them ranges from 1 to 10. ; For characteristic variable sequences such as irradiance and temperature; The target variable sequence is such as photovoltaic output and load power; For characteristic variables The One observation value; For target variable The One observation value; For characteristic variables The sample mean; For target variable The sample mean; The total number of samples; Key influencing characteristics were identified: key characteristics of photovoltaic output include historical irradiance sequence, cloud cover, and temperature; key characteristics of load include historical load sequence, date type, holiday markers, and temperature.
4. The multi-level source-load prediction method based on spatiotemporal distribution and typical scenarios according to claim 1, characterized in that, The unsupervised clustering algorithm is used to cluster scene samples, dividing the scene samples into several typical scene categories, including: Principal component analysis (PCA) or T-distributed random neighborhood embedding (t-SNE) methods are used to reduce the dimensionality of the high-dimensional feature vectors of all samples to eliminate redundancy and highlight the main differences. Unsupervised clustering algorithms K-means++ or DBSCAN are used to cluster all scene samples after dimensionality reduction, dividing historical daily scenes into K typical scene categories.
5. The multi-level source-load prediction method based on spatiotemporal distribution and typical scenarios according to claim 4, characterized in that, The principal component analysis (PCA) calculation formula is as follows: ; In the formula, The original data matrix, For the sample size, For feature dimensions; The data matrix after centralization; for A column vector of all 1s; This is the mean vector of each feature; For the first Feature vectors of each sample; It is the covariance matrix; The total number of samples; principal components are obtained by analyzing... Obtained by eigenvalue decomposition; The t-SNE method calculation formula is as follows: ; In the formula: Let t-SNE be the objective function, which is minimized by gradient descent; KL divergence is the relative entropy, which measures the high-dimensional distribution. With low-dimensional distribution Differences; For samples in high-dimensional space and The joint probability is expressed in symmetric form. ; Samples in low-dimensional space and The joint probability is calculated using the t-distribution.
6. The multi-level source-load prediction method based on spatiotemporal distribution and typical scenarios according to claim 4, characterized in that, The objective calculation formula for the unsupervised clustering algorithm K-means++ is as follows: ; In the formula: The preset number of clusters; For the first Each cluster contains a set of sample indexes. ; For the first The centroid vector of each cluster; For the first The feature vector of each sample after dimensionality reduction by PCA / t-SNE; It is the Euclidean norm; This indicates that the partitioning and centroids of all clusters need to be optimized simultaneously; the objective function achieves clustering by minimizing the sum of squared distances from samples within a cluster to the centroid. The DBSCAN core point determination calculation is shown in the following formula: ; In the formula, The i-th sample point; by The set of samples within a neighborhood centered at a radius of ε; Number of samples in the neighborhood; Minimum number of points threshold.
7. The multi-level source-load prediction method based on spatiotemporal distribution and typical scenarios according to claim 1, characterized in that, The construction of a prediction model based on transfer learning and spatiotemporal graph neural networks, and the training of the model using several typical scene categories, includes: A hierarchical graph network is constructed based on the physical topology of the power distribution network. The calculation formula for the physical topology layer is as follows: ; In the formula: For nodes With nodes Similarity weights between them; This is an indicator function that takes the value 1 when the condition is true and 0 otherwise. Represents a node and There are connections in the electrical topology; For electrical membership edges; For nodes and Geographic or electrical distance between them; This is the distance attenuation parameter; They are nodes and Meteorological feature vectors; This is the scale parameter for the similarity of meteorological features; This is a similarity matrix with elements of . ; It is the identity matrix; For degree matrix, ; The adjacency matrix is the symmetric normalized adjacency matrix; A spatiotemporal graph neural network (ST-GNN) is constructed as the core prediction model, which includes: Use graph convolutional networks (GCN) or graph attention networks (GAT) to aggregate information about neighboring nodes and capture the spatial association characteristics between nodes. Gated recurrent units (GRU) or temporal convolutional networks (TCN) are used to learn the dynamic changes in the historical sequence data of each node and capture time-dependent characteristics. For each typical scenario, a high-performance ST-GNN model is trained as a pre-trained model. For feeder and transformer substation levels with less than a set amount of data, training is no longer started from scratch. Instead, the parameters of the grid-level pre-trained model are transferred over as the initial values for training the new model, and fine-tuning is performed using a small amount of data from a specific feeder or transformer substation.
8. The multi-level source-load prediction method based on spatiotemporal distribution and typical scenarios according to claim 7, characterized in that, The GCN space update calculation is shown in the following formula: ; In the formula: For the first The node feature matrix of the layer For the number of nodes, For the first The feature dimension of the layer; For the first The node feature matrix of the layer; This is the original adjacency matrix. Represents a node and Connected; for The identity matrix is used to add self-loop connections; for The degree matrix, ; The adjacency matrix is the symmetric normalized adjacency matrix; For the first The learnable weight matrix of the layer; For the first Layer bias vector; It is a non-linear activation function; The GAT attention coefficient is calculated as follows: ; In the formula: For nodes The input feature vector, Input feature dimension; For neighboring nodes The input feature vector; For a shared linear transformation matrix, The transformed feature dimensions; This is a vector concatenation operation; This represents the learnable parameter vector for the attention mechanism; is the activation function for the rectified linear unit with leakage; For nodes To the neighbors Unnormalized attention score; For nodes The set of neighboring nodes, including itself; The normalized attention weights satisfy... ; It is an exponential function.
9. The multi-level source-load prediction method based on spatiotemporal distribution and typical scenarios according to claim 7, characterized in that, The TCN one-dimensional convolution calculation is shown in the following formula: ; In the formula, K is the kernel width; d is the dilation coefficient; For the first The channel vector of the layer at time t. For the first The linear transformation matrix shared by the layers. For the first The bias vector of the layer.
10. The multi-level source-load prediction method based on spatiotemporal distribution and typical scenarios according to claim 7, characterized in that, In the process of training a high-performance ST-GNN model as a pre-trained model for each typical scenario, the prediction loss function is minimized at the grid level as shown in the following formula: ; In the formula: This is the total loss function during the pre-training phase; Let be the set of all nodes in the graph; The total number of nodes; To predict the length of the time domain; For node indexing; The current moment; For nodes In the future The true value of the step; For nodes In the future The model predictions for each step; The set of all learnable parameters of the model; The squared L2 norm of the parameter is used as the weight decay term; This is the regularization coefficient, used to control the strength of the regularization term and suppress overfitting.
11. A multi-level source-load prediction system based on spatiotemporal distribution and typical scenarios, characterized in that, Using the method of any one of claims 1 to 10, the system comprises: The data acquisition unit is used to collect historical photovoltaic power generation data, historical electricity load data, and corresponding meteorological data and date-type data. It performs outlier removal and missing value interpolation on the raw data, calculates the Pearson correlation coefficient and maximum mutual information coefficient between the processed data, and selects key influencing features. The scene construction unit is used to combine the key impact features with the processed data to construct scene samples, and to use an unsupervised clustering algorithm to cluster the scene samples into several typical scene categories. The modeling and training unit is used to construct a prediction model based on transfer learning and spatiotemporal graph neural networks, and to train the model using several of the typical scene categories. The prediction unit is used to collect recent data and future weather forecasts for any prediction target object, determine its typical scenario category, make predictions using the corresponding trained prediction model, and output prediction results at multiple time scales.
Citation Information
Patent Citations
Distribution area distributed photovoltaic power prediction method and system
CN120109786A
Intelligent monitoring and data analysis system and method for photovoltaic power station
CN120165500A
Photovoltaic electric field output prediction method and device based on association rule mining and medium
CN120430454A