Method, device and equipment for medium and long term power prediction based on multi-source data fusion

By employing multidimensional feature vector recognition and structured scene coding, combined with a prediction model library and dynamic fusion weights, the error problem in medium- and long-term power generation forecasting under extreme scenarios is solved, achieving high-precision and robust power generation forecasting.

CN123159731APending Publication Date: 2026-11-24INST OF ECONOMIC & TECH STATE GRID HEBEI ELECTRIC POWER
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611205013.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-10
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Existing medium- and long-term electricity forecasting methods show significantly increased prediction errors under extreme scenarios. They lack deep fusion and classification-driven processing of multi-source data, cannot systematically cover various extreme scenario types, and lack uncertainty quantification, which increases the difficulty of decision-making.

Method used

A multi-dimensional feature vector is input to a scene classifier for scene recognition, generating a structured scene code. Combined with a prediction model library and multi-model fusion, the fusion weight is dynamically calculated based on scene intensity and historical error, and the final power prediction result is output, realizing deep fusion of multi-source data and uncertainty quantification.

Benefits of technology

It significantly improves the accuracy and robustness of medium- and long-term power forecasting in complex and extreme scenarios, can adapt to multiple concurrent scenarios, and provides reliable forecast results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123159731A_ABST
    Figure CN123159731A_ABST
Patent Text Reader

Abstract

This invention provides a method, apparatus, and device for medium- and long-term power generation forecasting based on multi-source data fusion, relating to the field of power generation forecasting technology. The method includes: inputting a multi-dimensional feature vector constructed based on multi-source data into a scene classifier; identifying scenes from multiple dimensions and generating structured scene codes; these multiple dimensions include meteorological, socio-economic, and power grid operation dimensions; according to the structured scene codes, scheduling corresponding prediction models from a prediction model library to obtain power generation forecast results; the prediction model library stores basic prediction models and specialized prediction models trained for various extreme scenarios; when the structured scene codes indicate the existence of extreme scenarios in multiple dimensions, dynamically calculating fusion weights based on the scene intensity of each dimension and the historical prediction errors of each specialized prediction model, and weightedly fusing the power generation forecast results of multiple specialized prediction models to obtain the final power generation forecast result. This invention can improve the accuracy of medium- and long-term power generation forecasting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power generation forecasting technology, and in particular to a medium- and long-term power generation forecasting method, apparatus, and equipment based on multi-source data fusion. Background Technology

[0002] In the field of power system planning and operation, medium- and long-term electricity demand forecasting is a key technology supporting the safe and stable operation of the power grid, the rational allocation of power sources, and market trading decisions. With the advancement of energy transition and the construction of new power systems, the factors influencing electricity demand are becoming increasingly complex and diverse. In addition to traditional economic development and population growth, the impact of new factors such as meteorological conditions, environmental policies, fluctuations in the production capacity of key industries, and the widespread adoption of electric vehicles is significantly increasing. To improve forecast accuracy, existing technical solutions generally attempt to incorporate multi-source data, such as macroeconomic indicators, meteorological data, and policy information, to construct more comprehensive forecasting models.

[0003] Currently, medium- and long-term power forecasting typically employs a single forecasting model to address all scenarios, or focuses only on a single type of extreme scenario. For example, some methods use unified models such as XGBoost or LSTM for provincial load forecasting, failing to distinguish the driving mechanisms of different scenario characteristics and data dimensions; other methods only conduct specific forecasts for summer heat waves, failing to cover other types of extreme scenarios such as cold waves, holidays, and sudden drops in renewable energy. While these methods perform well under normal conditions, their prediction errors increase significantly under extreme scenarios.

[0004] Furthermore, while existing multi-scenario adaptive methods attempt to adapt to different scenarios through hyperparameter adjustment, they still rely on a single model architecture, lacking a predictive model library and a systematic classification scheduling mechanism. They also lack deep fusion and classification-driven processing of multi-source heterogeneous data. Regarding data augmentation, existing methods often generate augmented samples unconditionally, failing to control the scenario type of the generated samples and lacking physical consistency constraints. This results in augmented samples potentially being mismatched with the target scenario or not conforming to the fundamental physical laws of power variation. In the case of multiple extreme scenarios occurring concurrently, existing technologies lack multi-model fusion mechanisms, cannot dynamically adjust fusion weights based on scenario intensity and historical model errors, and only output point estimates without uncertainty quantification, making it difficult for decision-makers to assess the reliability of the prediction results.

[0005] Therefore, there is an urgent need for a medium- and long-term power forecasting scheme that can systematically cover multiple extreme scenario types, establish classification-driven and special prediction mechanisms, achieve high-quality data enhancement through condition generation, and integrate multi-model prediction results with uncertainty quantification. Summary of the Invention

[0006] This invention provides a method, apparatus, and device for medium- and long-term power generation forecasting based on multi-source data fusion, in order to address the problem of how to improve the accuracy of medium- and long-term power generation forecasting.

[0007] In a first aspect, embodiments of the present invention provide a medium- to long-term power forecasting method based on multi-source data fusion, comprising: A multi-dimensional feature vector constructed based on multi-source data is input into a scene classifier to identify scenes from multiple dimensions and generate structured scene codes; wherein, the multiple dimensions include meteorological dimension, socio-economic dimension and power grid operation dimension; Based on the structured scenario encoding, the corresponding prediction model is scheduled from the prediction model library to obtain the power prediction result; wherein, the prediction model library stores basic prediction models and special prediction models trained for various extreme scenarios; When the structured scene coding indicates the existence of extreme scenarios in multiple dimensions, the fusion weight is dynamically calculated based on the scene intensity of each dimension and the historical prediction error of each special prediction model. The power prediction results of multiple special prediction models are then weighted and fused to obtain the final power prediction result. Output the final power prediction result.

[0008] In one possible implementation, the meteorological dimension features include average temperature, temperature change, average humidity, cumulative precipitation, average wind speed, average light intensity, and number of consecutive high-temperature days; the socio-economic dimension features include holiday markers, holiday type indexes, economic activity indices, and special event markers; and the power grid operation dimension features include load change rate, proportion of renewable energy output, equipment fault markers, frequency deviation, and voltage deviation.

[0009] In one possible implementation, the scene classifier employs a multi-task classification network, which includes a shared feature extraction layer and a multi-branch output layer. The shared feature extraction layer extracts features from the multi-dimensional feature vector. Each branch of the multi-branch output layer corresponds to each dimension among the multiple dimensions and outputs the scene probability distribution of the corresponding dimension. Each branch outputs the single-label scene category probability of the corresponding dimension.

[0010] In one possible implementation, the structured scene code is generated as follows: For each of the multiple dimensions, if the scenario category corresponding to the highest probability in the scenario probability distribution of that dimension is a normal scenario, then that dimension is encoded as a normal scenario identifier; if the scenario category corresponding to the highest probability in the scenario probability distribution of that dimension is an extreme scenario, then when the highest probability value is not lower than the judgment threshold, that dimension is encoded as an extreme scenario type identifier, otherwise it is encoded as a normal scenario identifier; the combination of the codes of each dimension forms the structured scenario code.

[0011] In one possible implementation, the step of scheduling the corresponding prediction model from the prediction model library based on the structured scene encoding includes: When the structured scene is encoded as a normal scene, the basic prediction model is scheduled; When the structured scene encoding contains an extreme scenario in a single dimension, the specialized prediction model corresponding to that dimension is scheduled. When the structured scene encoding contains extreme scenarios in multiple dimensions, multiple specialized prediction models corresponding to each dimension are scheduled.

[0012] In one possible implementation, the prediction model library adopts a three-level hierarchical architecture: the basic model layer contains the basic prediction model; multiple specialized sub-libraries correspond to each of the multiple dimensions, including meteorological, socio-economic, and power grid operation dimensions, and each specialized sub-library contains the specialized prediction model trained for various extreme scenarios under the corresponding dimension; the specialized prediction model selects an appropriate network structure according to the characteristics of the corresponding scenario.

[0013] In one possible implementation, the dynamic calculation of fusion weights based on the scene intensity of each dimension and the historical prediction errors of each specialized prediction model includes: The scene intensity is calculated for each extreme dimension. The scene intensity reflects the degree to which the current scene deviates from the normal threshold, and the scene intensity of each dimension is a dimensionless ratio. The average prediction error of each special prediction model under the same historical scene is queried. The fusion weight is determined jointly based on the scene intensity and the historical prediction error. The special prediction model with higher scene intensity and smaller historical prediction error gets a higher fusion weight.

[0014] In one possible implementation, after obtaining the final power prediction result, the method further includes: Calculate the prediction variance of each special prediction model; calculate the fusion prediction variance based on the fusion weights, the prediction variance of each special prediction model, and the correlation between models; determine the confidence interval based on the final electricity prediction result and the fusion prediction variance.

