Short-term power load prediction method based on eagle optimization-TCN-Transformer and related device

By constructing a multi-source data acquisition and processing framework, combining TCN and Transformer models, and optimizing model parameters, the problem of insufficient accuracy of existing power load forecasting methods under multi-dimensional factors is solved, achieving high-precision power load forecasting with significantly improved adaptability and robustness.

CN121840564APending Publication Date: 2026-04-10NORTHWEST BRANCH OF STATE GRID POWER GRID CO +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-06
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing power load forecasting methods are insufficient to fully reflect the complex characteristics of load changes in modern power systems, especially under the influence of multidimensional factors, resulting in insufficient forecasting accuracy and affecting the stable operation of power systems and the reliability of power supply.

Method used

By constructing a multi-source data acquisition and processing framework, and combining TCN and Transformer models, we can achieve the fusion of multi-dimensional information such as meteorology and electricity prices. Furthermore, by optimizing model parameters through the OOA algorithm, we can provide a complete solution from data acquisition to result output.

Benefits of technology

It significantly improves prediction accuracy in special scenarios such as extreme weather and holidays, reduces prediction errors, enhances the adaptability and robustness of the system, and realizes automatic optimization of model parameters and engineering practicality of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121840564A_ABST
    Figure CN121840564A_ABST
Patent Text Reader

Abstract

The invention discloses a short-term power load prediction method based on eagle optimization-TCN-Transform and a related device. The method comprises the following steps: acquiring original data of power load, weather and electricity price; interpolating missing values in the collected original data, and converting the data into an input format suitable for a deep learning model; the method comprises the following steps: processing data, inputting the processed data to a preset OOA-TCN-Transform combined prediction model to obtain a prediction result, the OOA-TCN-Transform combined prediction model comprising a TCN submodule, a Transform submodule and an OOA optimizer, the TCN submodule extracting multi-scale time sequence features of the processed data, the Transform submodule establishing a global dependency relationship among the features, and the OOA optimizer dynamically adjusting model parameters. All links from data acquisition and preprocessing to model training and online prediction are elaborately designed and optimized, and the modular architecture design facilitates deployment and maintenance of the system.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of power load prediction, and particularly relates to a short-term power load prediction method based on fish-eagle optimization-TCN-Transformer and a related device. BACKGROUND

[0002] The load has a vital role. With the rapid development of smart grid technology and the in-depth promotion of power marketization reform, accurate load prediction is not only related to the optimization of power generation planning and the rational allocation of power resources, but also directly affects the economic operation and power supply reliability of the power system. The traditional load prediction method mainly relies on time series analysis of historical load data. This single-dimensional prediction method cannot fully reflect the complex characteristics of load changes in modern power systems. In actual power system operation, power load is affected by multiple factors. Changes in weather conditions directly affect the power consumption behavior of users. For example, the increase in temperature will cause a sharp increase in air conditioning load. The adjustment of electricity price policy will guide users to change their power consumption mode and achieve peak clipping and valley filling. The holiday effect and the fluctuation of economic activity level will also have a significant impact on the load. Therefore, establishing a prediction system that can consider multiple influencing factors is the key to improving prediction accuracy.

[0003] The current research on power load prediction technology mainly focuses on the following directions. Traditional statistical methods such as autoregressive integrated moving average (ARIMA) model and exponential smoothing method, etc. This kind of method is based on strict mathematical assumptions, the model structure is simple and the interpretability is strong, but it performs poorly when dealing with load data with nonlinear characteristics. Machine learning methods include support vector machine (SVM), random forest and gradient boosting tree, etc. These methods can handle some degree of non-linear relationship, but require a lot of feature engineering work, and the generalization ability of the model is limited.

[0004] The application of deep learning methods has brought new breakthroughs to load prediction. Recurrent neural networks such as long short-term memory (LSTM) and gated recurrent unit (GRU) can effectively process time series data, but they are prone to gradient vanishing or explosion problems when facing long sequences, making it difficult to capture super-long-term dependencies. Convolutional neural networks (CNN) reduce the number of parameters through local perception and weight sharing, but standard CNN needs special design when processing time series data. Some recent research has emerged a combination of prediction models, such as CNN-LSTM, TCN-Transformer, etc. These models try to combine the advantages of different architectures, but most researches are still limited to single-variable time series prediction, and fail to fully utilize the complementarity of multi-source information.

