Short-term power load prediction method based on fish eagle optimization algorithm and related products
By combining the Osprey optimization algorithm with a combined model of Temporal Convolutional Network (TCN) and Transformer, multi-source power load data is processed, which solves the problems of single data dimension and insufficient parameter optimization in existing power load forecasting methods, and achieves higher forecasting accuracy and reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUANENG HUBEI ENERGY SALES LLC
- Filing Date
- 2026-03-24
- Publication Date
- 2026-05-29
AI Technical Summary
Existing power load forecasting methods rely on single historical load data, which makes it difficult to fully reflect the complex dynamic characteristics of load changes in modern power systems, resulting in insufficient forecast reliability.
A combined prediction model based on the Osprey optimization algorithm is adopted. By combining the temporal convolutional network TCN and the Transformer, multi-scale temporal feature extraction and global dependency modeling are performed by combining multi-source historical time series data. The isolated forest algorithm is used to detect and process outliers, construct a multivariate feature matrix, and optimize the parameter combination to improve prediction accuracy.
It improves the comprehensiveness and reliability of power load forecasting. By integrating multi-dimensional data and optimizing model parameters, it solves the problems of single data dimension and insufficient parameter optimization in traditional methods, thereby improving the accuracy and robustness of forecasting.
Smart Images

Figure CN122118683A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power load forecasting technology, specifically to a short-term power load forecasting method and related products based on the Osprey optimization algorithm. Background Technology
[0002] Short-term load forecasting is a core component of power system dispatching and operation, playing a decisive role in ensuring the safe and stable operation of the power grid. With the rapid evolution of smart grid technology and the deepening of power market reforms, accurate load forecasting not only directly affects the optimization of power generation plans and the efficient allocation of power resources, but also relates to the economic operation level of the power system and the reliability of power supply.
[0003] Current research on power load forecasting technology mainly focuses on the following directions. Traditional statistical methods, such as the Autoregressive Integral Moving Average (ARIMA) model and exponential smoothing, are based on strict mathematical assumptions, have simple model structures, and are highly interpretable, but they perform poorly when dealing with load data with nonlinear characteristics. The application of deep learning methods has brought new breakthroughs to load forecasting. Long Short-Term Memory (LSTM) networks can effectively process time-series data; Temporal Convolutional Networks (TCNs) can exponentially expand the receptive field by inserting holes between sampling points of the convolution kernel, enabling the network to cover longer historical sequences with fewer layers, while ensuring causal relationships and supporting parallel computing; Transformers, based on self-attention mechanisms, can directly establish dependencies between any positions in the sequence through query-key-value (QKV) computation with multi-head self-attention, effectively capturing long-distance dependencies and dynamically focusing on the most important historical information in time-series forecasting. However, existing deep learning forecasting methods mainly rely on time-series analysis of single historical load data. This single-dimensional modeling approach is difficult to fully reflect the complex dynamic characteristics of load changes in modern power systems, resulting in insufficient forecast reliability.
[0004] Therefore, how to construct a predictive model that can deeply integrate multi-dimensional influencing factors and improve prediction accuracy has become a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] The purpose of this invention is to provide a short-term power load forecasting method and related products based on the Osprey optimization algorithm, so as to overcome the problem of insufficient reliability of existing power load forecasting methods.
[0006] The present invention solves the above-mentioned technical problems through the following technical solution: This invention provides a short-term power load forecasting method based on the Osprey optimization algorithm, comprising the following steps: Acquire multi-source historical time-series data related to power load; Preprocessing of multi-source historical time-series data to construct a multivariate feature matrix; The multivariate feature matrix is input into a pre-trained combined prediction model to obtain the power load prediction results for a future preset period. The combined prediction model is obtained by parameter optimization training of a combined model of temporal convolutional network TCN and Transformer based on Osprey optimization algorithm OOA. The combined model is used to extract multi-scale temporal features from the multivariate feature matrix through temporal convolutional network TCN, and to establish global dependencies on the extracted multi-scale temporal features through Transformer.
[0007] A further improvement of this invention lies in the preprocessing of multi-source historical time-series data, including: Detecting outliers in multi-source historical time-series data using the isolated forest algorithm; For abnormal data where there are fewer than the first threshold consecutive outliers, linear interpolation is used to fill in the gaps. For abnormal data where consecutive outliers reach or exceed the first threshold, historical data from the same period are used to fill the gaps.
[0008] A further improvement of this invention is that the multi-source historical time-series data includes at least historical load data, meteorological data, and electricity price data.
[0009] A further improvement of the present invention is that the meteorological data includes at least temperature, humidity and wind speed.
[0010] A further improvement of this invention lies in constructing a multivariate feature matrix, specifically including: Based on the preprocessed multi-source historical time-series data, historical load sequences, temperature sequences, humidity sequences, wind speed sequences, electricity price sequences, and date type codes are constructed. By combining historical load sequences, temperature sequences, humidity sequences, wind speed sequences, electricity price sequences, and date type codes, a multivariate feature matrix X is obtained:
[0011] in, Historical load sequence; It is a temperature sequence; It is a humidity sequence; This is a wind speed sequence; Electricity price series; The date type is encoded; n is the time window length of the historical load sequence; t is the current time; m is the time window length of the temperature sequence, humidity sequence, wind speed sequence, and electricity price sequence.
[0012] A further improvement of this invention lies in the parameter optimization training of the combined model of Temporal Convolutional Network (TCN) and Transformer based on the Oorestee Optimization Algorithm (OOA), specifically including: Initialize the OSA (Out-of-Area) parameter combination for the Osprey optimization algorithm. The parameter combination includes the population size, maximum number of iterations, and the dimension of the parameter to be optimized. In each iteration, the combined model of Temporal Convolutional Network (TCN) and Transformer is trained using the parameter combination generated by the OOOA optimization algorithm. The fitness value is calculated using the prediction error of the combined model under the current parameter combination using the validation set. Based on the fitness value, the search position of the parameter combination is updated through the exploration and development phases of the Osprey Optimization Algorithm (OOA) until the maximum number of iterations is reached. The combined model corresponding to the optimal parameter combination is then used as the pre-trained combined prediction model.
[0013] This invention also provides a short-term power load forecasting system based on the Osprey optimization algorithm, comprising: The first module is used to acquire multi-source historical time-series data related to power load; The second module is used to preprocess multi-source historical time-series data and construct a multivariate feature matrix; The third module is used to input the multivariate feature matrix into the pre-trained combined prediction model to obtain the power load prediction results for the future preset period. The combined prediction model is obtained by parameter optimization training of the combined model of temporal convolutional network TCN and Transformer based on Osprey optimization algorithm OOA. The combined model is used to extract multi-scale time series features from the multivariate feature matrix through temporal convolutional network TCN, and to establish global dependencies on the extracted multi-scale time series features through Transformer.
[0014] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the short-term power load forecasting method based on the Osprey optimization algorithm described above.
[0015] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the short-term power load forecasting method based on the Osprey optimization algorithm described above.
[0016] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the short-term power load forecasting method based on the Osprey optimization algorithm described above.
[0017] Compared with the prior art, the positive and progressive effects of the present invention are as follows: This invention provides a short-term power load forecasting method based on the Osprey optimization algorithm. By acquiring multi-source historical time-series data related to power load, it can capture the influence of multiple factors such as weather and electricity prices, avoiding the limitations of single historical load data and thus improving the comprehensiveness of the forecast. The multi-source historical time-series data is preprocessed to construct a multivariate feature matrix. Through data cleaning and integration, a unified input structure is formed to ensure feature quality and provide a reliable foundation for the model. The multivariate feature matrix is input into a pre-trained combined forecasting model, which is obtained by parameter optimization training of a combined model of a Temporal Convolutional Network (TCN) and a Transformer based on the Osprey optimization algorithm. The TCN extracts multi-scale temporal features from the multivariate feature matrix, solving the gradient problem in long sequence processing and capturing local temporal patterns. The Transformer establishes global dependencies on the extracted multi-scale temporal features, achieving long-term dependency modeling. The application of the Osprey optimization algorithm optimizes the parameter combination, ensuring global search capability and avoiding the inadequacy of empirical settings, thereby improving the overall reliability and robustness of the forecast. By integrating multi-source data and optimizing the combined model, the problems of single data dimension and insufficient parameter optimization in traditional load forecasting are solved. Attached Figure Description
[0018] The accompanying drawings are provided to further understand the invention and constitute a part of this invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0019] Figure 1 This is a schematic diagram of the architecture of the power load prediction model of the present invention; Figure 2 This is a flowchart illustrating the Osprey optimization algorithm of the present invention; Figure 3 This is a schematic diagram of the architecture of the Transformer model of this invention; Figure 4 This is a schematic diagram of the power load prediction error distribution of the present invention. Detailed Implementation
[0020] 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.
[0021] In the description of this invention, it should be understood that the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0022] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0023] It should be understood that although terms such as first, second, third, etc., may be used in the embodiments of the present invention to describe the preset range, these preset ranges should not be limited to these terms. These terms are only used to distinguish the preset ranges from one another. For example, without departing from the scope of the embodiments of the present invention, the first preset range may also be referred to as the second preset range, and similarly, the second preset range may also be referred to as the first preset range.
[0024] Depending on the context, the word "if" as used here can be interpreted as "when," "when," "in response to determination," or "in response to detection." Similarly, depending on the context, the phrase "if determination" or "if detection (of the stated condition or event)" can be interpreted as "when determination," "in response to determination," "when detection (of the stated condition or event)," or "in response to detection (of the stated condition or event)."
[0025] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. This is an explanation of the present invention and not a limitation thereof.
[0026] In actual operation scenarios, power load is affected by a variety of external factors: meteorological conditions such as temperature fluctuations can significantly change users' electricity consumption behavior, for example, high temperatures can cause a sharp increase in air conditioning load; adjustments to electricity pricing policies can guide changes in users' electricity consumption patterns to achieve peak shaving and valley filling; at the same time, holiday effects, cyclical fluctuations in economic activities, and special events can all cause significant disturbances to the load curve.
[0027] Osprey Optimization (OOA) is a novel swarm intelligence optimization algorithm that simulates the fishing behavior of ospreys. The algorithm consists of two main phases: the exploration phase simulates the process of ospreys searching for schools of fish at high altitudes, achieving global search; the development phase simulates the process of ospreys precisely diving to catch prey after locking onto a target, achieving local optimization. It has powerful global search and local development capabilities.
[0028] To overcome the shortcomings of existing power load forecasting technologies, this invention provides a short-term power load forecasting method based on the Osprey optimization algorithm, comprising the following steps: Acquire multi-source historical time-series data related to power load; Preprocessing of multi-source historical time-series data to construct a multivariate feature matrix; The multivariate feature matrix is input into a pre-trained combined prediction model to obtain the power load prediction results for a future preset period. The combined prediction model is obtained by parameter optimization training of a combined model of temporal convolutional network TCN and Transformer based on Osprey optimization algorithm OOA. The combined model is used to extract multi-scale temporal features from the multivariate feature matrix through temporal convolutional network TCN, and to establish global dependencies on the extracted multi-scale temporal features through Transformer.
[0029] By constructing a multi-source data acquisition and processing framework, the system effectively integrates multi-dimensional information such as meteorology, electricity prices, and load; enhances the model's learning ability for complex time-series patterns through multi-scale feature extraction of TCN and the self-attention mechanism of Transformer; achieves adaptive adjustment of model parameters through intelligent optimization of OOA algorithm; and provides a complete solution from data acquisition to result output through modular system design, meeting the application requirements of real-time dispatching of power systems.
[0030] This invention acquires multi-source historical time-series data related to electricity load, capturing the influence of multiple factors such as weather and electricity prices, avoiding the limitations of single historical load data, and thus improving the comprehensiveness of prediction. The multi-source historical time-series data is preprocessed to construct a multivariate feature matrix. Data cleaning and integration form a unified input structure, ensuring feature quality and providing a reliable foundation for the model. The multivariate feature matrix is input into a pre-trained combined prediction model. This model uses the Osprey optimization algorithm to optimize the parameters of a combined model of a Temporal Convolutional Network (TCN) and a Transformer. The TCN extracts multi-scale temporal features from the multivariate feature matrix, solving the gradient problem in long-sequence processing and capturing local temporal patterns. The Transformer establishes global dependencies on the extracted multi-scale temporal features, achieving long-term dependency modeling. The Osprey optimization algorithm optimizes the parameter combination, ensuring global search capability and avoiding the inadequacy of empirical settings, thereby improving the overall reliability and robustness of the prediction. By integrating multi-source data and optimizing the combined model, the challenges of single data dimensions and insufficient parameter optimization in traditional load forecasting are addressed.
[0031] Specifically, preprocessing of multi-source historical time-series data includes: Detecting outliers in multi-source historical time-series data using the isolated forest algorithm; For abnormal data where there are fewer than the first threshold consecutive outliers, linear interpolation is used to fill in the gaps. For abnormal data where consecutive outliers reach or exceed the first threshold, historical data from the same period are used to fill the gaps.
[0032] This paper utilizes the Isolation Forest algorithm to detect outliers in multi-source historical time-series data. This algorithm can efficiently identify outliers in high-dimensional time-series data, avoiding the detection blind spots of traditional methods in complex data scenarios and ensuring that all outliers are captured. For detected outliers, processing is differentiated based on the number of consecutive outliers: when the number of consecutive outliers is less than a first threshold, linear interpolation is used for imputation. This method maintains data continuity and smoothness for sporadic outliers, avoiding data fluctuation distortion caused by a small number of anomalies. When the number of consecutive outliers reaches or exceeds the first threshold, historical data from the same period is used for imputation. This method restores data rationality by utilizing historical similarity patterns for large-area anomalies, preventing the distortion risk of interpolation methods under long-term anomalies and ensuring overall data consistency and reliability. The outlier handling scheme for multi-source historical time-series data, through a step-by-step detection and imputation mechanism, effectively solves the data distortion problem, ensures the quality of preprocessed data, and provides reliable input for subsequent prediction models.
[0033] Specifically, multi-source historical time-series data should include at least historical load data, meteorological data, and electricity price data.
[0034] Historical load data provides fundamental time-series pattern information, ensuring that forecasting models can capture the inherent variation patterns of the load itself. Meteorological data incorporates the influence of environmental factors, such as the regulatory effect of temperature changes on air conditioning load. Electricity price data reflects the regulatory effect of market behavior on user electricity consumption patterns, such as the peak-shaving and valley-filling effects guided by electricity pricing policies. By including at least these three types of data, the comprehensiveness and diversity of the input data are ensured, thereby avoiding the problem of a single data source ignoring key influencing factors and improving the accuracy and reliability of load forecasting.
[0035] Specifically, meteorological data should include at least temperature, humidity, and wind speed.
[0036] In power load forecasting, temperature is a core influencing factor, directly affecting the electricity consumption of air conditioning and heating equipment; for example, high temperatures can lead to a surge in cooling demand. Humidity, as a secondary factor, affects human comfort and equipment operating efficiency, potentially indirectly altering electricity consumption patterns. Wind speed involves ventilation and natural cooling effects, significantly impacting load, especially in industrial or built environments. By concretizing meteorological data into a combination of these three elements, the model can simultaneously consider the independent contributions and interactions of temperature, humidity, and wind speed. This avoids the risk of information gaps caused by single or generalized meteorological data, effectively improving the comprehensiveness and accuracy of forecasts and ensuring that load forecast results better align with the actual operational needs of the power system.
[0037] Specifically, constructing a multivariate feature matrix includes: Based on the preprocessed multi-source historical time-series data, historical load sequences, temperature sequences, humidity sequences, wind speed sequences, electricity price sequences, and date type codes are constructed. By combining historical load sequences, temperature sequences, humidity sequences, wind speed sequences, electricity price sequences, and date type codes, a multivariate feature matrix X is obtained:
[0038] in, Historical load sequence; It is a temperature sequence; It is a humidity sequence; This is a wind speed sequence; Electricity price series; The date type is encoded; n is the time window length of the historical load sequence; t is the current time; m is the time window length of the temperature sequence, humidity sequence, wind speed sequence, and electricity price sequence.
[0039] Multiple sequences were constructed based on preprocessed multi-source historical time-series data to ensure data quality, avoid noise interference, and provide clean input for subsequent combination. Historical load, temperature, humidity, wind speed, and electricity price sequences, along with date type encoding, were constructed. These sequences capture the historical trends of the load itself, changes in meteorological conditions, the influence of market factors, and time-periodic patterns, covering key influencing factors and preventing the omission of crucial information. These sequences were combined to obtain a multivariate feature matrix X. The historical load sequence uses a specific time window tn to t-1 to emphasize the recent dependence of the load; the temperature, humidity, and wind speed sequences use a time window tm to t to synchronously reflect current environmental changes; the electricity price sequence captures real-time market dynamics; and the date type encoding handles non-numerical time features, ensuring time alignment and feature fusion between different sequences, avoiding data redundancy, and enabling the feature matrix to comprehensively and accurately represent multi-source time-series relationships, thus providing high-quality input for the prediction model.
[0040] Specifically, the parameters of the combined model of Temporal Convolutional Network (TCN) and Transformer are optimized and trained based on the OOA optimization algorithm of the Osprey algorithm, including: Initialize the OSA (Out-of-Area) parameter combination for the Osprey optimization algorithm. The parameter combination includes the population size, maximum number of iterations, and the dimension of the parameter to be optimized. In each iteration, the combined model of Temporal Convolutional Network (TCN) and Transformer is trained using the parameter combination generated by the OOOA optimization algorithm. The fitness value is calculated using the prediction error of the combined model under the current parameter combination using the validation set. Based on the fitness value, the search position of the parameter combination is updated through the exploration and development phases of the Osprey Optimization Algorithm (OOA) until the maximum number of iterations is reached. The combined model corresponding to the optimal parameter combination is then used as the pre-trained combined prediction model.
[0041] The Osprey Optimization (OOA) algorithm addresses the inefficiency and local optima issues of traditional optimization methods, achieving global optimal parameter search. Specifically, the initial parameter combinations include population size, maximum number of iterations, and the dimension of the parameters to be optimized. This ensures systematic startup and range control of the optimization process, avoiding the blindness of random initialization and ensuring global search coverage. In each iteration, the combined model of a Temporal Convolutional Network (TCN) and a Transformer is trained using the parameter combinations generated by the Osprey Optimization algorithm. This allows for intelligent exploration of different configurations in the parameter space, improving search efficiency by dynamically generating parameter combinations instead of static settings. The prediction error of the combined model under the current parameter combinations is calculated using the validation set as the fitness value. This quantifies parameter performance and provides a clear optimization objective, ensuring generalization ability through validation set evaluation. Based on the fitness value, the search position of the parameter combinations is updated through the exploration and development phases of the OSA algorithm. This simulates the foraging behavior of an osprey, balancing global exploration and local development, effectively preventing getting trapped in local optima. The maximum number of iterations is reached, ensuring process convergence and computational feasibility. The combined model corresponding to the optimal parameter combination is used as a pre-trained combined prediction model, directly locking in the best-performing model configuration to ensure improved prediction accuracy. Overall, this method efficiently improves the effect of parameter training through the intelligent optimization mechanism of OOA.
[0042] Based on the same inventive concept, this invention also provides a short-term power load forecasting system based on the Osprey optimization algorithm, comprising: The first module is used to acquire multi-source historical time-series data related to power load; The second module is used to preprocess multi-source historical time-series data and construct a multivariate feature matrix; The third module is used to input the multivariate feature matrix into the pre-trained combined prediction model to obtain the power load prediction results for the future preset period. The combined prediction model is obtained by parameter optimization training of the combined model of temporal convolutional network TCN and Transformer based on Osprey optimization algorithm OOA. The combined model is used to extract multi-scale time series features from the multivariate feature matrix through temporal convolutional network TCN, and to establish global dependencies on the extracted multi-scale time series features through Transformer.
[0043] The first module acquires multi-source historical time-series data, ensuring the prediction model can integrate various influencing factors such as load, weather, and electricity price data. This overcomes the limitations of traditional methods that rely on a single data source, providing a more comprehensive input foundation. The second module preprocesses the data and constructs a multivariate feature matrix. It addresses data quality issues through outlier detection and imputation, and structurally integrates multi-source information, providing high-quality feature input to the model and solving the challenges of data noise and feature dispersion. The third module uses a pre-trained combined prediction model for prediction. This combined model optimizes parameters based on the Osprey optimization algorithm, solving the problem of finding the global optimum through manual parameter tuning and improving the model's generalization ability. The Temporal Convolutional Network (TCN) extracts multi-scale temporal features from the multivariate feature matrix, effectively capturing local patterns at different time scales and solving the gradient vanishing problem in traditional models handling long sequences. The Transformer establishes global dependencies on the extracted features, ensuring the capture of long-term temporal dependencies and overcoming the limitations of local feature extraction. The entire system works collaboratively, significantly improving prediction accuracy and reliability through optimized data integration, feature processing, and model architecture.
[0044] The short-term power load forecasting system proposed in this invention adopts a layered modular architecture design. The overall system consists of four layers: data layer, processing layer, model layer, and application layer. Data interaction between each layer is achieved through standardized interfaces to ensure the scalability and maintainability of the system.
[0045] The data layer is responsible for the acquisition and storage of multi-source heterogeneous data. The system interfaces with external systems through various data interfaces, including real-time connections with power grid SCADA systems, meteorological information systems, and power trading systems. Collected load, meteorological, and electricity price data are stored in a time-series database, supporting efficient time-series query and aggregation operations. The processing layer performs data preprocessing and feature engineering. This layer includes a data quality control module for intelligent imputation of missing values. The feature engineering module constructs a multi-dimensional feature matrix, including periodic encoding of time features, sliding window statistical features, and interactive features, converting raw data into an input format suitable for deep learning models. The model layer is the core computing unit of the system, deploying an OOA-TCN-Transformer combined prediction model. The TCN submodule extracts multi-scale time-series features, the Transformer submodule establishes global dependencies between features, and the OOA optimizer dynamically adjusts model parameters. The application layer is responsible for generating and displaying prediction results. The specific process framework is as follows: Figure 1 As shown, Figure 2 , Figure 3 The detailed processes of the Osprey optimization algorithm and the Transformer framework are presented separately.
[0046] The system operates as follows: First, the system acquires load data from the power grid SCADA system in real time via an API interface, and simultaneously obtains data such as temperature (T), humidity (H), and wind speed (W) from the meteorological department, and real-time electricity price (P) from the power trading center. Data acquisition is performed every 30 minutes. An isolated forest algorithm is used to detect outliers, with an outlier score threshold set at 0.6. For detected outliers, if there are fewer than three consecutive outliers, linear interpolation is used; otherwise, the data is marked as missing and filled using historical data from the same period.
[0047] Secondly, construct a multivariate feature matrix.
[0048] in: : Historical load sequence (n=48); Temperature sequence (m=12); :Humidity sequence; Wind speed sequence; Electricity price series; Date type encoding Model training and optimization: Initialize OOA algorithm parameters: Osprey population size N = 30, maximum number of iterations T = 100, parameter dimension dim = 4. Construct a TCN-Transformer model: the TCN layer extracts multi-scale temporal features, the Transformer captures the dependencies between features, and the output layer generates load predictions for the next 48 time points. The iterative optimization process includes: exploration phase: Ospreys search for the optimal parameter position; development phase: local fine-grained search; fitness evaluation: calculate validation set RMSE (incorporating the RMSE calculation formula); using a sliding window approach, updating predictions every 30 minutes to maintain model timeliness.
[0049] Examples are as follows: To verify the effectiveness of this invention, a comprehensive experimental verification was conducted on actual data from a provincial power grid. See Table 1. The experimental data covered the entire year of 2023, including load data sampled every 30 minutes, synchronous meteorological data, and electricity price data. The dataset was divided in a time-series manner, with the first 10 months used as the training set (approximately 14,400 samples), the 11th month used as the validation set (approximately 1,440 samples), and the last month used as the test set (approximately 1,440 samples).
[0050] Table 1 Measurement point data
[0051] The experiment set up multiple benchmarks to comprehensively evaluate the system performance.
[0052] The benchmark model includes: (1) LSTM model, using only historical load data; (2) TCN model; (3) Transformer model (4) The complete system of the present invention includes multiple inputs and OOA optimization.
[0053] All models used the same data partitioning and evaluation metrics to ensure fairness in the comparison. The experimental results are shown in Figure 2 and... Figure 4 As shown.
[0054] Table 2 Comparison of Predictive Performance
[0055] The experimental results in Table 2 show that the system proposed in this invention achieves the best performance in all indicators. On the test set, the system's mean absolute error (MAE) is 76.32MW, root mean square error (RMSE) is 98.45MW, mean absolute percentage error (MAPE) is 4.87%, and the coefficient of determination R² reaches 0.9956. Compared with the univariate TCN-Transformer benchmark, multivariate input reduces MAE by 36.5% and RMSE by 33.8%, fully demonstrating the effectiveness of multidimensional information fusion.
[0056] Through the Figure 4 The analysis shows that the predicted values of the system of the present invention are highly consistent with the actual load curves, which fully demonstrates the important role of considering multidimensional influencing factors in improving the accuracy of prediction under extreme conditions.
[0057] The system provided by this invention not only considers historical load sequences but also integrates multi-dimensional information such as temperature, humidity, wind speed, rainfall, electricity price, weekday marking, and time period coding. Through carefully designed feature engineering, including sliding window statistics, periodic coding, and interactive feature generation methods, a feature system that comprehensively reflects the factors influencing load is constructed.
[0058] TCN extracts features at different time scales through multi-scale dilated convolutions, while the Transformer establishes global dependencies between features through a self-attention mechanism, and OOA optimizes model parameters through intelligent search. These three components, each with its own function yet working together, form a highly efficient prediction system. The combination of multi-scale feature extraction and global dependency modeling enhances the model's expressive power. TCN's dilated convolutions cover long-term series with fewer parameters, while the Transformer's self-attention mechanism captures dependencies at arbitrary distances. This combination of local and global, multi-scale and global approaches enables the model to handle both short-term fluctuations and long-term trends simultaneously.
[0059] The short-term power load forecasting system based on Osprey Optimization-TCN-Transformer proposed in this invention has significant advantages and improvements over existing technologies. In terms of information utilization, the system fully leverages the value of multi-source data. By integrating information from eight dimensions, including load, meteorology, and electricity prices, a more comprehensive model of load influencing factors is established. Especially in special scenarios such as extreme weather and holidays, the fusion of multi-source information reduces prediction errors by more than 50%, greatly improving the system's adaptability and robustness. Regarding system intelligence, the OOA algorithm enables automatic optimization of model parameters, avoiding the tedious manual parameter tuning process of traditional methods. In terms of engineering practicality, the system provides a complete end-to-end solution. From data acquisition and preprocessing to model training and online forecasting, each stage has been carefully designed and optimized, and the modular architecture facilitates system deployment and maintenance.
[0060] Based on the same inventive concept, this application provides a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of a short-term power load forecasting method based on the Osprey optimization algorithm. The memory may include main memory, such as high-speed random access memory, or it may also include non-volatile memory, such as at least one disk storage device. The processor, network interface, and memory are interconnected via an internal bus, which may be an industry-standard architecture bus, a peripheral component interconnection standard bus, an extended industry-standard architecture bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. The memory stores the program; specifically, the program may include program code, which includes computer operation instructions. The memory may include main memory and non-volatile memory, and provides instructions and data to the processor.
[0061] Based on the same inventive concept, embodiments of this application provide a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the steps of the short-term power load forecasting method based on the Osprey optimization algorithm. Specifically, the computer-readable storage medium includes, but is not limited to, volatile memory and / or non-volatile memory. The volatile memory may include RAM (Random Access Memory) and / or cache memory, etc. The non-volatile memory may include ROM (Read-Only Memory), hard disk, flash memory, optical disk, magnetic disk, etc.
[0062] Based on the same inventive concept, this application provides a computer program product, which includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions, which, when executed by a computer device, cause the computer device to perform the steps of the above-described short-term power load forecasting method based on the Osprey optimization algorithm.
[0063] Those skilled in the art will understand that embodiments of the present invention can be provided as methods or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM (Compact Disc Read-Only Memory), optical storage, etc.) containing computer-usable program code.
[0064] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer apparatus or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0065] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer device or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0066] These computer program instructions may also be loaded onto a computer device or other programmable data processing equipment to cause a series of operational steps to be performed on the computer device or other programmable equipment to produce a process implemented by the computer device, thereby providing instructions that execute on the computer device or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0067] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0068] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A short-term power load forecasting method based on the Osprey optimization algorithm, characterized in that, Includes the following steps: Acquire multi-source historical time-series data related to power load; Preprocessing of multi-source historical time-series data to construct a multivariate feature matrix; The multivariate feature matrix is input into a pre-trained combined prediction model to obtain the power load prediction results for a future preset period. The combined prediction model is obtained by parameter optimization training of a combined model of temporal convolutional network TCN and Transformer based on Osprey optimization algorithm OOA. The combined model is used to extract multi-scale temporal features from the multivariate feature matrix through temporal convolutional network TCN, and to establish global dependencies on the extracted multi-scale temporal features through Transformer.
2. The short-term power load forecasting method based on the Osprey optimization algorithm according to claim 1, characterized in that, Preprocessing of multi-source historical time-series data includes: Detecting outliers in multi-source historical time-series data using the isolated forest algorithm; For abnormal data where there are fewer than the first threshold consecutive outliers, linear interpolation is used to fill in the gaps. For abnormal data where consecutive outliers reach or exceed the first threshold, historical data from the same period are used to fill the gaps.
3. The short-term power load forecasting method based on the Osprey optimization algorithm according to claim 1, characterized in that, Multi-source historical time-series data should include at least historical load data, meteorological data, and electricity price data.
4. The short-term power load forecasting method based on the Osprey optimization algorithm according to claim 3, characterized in that, Meteorological data should include at least temperature, humidity, and wind speed.
5. A short-term power load forecasting method based on the Osprey optimization algorithm according to claim 4, characterized in that, Constructing a multivariate feature matrix specifically includes: Based on the preprocessed multi-source historical time-series data, historical load sequences, temperature sequences, humidity sequences, wind speed sequences, electricity price sequences, and date type codes are constructed. By combining historical load sequences, temperature sequences, humidity sequences, wind speed sequences, electricity price sequences, and date type codes, a multivariate feature matrix X is obtained: in, Historical load sequence; It is a temperature sequence; It is a humidity sequence; This is a wind speed sequence; Electricity price series; The date type is encoded; n is the time window length of the historical load sequence; t is the current time; m is the time window length of the temperature sequence, humidity sequence, wind speed sequence, and electricity price sequence.
6. A short-term power load forecasting method based on the Osprey optimization algorithm according to claim 1, characterized in that, The Osprey Optimization Algorithm (OOA) is used to optimize the parameters of a combined Temporal Convolutional Network (TCN) and Transformer model. Specifically, this includes: Initialize the OSA (Out-of-Area) parameter combination for the Osprey optimization algorithm. The parameter combination includes the population size, maximum number of iterations, and the dimension of the parameter to be optimized. In each iteration, the combined model of Temporal Convolutional Network (TCN) and Transformer is trained using the parameter combination generated by the OOOA optimization algorithm. The fitness value is calculated using the prediction error of the combined model under the current parameter combination using the validation set. Based on the fitness value, the search position of the parameter combination is updated through the exploration and development phases of the Osprey Optimization Algorithm (OOA) until the maximum number of iterations is reached. The combined model corresponding to the optimal parameter combination is then used as the pre-trained combined prediction model.
7. A short-term power load forecasting system based on the Osprey optimization algorithm, characterized in that, include: The first module is used to acquire multi-source historical time-series data related to power load; The second module is used to preprocess multi-source historical time-series data and construct a multivariate feature matrix; The third module is used to input the multivariate feature matrix into the pre-trained combined prediction model to obtain the power load prediction results for the future preset period. The combined prediction model is obtained by parameter optimization training of the combined model of temporal convolutional network TCN and Transformer based on Osprey optimization algorithm OOA. The combined model is used to extract multi-scale time series features from the multivariate feature matrix through temporal convolutional network TCN, and to establish global dependencies on the extracted multi-scale time series features through Transformer.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the short-term power load forecasting method based on the Osprey optimization algorithm as described in any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the short-term power load forecasting method based on the Osprey optimization algorithm as described in any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the short-term power load forecasting method based on the Osprey optimization algorithm as described in any one of claims 1 to 6.