[0015] It should be noted that the various specialized prediction models in the prediction model library used in the above prediction method can utilize conditional generative adversarial networks (GANs) to generate enhanced samples for various extreme scenarios during the training phase to expand the training dataset. The training objective of the GAN can incorporate physical consistency constraints (including constraints on the shape of the power curve, peak-valley time period matching constraints, and power-meteorological correlation constraints). The training method described is not within the scope of protection of the prediction method of this invention; specific implementation methods are described in the embodiments below.

[0016] Secondly, embodiments of the present invention provide a medium- to long-term power forecasting device based on multi-source data fusion, comprising: The scene encoding module is used to input a multi-dimensional feature vector constructed based on multi-source data into the scene classifier, perform scene recognition from multiple dimensions, and generate structured scene codes; wherein, the multiple dimensions include meteorological dimension, socio-economic dimension, and power grid operation dimension; The preliminary prediction module is used to obtain the power prediction result by scheduling the corresponding prediction model from the prediction model library according to the structured scenario encoding; wherein, the prediction model library stores the basic prediction model and the special prediction model trained for various extreme scenarios. The power prediction module is used to dynamically calculate the fusion weight based on the scene intensity of each dimension and the historical prediction error of each special prediction model when the structured scene coding indicates the existence of extreme scenarios in multiple dimensions, and to perform weighted fusion of the power prediction results of multiple special prediction models to obtain the final power prediction result. The output module is used to output the final power prediction result.

[0017] Thirdly, embodiments of the present invention provide an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method described in the first aspect or any possible implementation thereof.

[0018] In this embodiment of the invention, a multi-dimensional feature vector constructed based on multi-source data is first input into a scene classifier. Scene identification is performed from three dimensions: meteorology, socio-economic factors, and power grid operation, generating structured scene codes. These three dimensions respectively represent extreme meteorological, socio-economic, and power grid operation characteristics, covering the main extreme factors affecting medium- and long-term power generation forecasts. A quantitative judgment mechanism accurately distinguishes between normal scenarios and various extreme scenarios, providing a reliable scenario basis for subsequent model scheduling. Then, based on the structured scene codes, the corresponding prediction model is scheduled from a prediction model library. This library stores basic prediction models and specialized prediction models trained for various extreme scenarios, ensuring that the prediction model is always deeply adapted to the characteristics of the current scenario, avoiding the limitation of a fixed single model being unable to handle multiple scenarios. When structured scene encoding indicates the existence of multi-dimensional extreme scenarios, the fusion weights are dynamically calculated based on the scene intensity of each dimension and the historical prediction errors of each specialized prediction model. The power prediction results from multiple specialized prediction models are then weighted and fused. Scene intensity quantifies the degree to which the current scene deviates from the normal threshold, while historical prediction errors reflect the model's generalization ability in similar scenarios. The dual-factor joint determination of weights ensures that models with higher scene relevance and better historical performance receive greater weights, achieving adaptive optimization of the fusion weights and effectively reducing the overall prediction error. Through the synergistic effect of multi-dimensional scene identification and structured scene encoding, prediction model library classification and scheduling, and dual-factor dynamic fusion, this invention significantly improves the accuracy and robustness of medium- and long-term power prediction in complex and extreme scenarios. Attached Figure Description

[0019] Figure 1 This is an application scenario diagram of a medium- and long-term power forecasting method based on multi-source data fusion provided in an embodiment of the present invention; Figure 2 This is a flowchart illustrating the implementation of a medium- to long-term power forecasting method based on multi-source data fusion, according to an embodiment of the present invention. Figure 3 This is a schematic diagram of the type division of classification-driven data provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of a medium- and long-term power prediction device based on multi-source data fusion provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0020] In actual production and life, economic growth trends have long-term, slow-changing characteristics, temperature changes exhibit strong seasonal cycles, while environmental protection and power rationing policies are sudden events. Simply piecing together these data with such different characteristics at the feature level can easily lead to models failing to capture core patterns and becoming more sensitive to noise and outliers.

[0021] Policy is a significant factor influencing electricity consumption fluctuations, particularly socio-economic policies related to economic development, environmental protection measures, coal-to-electricity conversion, and appliance subsidies. It is necessary to break down and analyze historical electricity consumption data based on policy changes over the years, identify and quantify the specific impacts of various socio-economic policies on electricity consumption fluctuations, and determine the basic growth rate and fluctuation trend of electricity consumption. Furthermore, holidays are important periods for electricity consumption fluctuations, especially during traditional holidays such as the Spring Festival, Mid-Autumn Festival, and National Day, when electricity demand is significantly affected by factors such as lifestyle habits, work patterns, and social activities.

[0022] The embodiments of this application aim to provide a new method for more intelligently and precisely integrating multi-source data, taking into account socio-economic policy changes and holidays. The embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0023] Figure 1 This diagram illustrates an application scenario of the medium-to-long-term power forecasting method based on multi-source data fusion provided in this invention. (Example:) Figure 1 As shown, the power forecasting server communicates with the power grid operation data server, the socio-economic data server, and the meteorological data server to obtain multi-source data from each server. Based on the multi-source data, it performs intelligent and refined processes such as segmentation, prediction, correction, and fusion to obtain the final medium- and long-term power forecast data and improve the accuracy of power forecasting.

[0024] See Figure 2 The document illustrates a flowchart of the implementation of a medium- to long-term power forecasting method based on multi-source data fusion provided in an embodiment of the present invention, including the following steps: S201. Input the multi-dimensional feature vector constructed based on multi-source data into the scene classifier to identify the scene from multiple dimensions and generate a structured scene code; among which, the multiple dimensions include meteorological dimension, socio-economic dimension and power grid operation dimension; the meteorological dimension represents extreme meteorological characteristics, the socio-economic dimension represents extreme socio-economic characteristics, and the power grid operation dimension represents extreme power grid operation characteristics.

[0025] The execution subject of each embodiment of this application can be a server, processor, microprocessor, or other device with data processing capabilities. In actual implementation, the specific implementation method of the execution subject can be selected according to actual needs. This embodiment does not impose any special restrictions on this, as long as it is a device with data processing capabilities.

[0026] In this step, the "multidimensional feature vector" referred to in this invention is a comprehensive input vector formed by splicing features extracted from three dimensions: meteorology, socio-economics, and power grid operation. Its dimensions cover the main extreme factors affecting medium- and long-term power generation forecasts.

[0027] The meteorological dimension characterizes extreme meteorological features, such as the impact of extreme weather events like heat waves, cold waves, and rainstorms on electricity consumption; the socio-economic dimension characterizes extreme socio-economic features, such as the deviation of electricity consumption patterns caused by long holidays, major events, and emergencies; and the power grid operation dimension characterizes extreme power grid operation features, such as the disturbance of the power grid supply and demand balance caused by sudden drops in renewable energy, equipment failures, and load changes.

[0028] The reason for requiring scenario identification from three dimensions rather than relying on a single dimension is that, in actual power grid operation, extreme scenarios often occur concurrently in multiple dimensions rather than in isolation. For example, a summer heat wave may be accompanied by a sharp drop in renewable energy output, and the Spring Festival may be accompanied by a cold wave. If scenarios are identified only from a single dimension, the combined effects of such concurrent extreme scenarios cannot be captured, leading to misjudgments in model scheduling. Therefore, this embodiment achieves systematic and accurate identification of complex scenarios through joint identification of three dimensions and structured scenario coding, providing a reliable scenario basis for subsequent model scheduling.

[0029] It should be understood that although this embodiment lists three dimensions—meteorology, socio-economic factors, and power grid operation—in other embodiments, the dimension settings can be adjusted according to the operating characteristics and data availability of the target power grid. For example, in power grid areas with a very high proportion of renewable energy, a renewable energy fluctuation dimension can be added, as long as it meets the condition of being able to independently reflect a specific physical driving mechanism.

[0030] like Figure 3 This example illustrates how to divide predicted and corrected data for economic trend data, temperature and humidity cycle data, and special item data. Specifically, economic trend data and temperature and humidity cycle data are shown as having two levels of corrected data, while special item data is shown as having a single level of corrected data. In other possible implementations, the division rules can be adjusted according to specific needs to flexibly adapt to different scenarios.

[0031] S202. Based on the structured scenario coding, the corresponding prediction model is scheduled from the prediction model library to obtain the power prediction result; wherein, the prediction model library stores the basic prediction model and the special prediction model trained for various extreme scenarios.

[0032] In this step, structured scene encoding is the quantitative judgment result output by the scene classifier, and its encoding format reflects the scene type in each dimension. The prediction model library uses a hierarchical architecture to store the basic prediction model and specialized prediction models, and performs classification scheduling based on the structured scene encoding. When the structured scene encoding indicates that the current scene is normal, the basic prediction model is scheduled; when the structured scene encoding contains extreme scene labels, the corresponding specialized prediction model is scheduled.

