Urban power load online prediction method and system under extreme weather conditions
Patent Information
- Application Number
- CN202511490262.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-17
- Publication Date
- 2026-11-03
- Estimated Expiration
- 2045-10-17
AI Technical Summary
Existing technologies cannot effectively obtain sufficient historical data samples under extreme weather conditions, resulting in decreased accuracy in power load forecasting and the inability to make accurate online forecasts, which seriously threatens the safe and stable operation of the power system.
Electricity load data is processed using radian scaling technology. Combined with a contrastive learning model and a concept drift detection mechanism, the learning rate and temperature parameters are adjusted using Z-Score test statistics to achieve dynamic adaptation of the contrastive learning model and capture load patterns under extreme weather conditions.
It enables accurate load forecasting under extreme weather conditions, solves the problems of data scarcity and unbounded forecasting, improves forecast accuracy and computational efficiency, and ensures the safe and stable operation of the power system.
Smart Images

Figure CN121332476B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power forecasting technology, and in particular to an online forecasting method and system for urban power load under extreme weather conditions. Background Technology
[0002] With the intensification of global climate change, the frequency and intensity of extreme weather events have increased significantly, posing unprecedented challenges to the stable operation of power systems.
[0003] Extreme weather conditions can cause sudden surges in load demand, resulting in widespread peak loads accompanied by significant fluctuations, greatly increasing the difficulty of accurately forecasting extreme weather loads. Although the field of power load forecasting has evolved from traditional statistical methods to deep learning techniques, fundamental limitations remain under extreme weather conditions. Traditional time series methods are based on static assumptions, which completely fail in the face of abrupt changes caused by extreme weather. While current deep learning models perform well in handling time dependencies, their performance is severely limited by imbalanced training data, as extreme weather events represent only a small fraction of historical data. Most existing methods employ offline training, failing to capture real-time conceptual drift during extreme weather events. Most studies neglect the nonlinear characteristics of load changes under extreme weather conditions. Simple normalization methods fail when encountering extreme values beyond the training data range and cannot effectively handle the abrupt changes in data distribution caused by extreme weather events.
[0004] Existing technologies often fail to provide accurate online forecasts of power load under extreme weather conditions due to insufficient historical data samples or unbalanced data samples. This poses a serious threat to the safe and stable operation of the power system under extreme weather conditions. Summary of the Invention
[0005] This invention discloses an online forecasting method and system for urban power load under extreme weather conditions to overcome the aforementioned technical problems.
[0006] To achieve the above objectives, the technical solution of the present invention is as follows: A method for online forecasting of urban power load under extreme weather conditions includes the following steps: S1: Obtain a real power load dataset containing extreme weather meteorological data within a historical time period to obtain a time series of power load data; wherein, the power load data in the power load dataset includes meteorological data and power load data; S2: Obtain the radian-scaled time series of power load data based on the power load data time series; S3: Based on the time series of power load data after radian scaling, the contrastive learning model is trained according to the loss function of the contrastive learning model to obtain the trained contrastive learning model; S4: Based on real power load data and meteorological data, a concept drift detection mechanism is used to obtain the Z-Score test statistic of meteorological factors; S5: If the Z-Score test statistic of the meteorological factor exceeds the set statistical threshold, adjust the learning rate and temperature parameters of the trained contrastive learning model, and execute S6 based on the contrastive learning model with the adjusted learning rate and temperature parameters; otherwise, execute S6 directly based on the trained contrastive learning model. S6: Based on real power load data and meteorological data, obtain the type of power load data for a predetermined future duration based on real power load data and meteorological data, so as to complete the online prediction of urban power load; wherein, the type of power load data includes extreme weather data and non-extreme weather data.
[0007] Furthermore, the formula used to obtain the time series of power load data after radian scaling is:
[0008] In the formula: Indicates time step The corresponding radian value; It is the arctangent function; The difference between the power load values at two consecutive time points; It is the time step; For time steps The corresponding power load value; For time steps.
[0009] Furthermore, the expression for the loss function of the contrastive learning model is:
[0010]
[0011] In the formula: This represents the value of the contrastive learning loss function; Operators that express mathematical expectation; This represents the similarity scoring function; Indicates relative to the current time step The future Step-by-step power load sample; This indicates that the autoregressive model is at time step Context vector; Indicates the first One negative sample; Represents a sample set; Indicates the current time step; The index representing the prediction time step; Index representing a negative sample; express eigenvectors; express Transpose of; Indicates transpose; Indicates proportional to; Represents conditional probability; Represents marginal probability; Represents the learnable weight matrix; This represents a temperature parameter used to control the smoothness of the similarity distribution.
[0012] Furthermore, the expression for the concept drift detection mechanism is:
[0013]
[0014]
[0015] In the formula: Indicates the first Z-Score test statistics for meteorological factors in each dimension; Indicates the first Meteorological characteristics in several dimensions over time steps Observed values; This represents the average value of the meteorological feature of the d-th dimension in the historical training set; Indicates historical standard deviation; Indicates the number of samples; Dimension index representing meteorological characteristics; Indicates the sequence number of the sample in the historical training set; Indicates the first The first sample Observations of features in each dimension; Represents absolute value; These are the parameters of the trained model.
[0016] Furthermore, the formula used to adjust the learning rate of the trained contrastive learning model is as follows:
[0017] The formula used to adjust the temperature parameters of the trained contrastive learning model is as follows:
[0018] In the formula: These are all trainable parameters in the entire model; This is the adjusted learning rate; This represents the gradient of the total loss with respect to the parameters; This is the gradient clipping function; This is the clipping threshold; They represent Time and The temperature parameters are etched.
[0019] Furthermore, the Z-Score test statistic of the meteorological factors is updated using a sliding window, and the formula used is:
[0020]
[0021]
[0022] In the formula: Indicates the current sliding window's... Local average values of meteorological characteristics in each dimension; Represents the first sample pair Meteorological characteristics in several dimensions; This represents the sample pairs within the window, where For feature vectors, The corresponding load value; Indicates the current sliding window's... Local standard deviation of each meteorological feature dimension; This is the size of the sliding window, fixed at 1000; Indicates a sliding window; It is the squared difference between the meteorological characteristics of each sample and the local mean; It represents the absolute value.
[0023] Furthermore, the meteorological data includes one or more of the following: temperature, humidity, wind speed, wind direction, and air pressure.
[0024] A prediction system for an online urban power load forecasting method under extreme weather conditions includes a power load data acquisition module, a radian scaling module, a contrast learning module, a concept drift detection module, and an online power load forecasting module. The power load data acquisition module is used to acquire real power load datasets within historical time periods to obtain power load data time series. The radian scaling module is used to obtain a radian-scaled power load data time series based on the power load data time series. The comparative learning module is used to train the comparative learning model based on the loss function of the comparative learning model according to the time series of power load data after radian scaling, so as to obtain the trained comparative learning model. The concept drift detection module is used to obtain the Z-Score test statistic of meteorological factors based on real power load data and meteorological data using a concept drift detection mechanism; and when the Z-Score test statistic of meteorological factors exceeds the set statistical threshold, the learning rate and temperature parameters of the trained comparative learning model are adjusted. The online power load forecasting module is used to obtain the type of power load data for a preset future duration based on real power load data and meteorological data, so as to complete the online forecasting of urban power load; wherein, the type of power load data includes extreme weather data and non-extreme weather data.
[0025] Beneficial Effects: This invention provides an online urban power load forecasting method and system under extreme weather conditions. It trains a contrastive learning model using time series power load data scaled in radians. A concept drift detection mechanism is employed to obtain Z-Score test statistics for meteorological factors. When the Z-Score test statistics for meteorological factors exceed a set statistical threshold, the learning rate and temperature parameters of the trained contrastive learning model are adjusted. The model then performs forecasts using real power load data and meteorological data. By acquiring radian-scaled power load data, this invention addresses the problems of data scarcity and unbounded forecasting in extreme weather scenarios through the integration of contrastive learning and radian scaling modules. The Z-Score detection method enables accurate identification of extreme weather conditions during online forecasting. Dynamic adjustment of the learning rate and contrastive learning temperature parameters achieves multi-dimensional collaborative adaptation, thereby rapidly capturing new load patterns. This solves the problems of low accuracy and low computational efficiency in load forecasting under extreme weather conditions. It has broad application prospects, contributing to the safe and stable operation of power systems under extreme weather conditions and ensuring the reliability and security of power supply. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 This is a flowchart of the online urban power load forecasting method under extreme weather conditions according to the present invention; Figure 2 This is a comparison chart of the load prediction results of the prediction model and the Transformer algorithm in the embodiment of the invention under non-extreme weather conditions. Figure 3 This is a comparison chart of the load prediction results of the prediction model and the Transformer algorithm in the embodiment of the invention under extreme weather conditions. Figure 4 This is a schematic diagram of the prediction system in an embodiment of the invention. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0029] This embodiment introduces a method for online forecasting of urban power load under extreme weather conditions, including the following steps: Figure 1 As shown: S1: Obtain a real power load dataset containing extreme weather meteorological data within a historical time period to obtain a time series of power load data; wherein, the power load data in the power load dataset includes meteorological data and power load data; Specifically, a real power load dataset is obtained, which includes multiple real sample data, including time series of meteorological data from historical periods and the corresponding time series of power load data. The power load data is used to characterize the power load demand in the power system; the power load data includes one or more power load magnitude indicators.
[0030] The meteorological data includes one or more of temperature, humidity, wind speed, wind direction, and air pressure; these factors directly affect electricity load demand. Electricity load time series data represents the electricity load demand on the user side of the power system, and is usually closely related to meteorological factors. For example, during the winter cold wave in Texas in 2021, peak load demand reached 69,692 MW, exceeding the historical winter record by 13,000 MW. In February 2023, Northwest China was hit by a cold wave, causing a sharp increase in load demand, with the actual load deviating from the predicted value by 12,000 MW, resulting in an imbalance between power system supply and demand.
[0031] Optionally, extreme weather may be defined as a peak load value reaching 95% of the historical peak load value and a daily minimum temperature drop of 8°C or more within 24 hours, or a drop of 10°C or more within 48 hours, or a drop of 12°C or more within 72 hours.
[0032] S2: Obtain the radian-scaled time series of power load data based on the power load data time series; Specifically, in this embodiment, the real power load data and meteorological data are input into the radian scaling module to obtain processed power load data, enabling the model to make predictions that exceed the boundaries of historical power load data. Preferably, the formula used to obtain the time series of power load data after radian scaling is:
[0033] In the formula: Indicates time step The corresponding radian value; The arctangent function is used to convert numerical changes into radians. The difference between the power load values at two consecutive time points; It is the time step; For time steps The corresponding power load value; For time steps; In this embodiment, the time interval between two adjacent sampling points is because the time series has been standardized to a unit time step. :
[0034] Specifically, for two consecutive values in a power load time series, their radian value is calculated using the arctangent function. Due to the nature of time series, the range of radian values is strictly limited. Internally, after the model outputs the predicted radian value, it uses the tangent function to combine the actual load value at the current moment to restore the actual load prediction value. This conversion mechanism ensures that the model can predict load values of any size, without being limited by the range of training data, thus effectively solving the problem of systematic underestimation under extreme weather conditions by traditional normalization methods.
[0035] Specifically, after obtaining the real power load dataset, the city power load under preset extreme weather conditions is used to realize the radian scaling processing of meteorological data and corresponding power load time series data in online prediction, providing unbounded prediction capability for the online prediction model of urban power load under extreme weather conditions. The unbounded prediction capability refers to the ability of the model to make predictions beyond the boundaries of historical power load data in the prediction of power load demand. Specifically, in extreme weather load forecasting, models often experience concept drift during the prediction process. This is because the sudden occurrence of extreme weather can cause changes in the statistical characteristics of the data, leading to a shift in the data distribution. However, existing methods are too complex, affecting computational efficiency and hindering online learning. Radian scaling, as a scaling method, does not rely on the statistical characteristics or distribution of the data. Its core approach is to convert the differences between continuous values into arcs, eliminating prediction boundaries and enabling the model to predict data larger than the training dataset, effectively solving the concept drift problem.
[0036] S3: Based on the time series of power load data after radian scaling, the contrastive learning model is trained according to the loss function of the contrastive learning model to obtain the trained contrastive learning model; Specifically, before inputting the radian-scaled power load data into the comparative learning model, a complete feature sequence needs to be constructed. This feature sequence consists of the following components: the radian-scaled power load time series, time-coded features, lag features, and the interaction features between meteorological and load features. These raw features are organized chronologically and then processed using preliminary feature engineering methods to obtain coded features, forming a standardized input that can be processed by a bidirectional long short-term memory network encoder.
[0037] Specifically, the processed power load data, i.e., the radian-scaled power load data, is input into a contrastive learning model to train the model. The parameters of the contrastive learning model are determined, and based on the trained model, the type identifier of the power load data is obtained. This allows for the extraction of robust temporal feature representations of real power load data and alleviates the problem of scarce real power load data during extreme weather events. The contrastive learning model used is an existing model in the field, and its structural composition will not be elaborated upon here.
[0038] Specifically, the feature sequence and encoded features are input into the bidirectional long short-term memory network encoder to extract time features. In contrastive learning, the continuity of time series is used to mark samples that are time-adjacent within a batch as positive samples, and other sample pairs are automatically labeled as negative sample pairs. The model learns discriminative features through loss function optimization to distinguish load patterns under different weather conditions. Preferably, the expression for the loss function of the contrastive learning model is:
[0039]
[0040] In the formula: This represents the value of the contrastive learning loss function; Operators that express mathematical expectation; This represents a similarity scoring function used to measure the degree of matching between a sample and its context. Indicates relative to the current time step The future Step-by-step power load sample (positive sample); This indicates that the autoregressive model is at time step The context vector, which is obtained by encoding the historical load sequence, contains a comprehensive representation of historical information up to the current moment, in which the autoregressive model is used to capture the temporal dependencies of the load time series; Indicates the first One negative sample; Represents a sample set; Indicates the current time step; The index representing the prediction time step; Index representing a negative sample; express eigenvectors; express Transpose of; Indicates transpose; Indicates proportional to; Represents conditional probability; Represents marginal probability; This represents a learnable weight matrix used to integrate the context vector. Mapped to the prediction space to predict the future. The characteristic representation of the step; This represents a temperature parameter used to control the smoothness of the similarity distribution; Specifically, the loss function of the contrastive learning model, by minimizing the negative log-likelihood, is equivalent to maximizing the future load sample. With the current context vector Mutual information between them. That is, by thoroughly learning the current context vector. The historical information contained therein can minimize future load. This reduces uncertainty and thus improves forecast accuracy. Specifically, the output of the bidirectional long short-term memory network in this embodiment is represented as follows:
[0041]
[0042]
[0043] in, It is the input quantity of the input layer. It is the output of the feedforward network. It is the output of the feedforward network. It is the output of the output layer. and They are all activation functions. All are weights. Indicates a time step.
[0044] Specifically, the real power load data is input into the comparative learning model to extract robust temporal feature representations of the real power load data, thereby alleviating the problem of scarcity of real power load data during extreme weather. The real power load data is also input into the concept drift detection mechanism of the online urban power load prediction model under extreme weather conditions to identify extreme weather patterns in real time and achieve rapid adaptation by dynamically adjusting the learning rate and temperature parameters. Specifically, in situations where extreme weather data is severely imbalanced and scarce, the contrastive learning model can fully utilize normal weather data for self-supervised pre-training, learning general load change patterns without additional labeling—something traditional supervised learning cannot achieve. First, a 96-step feature sequence is input into a bidirectional long short-term memory network encoder to extract temporal features, which are then mapped to the contrastive learning space using a projection head. Second, when constructing positive and negative sample pairs, this embodiment utilizes the features of the temporal data, labeling samples with adjacent times in a batch as positive sample pairs. Other sample pairs not on the diagonal automatically become negative samples. The self-supervised mechanism of contrastive learning enables the model to learn discriminative features that differentiate load patterns under different weather conditions, even without extreme weather labels.
[0045] S4: Based on the actual power load data and meteorological data, input the actual power load data and meteorological data into the concept drift module, and use the concept drift detection mechanism to obtain the Z-Score test statistic of the meteorological factor; Preferably, the expression for the concept drift detection mechanism is:
[0046]
[0047]
[0048] In the formula: Indicates the first Z-Score test statistics for meteorological factors in each dimension; Indicates the first Meteorological characteristics in several dimensions over time steps Observed values; Indicates the first The average value of meteorological characteristics in each dimension in the historical training set; Indicates historical standard deviation; Indicates the number of samples; Dimension index representing meteorological characteristics; Indicates the sequence number of the sample in the historical training set; Indicates the first The first sample Observations of features in each dimension; Represents absolute value; These are the parameters of the trained model; S5: If the Z-Score test statistic of the meteorological factor exceeds the set statistical threshold, adjust the learning rate and temperature parameters of the trained contrastive learning model, and execute S6 based on the contrastive learning model with the adjusted learning rate and temperature parameters; otherwise, execute S6 directly based on the trained contrastive learning model. Preferably, the formula used to adjust the learning rate of the trained contrastive learning model is as follows:
[0049] The formula used to adjust the temperature parameters of the trained contrastive learning model is as follows:
[0050] In the formula: For all trainable parameters in the entire model (including the weights of the bidirectional LSTM), Comparison of learning weight matrices, (Weights of the feature encoder, parameters of the projection head, etc.) This is the adjusted learning rate; This represents the gradient of the total loss with respect to the parameters; This is the gradient clipping function; This is the clipping threshold; They represent Time and The temperature parameters are etched.
[0051] Specifically, each time concept drift is detected, the temperature parameter decreases by 10% to control the smoothness of the similarity distribution; Preferably, the Z-Score test statistic of the meteorological factors is updated using a sliding window, and the formula used is:
[0052]
[0053]
[0054] In the formula: Indicates the current sliding window's... Local average values of meteorological characteristics in each dimension; Represents the first sample pair Meteorological characteristics in several dimensions; This represents the sample pairs within the window, where For feature vectors, The corresponding load value; Indicates the current sliding window's... Local standard deviation of each meteorological feature dimension; This is the size of the sliding window, fixed at 1000; Indicates a sliding window; It is the squared difference between the meteorological characteristics of each sample and the local mean.
[0055] Through the aforementioned sliding window mechanism, the system can dynamically track changes in data distribution. When the Z-Score statistic exceeds a preset threshold, concept drift is identified, triggering subsequent adaptive parameter adjustments.
[0056] Specifically, the real power load data and meteorological data are input into the concept drift detection mechanism to output the concept drift detection results and adjusted learning rate and temperature parameters. Specifically, the Z-Score statistic is calculated for each meteorological feature dimension at the current time. If it exceeds a preset threshold, it is determined that concept drift has occurred, i.e., extreme weather. A fixed-size sliding window is used to update the local statistical test value to maintain timeliness. After detecting concept drift, an adaptive parameter adjustment mechanism is triggered to increase the learning rate and decrease the temperature parameter so that the model pays more attention to difficult negative samples. The weighted combination of prediction loss and contrastive learning loss is calculated as the total loss. The model parameters are updated through backpropagation and gradient pruning to achieve rapid adaptation to extreme weather patterns and determine the power load under extreme weather conditions within a preset time range in the future, so as to complete the online prediction of urban power load under extreme weather conditions.
[0057] S6: Based on the actual power load data and meteorological data, input the actual power load data and meteorological data into the comparative learning model after S5 execution, obtain the type of power load data for the future preset duration based on the actual power load data and meteorological data, so as to complete the online prediction of urban power load; The types of power load data include extreme weather data and non-extreme weather data.
[0058] Specifically, the basic network architecture of the urban power load online prediction model under extreme weather conditions in this embodiment is constructed from radian scaling, a contrastive learning model, and a concept drift detection mechanism. Based on the trained contrastive learning model, the power load data after radian scaling is processed to obtain the specific parameters of the trained contrastive learning model. When the actual power load data is greater than the statistical test value, the parameters of the trained contrastive learning model are adjusted through the concept drift detection mechanism to complete the training of the entire urban power load online prediction model. The current actual load data and meteorological data are input into the urban power load online prediction model that has been trained to a convergent state to determine the power load under extreme weather conditions within a preset time range in the future, thereby completing the online prediction of urban power load under extreme weather conditions.
[0059] This embodiment also discloses a prediction system for an online urban power load prediction method under extreme weather conditions, including a power load data acquisition module, a radian scaling module, a contrast learning module, a concept drift detection module, and an online power load prediction module; The power load data acquisition module is used to acquire real power load datasets within historical time periods to obtain power load data time series. Specifically, the power load data acquisition module is configured to respond to instructions for online prediction of urban power load under extreme weather conditions and acquire a real power load dataset. The real power load data includes multiple real sample data, each of which includes meteorological data within a historical time period and its corresponding power load time series data. The power load time series data is used to characterize the power load demand in the power system. The radian scaling module is used to obtain a radian-scaled power load data time series based on the power load data time series. Specifically, the real power load data and meteorological data are input into the radian scaling module to obtain processed power load data, enabling the model to make predictions beyond the boundaries of historical power load data. Specifically, for two consecutive values in the power load time series, their radian values are calculated using the arctangent function. Due to the nature of time series, the range of radian values is strictly limited to a specific interval. After the model outputs the predicted radian value, it is restored to the actual load prediction value by combining the tangent function with the real load value at the current moment. This conversion mechanism ensures that the model can predict load values of any size, unrestricted by the training data range, thus effectively solving the problem of systematic underestimation under extreme weather conditions using traditional normalization methods.
[0060] The comparative learning module is used to train the comparative learning model based on the loss function of the comparative learning model according to the time series of power load data after radian scaling, so as to obtain the trained comparative learning model. Specifically, the radian-scaled power load data is input into the contrastive learning model to obtain the trained contrastive learning model parameters, so as to extract robust temporal feature representations of real power load data and alleviate the problem of scarcity of real power load data in extreme weather. Specifically, the feature sequence and encoded features are input into the bidirectional long short-term memory network encoder to extract temporal features. In contrastive learning, the continuity feature of time series is used to mark samples with adjacent times within a batch as positive sample pairs and other sample pairs as negative sample pairs. The model learns discriminative features through loss function optimization to distinguish load patterns under different weather conditions. The concept drift detection module is used to input real power load data and meteorological data into the concept drift module, and use the concept drift detection mechanism to obtain the Z-Score test statistic of the meteorological factor; and when the Z-Score test statistic of the meteorological factor exceeds the set statistical threshold, the learning rate and temperature parameters of the trained contrastive learning model are adjusted. Specifically, the real power load data and meteorological data are input into the concept drift detection module to output the concept drift detection results and adjusted learning rate and temperature parameters. The learning rate and temperature parameters are hyperparameters built into the contrastive learning model. Specifically, the Z-Score statistic is calculated for each meteorological feature dimension at the current time. If it exceeds the preset threshold, it is determined that concept drift has occurred, i.e., extreme weather. A fixed-size sliding window is used to update the local statistics to maintain timeliness. After detecting concept drift, an adaptive parameter adjustment mechanism is triggered to increase the learning rate and decrease the temperature parameter so that the model pays more attention to difficult negative samples. The weighted combination of prediction loss and contrastive learning loss is calculated as the total loss. The model parameters are updated through backpropagation and gradient pruning to achieve rapid adaptation to extreme weather patterns. The online power load forecasting module is used to obtain the type of power load data for a preset future duration based on real power load data and meteorological data, so as to complete the online forecasting of urban power load; wherein, the type of power load data includes extreme weather data and non-extreme weather data.
[0061] Specifically, based on the contrastive learning model and the concept drift detection mechanism, the processed power load data is processed to obtain the specific parameters of the trained model, so as to determine the online prediction model of urban power load under extreme weather conditions that has been trained to a convergent state. The current real load data and meteorological data are input into the online prediction model of urban power load under extreme weather conditions that has been trained to a convergent state to determine the power load under extreme weather conditions within a future preset time range, so as to complete the online prediction of urban power load under extreme weather conditions.
[0062] Specifically, the actual power load data is input into the radian scaling model, contrastive learning model, and concept drift detection model of the online power load prediction model. Based on the contrastive learning model and the concept drift detection mechanism, the actual power load data is processed, and current meteorological data is used to predict the power load for a future period. Inputting current meteorological data (such as temperature, humidity, wind speed, etc.) into the trained power load prediction model, the model will output the power load demand within the predicted timeframe, helping the power dispatch center to prepare power dispatch plans in advance.
[0063] Based on the above forecasts, power companies can effectively manage power dispatch in the event of predicted extreme weather conditions. By rationally scheduling power according to the predicted load demand, they can ensure the stable operation of the power grid. Furthermore, by taking proactive measures based on extreme weather forecasts, such as strengthening the protection of power grid facilities, they can ensure the stable operation of the power system even under unstable conditions.
[0064] This implementation method enables accurate prediction of power load under extreme weather conditions, thereby improving the power system's ability to cope with and dispatch power under extreme weather conditions.
[0065] Please refer to Table 1, which shows the error statistics between the model in this embodiment and the traditional Transformer algorithm: Table 1. Statistical table of error indices between the model in this application and the Transformer algorithm.
[0066] In some embodiments, Figure 2 This is a comparison chart of the load prediction results of the model in this application and the Transformer algorithm under non-extreme weather conditions. Figure 3 This is a comparison chart of the load prediction results of the model in this application and the Transformer algorithm under extreme weather conditions.
[0067] In this embodiment, according to Table 1, Figure 2 and Figure 3It is clear, without a doubt, that this embodiment, based on radian scaling, contrastive learning, and concept drift detection mechanisms, exhibits better prediction accuracy and speed in load forecasting under both non-extreme and extreme weather conditions. It can minimize the occurrence of power supply and demand imbalances caused by excessive load forecasting deviations under extreme weather conditions, avoid large-scale power rationing and outages, improve the safety and stability of the power system under extreme weather conditions, and help the power system cope with frequent extreme weather events in the future.
[0068] Please see Figure 4 This application provides an online urban power load forecasting device under extreme weather conditions, comprising a real power load data acquisition module, an radian scaling module, a contrastive learning and concept drift detection mechanism module, and an online power load forecasting module. The real power load data acquisition module is configured to acquire a real power load dataset in response to an instruction to perform online forecasting of urban power load under extreme weather conditions. The real power load data includes multiple real sample data, each including meteorological data from a historical time period and its corresponding power load time series data. The power load time series data is used to characterize the power load demand in the power system. The radian scaling module is configured to use a preset radian scaling method for online forecasting of urban power load under extreme weather conditions, based on the meteorological data and its corresponding power load time series data, to provide unbounded forecasting capability for the online forecasting model of urban power load under extreme weather conditions. This unbounded forecasting capability refers to the model's ability to forecast power load demand beyond the boundaries of historical power load data. The contrastive learning and concept drift detection mechanism module is configured to input the real power load data... The comparative learning model of the online urban power load forecasting model under extreme weather conditions is used to extract robust time feature representations of real power load data and alleviate the problem of scarcity of real power load data under extreme weather conditions. The real power load data is input into the concept drift detection mechanism of the online urban power load forecasting model under extreme weather conditions to identify extreme weather patterns in real time and achieve rapid adaptation by dynamically adjusting the learning rate and temperature parameters. The online power load forecasting module is configured to process the real power load data based on the comparative learning model and the concept drift detection mechanism to determine the online urban power load forecasting model under extreme weather conditions that has been trained to a convergent state. The current meteorological data is input into the online urban power load forecasting model under extreme weather conditions that has been trained to a convergent state to determine the power load under extreme weather conditions within a preset time range in the future, so as to complete the online forecasting of urban power load under extreme weather conditions.
[0069] This embodiment, by acquiring radian-scaled power load data, addresses the issues of data scarcity and unbounded prediction in extreme weather scenarios by integrating a contrastive learning module and a radian scaling module. In extreme weather scenarios, to achieve accurate urban load forecasting, contrastive learning is used to learn temporal representations from a large amount of unlabeled normal weather data. Through the positive and negative sample mechanism of contrastive learning, the model can capture load characteristics, providing a basis for accurate load forecasting under extreme weather conditions.
[0070] By employing the Z-Score detection method, accurate identification of extreme weather conditions is achieved during online forecasting. Upon detecting concept drift, multi-dimensional collaborative adaptation is realized through dynamic adjustment of the learning rate and comparative learning temperature parameters, thereby rapidly capturing new load patterns. This solves the problems of low accuracy and low computational efficiency in load forecasting under extreme weather conditions. It has broad application prospects, contributing to the safe and stable operation of power systems under extreme weather conditions and ensuring the reliability and security of power supply.
[0071] The model in this embodiment, based on radian scaling, contrastive learning, and concept drift detection mechanisms, can better cope with the complexity and variability in power load forecasting. Compared with existing traditional single models, it not only improves forecast accuracy but also significantly enhances computational efficiency, enabling real-time and accurate load data forecasting under extreme weather conditions and ensuring the stable operation of the power system.
[0072] With the increasing frequency of extreme weather events, the application prospects of this invention are extremely broad. In power systems, accurate and rapid load forecasting is crucial for ensuring system stability and reducing risks. This invention can not only effectively predict power load under extreme weather conditions online, but also provide important data for power system dispatching and operation. By accurately predicting power load data under extreme weather conditions, power dispatchers can make reasonable adjustments in advance before extreme weather occurs, avoiding overload or frequent failures of the power system caused by load fluctuations due to extreme weather, thereby effectively ensuring the safe and stable operation of the power system under extreme weather conditions.
[0073] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for online forecasting of urban power load under extreme weather conditions, characterized in that, Includes the following steps: S1: Obtain a real power load dataset containing extreme weather meteorological data within a historical time period to obtain a time series of power load data; wherein, the power load data in the power load dataset includes meteorological data and power load data; S2: Obtain the radian-scaled time series of power load data based on the power load data time series; The formula used to obtain the time series of power load data after radian scaling is: In the formula: Indicates time step The corresponding radian value; It is the arctangent function; The difference between the power load values at two consecutive time points; It is the time step; For time steps The corresponding power load value; For time steps; S3: Based on the time series of power load data after radian scaling, the contrastive learning model is trained according to the loss function of the contrastive learning model to obtain the trained contrastive learning model; S4: Based on real power load data and meteorological data, a concept drift detection mechanism is used to obtain the Z-Score test statistic of meteorological factors; The expression for the concept drift detection mechanism is: In the formula: Indicates the first Z-Score test statistics for meteorological factors in each dimension; Indicates the first Meteorological characteristics in several dimensions over time steps Observed values; This represents the average value of the meteorological feature of the d-th dimension in the historical training set; Indicates historical standard deviation; Indicates the number of samples; Dimension index representing meteorological characteristics; Indicates the sequence number of the sample in the historical training set; Indicates the first The first sample Observations of features in each dimension; Represents absolute value; These are the parameters of the trained model; S5: If the Z-Score test statistic of the meteorological factor exceeds the set statistical threshold, adjust the learning rate and temperature parameters of the trained contrastive learning model, and execute S6 based on the contrastive learning model with the adjusted learning rate and temperature parameters; otherwise, execute S6 directly based on the trained contrastive learning model. S6: Based on real power load data and meteorological data, obtain the type of power load data for a predetermined future duration based on real power load data and meteorological data, so as to complete the online prediction of urban power load; wherein, the type of power load data includes extreme weather data and non-extreme weather data.
2. The method for online forecasting of urban power load under extreme weather conditions according to claim 1, characterized in that, The expression for the loss function of the contrastive learning model is: In the formula: This represents the value of the contrastive learning loss function; Operators that express mathematical expectation; This represents the similarity scoring function; Represents relative to the current time step The future Step-by-step power load sample; This indicates that the autoregressive model is at time step Context vector; Indicates the first One negative sample; Represents a sample set; Indicates the current time step; The index representing the prediction time step; Index representing a negative sample; express eigenvectors; express Transpose of; Indicates transpose; Indicates proportional to; Represents conditional probability; Represents marginal probability; Represents the learnable weight matrix; This represents a temperature parameter used to control the smoothness of the similarity distribution.
3. The method for online forecasting of urban power load under extreme weather conditions according to claim 1, characterized in that, The formula used to adjust the learning rate of the trained contrastive learning model is as follows: The formula used to adjust the temperature parameters of the trained contrastive learning model is as follows: In the formula: These are all trainable parameters in the entire model; This is the adjusted learning rate; This represents the gradient of the total loss with respect to the parameters; This is the gradient clipping function; This is the clipping threshold; They represent Time and The temperature parameters are etched.
4. The method for online forecasting of urban power load under extreme weather conditions according to claim 1, characterized in that, The Z-Score test statistics of the meteorological factors are updated using a sliding window, and the formula used is as follows: In the formula: Indicates the current sliding window's... Local average values of meteorological characteristics in each dimension; Represents the first sample pair Meteorological characteristics in several dimensions; This represents the sample pairs within the window, where For feature vectors, The corresponding load value; Indicates the current sliding window's... Local standard deviation of each meteorological feature dimension; This is the size of the sliding window, fixed at 1000; Indicates a sliding window; It is the squared difference between the meteorological characteristics of each sample and the local mean; It represents the absolute value.
5. The method for online forecasting of urban power load under extreme weather conditions according to claim 1, characterized in that, The meteorological data includes one or more of the following: temperature, humidity, wind speed, wind direction, and air pressure.
6. The prediction system for an online urban power load prediction method under extreme weather conditions according to any one of claims 1-5, characterized in that, It includes a power load data acquisition module, a radian scaling module, a comparative learning module, a concept drift detection module, and a power load online forecasting module; The power load data acquisition module is used to acquire real power load datasets within historical time periods to obtain power load data time series. The radian scaling module is used to obtain a radian-scaled power load data time series based on the power load data time series. The comparative learning module is used to train the comparative learning model based on the loss function of the comparative learning model according to the time series of power load data after radian scaling, so as to obtain the trained comparative learning model. The concept drift detection module is used to obtain the Z-Score test statistic of meteorological factors based on real power load data and meteorological data using a concept drift detection mechanism. And when the Z-Score test statistic of the meteorological factor exceeds the set statistical threshold, the learning rate and temperature parameters of the trained contrastive learning model are adjusted. The online power load forecasting module is used to obtain the type of power load data for a preset future duration based on real power load data and meteorological data, so as to complete the online forecasting of urban power load; wherein, the type of power load data includes extreme weather data and non-extreme weather data.