[0005] From a system implementation perspective, existing research mostly remains at the algorithm verification stage, lacking complete and systematic solutions. Practical applications require consideration of multiple stages, including real-time data acquisition, preprocessing, model updates, and result visualization, but current technologies often neglect these engineering challenges. Furthermore, model parameter optimization relies heavily on empirical settings or simple grid searches, making it difficult to guarantee finding the global optimum, which to some extent limits the improvement of model performance. Summary of the Invention

[0006] The main objective of this invention is to overcome the shortcomings of existing power load forecasting technologies and provide a short-term power load forecasting method and related apparatus based on Osprey Optimization-TCN-Transformer. This invention achieves effective fusion of multi-dimensional information such as meteorological data, electricity prices, and load by constructing a multi-source data acquisition and processing framework; 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 the OOA algorithm; and provides a complete solution from data acquisition to result output through modular system design, meeting the application requirements of real-time power system dispatching.

[0007] To achieve the above objectives, the present invention adopts the following technical solution: A short-term power load forecasting method based on Osprey optimization-TCN-Transformer includes: Collect raw data on power load, weather, and electricity prices; Imput missing values ​​in the collected raw data and convert the data into an input format suitable for deep learning models; The processed data is input into the preset OOA-TCN-Transformer combined prediction model to obtain the prediction results. The OOA-TCN-Transformer combined prediction model includes a TCN submodule, a Transformer submodule, and an OOA optimizer. The TCN submodule extracts multi-scale temporal features of the processed data, the Transformer submodule establishes global dependencies between features, and the OOA optimizer dynamically adjusts the model parameters.

[0008] A further improvement of this invention lies in the collection of raw data on power load, weather, and electricity prices, including: The system obtains load data from the power grid SCADA system in real time through API interfaces, and also obtains temperature, humidity and wind speed data from meteorological departments and real-time electricity prices from the power trading center.

[0009] A further improvement of this invention lies in imputing missing values ​​in the collected raw data, including: The Isolation Forest algorithm was used to detect outliers, with an outlier score threshold of 0.6. For detected outliers, if there were fewer than 3 consecutive outliers, linear interpolation was used; otherwise, the data was marked as missing and imputed using historical data from the same period.

[0010] A further improvement of this invention is that the preset OOA-TCN-Transformer combined prediction model includes: (1) Construction of feature matrix The feature matrix is ​​constructed as follows: ; in: Historical load sequence, n=48; Temperature sequence, m=12; : Humidity sequence; Wind speed sequence; Electricity price series; Date type encoding; (2) TCN submodule structure Three dilated causal convolutional layers are used, with dilation rates of 1, 2, and 4 respectively. Each layer has 64 convolutional kernels with a kernel size of 3. Gradient propagation is ensured through residual connections and weight normalization. A 128-dimensional temporal feature vector is output. (3) Transformer submodule configuration A two-layer encoder is configured, with each layer containing four attention heads, and the hidden layer dimension is 256. The dependency weights between features are calculated using a multi-head self-attention mechanism, with the following formula:

[0011] Where Q, K, and V are the query matrix, key matrix, and value matrix, respectively. The key vector dimension is used; after passing through a feedforward neural network and residual connections, the global dependency features are output. (4) OOA optimizer settings Initialize the osprey population size N=30, the maximum number of iterations T=100, and the parameter dimension dim=4, including the number of TCN convolutional kernels, the number of Transformer attention heads, the learning rate, and the dropout rate; Define the fitness function as the validation set RMSE:

[0012] in This is the actual load value. This is a predicted value; Global search and local optimization are performed alternately through exploration and development phases: the exploration phase uses a position update formula. During the development phase, a local fine-grained search strategy was adopted, in which... , It is a random number. This is the current optimal solution; (5) Model output layer The feature vector output by the Transformer is mapped to the load prediction values ​​for the next 48 time points through a fully connected layer, and the activation function is ReLU.