[0033] This model scheduling mechanism based on structured scene coding ensures that the prediction model is always deeply adapted to the characteristics of the current scene, avoiding the limitation of a fixed single model being unable to handle multiple scenarios. The base prediction model is a general model trained on all normal scene data, providing stable baseline predictions when there is no interference from extreme scenes. The specialized prediction models, on the other hand, are models specifically trained with network structures adapted to the characteristics of various extreme scenarios, providing accurate deviation predictions under extreme conditions.

[0034] S203. When the structured scene coding indicates the existence of extreme scenarios in multiple dimensions, the fusion weight is dynamically calculated based on the scene intensity of each dimension and the historical prediction error of each special prediction model. The power prediction results of multiple special prediction models are then weighted and fused to obtain the final power prediction result.

[0035] In this step, when structured scene encoding indicates the existence of multiple dimensions of concurrent extreme scenarios, it is necessary to schedule multiple specialized prediction models and fuse their prediction results. This embodiment employs a two-factor dynamic calculation of fusion weights: scene intensity quantifies the degree to which the current scene deviates from the normal threshold, reflecting the influence weight of each extreme dimension on the current predicted scene; historical prediction error reflects the generalization ability of each specialized prediction model in similar scenarios, demonstrating the model's reliability. The joint determination of weights by two factors allows models with higher scene relevance and better historical performance to receive greater weights. Compared to fusion methods that rely solely on a single factor or fixed weights, this achieves scene-adaptive optimization of the fusion weights.

[0036] In other embodiments, weights may be calculated based solely on scene intensity or solely on historical prediction errors to satisfy the logic of dynamically adjusting the model fusion contribution based on the scene.

[0037] S204, Output the final power prediction result.

[0038] In this step, the final power forecast results after fusion are output to the power grid dispatch system or planning decision-making platform to provide data support for power planning, power transmission and transformation project construction decisions and the signing of long-term power purchase agreements.

[0039] The above embodiments, through accurate determination of multi-dimensional scene recognition and structured scene coding, classification and scheduling of prediction model library, and adaptive weight optimization of two-factor dynamic fusion, construct a complete prediction framework of "scene recognition-driven - model library scheduling - two-factor fusion". This fundamentally solves the problem that a single model cannot adapt to complex scenarios and that the lack of multi-dimensional scene recognition and structured scene coding scheduling mechanism leads to insufficient prediction accuracy. It realizes the improvement of accuracy and robustness of medium and long-term power prediction in complex and extreme scenarios.

[0040] In this embodiment, a multi-dimensional feature vector constructed based on multi-source data is first input into a scene classifier. Scene identification is performed from three dimensions: meteorology, socio-economic factors, and power grid operation, generating structured scene codes. These three dimensions represent extreme meteorological, socio-economic, and power grid operation characteristics, respectively, covering the main extreme factors affecting medium- and long-term power generation forecasts. A quantitative judgment mechanism can accurately distinguish between normal scenarios and various extreme scenarios, providing a reliable scenario basis for subsequent model scheduling. Then, the corresponding prediction model is scheduled from the prediction model library according to the structured scene code. The prediction model library stores basic prediction models and specialized prediction models trained for various extreme scenarios, ensuring that the prediction model is always deeply adapted to the characteristics of the current scenario, avoiding the limitation of a fixed single model being unable to cover multiple scenarios. When structured scene encoding indicates the existence of multi-dimensional extreme scenarios, the fusion weights are dynamically calculated based on the scene intensity of each dimension and the historical prediction errors of each specialized prediction model. The power prediction results from multiple specialized prediction models are then weighted and fused. Scene intensity quantifies the degree to which the current scene deviates from the normal threshold, while historical prediction errors reflect the model's generalization ability in similar scenarios. The dual-factor joint determination of weights ensures that models with higher scene relevance and better historical performance receive greater weights, achieving adaptive optimization of the fusion weights and effectively reducing the overall prediction error. Through the synergistic effect of multi-dimensional scene identification and structured scene encoding, prediction model library classification and scheduling, and dual-factor dynamic fusion, this invention significantly improves the accuracy and robustness of medium- and long-term power prediction in complex and extreme scenarios.

[0041] In one possible implementation, the meteorological dimension features include average temperature, temperature variation, average humidity, cumulative precipitation, average wind speed, average light intensity, and number of consecutive high-temperature days; the socio-economic dimension features include holiday markers, holiday type indexes, economic activity indices, and special event markers; and the power grid operation dimension features include load change rate, proportion of renewable energy output, equipment fault markers, frequency deviation, and voltage deviation.

[0042] Regarding meteorological characteristics, average temperature reflects the overall temperature level of the current period and is a basic indicator for judging heat waves or cold waves; temperature change reflects the magnitude of temperature jumps between adjacent periods and is used to capture the characteristics of sudden extreme scenarios such as cold waves; average humidity reflects the degree of air moisture, which, together with temperature, affects the adjustment demand of air conditioning load; cumulative precipitation reflects the cumulative effect of continuous rainfall and is used to identify rainstorm-type scenarios; average wind speed and average light intensity reflect wind conditions and light conditions, respectively, and have indirect reference value for predicting new energy output; the number of consecutive high-temperature days is the number of days with temperatures exceeding 35 degrees Celsius, which is a key indicator for identifying heat wave scenarios because the impact of heat waves on power generation forecasts has a cumulative effect, and the more consecutive high-temperature days there are, the more significant the cumulative increase in air conditioning load.

[0043] In other embodiments, the meteorological dimension features may also include derived indicators such as the number of extreme temperature threshold days and temperature standard deviation, depending on the climate characteristics of the target area, as long as they meet the conditions that can characterize extreme meteorological features.

[0044] For the characteristics of the socio-economic dimension, the holiday marker uses 0 or 1 to indicate whether the current period is a holiday, which is used to distinguish the difference in electricity consumption patterns between holidays and weekdays; the holiday type index further distinguishes different types of holidays (such as the Spring Festival holiday, the National Day holiday, weekends, etc.), because different types of holidays have different impact patterns and durations on industrial load and residential load; the economic activity index is calculated based on macroeconomic indicators such as the rate of change in industrial electricity consumption, reflecting the driving effect of economic fluctuations on long-term electricity consumption trends; the special event marker uses 0 or 1 to indicate whether there are major events or emergencies, which is used to capture the sharp deviation of electricity consumption patterns caused by sudden social shocks.

[0045] The calculation method of the economic activity index can be adjusted according to data availability. For example, the industrial value-added change rate or GDP growth rate can be used as a substitute, as long as it can reflect the driving effect of economic fluctuations on electricity consumption.

[0046] Regarding the characteristics of power grid operation, the load change rate reflects the rate of change of load in the current period relative to the previous period, and is used to identify load abrupt change scenarios; the proportion of renewable energy output reflects the proportion of wind and solar power output in total power generation, and is used to identify renewable energy sudden drop scenarios. When the proportion of renewable energy output suddenly decreases, it means that the power grid supply and demand balance is disturbed; equipment fault markers indicate whether there are faults in transmission and transformation equipment, and are used to identify power grid fault scenarios; frequency deviation and voltage deviation reflect the degree to which the power grid frequency and voltage deviate from their rated values, respectively, and are direct indicators of power grid operation stability, used to identify power oscillation scenarios.

[0047] The load change rate can be calculated in the form of absolute change or relative change rate, and the calculation of the proportion of renewable energy output can also be adjusted according to the specific renewable energy configuration of the power grid.

[0048] The above-mentioned features can be quantified using the following formula. The meteorological feature vector is shown below: The variables are defined as follows: The average temperature (°C) can be either the current measured value or the weather forecast value. The change in temperature is expressed in °C. It can be calculated based on measured or forecast data; The average humidity (%) can be measured or forecasted. This represents the cumulative precipitation (mm). It can be based on measured or forecast data; The average wind speed (m / s) can be measured or forecasted. The average light intensity (W / m²) can be measured or predicted values. The number of consecutive high-temperature days (days) is used to calculate the consecutive high-temperature days. The number of days with a temperature of ℃ is based on historical measured data.

[0049] The socioeconomic feature vector is shown below: This formula is used to construct a feature vector for the socioeconomic dimension, which serves as one of the input components of the scene classifier. Where: For socioeconomic feature vectors, Use a variable to mark holidays (with a value of 0 or 1). Index for holiday types (distinguishing between different types of holidays such as Spring Festival, National Day, etc.) This is an economic activity index (calculated based on the rate of change in industrial electricity consumption). Used as a special event marker (value 0 or 1). This indicates that the vector belongs to the four-dimensional real space.

