Electrical load prediction method and device
The load forecasting method, which uses multi-source data training and feature construction, solves the problem of forecast inaccuracy caused by a single data source in existing technologies, and achieves more efficient electricity load forecasting and decision support.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- STATE GRID INFORMATION & TELECOMM GRP CO LTD
- Filing Date
- 2025-12-10
- Publication Date
- 2026-04-24
AI Technical Summary
Existing load forecasting methods rely on a single data source and do not consider external factors such as weather, holidays, and electricity pricing policies. The forecasting models are not sensitive to external changes, and the forecast results deviate significantly from the actual load. They also lack load forecasting interval estimation, which affects the effectiveness and reliability of decision-making.
The prediction model is trained using multi-source data, including load data, meteorological data, and electricity price policy data. Load characteristics are constructed through time alignment, missing value imputation, and outlier correction. The model is then used for prediction with STL decomposition model, quantile regression model, LSTM sequence model, and XGBoost regression model, and the model is updated by combining concept drift detection.
It improves the accuracy and reliability of electricity load forecasting, enables better quantification of policy impact and assessment of data quality, and enhances the effectiveness of resource allocation decisions.
Smart Images

Figure CN121923083A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power technology, and in particular to a method and apparatus for predicting electricity load. Background Technology
[0002] With the increasing digitalization and intelligence of power systems, load forecasting and data analysis play a crucial role in power grid dispatching, electricity consumption monitoring, and electricity price policy evaluation. Existing load forecasting methods suffer from problems such as incomplete features constructed based on a single data source, lack of forecast interval estimation, and missing data quality assessment tools, which affect the effectiveness and reliability of resource allocation decisions. Summary of the Invention
[0003] In view of this, the purpose of this application is to provide a method and apparatus for predicting electricity load.
[0004] To achieve the above objectives, embodiments of this application provide a method for predicting electricity load, including: Acquire multi-source data; The multi-source data is preprocessed to obtain preprocessed multi-source data; Based on the preprocessed multi-source data, load characteristics are constructed; The load characteristics are input into the load forecasting model selected based on the forecasting task, and the load forecasting model outputs the predicted load forecasting results. When the multi-source data experiences conceptual drift or the load forecast result deviation exceeds a set deviation threshold, the load forecast model is updated.
[0005] Optionally, the multi-source data is preprocessed to obtain preprocessed multi-source data, including: The multi-source data is time-aligned to obtain time-aligned multi-source data; Determine whether there are missing values in the time-aligned multi-source data. If so, fill single missing values with the K-nearest neighbor method and fill consecutive missing values with the prediction results of the LSTM network model to obtain the filled multi-source data. Based on the filled multi-source data, the isolation forest and 3σ principle are used to detect whether there are outliers. If they are found, linear interpolation is used to correct single outliers, and historical data from the same period is used to replace continuous outliers, thus obtaining corrected multi-source data.
[0006] Optionally, the multi-source data includes load data, meteorological data, electricity pricing policy data, holiday data, and macroeconomic data; based on the preprocessed multi-source data, load characteristics are constructed, including: Based on the load data, load characteristics with time lag, sliding statistical characteristics, periodic characteristics, and aggregate statistical characteristics are constructed. Based on the meteorological data, meteorological impact characteristics are constructed; Based on the electricity price policy data, calculate the characteristics of the electricity price impact; Based on the holiday data, the characteristics of the impact of holidays are constructed; Based on the aforementioned macroeconomic data, economic impact characteristics are constructed.
[0007] Optionally, the load forecasting model includes an STL decomposition model for analyzing electricity sales, a quantile regression model for predicting load forecast intervals, an LSTM sequence model for predicting short-term load, and an XGBoost regression model for predicting monthly average load.
[0008] Optionally, the objective function of the XGBoost regression model is: (9) in, q For the current iteration of model training, n For the sample size, y i It is the first The actual load value of each sample For the model after the first q-1 iterations, the th i Load forecast values for each sample It is the first q Tree pairs of feature vectors x i The load forecast value, L For loss function, This is a regularization term.
[0009] Optionally, the method further includes: Based on the load forecast, actual load, and baseline load forecast output by the XGBoost regression model, calculate the quantitative parameters of the policy impact.
[0010] Optionally, the method further includes: The data quality index is calculated based on the load forecast interval and actual load value output by the quantile regression model.
[0011] Optionally, the method further includes: The mean absolute percentage error is calculated based on the prediction results output by the LSTM sequence model and the XGBoost regression model. Calculate the load forecast interval coverage probability based on the load forecast interval output by the quantile regression model. The performance degradation of single-point load forecasting and load forecasting intervals is detected based on the mean absolute percentage error and the load forecasting interval coverage probability.
[0012] Optionally, the method further includes: Calculate the concept drift detection statistic based on the changes in the multi-source data; When the multi-source data experiences conceptual drift or the load forecast result deviation exceeds a set deviation threshold, the load forecast model is updated, including: The load prediction model is updated when the concept drift detection statistic is greater than the preset distribution drift threshold, and / or the average prediction error of the load prediction model is greater than the product of the performance degradation coefficient and the baseline prediction error.
[0013] This application embodiment also provides an electricity load forecasting device, including: The acquisition module is used to acquire data from multiple sources; The preprocessing module is used to preprocess the multi-source data to obtain preprocessed multi-source data; The feature construction module is used to construct load features based on the preprocessed multi-source data; The prediction module is used to input the load characteristics into a load prediction model selected based on the prediction task, and the load prediction model outputs the predicted load prediction results. The update module is used to update the load forecasting model when the multi-source data undergoes conceptual drift or the deviation of the load forecasting result exceeds a set deviation threshold.
[0014] As can be seen from the above description, the electricity load forecasting method and apparatus provided in this application acquire multi-source data, preprocess the multi-source data to obtain preprocessed multi-source data, construct load characteristics based on the preprocessed multi-source data, input the load characteristics into a load forecasting model selected based on the forecasting task, and output the predicted load forecasting result from the load forecasting model. When multi-source data experiences conceptual drift or the deviation of the load forecasting result exceeds a set deviation threshold, the load forecasting model is updated. This application can improve the accuracy and reliability of forecasting. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a schematic diagram of the method flow of an embodiment of this application; Figure 2 This is a schematic diagram of a method flow according to another embodiment of this application; Figure 3 This is a schematic diagram of the multi-source data preprocessing process according to an embodiment of this application; Figure 4 This is a schematic diagram of the prediction model architecture in an embodiment of this application; Figure 5 This is a schematic diagram of the system architecture of an embodiment of this application; Figure 6 This is a schematic diagram of the model management process in an embodiment of this application; Figure 7 This is a block diagram of the device structure according to an embodiment of this application; Figure 8 This is a block diagram of the electronic device structure according to an embodiment of this application. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this disclosure clearer, the following detailed description is provided in conjunction with specific embodiments and the accompanying drawings.
[0018] It should be noted that, unless otherwise defined, the technical or scientific terms used in the embodiments of this application should have the ordinary meaning understood by one of ordinary skill in the art to which this disclosure pertains. The terms "first," "second," and similar terms used in the embodiments of this application do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are only used to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0019] As described in the background section, existing load forecasting methods rely on a single data source for predicting load results using forecasting models. They depend heavily on historical load data and do not consider external factors such as weather, holidays, and electricity pricing policies. The forecasting models are not sensitive to external changes, and the forecast results deviate significantly from the actual load. Moreover, load forecast results are generally single-point load data, without load forecast interval estimation, lack of uncertainty quantification, making it difficult to assess data quality and forecast reliability, thus affecting the effectiveness of decision-making.
[0020] In view of this, this application trains a prediction model based on multi-source data including load data, meteorological data, and electricity price policy data, and uses the trained prediction model to predict results including single-point load data and load prediction intervals, which can improve the accuracy and reliability of prediction.
[0021] The technical solution of this application will be further described in detail below through specific embodiments.
[0022] like Figure 1 , 2 As shown in the figure, this application provides a method for predicting electricity load, including: S101: Acquire multi-source data; In this embodiment, in order to achieve accurate electricity load forecasting, load data, holiday data, electricity price policy data, and macroeconomic data are obtained from the power system, and meteorological data are obtained from the meteorological system. Load forecasting is performed based on multi-source data such as load data, meteorological data, electricity price policy data, holiday data, and macroeconomic data.
[0023] S102: Preprocess the multi-source data to obtain preprocessed multi-source data; In this embodiment, considering the issues of inconsistent timelines, missing data, and data anomalies in the acquired multi-source data, preprocessing is required to improve prediction accuracy and ensure the consistency and standardization of the data foundation. For example, Figure 3 As shown, the preprocessing methods include: Time alignment is performed on multi-source data to obtain time-aligned multi-source data. Determine whether there are missing values in the time-aligned multi-source data. If so, use the K-nearest neighbor method to fill in single missing values, and use the prediction results of the LSTM network model to fill in consecutive missing values, thus obtaining the filled multi-source data. Based on the filled multi-source data, the isolation forest and 3σ principle are used to detect outliers. If they are found, linear interpolation is used to correct single outliers, and historical data from the same period are used to replace continuous outliers, thus obtaining corrected multi-source data.
[0024] In this embodiment, for multi-source data acquired at different times, the data is aligned using a timestamp alignment function, as shown below: (1) in, D i For the first i Data from data sources, such as load data. D load Meteorological data D weather Electricity price policy dataD price Holiday data D holiday , t ref For reference timelines (e.g., 15-minute intervals). t j The timestamp of the original data. d j These are the original data values. For example, for load data acquired at a first time interval (e.g., 15 minutes), meteorological data acquired at a second time interval (e.g., hourly), and electricity price policy data acquired through event-driven means (i.e., when an electricity price policy is adjusted, the corresponding adjusted electricity price is acquired), the low-frequency data are uniformly aligned to the high-frequency reference time axis using a linear interpolation method with the reference time axis as the benchmark.
[0025] After time alignment, check for missing values in the time-aligned multi-source data. Imputation is performed on data with missing values. For example, if a single data point is missing, or multiple data points within a consecutive time period are missing, the spatiotemporal collaborative K-nearest neighbor method is used to impute missing single data points. The method is as follows: (2) in, K The preset number of nearest neighbor data. k For the first k An index of the nearest neighbor data. The spatiotemporal combination weight is determined by time distance. d temporal (e.g., hours) and spatial distance d spatial (For example, differences in load among similar users) are determined and represented as: (3) For consecutive missing values, the prediction results of a pre-built LSTM network model are used to fill in the missing values; that is, the missing data is predicted using known historical data, represented as follows: x t =LSTM ,in, For the parameters of the LSTM network model, p For historical time steps.
[0026] After missing value imputation, outlier detection is performed based on the complete multi-source data after imputation to determine whether there are any anomalous single data points or continuous data. Specifically, the isolated forest and 3σ principle are used to detect outliers. The methods are as follows: (4) in, h ( x) represents the feature vector of multi-source data samples. x Path length in an isolated tree c ( n The standardization factor is . If a single outlier is detected, linear interpolation of neighboring points is used to correct the outlier. If multiple consecutive outliers are detected, a data quality alarm is triggered, and historical data from the same period is used as a replacement. After correcting the multi-source data, a unified standardization process is performed to obtain high-quality multi-source data.
[0027] S103: Construct load characteristics based on preprocessed multi-source data; In this embodiment, after preprocessing the multi-source data, load characteristics are constructed based on the preprocessed multi-source data. The method includes: Based on load data, load characteristics with time lag, sliding statistical characteristics, periodic characteristics, and aggregate statistical characteristics are constructed. Based on meteorological data, construct meteorological impact characteristics; Based on electricity price policy data, calculate the characteristics of electricity price impact; Based on holiday data, construct the characteristics of the impact of holidays; Based on macroeconomic data, we construct characteristics of economic impact.
[0028] Specifically, for preprocessed load data sequences arranged by time... Constructing load characteristics with time lag ,in, l t-1 The load at the previous time step (t-1) l t-24 The load at the same time the previous day (24-hour cycle). l t-168 The load at the same time in the previous week (168-hour cycle). l t-720 The load at the same time in the previous month (720-hour cycle).
[0029] Constructing sliding statistical characteristics: (5) in, mean ( L t-23 :t This is the moving average of the load series over the past 24 time points. std ( L t-23 : t ( ) represents the moving standard deviation of the load series over the past 24 time points. max ( L t-23 :t() represents the maximum value in the load sequence over the past 24 time points. min ( L t-23 :t () is the minimum value in the load sequence over the past 24 time points.
[0030] Constructing periodic features: (6) in, t 24 represents the current timestamp, 168 represents the daily cycle parameter, and 24 represents the weekly cycle parameter.
[0031] Based on load data, aggregated statistical features are constructed, including the regional load average for a specific area and the industry electricity consumption ratio for a specific sector.
[0032] Based on the preprocessed meteorological data, a piecewise function is used to quantify the impact of temperature on the load, and meteorological impact characteristics are constructed: (7) in, T The current temperature. T comfort The comfort temperature threshold (e.g., 20°C). a 1 represents the coefficient of performance (COP). a 2 represents the coefficient of performance (COP). b 1. b 1 is the adjustment amount based on the base load.
[0033] Based on the preprocessed electricity pricing policy data, the characteristics of electricity price impact are calculated: (8) in, P current The electricity price for the current period is... P base Based on the basic electricity price.
[0034] Based on preprocessed holiday data, holiday impact characteristics are constructed, including whether it is a holiday, the type of holiday, and the periods before and after the holiday. Based on preprocessed macroeconomic data, economic impact characteristics are constructed, including industry electricity intensity index and economic activity index.
[0035] S104: Input the load characteristics into the load forecasting model selected based on the forecasting task, and the load forecasting model outputs the predicted load forecasting results; like Figure 4As shown in this embodiment, one or more suitable load forecasting models can be selected according to the forecasting task. The constructed load characteristics are input into the load forecasting model, and the load forecasting model outputs the corresponding load forecasting results. Among them, the selectable load forecasting models include the STL decomposition model for analyzing electricity sales, the quantile regression model for load forecasting intervals, the LSTM sequence model for predicting short-term load, and the XGBoost regression model for predicting monthly average load.
[0036] The STL decomposition model takes time-lag load characteristics, sliding statistical characteristics, periodic characteristics, and aggregate statistical characteristics as inputs, and outputs three components of the time series: a trend component representing the long-term direction of load change, a seasonal component representing the periodic fluctuations of load, and a random fluctuation residual component representing the load after removing the trend and seasonal effects. By analyzing these three components, the STL decomposition model can provide a deeper understanding of the driving factors and anomaly patterns of load changes. The quantile regression model takes all time-lag load characteristics, sliding statistical characteristics, periodic characteristics, aggregate statistical characteristics, meteorological influence characteristics, electricity price influence characteristics, holiday influence characteristics, and economic influence characteristics as inputs, and outputs the load forecast interval. L lower , L upper The LSTM sequence model takes as input time-lag load characteristics, sliding statistical characteristics, periodic characteristics, meteorological impact characteristics, electricity price impact characteristics, holiday impact characteristics, and economic impact characteristics, and outputs a 96-point load sequence. The XGBoost regression model takes as input all features and outputs the monthly average load forecast.
[0037] In some embodiments, the XGBoost regression model, based on the traditional XGBoost model, adds a regularization term tailored to power load characteristics and a time-sensitive loss function. Its objective function is: (9) in, q For the current iteration of model training, n For the sample size, y i It is the first The actual load value of each sample For the model after the first q-1 iterations, the th i Load forecast values for each sample It is the first q Tree pairs of feature vectors x i The load forecast value. L For loss function, The regularization term is represented as: (10) in, It is a complexity control parameter. T It is the number of leaf nodes. yes L 2 Regularization coefficient, w It is the leaf weight.
[0038] Based on the load forecast, actual load, and baseline load forecast output by the XGBoost regression model, the quantitative parameters of the policy impact are calculated using the following method: (11) in, For the first i The actual load value at each time point The load forecasts, taking policy factors into account, are output by the XGBoost regression model. This is the baseline load forecast value without policy impact. N This represents the total number of time points within the assessment period. Quantitative parameters for policy impact. This is used to quantify the impact of time-of-use pricing policies on load, providing data support for relevant departments to evaluate the policy's effectiveness.
[0039] In some embodiments, the load forecast interval is estimated using a quantile regression model, expressed as: (12) in, For quantiles (e.g., 0.05, 0.95). x The input feature vector, y This is the actual load value. for Predicted values at the quantile level. For example, This represents a 90% confidence interval.
[0040] The Data Quality Index (DQI) is calculated based on the load forecast range and the actual load value, using the following method: (13) in, This is an indicator function; its value is 1 when the actual load value is outside the load forecast range, and 0 otherwise. t 0 represents the current start time of the evaluation. Representative from The moment begins i At a certain point in time, D To evaluate window size, This represents the lower bound of the load forecast interval for the quantile regression model. This represents the upper bound of the load prediction interval for the quantile regression model.
[0041] The data quality index is used to quantitatively assess the reliability of the actual collected load data. Its value ranges from [0,1]. The higher the value, the better the match between the actual data and the load forecast range, and the higher the data quality and reliability. When the data quality index is consistently lower than the preset threshold, a data quality alarm is triggered, indicating that there may be abnormalities in data collection or transmission, requiring manual intervention or automatic checks.
[0042] In some embodiments, when multiple models are selected, the final prediction result is determined based on the prediction results of each model, as shown below: (14) in, For the final prediction result, For the model m At any moment t The prediction results M The number of load forecasting models participating in the fusion. For the model m At any moment t The weights are generated dynamically, using the following method: (15) in, Adjust the sensitivity coefficient for the model. For the model m The prediction error at time t-1 For the model j The prediction error at time t-1.
[0043] S105: When multi-source data experiences conceptual drift or the prediction result deviation exceeds the set deviation threshold, update the load prediction model.
[0044] In this embodiment, to ensure the accuracy and adaptability of the model, an adaptive update strategy based on statistical testing is used to update each load prediction model. The concept drift detection statistic is calculated based on changes in multi-source data, and is expressed as: (16) in, F 1( x ) represents the distribution function of historical multi-source data. F 2( x ) represents the distribution function of multi-source data over a recent period. D ks This is a statistical measure for concept drift detection.
[0045] When concept drift occurs in multi-source data or the prediction results of the load forecasting model deviate beyond a set deviation threshold, the load forecasting model is updated, including: The load forecasting model is updated when the concept drift detection statistic is greater than the preset distribution drift threshold, or when the average prediction error of the load forecasting model is greater than the product of the performance degradation coefficient and the baseline prediction error.
[0046] It can be represented as: (17) in, This is the distribution drift threshold. This is the performance degradation factor (for example, a value of 1.5). This represents the average forecasting error of the load forecasting model over the current period. This represents the baseline prediction error.
[0047] In some embodiments, the load forecasting model uses the TimeSeriesSplit method for validation to avoid data leakage, as shown below: (18) in, It is the training sample set. This is the test sample set.
[0048] In some embodiments, the prediction accuracy of load forecasting results from LSTM sequence models and XGBoost regression models is evaluated using mean absolute error, root mean square error, and mean absolute percentage error as assessment metrics. The mean absolute percentage error is calculated as follows: (19) in, y i For time points i The actual load value, For time points i The predicted load value, n This represents the total number of samples during the evaluation period.
[0049] The method for calculating the root mean square error is as follows: (20) The method for calculating the mean absolute percentage error is as follows: (twenty one) In some embodiments, the load forecast interval results of the quantile regression model are evaluated using the predicted interval coverage probability and the normalized average width as evaluation indicators. The method for calculating the load forecast interval coverage probability is as follows: (twenty two) in, L i , U i They are time points respectively i The lower and upper bounds of the load forecast interval.
[0050] The method for calculating the normalized average width is as follows: (twenty three) Where R is the range width of the actual load value.
[0051] In some embodiments, the method for calculating the peak time accuracy of a 96-point load sequence output by an LSTM sequence model is as follows: (twenty four) in, For the first p The peak time predicted by the heavens, For the first p The actual peak time of the day, Allowable time deviation (e.g., 30 minutes). P This represents the total number of days during the assessment period.
[0052] In some embodiments, the overall score of the load forecasting model is: (25) in, w 1. w 2. w 3. w 4 represents the weight of each score item. S accuracy For accuracy scoring, S interval For interval quality score, S peak For peak prediction score, S stability The stability score is calculated as follows: (26) (27) (28) (29) in, The maximum acceptable error threshold for the business. PPA For peak size accuracy, This is the daily point prediction error sequence.
[0053] In some embodiments, the weights of each item in equation (25) are determined based on the importance of the business to the score, and are expressed as follows: (30) in, For the first i The importance of each scoring indicator to the business. Adjust the intensity coefficient for the weight.
[0054] In some embodiments, the performance degradation of single-point load forecasting and load forecasting intervals is detected based on the mean absolute percentage error and the load forecasting interval coverage probability. The method is as follows: (31) in, The mean absolute percentage prediction error over a recent period. This is the historical average error. The historical error standard deviation This represents the coverage probability of the load forecast interval for a recent period. The reasons for performance degradation are analyzed based on the degree of degradation. When multiple models simultaneously degrade, and... D ks When the changes are not significant, it is inferred that the data quality of multi-source data has decreased. D ks When the performance of a single model increases significantly and all models degrade synchronously, concept drift is inferred. When the performance of a single model degrades while the performance of other models is normal, the single model is inferred to be outdated. This triggers model updates or parameter adjustments based on the analysis results and can generate periodic performance reports.
[0055] like Figure 5 , 6 As shown, in some embodiments, the MLOps framework provides full lifecycle management of load forecasting models from development to production deployment. The MLflow management platform is used to manage model versions, experiment tracking, and deployment. The mathematical model for recording experiments is defined as Experiment={Metadata,Parameters,Metrics,Artifacts}, where Metadata represents metadata information. Parameters is the set of model hyperparameters. , For the set of evaluation metrics, Metrics={ M 1, M 2,…, M n}, Artifacts are the output files, Artifacts={model_file,feature_importance,prediction_samples}.
[0056] The model version evolution rule is as follows: (32) in, The percentage increase in the overall score. ; It is the overall score of the newly trained load prediction model. It is the overall score of the current load forecasting model. This is the main version. It is a minor version. It is a revised version.
[0057] In some embodiments, a time-series prediction-oriented optimization strategy is used to optimize the hyperparameters of the XGBoost regression model and the LSTM sequence model, defining a Bayesian optimization objective function: (33) in, For hyperparameter combination, For the hyperparameter search space, For loss function, For hyperparameters Model predictions at that time.
[0058] In some approaches, for XGBoost regression and quantile regression models, a time-sensitive loss function is designed, expressed as: (34) in, T To assess the total number of time points within a time period, y t The actual load value at time t. Let be the predicted load value at time t. w t The weighting coefficient at time t is expressed as: (35) in, For peak period indication function, when t The indicator function is set to 1 at peak electricity consumption times and 0 at other times. This is the peak weight enhancement coefficient.
[0059] In some embodiments, the MLOps system monitors service health and resource utilization efficiency in real time, wherein service health is: (36) (37) (38) in, I availability For service availability metrics, latency is the delay and throughput is the throughput.
[0060] Resource utilization efficiency is: (39) This refers to resource usage, which includes, but is not limited to, computing and storage resources such as CPU, memory, and GPU.
[0061] It should be noted that the method in this embodiment can be executed by a single device, such as a computer or server. The method can also be applied in a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the method in this embodiment, and the multiple devices will interact with each other to complete the method described.
[0062] It should be noted that the above description describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims may be performed in a different order than that shown in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0063] like Figure 7 As shown, the electricity load prediction device according to an embodiment of this application includes: The acquisition module is used to acquire data from multiple sources; The preprocessing module is used to preprocess multi-source data to obtain preprocessed multi-source data; The feature construction module is used to construct load features based on preprocessed multi-source data. The forecasting module is used to input load characteristics into the load forecasting model selected based on the forecasting task, and the load forecasting model outputs the predicted load forecasting results. The update module is used to update the load forecasting model when multi-source data undergoes conceptual drift or the deviation of load forecasting results exceeds a set deviation threshold.
[0064] For ease of description, the above devices are described in terms of function, divided into various modules. Of course, in implementing the embodiments of this application, the functions of each module can be implemented in one or more software and / or hardware.
[0065] The apparatus described above is used to implement the corresponding methods in the foregoing embodiments and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0066] Figure 8 This embodiment illustrates a more specific hardware structure of an electronic device. The device may include a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, memory 1020, input / output interface 1030, and communication interface 1040 are interconnected internally via the bus 1050.
[0067] The processor 1010 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0068] The memory 1020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.
[0069] The input / output interface 1030 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components within the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touchscreens, microphones, various sensors, etc., while output devices may include displays, speakers, vibrators, indicator lights, etc.
[0070] The communication interface 1040 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0071] Bus 1050 includes a pathway for transmitting information between various components of the device, such as processor 1010, memory 1020, input / output interface 1030, and communication interface 1040.
[0072] It should be noted that although the above-described device only shows the processor 1010, memory 1020, input / output interface 1030, communication interface 1040, and bus 1050, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.
[0073] The electronic devices described above are used to implement the corresponding methods in the foregoing embodiments and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0074] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0075] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of this disclosure (including the claims) is limited to these examples; within the framework of this disclosure, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of the embodiments of this application as described above, which are not provided in the details for the sake of brevity.
[0076] Additionally, to simplify the description and discussion, and to avoid obscuring the embodiments of this application, the well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. Furthermore, the apparatus may be shown in block diagram form to avoid obscuring the embodiments of this application, and this also takes into account the fact that the details of the implementation of these block diagram apparatuses are highly dependent on the platform on which the embodiments of this application will be implemented (i.e., these details should be fully understood by those skilled in the art). While specific details (e.g., circuits) have been set forth to describe exemplary embodiments of this disclosure, it will be apparent to those skilled in the art that the embodiments of this application can be implemented without these specific details or with variations thereof. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0077] Although this disclosure has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed.
[0078] The embodiments of this application are intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the embodiments of this application should be included within the protection scope of this disclosure.
Claims
1. A method for predicting electricity load, characterized in that, include: Acquire multi-source data; The multi-source data is preprocessed to obtain preprocessed multi-source data; Based on the preprocessed multi-source data, load characteristics are constructed; The load characteristics are input into the load forecasting model selected based on the forecasting task, and the load forecasting model outputs the predicted load forecasting results. When the multi-source data experiences conceptual drift or the load forecast result deviation exceeds a set deviation threshold, the load forecast model is updated.
2. The method according to claim 1, characterized in that, The multi-source data is preprocessed to obtain preprocessed multi-source data, including: The multi-source data is time-aligned to obtain time-aligned multi-source data; Determine whether there are missing values in the time-aligned multi-source data. If so, fill single missing values with the K-nearest neighbor method and fill consecutive missing values with the prediction results of the LSTM network model to obtain the filled multi-source data. Based on the filled multi-source data, the isolation forest and 3σ principle are used to detect whether there are outliers. If they are found, linear interpolation is used to correct single outliers, and historical data from the same period is used to replace continuous outliers, thus obtaining corrected multi-source data.
3. The method according to claim 1, characterized in that, The multi-source data includes load data, meteorological data, electricity price policy data, holiday data, and macroeconomic data; Based on the preprocessed multi-source data, load characteristics are constructed, including: Based on the load data, load characteristics with time lag, sliding statistical characteristics, periodic characteristics, and aggregate statistical characteristics are constructed. Based on the meteorological data, meteorological impact characteristics are constructed; Based on the electricity price policy data, calculate the characteristics of the electricity price impact; Based on the holiday data, the characteristics of the impact of holidays are constructed; Based on the aforementioned macroeconomic data, economic impact characteristics are constructed.
4. The method according to claim 1, characterized in that, The load forecasting model includes an STL decomposition model for analyzing electricity sales, a quantile regression model for predicting load forecast intervals, an LSTM sequence model for predicting short-term load, and an XGBoost regression model for predicting monthly average load.
5. The method according to claim 4, characterized in that, The objective function of the XGBoost regression model is: (9) in, q For the current iteration of model training, n For the sample size, y i It is the first The actual load value of each sample For the model after the first q-1 iterations, the th i Load forecast values for each sample It is the first q Tree pairs of feature vectors x i The load forecast value, L For loss function, This is a regularization term.
6. The method according to claim 5, characterized in that, Also includes: Based on the load forecast, actual load, and baseline load forecast output by the XGBoost regression model, calculate the quantitative parameters of the policy impact.
7. The method according to claim 4, characterized in that, Also includes: The data quality index is calculated based on the load forecast interval and actual load value output by the quantile regression model.
8. The method according to claim 4, characterized in that, Also includes: The mean absolute percentage error is calculated based on the prediction results output by the LSTM sequence model and the XGBoost regression model. Calculate the load forecast interval coverage probability based on the load forecast interval output by the quantile regression model. The performance degradation of single-point load forecasting and load forecasting intervals is detected based on the mean absolute percentage error and the load forecasting interval coverage probability.
9. The method according to claim 1, characterized in that, Also includes: Calculate the concept drift detection statistic based on the changes in the multi-source data; When the multi-source data experiences conceptual drift or the load forecast result deviation exceeds a set deviation threshold, the load forecast model is updated, including: The load prediction model is updated when the concept drift detection statistic is greater than the preset distribution drift threshold, and / or the average prediction error of the load prediction model is greater than the product of the performance degradation coefficient and the baseline prediction error.
10. An electricity load prediction device, characterized in that, include: The acquisition module is used to acquire data from multiple sources; The preprocessing module is used to preprocess the multi-source data to obtain preprocessed multi-source data; The feature construction module is used to construct load features based on the preprocessed multi-source data; The prediction module is used to input the load characteristics into a load prediction model selected based on the prediction task, and the load prediction model outputs the predicted load prediction results. The update module is used to update the load forecasting model when the multi-source data undergoes conceptual drift or the deviation of the load forecasting result exceeds a set deviation threshold.