[0013] A short-term power load forecasting device based on Osprey Optimized-TCN-Transformer includes: The data acquisition unit collects raw data on power load, weather, and electricity prices. The data processing unit imputes missing values ​​in the collected raw data and converts the data into an input format suitable for deep learning models. The prediction unit inputs the processed data into a preset OOA-TCN-Transformer combined prediction model to obtain the prediction results. The OOA-TCN-Transformer combined prediction model includes a TCN submodule, a Transformer submodule, and an OOA optimizer. The TCN submodule extracts multi-scale temporal features of the processed data, the Transformer submodule establishes global dependencies between features, and the OOA optimizer dynamically adjusts the model parameters.

[0014] An electronic device includes: a processor and a memory coupled to the processor, the memory storing a computer program that, when executed by the processor, implements the steps of the Osprey-Optimized-TCN-Transformer-based short-term power load forecasting method.

[0015] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the short-term power load forecasting method based on Osprey Optimization-TCN-Transformer.

[0016] Compared with the prior art, the present invention has at least the following beneficial technical effects: The short-term power load forecasting method and related device based on Osprey Optimization-TCN-Transformer proposed in this invention have significant advantages and improvements compared to 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 in 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. Attached Figure Description

[0017] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0018] Figure 1 The flowchart shows a short-term power load forecasting method based on Osprey Optimization-TCN-Transformer. Figure 2 Basic flowchart of the Osprey optimization algorithm; Figure 3 This is a schematic diagram of the Transformer model architecture; Figure 4 This is a schematic diagram of the experimental results of an embodiment of the present invention; Figure 5 This is a block diagram of a short-term power load forecasting device based on Osprey Optimization-TCN-Transformer. Detailed Implementation

[0019] In the following description, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments can be modified in various ways without departing from the spirit or scope of the invention. Therefore, the drawings and description are considered to be exemplary in nature and not restrictive.

[0020] In the description of this invention, it should be understood that, when used in this specification and the appended claims, 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.

[0021] 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.

[0022] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0023] The accompanying drawings illustrate various structural schematic diagrams according to embodiments disclosed in this invention. These drawings are not to scale, and some details have been enlarged for clarity, and some details may have been omitted. The shapes of the various regions and layers shown in the drawings, as well as their relative sizes and positional relationships, are merely exemplary and may deviate from reality due to manufacturing tolerances or technical limitations. Furthermore, those skilled in the art can design regions / layers with different shapes, sizes, and relative positions as needed.

[0024] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0025] Example 1 The short-term power load forecasting method based on Osprey Optimization-TCN-Transformer provided by this invention includes: Collect raw data on power load, weather, and electricity prices; Imput missing values ​​in the collected raw data and convert the data into an input format suitable for deep learning models; The processed data is input into the preset OOA-TCN-Transformer combined prediction model to obtain the prediction results. The OOA-TCN-Transformer combined prediction model includes a TCN submodule, a Transformer submodule, and an OOA optimizer. The TCN submodule extracts multi-scale temporal features of the processed data, the Transformer submodule establishes global dependencies between features, and the OOA optimizer dynamically adjusts the model parameters.

[0026] In this embodiment, raw data on power load, weather, and electricity prices are collected, including: The system obtains load data from the power grid SCADA system in real time through API interfaces, and also obtains temperature, humidity and wind speed data from meteorological departments and real-time electricity prices from the power trading center.

[0027] In this embodiment, imputation of missing values ​​in the collected raw data includes: The Isolation Forest algorithm was used to detect outliers, with an outlier score threshold of 0.6. For detected outliers, if there were fewer than 3 consecutive outliers, linear interpolation was used; otherwise, the data was marked as missing and imputed using historical data from the same period.

[0028] In this embodiment, the preset OOA-TCN-Transformer combined prediction model includes: (1) Construction of feature matrix The feature matrix is ​​constructed as follows: ; in: Historical load sequence, n=48; Temperature sequence, m=12; : Humidity sequence; Wind speed sequence; Electricity price series; Date type encoding; (2) TCN submodule structure Three dilated causal convolutional layers are used, with dilation rates of 1, 2, and 4 respectively. Each layer has 64 convolutional kernels with a kernel size of 3. Gradient propagation is ensured through residual connections and weight normalization. A 128-dimensional temporal feature vector is output. (3) Transformer submodule configuration A two-layer encoder is configured, with each layer containing four attention heads, and the hidden layer dimension is 256. The dependency weights between features are calculated using a multi-head self-attention mechanism, with the following formula:

[0029] Where Q, K, and V are the query matrix, key matrix, and value matrix, respectively. The key vector dimension is used; after passing through a feedforward neural network and residual connections, the global dependency features are output. (4) OOA optimizer settings Initialize the osprey population size N=30, the maximum number of iterations T=100, and the parameter dimension dim=4, including the number of TCN convolutional kernels, the number of Transformer attention heads, the learning rate, and the dropout rate; Define the fitness function as the validation set RMSE:

[0030] in This is the actual load value. This is a predicted value; Global search and local optimization are performed alternately through exploration and development phases: the exploration phase uses a position update formula. During the development phase, a local fine-grained search strategy was adopted, in which... , It is a random number. This is the current optimal solution; (5) Model output layer The feature vector output by the Transformer is mapped to the load prediction values ​​for the next 48 time points through a fully connected layer, and the activation function is ReLU.

[0031] Example 2 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 the 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 the 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.

[0032] The specific operation of this invention is as follows: 1. First, the system obtains load data from the power grid SCADA system in real time through the 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. The data acquisition frequency is once every 30 minutes.

[0033] 2. The Isolation Forest algorithm was used to detect outliers, with an outlier score threshold set to 0.6. For detected outliers, if there were fewer than 3 consecutive outliers, linear interpolation was used; otherwise, the data was marked as missing and imputed using historical data from the same period.

[0034] 3. The feature matrix is ​​constructed as follows: ; in: Historical load sequence, n=48; Temperature sequence, m=12; : Humidity sequence; Wind speed sequence; Electricity price series; Date type encoding; 4. Model Training and Optimization 4.1 Initialize OOA algorithm parameters: Osprey population size N = 30, maximum number of iterations T = 100, parameter dimension dim = 4 4.2 TCN-Transformer Model Construction TCN layer extracts multi-scale temporal features Transformer captures the dependencies between features The output layer generates load forecasts for the next 48 time points. 4.3 Iterative optimization process: Exploration Phase: Osprey Search for Optimal Parameter Location Development phase: Local fine-grained search Fitness assessment: Calculate the RMSE on the validation set.

[0035] 5. A sliding window approach is used to update the prediction every 30 minutes to maintain the timeliness of the model.

[0036] Table 1. Measurement point data

[0037] Example 3 To verify the effectiveness of this invention, a comprehensive experimental verification was conducted using actual data from a provincial power grid. The experimental data covered the entire year of 2023, including load data sampled every 30 minutes, synchronized meteorological data, and electricity price data. The dataset was divided using a time-series approach: the first 10 months were used as the training set (approximately 14,400 samples), the 11th month as the validation set (approximately 1,440 samples), and the last month as the test set (approximately 1,440 samples).

[0038] Multiple benchmarks were set up in the experiment to comprehensively evaluate the system performance. The benchmark models included: (1) LSTM model, using only historical load data; (2) TCN model; (3) Transformer model; and (5) the complete system of this invention, including multivariate input and OOA optimization. All models used the same data partitioning and evaluation metrics to ensure the fairness of the comparison. The experimental results are shown in Figure 2 and Figure 3. Figure 4 As shown.

[0039] Table 2 Comparison of Predictive Performance

[0040] Table 1 shows the experimental results, demonstrating that the system proposed in this invention achieves optimal performance across all metrics. On the test set, the system's mean absolute error (MAE) is 76.32 MW, root mean square error (RMSE) is 98.45 MW, mean absolute percentage error (MAPE) is 4.87%, and the coefficient of determination (R²) reaches 0.9956. Compared to 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. Through further analysis... Figure 4 The analysis shows that the predicted values ​​of this 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 predictions under extreme conditions.

[0041] Example 4 like Figure 5 As shown, the short-term power load forecasting device based on Osprey Optimization-TCN-Transformer includes: The data acquisition unit collects raw data on power load, weather, and electricity prices. The data processing unit imputes missing values ​​in the collected raw data and converts the data into an input format suitable for deep learning models. The prediction unit inputs the processed data into a preset OOA-TCN-Transformer combined prediction model to obtain the prediction results. The OOA-TCN-Transformer combined prediction model includes a TCN submodule, a Transformer submodule, and an OOA optimizer. The TCN submodule extracts multi-scale temporal features of the processed data, the Transformer submodule establishes global dependencies between features, and the OOA optimizer dynamically adjusts the model parameters.