[0050] The power grid operation feature vector is shown below: This formula is used to construct a feature vector for the power grid operation dimension, serving as one of the input components of the scene classifier. Where: This is the characteristic vector of power grid operation. The load change rate (% / h) Percentage of energy contribution to new energy sources (%) The equipment fault flag (value 0 or 1) is set, and Δf is the frequency deviation (Hz). Voltage deviation (%) This indicates that the vector belongs to the five-dimensional real space.

[0051] in, , ; ; Voltage deviation (%) .

[0052] The feature vectors from the three dimensions mentioned above are concatenated to form a comprehensive scene feature vector as shown below: This formula is used to construct a comprehensive scene feature vector for multiple types of extreme scenarios, serving as the complete input to a scene classifier. Where: To synthesize scene feature vectors, Meteorological characteristic components, As a component of socioeconomic characteristics, These are characteristic components of power grid operation. This indicates that the feature vector has a dimension of 16.

[0053] The data source selection strategy for scene recognition is as follows: For short-term power generation forecasts (1-3 days from now), weather forecast data is prioritized for scene recognition to identify the scene type during the forecast period; for real-time power generation forecasts, current measured data is used for scene recognition. The choice of data source can be flexibly adjusted according to the timeliness requirements of the forecast task.

[0054] In this embodiment, by clarifying the specific composition of each dimension of features and their quantitative expression formulas, a structured data foundation is provided for the input of the scene classifier, enabling scene recognition to be based on quantitative indicators rather than subjective judgment, thereby improving the objectivity and repeatability of scene recognition.

[0055] In one possible implementation, the scene classifier employs a multi-task classification network, which includes a shared feature extraction layer and a multi-branch output layer. The shared feature extraction layer extracts features from the multi-dimensional feature vector, and each branch of the multi-branch output layer corresponds to a dimension in multiple dimensions and outputs the scene probability distribution for that dimension.

[0056] The multi-task classification network adopts an architecture design of shared feature extraction and multi-branch output. Its core idea is that although the three dimensions each focus on different extreme scenario types, there are shared physical relationships between their underlying features. For example, extreme meteorological scenarios and extreme power grid operation scenarios may share the coupling features of temperature and electricity. The shared feature extraction layer extracts the shared information from the 16-dimensional input feature vector through a unified feature mapping, avoiding the loss of cross-dimensional correlation information when each dimension extracts features independently.

[0057] Specifically, the shared feature extraction layer consists of two fully connected layers. The first layer maps the input from 16 dimensions to 64 dimensions, and the second layer maps from 64 dimensions to 128 dimensions. Each layer is followed by a ReLU activation function and Dropout regularization (dropout rate of 0.3) to prevent overfitting. The multi-branch output layer is divided into three independent branches, corresponding to the meteorological dimension, the socio-economic dimension, and the power grid operation dimension, respectively. Each branch contains a 128→64 fully connected layer and a 64→5 output layer. The output layer uses the SoftMax activation function to generate the probability distribution of five scenarios for each dimension (one normal scenario and four extreme scenarios).

[0058] In other embodiments, the shared feature extraction layer may optionally employ a residual network, an attention mechanism network, or other deep feature extraction architecture.

[0059] The output probability of a multi-task classification network can be quantified using the following formula. Taking the meteorological dimension as an example, its output probability distribution is shown below: This formula is used to calculate the 5-dimensional probability vector output by the meteorological dimension branch of the scene classifier, representing the selection probability of the 5 candidate scene types. Where: It is a 5-dimensional probability vector with meteorological dimensions. Let be the weight matrix of the meteorological dimension branch output layer, and h be the 128-dimensional feature vector output by the shared feature extraction layer. is the bias vector, and SoftMax is the normalization function that maps the linear output to a probability distribution.

[0060] in These correspond to the probabilities of normal, heat wave, cold wave, rainstorm, and combined weather scenarios, respectively. The socio-economic and power grid operation dimensions are similarly represented, each outputting its own probability. and .

[0061] The overall loss function for the scene classifier is shown below: This formula is used to construct the comprehensive loss function of the scene classifier. It optimizes the model's joint recognition capability in multi-dimensional scenes by weighted fusion of the classification losses from three dimensions. Where: For the overall scene loss function, , , These are the loss weighting coefficients for the meteorological dimension, the socio-economic dimension, and the power grid operation dimension, respectively. Losses are categorized by meteorological dimension. Losses are categorized according to socioeconomic dimensions. Losses are categorized according to the power grid operation dimension.

[0062] Each dimension employs cross-entropy loss, with the meteorological dimension as an example shown below: This formula is used to calculate the cross-entropy classification loss of the meteorological dimension branch, evaluating the difference between the model's predicted probability distribution and the true label. Where: is the cross-entropy loss value for the meteorological dimension, and k is the classification category index (5 categories in total). The true label of the k-th class (using one-hot encoding, with a value of 0 or 1). This represents the probability value of the k-th scenario predicted by the model.

[0063] Weights set to This ensures that the classification loss across the three dimensions contributes equally during training. It should be understood that in other embodiments, the weight settings can be adjusted based on differences in recognition difficulty or business importance across different dimensions, as long as the conditions for balancing the classification optimization objectives of each dimension are met.

[0064] In this embodiment, by using a joint architecture of a shared feature extraction layer and a multi-branch output layer, the scene classifier retains the independence of scene recognition in each dimension while utilizing the shared information of cross-dimensional features, resulting in higher accuracy of scene recognition in complex extreme scenarios with strong inter-dimensional correlations.

[0065] In one possible implementation, the structured scene code is generated as follows: for each of the multiple dimensions, when the highest probability value in the scene probability distribution of that dimension is lower than the judgment threshold, that dimension is encoded as a normal scene identifier; when the highest probability value in the scene probability distribution of that dimension is not lower than the judgment threshold, that dimension is encoded as an extreme scene type identifier corresponding to that highest probability value; the combination of the codes of each dimension forms the structured scene code.

[0066] The structured scene encoding generation logic is based on a quantization mechanism using a decision threshold and probability distribution. For each dimension, the multi-branch output layer of the scene classifier outputs a 5-dimensional probability vector, corresponding to the probability values ​​of normal scenes and four extreme scene categories. The quantization rules for scene determination are as follows: This formula is used to determine the scene type label for each dimension based on the probability distribution. Where: For scene type tags in the meteorological dimension, Indicates a normal scene label. Let θ be the maximum probability among all scenarios in the meteorological dimension, and θ be the decision threshold. Index for the scene category corresponding to the highest probability value. Socioeconomic dimension. and power grid operation dimension Similarly.

[0067] When the highest probability value is lower than the judgment threshold When this occurs, it means that there are no significant extreme scenarios in this dimension, and this dimension is encoded as a normal scenario identifier. When the highest probability value is not lower than the judgment threshold, it means that there is a significant extreme scenario in that dimension, and the dimension is encoded as the extreme scenario type identifier corresponding to the highest probability value. Judgment threshold The threshold setting needs to balance recognition sensitivity and false positive rate—too low a threshold will cause normal fluctuations to be misjudged as extreme scenarios, while too high a threshold will cause real extreme scenarios to be missed. In this embodiment, the judgment threshold θ is set to 0.5, meaning that an extreme scenario is only judged when the highest probability value of a certain dimension reaches 50% or more. This threshold achieved a comprehensive recognition accuracy of 93.6% in actual testing. It should be understood that 0.5 is only a preferred threshold example. In other embodiments, depending on the difference in the false positive cost of different dimension scenarios, the judgment threshold can also be set to 0.6 or 0.4, as long as it meets the statistical significance requirement of effectively distinguishing between normal and extreme scenarios.

[0068] The following table provides specific examples of structured scene encoding generation: This example demonstrates the complete mapping process from specific feature values ​​to structured scene encoding: first, based on meteorological features... ℃ and The meteorological dimension was determined to be heatwave type M1, and then based on... The socio-economic dimension is determined to be S2 (major event type), and the power grid operation dimension is determined to be N0 (normal power grid operation). The combination of the three forms a structured scenario code M1-S2-N0.

[0069] The combination of codes for each dimension forms a structured scenario code, formatted as Mx-Sy-Gz, where Mx represents the meteorological dimension code, Sy represents the socio-economic dimension code, and Gz represents the power grid operation dimension code. For example, when the meteorological dimension is determined to be a heat wave type (M1), the socio-economic dimension to be a major event type (S2), and the power grid operation dimension to be a normal scenario (N0), the structured scenario code is M1-S2-N0. This structured scenario code format makes the scenario type for each dimension immediately clear, providing a clear scenario basis for subsequent model scheduling.

[0070] In this embodiment, a structured scene code is generated by a quantitative judgment mechanism based on the judgment threshold and probability distribution, which enables systematic and accurate identification of complex scenes. It can accurately distinguish between normal scenes and various extreme scenes, providing a reliable scene basis for subsequent model scheduling.

[0071] In one possible implementation, scheduling the corresponding prediction model from the prediction model library based on the structured scene code includes: scheduling the basic prediction model when the structured scene code is a normal scene; scheduling the specialized prediction model corresponding to that dimension when the structured scene code contains an extreme scene with a single dimension; and scheduling multiple specialized prediction models corresponding to each dimension when the structured scene code contains extreme scenes with multiple dimensions.

[0072] The model scheduling logic classifies and schedules scenarios based on three scenario types encoded in the structured scenario code. When the structured scenario code is N0-N0-N0 (i.e., all three dimensions are normal scenarios), it indicates that there are no extreme scenario interferences, and the scheduling of the basic prediction model can provide a stable baseline prediction.

[0073] The basic prediction model is a general-purpose model trained on full-scale normal scenario data. Its network structure adopts an LSTM-Attention architecture, which can capture the trend and periodic patterns of medium- and long-term electricity consumption changes and has high prediction accuracy under normal scenarios. When the structured scenario encoding includes a single-dimensional extreme scenario, such as M1-N0-N0 (only the meteorological dimension has a heat wave extreme scenario), the meteorological dimension-specific prediction model—the heat wave-specific prediction model M1_heatwave_model—is scheduled. This model adopts a CNN-LSTM architecture and can capture the nonlinear impact of temperature accumulation on electricity consumption. When the structured scenario encoding includes multiple dimensions of extreme scenarios, such as M1-S2-N0 (the meteorological dimension has a heat wave extreme scenario and the socio-economic dimension has a major event extreme scenario), it is necessary to simultaneously schedule the meteorological dimension's heat wave-specific prediction model and the socio-economic dimension's major event-specific prediction model, and then perform a weighted fusion of the prediction results from the two specific prediction models.

[0074] In this embodiment, by using a classification and scheduling mechanism based on structured scene coding, the prediction model is always deeply adapted to the characteristics of the current scene, avoiding the limitation that a fixed single model cannot take into account multiple scenes, and improving the adaptability of prediction from the model selection level.

[0075] In one possible implementation, the prediction model library adopts a three-level hierarchical architecture: the basic model layer contains basic prediction models; multiple specialized sub-libraries correspond to various dimensions in multiple dimensions, including meteorological, socio-economic, and power grid operation dimensions, and each specialized sub-library contains specialized prediction models trained for various extreme scenarios under the corresponding dimension; the specialized prediction models select an appropriate network structure according to the characteristics of the corresponding scenario.

[0076] The three-tiered hierarchical architecture of the prediction model library, from top to bottom, consists of: a basic prediction model layer, a dimensional specialized sub-library layer, and a scenario-specific prediction model layer. The basic prediction model layer contains a basic prediction model trained on full datasets using an LSTM-Attention architecture, used for baseline predictions in normal scenarios. The dimensional specialized sub-library layer is divided into three sub-libraries according to a three-dimensional scenario classification system: a meteorological sub-library, a socio-economic sub-library, and a power grid operation sub-library.

[0077] The meteorological database contains four specialized prediction models: the heatwave model (M1_heatwave_model) uses a CNN-LSTM architecture to capture the cumulative temperature effect; the coldwave model (M2_coldwave_model) uses a Transformer architecture to capture sudden change features; the rainstorm model (M3_rainstorm_model) uses a CNN-BiLSTM architecture to capture the coupled fluctuations of rainfall and electricity; and the composite meteorological model (M4_composite_model) uses a Hybrid architecture to capture the composite effects of multiple extreme weather events.

[0078] The socio-economic special database contains four special prediction models: the long holiday model S1_holiday_model uses a BiLSTM+Attention architecture to capture deviations in electricity consumption patterns during holidays; the major event model S2_event_model uses a CNN-LSTM architecture to capture event-driven electricity consumption shocks; the emergency model S3_emergency_model uses a Transformer architecture to capture sudden electricity consumption changes in emergency scenarios; and the economic fluctuation model S4_economic_model uses an LSTM architecture to capture the long-term driving effect of economic cycles on electricity consumption.

[0079] The power grid operation-specific library contains four specialized prediction models: G1_renewable_model (for sudden drops in renewable energy output) uses an Encoder-Decoder architecture to capture supply-demand imbalances caused by sudden drops in renewable energy output; G2_fault_model (for power grid faults) uses a CNN-BiLSTM architecture to capture power transfer effects in fault scenarios; G3_sudden_model (for sudden load changes) uses a TCN architecture to capture the temporal characteristics of sudden load changes; and G4_oscillation_model (for power oscillations) uses a Transformer architecture to capture the frequency domain characteristics of power oscillations. The entire prediction model library comprises one basic prediction model and twelve scenario-specific prediction models.

[0080] The specific prediction model selects an appropriate network structure based on the characteristics of the corresponding scenario. The selection criteria are as follows: CNN is used to capture spatial cumulative effects (e.g., the cumulative increase in electricity consumption due to temperature in a heat wave scenario); LSTM and its variants are used to model temporal dependencies (e.g., temporal deviations in electricity consumption patterns during holidays); Transformer is used to capture sudden changes and long-range dependency features (e.g., the abrupt changes in temperature during a cold wave scenario); hybrid structures are used for complex extreme scenarios (e.g., the interactive effects of multiple extreme factors in complex weather scenarios); Encoder-Decoder is used for scenarios with asymmetrical input-output dimensions (e.g., the dimensional difference between a sudden drop in output and electricity response in a scenario of a sudden drop in renewable energy); and TCN is used for scenarios requiring long-range dependency modeling (e.g., the long-range temporal features before and after a load change in a scenario). It should be understood that although this embodiment lists the above 12 specific prediction models and their network structures, in other embodiments, the number of specific prediction models and network structures can be adjusted according to the scenario characteristics and data availability of the target power grid, as long as the condition of selecting an appropriate network structure based on scenario characteristics is met.

[0081] In this embodiment, through a three-level hierarchical architecture and a scenario-driven network structure selection strategy, the prediction model library achieves systematic coverage and accurate adaptation to various extreme scenarios. Compared with the existing technology of using a single model to deal with all scenarios, the prediction accuracy of extreme scenarios is improved by 15%-25%.

[0082] In one possible implementation, before scheduling the corresponding prediction model, the method further includes: using a conditional generative adversarial network to generate augmented samples to expand the training dataset for various extreme scenarios; wherein, the conditional generative adversarial network receives scenario conditional encoding and random noise as input to generate a synthetic power sequence that conforms to the target scenario type; the scenario conditional encoding controls the scenario type of the synthetic power sequence.

[0083] The scarcity of extreme scenario samples is a core challenge in training specialized prediction models for medium- and long-term electricity generation. For example, there are only 45 samples of heat wave scenarios and only 38 samples of cold wave scenarios in historical data, far from sufficient to support parameter optimization for deep learning models. This embodiment uses a conditional generative adversarial network (GAN) to generate enhanced samples to expand the training dataset. Its core advantage lies in the fact that the GAN receives scene conditional encoding and random noise as input. The scene conditional encoding controls the scene type of the synthesized electricity generation sequence, enabling the generated samples to accurately match the physical characteristics of the target extreme scenario, rather than generating unconditionally uncontrollable samples like the existing TimeGAN technology.

[0084] Specifically, the scene conditional encoding c includes three dimensions of One-Hot encoding, with each dimension encoded as a 5-dimensional vector (1 class of normal scenes plus 4 classes of extreme scenes). Taking the structured scene encoding M1-S2-N0 as an example, the meteorological dimension conditional encoding is as follows: This formula is used to define the One-Hot conditional coding vector for a heatwave-type scenario M1 in the meteorological dimension. Where: This is a 5-dimensional conditional encoding vector for meteorological dimensions. The vector elements correspond to the activation states of five scene types: N0, M1, M2, M3, and M4. The second element being 1 indicates that the heat wave scene M1 is triggered, and the remaining elements being 0 indicate that other scene types are not triggered.

[0085] The grid operation dimension condition coding is as follows: This formula is used to define the One-Hot conditional coding vector for the normal scenario N0 of the power grid operation dimension. Where: The vector is a 5-dimensional conditional encoding vector for power grid operation. The vector elements correspond to the activation states of five scenario types: N0, G1, G2, G3, and G4. The first element being 1 indicates the normal scenario N0, and the remaining elements being 0 indicate that the extreme scenario type has not been triggered.

[0086] The complete scene condition code formed after splicing is shown below: This formula defines a complete 15-dimensional scene conditional coding vector, which is composed of One-Hot codes from three dimensions: meteorology, socio-economic conditions, and power grid operation. In the formula: c is the 15-dimensional scene conditional coding vector. For the meteorological dimension, a 5-dimensional conditional encoding sub-vector, The 5-dimensional conditional encoding subvector for the socio-economic dimension. A 5-dimensional conditional encoding sub-vector for the power grid operation dimension. This indicates that the vector belongs to a 15-dimensional real space.