[0042] In the data acquisition unit of this embodiment, raw data on power load, weather, and electricity price are collected, including: The system obtains load data from the power grid SCADA system in real time through API interfaces, and also obtains temperature, humidity and wind speed data from meteorological departments and real-time electricity prices from the power trading center.

[0043] In the data processing unit of this embodiment, imputing missing values ​​in the collected raw data includes: The Isolation Forest algorithm was used to detect outliers, with an outlier score threshold of 0.6. For detected outliers, if there were fewer than 3 consecutive outliers, linear interpolation was used; otherwise, the data was marked as missing and imputed using historical data from the same period.

[0044] In the prediction unit of this embodiment, the preset OOA-TCN-Transformer combined prediction model includes: (1) Construction of feature matrix The feature matrix is ​​constructed as follows: ; in: Historical load sequence, n=48; Temperature sequence, m=12; : Humidity sequence; Wind speed sequence; Electricity price series; Date type encoding; (2) TCN submodule structure Three dilated causal convolutional layers are used, with dilation rates of 1, 2, and 4 respectively. Each layer has 64 convolutional kernels with a kernel size of 3. Gradient propagation is ensured through residual connections and weight normalization. A 128-dimensional temporal feature vector is output. (3) Transformer submodule configuration A two-layer encoder is configured, with each layer containing four attention heads, and the hidden layer dimension is 256. The dependency weights between features are calculated using a multi-head self-attention mechanism, with the following formula:

[0045] Where Q, K, and V are the query matrix, key matrix, and value matrix, respectively. The key vector dimension is used; after passing through a feedforward neural network and residual connections, the global dependency features are output. (4) OOA optimizer settings Initialize the osprey population size N=30, the maximum number of iterations T=100, and the parameter dimension dim=4, including the number of TCN convolutional kernels, the number of Transformer attention heads, the learning rate, and the dropout rate; Define the fitness function as the validation set RMSE:

[0046] in This is the actual load value. This is a predicted value; Global search and local optimization are performed alternately through exploration and development phases: the exploration phase uses a position update formula. During the development phase, a local fine-grained search strategy was adopted, in which... , It is a random number. This is the current optimal solution; (5) Model output layer The feature vector output by the Transformer is mapped to the load prediction values ​​for the next 48 time points through a fully connected layer, and the activation function is ReLU.

[0047] Example 5 An electronic device in this embodiment includes a processor and a memory coupled to the processor. The memory stores a computer program that, when executed by the processor, implements the steps of the short-term power load forecasting method based on Osprey Optimization-TCN-Transformer.

[0048] The electronic device may also include one or more of a multimedia component, an input / output (I / O) interface, and a communication component.

[0049] The processor controls the overall operation of the electronic device to complete all or part of the steps in the storage medium sharing method. The memory stores various types of data to support the operation of the electronic device. This data may include, for example, instructions for any application or method operating on the electronic device, and application-related data such as contact data, sent and received messages, pictures, audio, video, etc. The memory can be implemented using any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. Multimedia components may include a screen and audio components. The screen may be, for example, a touchscreen, and the audio components are used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may be further stored in memory or transmitted via a communication component. The audio component also includes at least one speaker for outputting audio signals. The I / O interface provides an interface between the processor and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual or physical. The communication component is used for wired or wireless communication between the electronic device and other devices. Wireless communication includes Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, or 4G, or a combination thereof; therefore, the corresponding communication component may include a Wi-Fi module, a Bluetooth module, or an NFC module.

[0050] In an exemplary embodiment, the electronic device may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing a storage medium sharing method.

[0051] Example 6 In this embodiment, a computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the short-term power load forecasting method based on Osprey Optimization-TCN-Transformer.

[0052] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application 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, optical storage, etc.) containing computer-usable program code.

[0053] This application is described with reference to flowchart illustrations and / or block diagrams of methods, systems, and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and 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 or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A system that specifies functions in one or more boxes.