[0087] For example, the conditional encoding of the structured scenario code M1-S2-N0 is c=[0,1,0,0,0, 0,0,1,0,0, 1,0,0,0,0], where the second bit of the meteorological dimension is 1 to represent heat wave type M1, the third bit of the socio-economic dimension is 1 to represent major event type S2, and the first bit of the power grid operation dimension is 1 to represent normal scenario N0.

[0088] The generator G employs a conditional generative adversarial network architecture, receiving random noise z and scene conditional codes c as input, and outputting a synthesized electrical quantity sequence. For the input, the random noise z follows a standard normal distribution. Scene condition coding In terms of network structure, the generator consists of fully connected layers and one-dimensional convolutional layers: First, the noise z is concatenated with the conditional code c to form a 115-dimensional input vector, which is then mapped to a high-dimensional space through the fully connected layer. After further upsampling through multiple layers of one-dimensional convolutions, the final output is synthetic data in time series form, with an output dimension of T×D, where T is the time step and D is the feature dimension. The scene conditional code c injects scene type information into the generation process through concatenation operations at the generator input, ensuring that the generator is always constrained by scene conditions when generating the synthetic power sequence, thus guaranteeing that the synthetic sequence conforms to the physical characteristics of the target scene type.

[0089] The number of augmented samples is calculated using an adaptive scaling method to ensure sufficient training data for extreme scenarios. The augmentation scaling is shown below: This formula is used to calculate the adaptive scale of data augmentation for extreme scenarios, ensuring sufficient training data. Where: To increase the proportion, The minimum enhancement ratio (value 2). The base enhancement ratio (value 5). For the target sample size, This represents the current actual number of samples.

[0090] in For the minimum enhancement ratio, The basic increase ratio, For the target sample size, This refers to the actual number of samples. For example, in a heatwave scenario, there are 45 actual samples and 500 target samples, representing the enhancement ratio. This means that 450 augmented samples are generated, bringing the total number of training samples to 495.

[0091] In this embodiment, enhanced samples are generated by conditional generative adversarial networks to expand the training dataset, and scene conditional encoding controls the scene type of the synthesized power sequence, effectively solving the problem of difficulty in training specialized prediction models due to the scarcity of extreme scene data.

[0092] In one possible implementation, physical consistency constraints are introduced into the training objective of the conditional generative adversarial network. These physical consistency constraints include: a shape constraint for the energy curve, which is used to ensure that the trend of the synthetic energy sequence is consistent with that of the real sequence; a peak-valley period matching constraint, which is used to ensure that the energy during the peak period is higher than the average value during the valley period; and an energy-meteorological correlation constraint, which is used to ensure that the correlation between the energy of the synthetic energy sequence and the meteorological data is consistent with that of the real sample.

[0093] The introduction of physical consistency constraints is a crucial safeguard to ensure that the generated samples conform to the physical laws of electricity. While samples generated by unconditional generative adversarial networks may be statistically similar to real samples, they may violate physical laws. For example, they might generate anomalous sequences where peak electricity levels are lower than valley levels, or contradictory sequences where the electricity-temperature correlation is positive (when it should be negative). This embodiment uses three types of physical consistency constraint losses to ensure the physical rationality of the synthesized samples from three dimensions: curve shape, peak-valley patterns, and meteorological correlation.

[0094] The shape constraint of the power curve is achieved by calculating the mean square error of the first-order difference between the synthesized sequence and the real sequence, ensuring that the trend of the synthesized sequence remains consistent with that of the real sequence. The loss function is shown below: This formula is used to calculate the mean squared error between the generated sample and the real sample in terms of their time series trends, thus ensuring that the dynamic characteristics of the generated data are consistent with the real data. Where: Here, T represents the shape loss function value, and T is the length of the time series. and These are the synthetic power data and the actual power data generated at time t, respectively. and These represent the increments (i.e., first-order differences) of the generated data and the real data at adjacent time points.

[0095] Peak-valley time period matching constraints ensure that the peak-time electricity consumption in the synthesized sequence is higher than the average value during the valley-time period, preventing the generation of abnormal sequences that violate the daily cycle of electricity consumption. The loss function is shown below: This formula is used to calculate the deviation between the average electricity consumption during peak hours and the average electricity consumption during off-peak hours, constraining the generated data to meet the daily cyclical pattern of electricity consumption. Where: Match loss values ​​to peak and trough periods. This represents the number of time steps included in the peak period. This represents the synthesized electricity consumption value during peak hours. The average electricity consumption during the off-peak period.

[0096] The electricity-meteorological correlation constraint calculates the Pearson correlation coefficient between the synthesized sequence and meteorological data to ensure that the electricity-meteorological correlation of the synthesized sequence (such as the negative correlation between electricity and temperature) is consistent with the real sample, thus preventing the generation of sequences with contradictory physical relationships. Its loss function is shown below: This formula is used to calculate the deviation between the generated sample and the real sample in terms of electricity-meteorological correlation, constraining the physical correlation characteristics of the generated data to be consistent with the real data. Where: Let ρ(·,·) be the correlation loss value, and ρ(·,·) be the Pearson correlation coefficient function. For the generated synthetic charge sequence, This is the decoded meteorological feature sequence. This is a true battery level sequence. This is a true meteorological feature sequence.

[0097] The total physical constraint loss is formed by the weighted combination of the three physical constraint losses as shown below: This formula is used to construct the total physical constraint loss function, comprehensively evaluating the physical consistency deviation of the generated results in terms of shape, peak value, and correlation. Where: The total physical constraint loss is represented by α1, α2, and α3, which are the weighting coefficients for shape loss, peak-valley matching loss, and correlation loss, respectively. L_shape represents the loss due to the shape difference of the charge curve. To match the loss during peak and off-peak periods, This refers to the loss due to the correlation between electricity consumption and weather conditions.

[0098] Weights set to , , The shape constraint has the highest weight because the curve shape is the most fundamental physical feature of the electrical quantity sequence. The training objective function of the conditional generative adversarial network is shown below: This formula is used to calculate the total training loss function of a conditional generative adversarial network (GAN), combining adversarial loss and physical constraint loss to optimize the model's prediction accuracy and physical consistency under extreme conditions. Where: For the total loss function, To counteract the loss term, λ is the balance coefficient (with a value of 0.1). This is the physical constraint loss term.

[0099] The adversarial losses are shown below: This formula is used to calculate the discriminator loss function in adversarial training to optimize the game process between the generator and the discriminator. Where: To combat the loss value, [·] represents the expectation of the true sample X and condition c. It represents the classification probability of the discriminator for the real sample and its conditions. [·] represents the expectation of the noise vector z and the condition c. These are synthetic samples generated by the generator based on noise and conditions. This represents the probability that the discriminator identifies the synthetic sample as fake.

[0100] in This is a balancing factor to ensure a reasonable trade-off between the losses from countermeasures and the losses from physical constraints.

[0101] In this embodiment, by introducing three physical consistency constraints—electricity curve shape constraint, peak-valley time period matching constraint, and electricity-meteorological correlation constraint—into the training objective of the conditional generative adversarial network, it is ensured that the synthetic samples are consistent with the real samples in terms of change trends, peak-valley patterns, and meteorological correlation. This data augmentation strategy driven by physical constraints guarantees the predictive ability of the special prediction model from the data level.

[0102] In one possible implementation, the fusion weight is dynamically calculated based on the scene intensity of each dimension and the historical prediction error of each special prediction model. This includes: calculating the scene intensity for each extreme dimension, where scene intensity reflects the degree to which the current scene deviates from the normal threshold; querying the average prediction error of each special prediction model under similar historical scenarios; and determining the fusion weight jointly based on the scene intensity and historical prediction error, with the special prediction model that has higher scene intensity and smaller historical prediction error receiving a higher fusion weight.

[0103] The fusion weights are calculated using a dual-factor approach, combining scene intensity and historical prediction error. First, the scene intensity is calculated for each extreme dimension, reflecting the degree to which the current scene deviates from the normal threshold. The scene intensity for the meteorological dimension is shown below: This formula is used to calculate the scene intensity index in the meteorological dimension, quantifying the degree to which current meteorological conditions deviate from the scene trigger threshold. Where: For meteorological scene intensity, This is the current temperature value. The threshold for triggering a scene (e.g., 35℃ for a heat wave) is set, and max indicates that the larger of the two values ​​should be used.

[0104] in The scene trigger threshold is set as follows. For example, the trigger threshold for a heat wave scene is 35 degrees Celsius. When the current average temperature is 38 degrees Celsius, the scene intensity is 38-35=3. The scene intensity for the socio-economic dimension is shown below: This formula is used to calculate the scenario intensity index in the socioeconomic dimension, quantifying the degree to which current social activities deviate from a baseline level. Where: The intensity of the scenario is defined by its socioeconomic dimension, and Duration represents the number of days the activity in the current extreme scenario lasts. The base number of days (e.g., 7 days).

[0105] in For the number of days the event lasts, Using a base number of days (e.g., 7 days), for example, if a major event lasts 14 days, the scenario intensity is 14 / 7=2. The scenario intensity for the power grid operation dimension is shown below: This formula is used to calculate the scenario intensity index of the power grid operation dimension, quantifying the degree to which the current power grid operation deviates from the normal threshold. Where: For the intensity of scenarios in the power grid operation dimension, For the load change rate, The load change rate threshold is 20% / h, and max indicates that the larger of the two values ​​should be taken.

[0106] in The load change rate threshold (e.g., 20% / h) is used. For example, if the load change rate is 25% / h, the scene intensity is 25 / 20=1.25.

[0107] For the K extreme dimensions, the normalization strength is as follows: This formula is used to calculate the normalized scene intensity of the k-th extreme dimension, ensuring that the relative weights of the intensities of each dimension are comparable. Where: Let be the normalized intensity of the k-th extreme dimension. Let K be the original scene intensity of the k-th extreme dimension, where K is the total number of extreme dimensions. This is the sum of the original scene intensities across all extreme dimensions.

[0108] Normalized intensity ensures that the relative weights of the intensity of each dimension are comparable, and avoids the excessive strength of a certain dimension from dominating the fusion result.

[0109] Secondly, the average prediction error of each specific prediction model under similar historical scenarios was queried, and the mean absolute percentage error (MAPE) was used as the error metric, as shown below: This formula is used to calculate the mean absolute percentage error (MAPE) of the k-th specific prediction model under similar historical scenarios to evaluate the model's prediction accuracy. Where: Let MAPE_k be the average prediction error of the k-th special project prediction model, and N be the total number of test samples. Let i be the actual power value of the i-th sample. Let be the predicted power value for the i-th sample.

[0110] For example, the MAPE of the heat wave-type special prediction model is 4.2% in historical heat wave scenarios, while the MAPE of the major event-type special prediction model is 3.5% in historical major event scenarios.

[0111] Finally, the fusion weights are determined jointly based on the scene intensity and historical prediction errors, as shown below: This formula is used to calculate the dynamic fusion weights of the k-th specific prediction model in multi-model ensemble prediction, in order to optimize the power prediction accuracy under extreme scenarios. Where: The fusion weights for the k-th specific prediction model are: Let $\frac{k}{k}$ be the average prediction error of the k-th specific prediction model under similar historical scenarios. Let be the normalized scene intensity of the k-th extreme dimension, K be the total number of special prediction models participating in the fusion, exp(·) be the exponential function, and the denominator be the normalized sum of the weighted errors of all models.

[0112] This calculation method assigns higher fusion weights to specialized prediction models with higher scene intensity and smaller historical prediction errors. Higher scene intensity means that this dimension has a greater impact on the current prediction scene and should be assigned a higher weight; smaller historical prediction errors mean that the model has a stronger predictive ability in similar scenes and should also be assigned a higher weight. The joint determination of weights by two factors achieves scene-adaptive optimization of fusion weights, effectively reducing the overall prediction error compared to fusion methods that rely on only a single factor or fixed weights.

[0113] In this embodiment, the fusion weight is determined by combining scene intensity and historical prediction error as two factors, thereby achieving scene adaptive optimization of the fusion weight. This allows models with higher scene relevance and better historical performance to receive greater weight, thus improving the robustness of the prediction results.

[0114] In one possible implementation, after obtaining the final electricity prediction result, the method further includes: calculating the prediction variance of each special prediction model; considering the correlation between the prediction results of different special prediction models, calculating the fusion prediction variance based on the fusion weight, the prediction variance of each special prediction model, and the correlation between models; and determining the confidence interval based on the final electricity prediction result and the fusion prediction variance.

[0115] The calculation of confidence intervals provides a quantitative assessment of the uncertainty of the forecast results, enabling decision-makers to evaluate the reliability of the forecasts. First, the forecast results from each specific forecasting model are weighted and fused to obtain the final electricity forecast value, as shown below: This formula is used to calculate the final power prediction value after multi-model integration. Where: Here, K represents the final electricity prediction value, and K is the number of specialized prediction models participating in the integration. The fusion weights for the k-th specific prediction model are: This represents the prediction result of the k-th special prediction model.

[0116] Secondly, the prediction variance of each specific prediction model is calculated as follows: This formula is used to calculate the prediction variance of the k-th specific prediction model, to quantify the prediction uncertainty of the model in the current scenario. Where: Let Variance be the prediction variance of the k-th specific prediction model. This is the variance parameter of the prediction error of the model in the current scenario.

[0117] in This represents the variance parameter of the prediction error of the model in the current scenario. Furthermore, considering the correlation between the prediction results of different specialized prediction models, the correlation coefficient matrix of the prediction results of each model is calculated. If the correlation between models is high (the average correlation coefficient exceeds a preset threshold such as 0.7), then the covariance term between models needs to be considered in the calculation of the fusion variance.

[0118] The calculation of the fusion prediction variance is as follows: This formula is used to calculate the final variance of the multi-model ensemble prediction results to assess the uncertainty of power generation prediction under extreme scenarios. Where: The final variance of the integrated prediction results is given by K, where K is the number of specialized prediction models participating in the integration. The fusion weights for the k-th specific prediction model are: Let Variance be the prediction variance of the k-th specific prediction model. Let be the correlation coefficient between the prediction results of the i-th and j-th special project prediction models. The product of the predicted standard deviations of the i-th and j-th special prediction models.

[0119] The first term represents the sum of the weighted variances of each model, and the second term represents the sum of the covariances among the models. This calculation method takes into account the impact of the correlation between models on the fusion variance. When the correlation between models is high, the fusion variance increases because the predictions of correlated models provide less independent information; when the correlation between models is low, the fusion variance decreases because the predictions of independent models provide more complementary information.

[0120] Finally, based on the final power generation prediction results and the fused prediction variance, the 95% confidence interval is determined as follows: This formula is used to calculate the 95% confidence interval for provincial power generation forecasts under extreme scenarios, providing a quantitative assessment of the uncertainty of the forecast results. Where: The 95% confidence interval is... The final electricity prediction value is given, and 1.96 is the quantile of the normal distribution corresponding to the 95% confidence level. To integrate the predicted variance.

[0121] Where 1.96 is the normal distribution quantile corresponding to the 95% confidence level.

[0122] In this embodiment, by calculating the prediction variance of each special prediction model, considering the correlation between models to calculate the fusion prediction variance, and determining the confidence interval accordingly, a quantitative uncertainty assessment is provided for the prediction results. Compared with the existing technology that only outputs point estimates without uncertainty quantification, this enables decision-makers to make risk-controllable decisions in power system planning and scheduling.

[0123] The system of this invention underwent a 12-month test and verification in a provincial power grid, and the test results are as follows.

[0124] Scene recognition accuracy test results: The above results show that the scene classifier of the present invention has a high recognition accuracy for various extreme scenes, with a comprehensive accuracy of 93.6%, which verifies the effectiveness of the multi-task classification network architecture.

[0125] Prediction accuracy comparison test results: The above results demonstrate that the prediction accuracy of this invention is significantly superior to traditional single-model methods in various extreme scenarios, with a comprehensive improvement of 22.5%, verifying the effectiveness of the prediction model library and the two-factor fusion mechanism. Particularly in extreme scenarios (heat wave type 27.6%, cold wave type 26.2%, long holiday type 27.1%, and sudden drop in renewable energy type 26.4%), the improvement far exceeds the 6.3% improvement in normal scenarios, indicating that the scenario-driven specialized prediction model scheduling strategy of this invention has a more significant accuracy advantage in extreme scenarios.

[0126] Data augmentation effect test results: The results show that data augmentation using conditional generative adversarial networks significantly improves the prediction accuracy for various extreme scenarios, with the largest improvement (18.6%) observed in scenarios with a sudden drop in new energy sources. This verifies the effective support of data augmentation strategies driven by physical consistency constraints for training specialized prediction models.

[0127] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0128] The following are device embodiments of the present invention. For details not described in detail, please refer to the corresponding method embodiments described above.

[0129] Figure 4 The diagram illustrates the structure of a medium- to long-term power forecasting device based on multi-source data fusion provided in an embodiment of the present invention. For ease of explanation, only the parts relevant to the embodiment of the present invention are shown, and are described in detail below: like Figure 4 As shown, the medium- and long-term power forecasting device 4 based on multi-source data fusion includes: The scene coding module 401 is used to input a multi-dimensional feature vector constructed based on multi-source data into the scene classifier, perform scene recognition from multiple dimensions, and generate structured scene codes; among which, the multiple dimensions include meteorological dimension, socio-economic dimension, and power grid operation dimension; The preliminary prediction module 402 is used to obtain the power prediction result by scheduling the corresponding prediction model from the prediction model library according to the structured scene encoding; wherein, the prediction model library stores the basic prediction model and the special prediction model trained for various extreme scenarios. The power prediction module 403 is used to dynamically calculate the fusion weight based on the scene intensity of each dimension and the historical prediction error of each special prediction model when the structured scene coding indicates the existence of extreme scenes in multiple dimensions, and to perform weighted fusion of the power prediction results of multiple special prediction models to obtain the final power prediction result. Output module 404 is used to output the final power prediction result.