[0054] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer 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.

[0055] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer 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.

[0056] The key technical points and the scope of protection of this invention are as follows: First, the multi-dimensional time-series feature fusion mechanism is the fundamental innovation of this invention. This invention not only considers historical load sequences but also integrates multi-dimensional information such as temperature, humidity, wind speed, rainfall, electricity price, weekday markings, 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.

[0057] Secondly, the core innovation of this invention lies in the organic integration of the OOA-TCN-Transformer three-layer architecture. TCN extracts features at different time scales through multi-scale dilated convolution, Transformer establishes global dependencies between features through self-attention, and OOA optimizes model parameters through intelligent search. These three components each perform their respective functions while cooperating with each other, forming a highly efficient prediction method.

[0058] Third, the combination of multi-scale feature extraction and global dependency modeling enhances the model's expressive power. TCN's dilated convolution covers long-term series with fewer parameters, while 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] Based on the above technical points, the scope of protection of this invention includes: a power load forecasting method using an OOA-TCN-Transformer architecture; a load forecasting method based on multivariate time-series feature fusion; a deep learning model parameter optimization method based on OOA; a system architecture that supports real-time forecasting and adaptive updates; and equivalent alternatives and improvements to the above technical solutions.

[0060] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered illustrative and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the scope of the invention. No reference numerals in the claims should be construed as limiting the scope of the claims.

[0061] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can be appropriately combined to form other embodiments that can be understood by those skilled in the art. The above content is only for illustrating the technical concept of the present invention and should not be construed as limiting the scope of protection of the present invention. Any modifications made based on the technical concept proposed in this invention shall fall within the scope of protection of the claims of this invention.

Claims

1. A short-term power load forecasting method based on Osprey Optimization-TCN-Transformer, characterized in that, include: Collect raw data on power load, weather, and electricity prices; Imput missing values ​​in the collected raw data and convert the data into an input format suitable for deep learning models; The processed data is input into the preset OOA-TCN-Transformer combined prediction model to obtain the prediction results. The OOA-TCN-Transformer combined prediction model includes a TCN submodule, a Transformer submodule, and an OOA optimizer. The TCN submodule extracts multi-scale temporal features of the processed data, the Transformer submodule establishes global dependencies between features, and the OOA optimizer dynamically adjusts the model parameters.

2. The short-term power load forecasting method based on Osprey Optimization-TCN-Transformer as described in claim 1, characterized in that, Collect raw data on power load, weather, and electricity prices, including: The system obtains load data from the power grid SCADA system in real time through API interfaces, and also obtains temperature, humidity and wind speed data from meteorological departments and real-time electricity prices from the power trading center.

3. The short-term power load forecasting method based on Osprey Optimization-TCN-Transformer as described in claim 1, characterized in that, Imputing missing values ​​in the collected raw data includes: The Isolation Forest algorithm was used to detect outliers, with an outlier score threshold of 0.

6. For detected outliers, if there were fewer than 3 consecutive outliers, linear interpolation was used; otherwise, the data was marked as missing and imputed using historical data from the same period.

4. The short-term power load forecasting method based on Osprey Optimization-TCN-Transformer as described in claim 1, characterized in that, The pre-defined OOA-TCN-Transformer combined prediction model includes: (1) Construction of feature matrix The feature matrix is ​​constructed as follows: ; in: Historical load sequence, n=48; Temperature sequence, m=12; Humidity hierarchy; Wind speed sequence; Electricity price series; Date type encoding; (2) TCN submodule structure Three dilated causal convolutional layers are used, with dilation rates of 1, 2, and 4 respectively. Each layer has 64 convolutional kernels with a kernel size of 3. Gradient propagation is ensured through residual connections and weight normalization. A 128-dimensional temporal feature vector is output. (3) Transformer submodule configuration A two-layer encoder is configured, with each layer containing four attention heads, and the hidden layer dimension is 256. The dependency weights between features are calculated using a multi-head self-attention mechanism, with the following formula: Where Q, K, and V are the query matrix, key matrix, and value matrix, respectively. The key vector dimension is used; after passing through a feedforward neural network and residual connections, the global dependency features are output. (4) OOA optimizer settings Initialize the osprey population size N=30, the maximum number of iterations T=100, and the parameter dimension dim=4, including the number of TCN convolutional kernels, the number of Transformer attention heads, the learning rate, and the dropout rate; Define the fitness function as the validation set RMSE: in This is the actual load value. This is a predicted value; Global search and local optimization are performed alternately through exploration and development phases: the exploration phase uses a position update formula. During the development phase, a local fine-grained search strategy was adopted, in which... , It is a random number. This is the current optimal solution; (5) Model output layer The feature vector output by the Transformer is mapped to the load prediction values ​​for the next 48 time points through a fully connected layer, and the activation function is ReLU.