[0130] In this embodiment, a multi-dimensional feature vector constructed based on multi-source data is first input into a scene classifier. Scene identification is performed from three dimensions: meteorology, socio-economic factors, and power grid operation, generating structured scene codes. These three dimensions represent extreme meteorological, socio-economic, and power grid operation characteristics, respectively, covering the main extreme factors affecting medium- and long-term power generation forecasts. A quantitative judgment mechanism can accurately distinguish between normal scenarios and various extreme scenarios, providing a reliable scenario basis for subsequent model scheduling. Then, the corresponding prediction model is scheduled from the prediction model library according to the structured scene code. The prediction model library stores basic prediction models and specialized prediction models trained for various extreme scenarios, ensuring that the prediction model is always deeply adapted to the characteristics of the current scenario, avoiding the limitation of a fixed single model being unable to cover multiple scenarios. When structured scene encoding indicates the existence of multi-dimensional extreme scenarios, the fusion weights are dynamically calculated based on the scene intensity of each dimension and the historical prediction errors of each specialized prediction model. The power prediction results from multiple specialized prediction models are then weighted and fused. Scene intensity quantifies the degree to which the current scene deviates from the normal threshold, while historical prediction errors reflect the model's generalization ability in similar scenarios. The dual-factor joint determination of weights ensures that models with higher scene relevance and better historical performance receive greater weights, achieving adaptive optimization of the fusion weights and effectively reducing the overall prediction error. Through the synergistic effect of multi-dimensional scene identification and structured scene encoding, prediction model library classification and scheduling, and dual-factor dynamic fusion, this invention significantly improves the accuracy and robustness of medium- and long-term power prediction in complex and extreme scenarios.

[0131] Figure 5 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. For example... Figure 5 As shown, the electronic device 5 of this embodiment includes a processor 50 and a memory 51. The memory 51 stores a computer program 52. When the processor 50 executes the computer program 52, it implements the steps in the various method embodiments described above. Alternatively, when the processor 50 executes the computer program 52, it implements the functions of each module / unit in the various device embodiments described above.

[0132] For example, computer program 52 may be divided into one or more modules / units, which are stored in memory 51 and executed by processor 50 to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of computer program 52 in electronic device 5.

[0133] Electronic device 5 may include, but is not limited to, processor 50 and memory 51. Those skilled in the art will understand that... Figure 5This is merely an example of electronic device 5 and does not constitute a limitation on electronic device 5. It may include more or fewer components than shown, or combine certain components, or different components. For example, electronic device 5 may also include input / output devices, network access devices, buses, etc.

[0134] For the sake of simplicity and clarity, only the above-described functional modules / units are used as examples. In practical applications, the functions described above can be assigned to different functional modules / units as needed. These modules / units can be implemented in hardware, software, or a combination of both.

[0135] In the above embodiments, the descriptions of each embodiment have their own emphasis. Parts not detailed or described in a particular embodiment can be referred to in the relevant descriptions of other embodiments. Unless otherwise specified or in conflict with logic, the terminology and / or descriptions between different embodiments are consistent and can be referenced interchangeably. Technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships.

[0136] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A method for medium and long term power load forecasting based on multi-source data fusion, characterized in that, include: A multi-dimensional feature vector constructed based on multi-source data is input into a scene classifier to identify scenes from multiple dimensions and generate structured scene codes. These multiple dimensions include meteorological, socio-economic, and power grid operation dimensions. Based on the structured scene codes, corresponding prediction models are selected from a prediction model library to obtain power generation prediction results. This prediction model library stores basic prediction models and specialized prediction models trained for various extreme scenarios. When the structured scene codes indicate the existence of extreme scenarios in multiple dimensions, fusion weights are dynamically calculated based on the scene intensity of each dimension and the historical prediction errors of each specialized prediction model. The power generation prediction results from multiple specialized prediction models are then weighted and fused to obtain the final power generation prediction result. This final power generation prediction result is then output.

2. The medium- and long-term power forecasting method based on multi-source data fusion according to claim 1, characterized in that, The meteorological dimension features include average temperature, temperature variation, average humidity, cumulative precipitation, average wind speed, average light intensity, and number of consecutive high-temperature days; the socio-economic dimension features include holiday markers, holiday type index, economic activity index, and special event markers; the power grid operation dimension features include load change rate, proportion of new energy output, equipment fault markers, frequency deviation, and voltage deviation.

3. The medium- and long-term power forecasting method based on multi-source data fusion according to claim 1, characterized in that, The scene classifier adopts a multi-task classification network, which includes a shared feature extraction layer and a multi-branch output layer. The shared feature extraction layer extracts features from the multi-dimensional feature vector. Each branch of the multi-branch output layer corresponds to each dimension in the multiple dimensions and outputs the scene probability distribution of the corresponding dimension. Each branch outputs the single-label scene category probability of the corresponding dimension.

4. The medium- and long-term power forecasting method based on multi-source data fusion according to claim 3, characterized in that, The structured scene code is generated in the following manner: For each of the multiple dimensions, when the highest probability value in the scene probability distribution of that dimension is lower than the judgment threshold, that dimension is encoded as a normal scene identifier; When the highest probability value in the probability distribution of a given dimension is not lower than the determination threshold, the dimension is encoded as the extreme scene type identifier corresponding to the highest probability value. The combination of codes from each dimension forms the structured scene code.

5. The medium- and long-term power forecasting method based on multi-source data fusion according to claim 1, characterized in that, The step of scheduling the corresponding prediction model from the prediction model library based on the structured scene encoding includes: When the structured scene is encoded as a normal scene, the basic prediction model is scheduled; When the structured scene encoding contains an extreme scenario in a single dimension, the specialized prediction model corresponding to that dimension is scheduled. When the structured scene encoding contains extreme scenarios in multiple dimensions, multiple specialized prediction models corresponding to each dimension are scheduled.

6. The medium- and long-term power forecasting method based on multi-source data fusion according to claim 5, characterized in that, The prediction model library adopts a three-level hierarchical architecture: the basic model layer contains the basic prediction model; multiple specialized sub-libraries correspond to each of the multiple dimensions, including meteorological, socio-economic, and power grid operation dimensions, and each specialized sub-library contains the specialized prediction model trained for various extreme scenarios under the corresponding dimension; the specialized prediction model selects an appropriate network structure according to the characteristics of the corresponding scenario.

7. The medium- and long-term power forecasting method based on multi-source data fusion according to claim 1, characterized in that, The dynamic calculation of fusion weights based on scene intensity across various dimensions and historical prediction errors of various specialized prediction models includes: The scene intensity is calculated for each extreme dimension. The scene intensity reflects the degree to which the current scene deviates from the normal threshold, and the scene intensity of each dimension is a dimensionless ratio. Query the average prediction error of each of the aforementioned specialized prediction models under similar historical scenarios; The fusion weight is determined jointly based on the scene intensity and the historical prediction error. The higher the scene intensity and the smaller the historical prediction error, the higher the fusion weight is obtained for the special prediction model.

8. The medium- and long-term power forecasting method based on multi-source data fusion according to claim 7, characterized in that, After obtaining the final power prediction result, the following is also included: Calculate the prediction variance of each specific prediction model; The fusion prediction variance is calculated based on the fusion weights, the prediction variances of each specific prediction model, and the correlation between models. The confidence interval is determined based on the final power prediction result and the fusion prediction variance.

9. A medium- to long-term power forecasting device based on multi-source data fusion, characterized in that, include: The scene encoding module is used to input a multi-dimensional feature vector constructed based on multi-source data into the scene classifier, perform scene recognition from multiple dimensions, and generate structured scene codes; wherein, the multiple dimensions include meteorological dimension, socio-economic dimension, and power grid operation dimension; The preliminary prediction module is used to obtain the power prediction result by scheduling the corresponding prediction model from the prediction model library according to the structured scenario encoding; wherein, the prediction model library stores the basic prediction model and the special prediction model trained for various extreme scenarios. The power prediction module is used to dynamically calculate the fusion weight based on the scene intensity of each dimension and the historical prediction error of each special prediction model when the structured scene coding indicates the existence of extreme scenarios in multiple dimensions, and to perform weighted fusion of the power prediction results of multiple special prediction models to obtain the final power prediction result. The output module is used to output the final power prediction result.

10. An electronic device, characterized in that, It includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method as described in any one of claims 1 to 8.