5. A short-term power load forecasting device based on Osprey Optimization-TCN-Transformer, characterized in that, include: The data acquisition unit collects raw data on power load, weather, and electricity prices. The data processing unit imputes missing values ​​in the collected raw data and converts the data into an input format suitable for deep learning models. The prediction unit inputs the processed data into a preset OOA-TCN-Transformer combined prediction model to obtain the prediction results. The OOA-TCN-Transformer combined prediction model includes a TCN submodule, a Transformer submodule, and an OOA optimizer. The TCN submodule extracts multi-scale temporal features of the processed data, the Transformer submodule establishes global dependencies between features, and the OOA optimizer dynamically adjusts the model parameters.

6. The short-term power load forecasting device based on Osprey Optimization-TCN-Transformer according to claim 5, characterized in that, The data acquisition unit collects raw data on power load, weather, and electricity prices, including: The system obtains load data from the power grid SCADA system in real time through API interfaces, and also obtains temperature, humidity and wind speed data from meteorological departments and real-time electricity prices from the power trading center.

7. The short-term power load forecasting device based on Osprey Optimization-TCN-Transformer according to claim 5, characterized in that, In the data processing unit, missing values ​​in the collected raw data are imputed, including: The Isolation Forest algorithm was used to detect outliers, with an outlier score threshold of 0.

6. For detected outliers, if there were fewer than 3 consecutive outliers, linear interpolation was used; otherwise, the data was marked as missing and imputed using historical data from the same period.

8. The short-term power load forecasting device based on Osprey Optimization-TCN-Transformer according to claim 5, characterized in that, The prediction unit includes a pre-defined OOA-TCN-Transformer combined prediction model, comprising: (1) Construction of feature matrix The feature matrix is ​​constructed as follows: ; in: Historical load sequence, n=48; Temperature sequence, m=12; : humidity sequence; Wind speed sequence; Electricity price series; Date type encoding; (2) TCN submodule structure Three dilated causal convolutional layers are used, with dilation rates of 1, 2, and 4 respectively. Each layer has 64 convolutional kernels with a kernel size of 3. Gradient propagation is ensured through residual connections and weight normalization. A 128-dimensional temporal feature vector is output. (3) Transformer submodule configuration A two-layer encoder is configured, with each layer containing four attention heads, and the hidden layer dimension is 256. The dependency weights between features are calculated using a multi-head self-attention mechanism, with the following formula: Where Q, K, and V are the query matrix, key matrix, and value matrix, respectively. The key vector dimension is used; after passing through a feedforward neural network and residual connections, the global dependency features are output. (4) OOA optimizer settings Initialize the osprey population size N=30, the maximum number of iterations T=100, and the parameter dimension dim=4, including the number of TCN convolutional kernels, the number of Transformer attention heads, the learning rate, and the dropout rate; Define the fitness function as the validation set RMSE: in This is the actual load value. This is a predicted value; Global search and local optimization are performed alternately through exploration and development phases: the exploration phase uses a position update formula. During the development phase, a local fine-grained search strategy was adopted, in which... , It is a random number. This is the current optimal solution; (5) Model output layer The feature vector output by the Transformer is mapped to the load prediction values ​​for the next 48 time points through a fully connected layer, and the activation function is ReLU.

9. An electronic device, characterized in that, include: A processor and a memory coupled to the processor, the memory storing a computer program that, when executed by the processor, implements the steps of the short-term power load forecasting method based on Osprey Optimization-TCN-Transformer as described in any one of claims 1-4.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the short-term power load forecasting method based on Osprey Optimization-TCN-Transformer as described in any one of claims 1-4.