Short-term load prediction method based on Crossform and high-resolution meteorological data
By combining the Crossformer framework with high-resolution meteorological data, the bottlenecks of traditional load forecasting models in multi-source data fusion and long-term dependency modeling have been solved, achieving high-precision short-term load forecasting and improving the accuracy of load forecasting for the next three days.
Patent Information
- Application Number
- CN202511088844.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-05
- Publication Date
- 2025-11-18
AI Technical Summary
Traditional load forecasting models fail to fully utilize high spatiotemporal resolution features and have bottlenecks in multi-source data fusion and long-term dependency modeling, resulting in insufficient accuracy of forecast results. In particular, the ability to model long-distance dependencies exceeding 48 hours is significantly reduced, and the generalization ability of linear models is weak.
The Crossformer framework is used in conjunction with high-resolution meteorological data. Through the DSW embedding layer and TSA layer, the spatiotemporal characteristics of load and meteorological data are captured. The information coefficient is used to evaluate the correlation and screen effective features. Finally, a hierarchical encoder-decoder is used for prediction.
It improves the accuracy and reliability of short-term load forecasting, solves the problem of integrating multi-source data at both temporal and spatial scales, and enhances the accuracy of load forecasting for the next three days.
Smart Images

Figure CN120978728A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of short-term load forecasting, more particularly to a short-term load forecasting method based on Crossformer and high-resolution meteorological data. BACKGROUND
[0002] The energy power system is undergoing a deep transformation from "source following load" to "source-load interaction". As a key link connecting power production and consumption, the strategic value of load forecasting is increasingly prominent. As a core part of the digital transformation of the energy system, load forecasting can accurately predict future power demand by mining the potential laws of historical electricity consumption data, meteorological information, social and economic factors, and other multi-dimensional data, not only providing data support for power market transactions and power grid dispatching optimization, but also an important technical means to promote renewable energy consumption and improve energy utilization efficiency.
[0003] Traditional load forecasting models generally only integrate single or a few meteorological factors such as temperature and humidity, and do not fully utilize high temporal and spatial resolution features. Traditional time series models are limited by gradient vanishing and memory capacity, and their modeling ability for long-distance dependence beyond 48 hours is significantly reduced, with local minima and slow speed. They have certain volatility, and the accuracy of the prediction results needs to be improved. In addition, linear models generally lack sufficient expression ability, and single models have weak generalization ability.
[0004] Therefore, how to break through the bottleneck of traditional prediction models in multi-source data fusion and long-period dependence modeling, provide high-precision and high-reliability future three-day load forecasting services for power companies, and help build a flexible and efficient, low-carbon and intelligent modern energy system, is a problem that needs to be solved by those skilled in the art. SUMMARY
[0005] In view of the above problems, the present application provides a short-term load forecasting method based on Crossformer and high-resolution meteorological data to at least solve some of the technical problems mentioned in the background.
[0006] In order to achieve the above purpose, the present application adopts the following technical solutions:
[0007] The present application provides a short-term load forecasting method based on Crossformer and high-resolution meteorological data, comprising the following steps:
[0008] S1, obtaining meteorological forecast data and historical load data of a target area, and preprocessing;
[0009] S2, performing feature analysis on the preprocessed meteorological forecast data and historical load data, respectively, to obtain corresponding derived meteorological features and derived load features;
[0010] S3. Use the information coefficient to evaluate the correlation between each derived feature and the load in the future preset time period; select effective derived features based on the correlation.
[0011] S4. Input the effective derived features into the trained load prediction model and output the load data for the future preset time period.
[0012] Further, in S1, the preprocessing specifically includes:
[0013] (1) Preprocessing the meteorological forecast data, specifically including:
[0014] Based on a time resolution of 1 hour and a spatial resolution of 9 km, load-related meteorological factors were selected from the meteorological forecast data.
[0015] For each user's latitude and longitude location, extract the adjacent 3×3 grid point data from the load-related meteorological factors;
[0016] Interpolate the extracted 3×3 grid meteorological data in the time dimension to improve its resolution from 1 hour to 15 minutes;
[0017] (2) Preprocessing the historical load data, specifically including:
[0018] Load data with a time resolution of 15 minutes were selected from the historical load data;
[0019] For each selected load data point, its multi-order historical load values are extracted as lag feature variables to construct multi-order lag features.
[0020] Further, step S2 specifically includes:
[0021] Based on temperature and rainfall indices, derived meteorological characteristics are obtained from the preprocessed meteorological forecast data.
[0022] Based on the preprocessed historical load data, derived load characteristics are obtained using a time window.
[0023] Furthermore, the process of obtaining derived meteorological characteristics based on temperature and rainfall indicators from the preprocessed meteorological forecast data specifically includes:
[0024] Calculate the temperature difference between the target day and the previous day; if the temperature difference is greater than the preset temperature difference range, mark the target day as warming; if the temperature difference is less than the preset temperature difference range, mark the target day as cooling; if the temperature difference is equal to the preset temperature difference range, mark the target day as unchanged.
[0025] Obtain the average daily precipitation for the target day; if the average daily precipitation exceeds the preset precipitation, mark the target day as rainy, otherwise mark it as sunny.
[0026] Furthermore, the step of obtaining derived load characteristics based on a time window for the preprocessed historical load data specifically includes:
[0027] Within a preset sliding window, the statistics of historical load data are calculated to capture the behavioral changes of the time series at different time periods.
[0028] Perform Fourier transform on historical load data to extract frequency domain periodic features;
[0029] Calculate the first difference or seasonal difference for historical load data to eliminate trends and seasonality;
[0030] Extract timestamp information from historical load data;
[0031] Calculate the variance and range of historical load data within a preset sliding window to characterize the volatility of the sequence.
[0032] Further, in S3, the correlation is represented as:
[0033]
[0034] Where ρ represents the correlation coefficient; x represents the derived feature; y represents the mean of the derived features; y represents the load over a predetermined future time period. This represents the average load over a predetermined future time period.
[0035] Furthermore, the load prediction model is based on the Crossformer framework, specifically including a DSW embedding layer and a hierarchical encoder and a hierarchical decoder;
[0036] In the DSW embedding layer, the input effective derived features are divided into multiple segments, and each segment is converted into an embedding vector, while position encoding is added to the embedding vector;
[0037] In each encoder layer, a TSA layer is introduced to extract features from the output of the DSW embedding layer from both temporal and spatial dimensions, thereby obtaining spatiotemporal features.
[0038] Each decoder layer receives the output of all layers of the encoder, fuses spatiotemporal features through the TSA layer and multi-head attention mechanism, and gradually generates prediction results.
[0039] The outputs of each layer of the decoder are linearly projected and then superimposed to form the final load prediction value.
[0040] Furthermore, in the DSW embedding layer:
[0041] The effective derived features of the input are divided into multiple segments, and each segment is converted into an embedding vector, represented as follows:
[0042]
[0043] Where T represents the total length of the effective derived features of the input; s represents the number of segments after segmenting the effective derived features; L seq D represents the length of each segment; D represents the number of valid derived features. X represents the embedding vector of the d-th effective derived feature in the i-th segment; 1:T This represents the set of variables after the effective derived features have been processed by the DSW embedding layer, containing the embedding vectors of all effective derived features for all segments;
[0044] The addition of positional encoding to the embedding vector is represented as follows:
[0045]
[0046] in, This represents the positional encoding function; z i,d Indicates the embedding vector Add position encoding function The new vector generated afterward; Z represents the set of variables after adding the positional encoding function; s represents the total number of segments; d model This indicates the model configuration parameters.
[0047] Furthermore, the TSA layer includes a temporal attention phase and a spatial attention phase;
[0048] The temporal attention phase is represented as follows:
[0049]
[0050] in, This represents a column of results after time attention; LayerNorm represents the layer normalization function; Z :,d Z represents all data in the d-th effective derived feature; MSA(·) represents the multi-head attention function; D represents the number of effective derived features; Z time This represents the result after applying temporal attention to all columns; MLP stands for Multilayer Feedforward Network.
[0051] The spatial attention phase is represented as follows:
[0052]
[0053] Among them, B i,:Represents the output of the spatial attention stage; R i,: This indicates the router is configured to be connected to... Equal random number matrices; This represents the first layer of multi-head attention function; L represents the second-layer multi-head attention function; seq Z represents the length of each segment. dim This represents the spatiotemporal features obtained through the TSA layer; The z variable represents a time interval that is empty; The z-variable represents spatial latitude; In Z time The result of a variable after undergoing multi-head attention, i.e., the intermediate computation result; express The result after one layer of normalization.
[0054] Furthermore, the load forecasting model is evaluated using the mean absolute percentage error, expressed as:
[0055]
[0056] acc = 1 - MAPE
[0057] Where MAPE represents the mean absolute percentage error; n represents the total number of predicted and true values; k represents the k-th input; y true Represents the true value; y pred This represents the predicted value; acc is the model evaluation metric.
[0058] As can be seen from the above technical solution, compared with the prior art, the present invention discloses a short-term load forecasting method based on Crossformer and high-resolution meteorological data, which has the following beneficial effects:
[0059] This invention solves the problem of fusion of multi-source data in terms of time granularity and spatial scale by embedding meteorological forecast data and historical load data in a unified manner.
[0060] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0061] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0062] Figure 1 This is a schematic diagram of the short-term load forecasting method based on Crossformer and high-resolution meteorological data provided in an embodiment of the present invention.
[0063] Figure 2 This is a schematic diagram of time series prediction provided for an embodiment of the present invention.
[0064] Figure 3 This is a schematic diagram illustrating the model evaluation and comparison provided in an embodiment of the present invention. Detailed Implementation
[0065] 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, and 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.
[0066] This invention discloses a short-term load forecasting method based on Crossformer and high-resolution meteorological data, comprising the following steps:
[0067] S1. Obtain meteorological forecast data and historical load data for the target area, and perform preprocessing;
[0068] S2. Perform feature analysis on the preprocessed meteorological forecast data and historical load data to obtain the corresponding derived meteorological features and derived load features.
[0069] S3. Use the information coefficient to evaluate the correlation between each derived feature and the load in the future preset time period; select effective derived features based on the correlation.
[0070] S4. Input the effective derived features into the trained load prediction model and output the load data for the future preset time period.
[0071] Next, each of the above steps will be explained in detail.
[0072] In step S1 above, meteorological forecast data and historical load data for the target area are acquired and preprocessed; wherein:
[0073] (1) Preprocessing of meteorological forecast data, specifically including:
[0074] Based on a time resolution of 1 hour and a spatial resolution of 9 km, load-related meteorological factors, such as temperature, humidity, air pressure, rainfall, and wind speed, are screened from meteorological forecast data.
[0075] For each user's latitude and longitude location, extract the adjacent 3×3 grid point data from load-related meteorological factors;
[0076] Interpolation of the extracted 3×3 grid meteorological data in the time dimension was performed to improve its resolution from 1 hour to 15 minutes.
[0077] (2) Preprocessing historical load data, specifically including:
[0078] Load data with a time resolution of 15 minutes were filtered from historical load data;
[0079] For each selected load data point, its multi-order historical load values are extracted as lagged feature variables to construct multi-order lagged features, thereby enriching the load feature data and revealing the autocorrelation properties of the series.
[0080] In step S2 above, feature analysis is performed on the preprocessed meteorological forecast data and historical load data to obtain corresponding derived meteorological features and derived load features; specifically including:
[0081] (1) Based on the preprocessed meteorological forecast data, derived meteorological characteristics are obtained from temperature and precipitation indices; specifically:
[0082] 1) Calculate the temperature difference between the target day and the previous day; if the temperature difference is greater than the preset temperature difference range, mark the target day as "warming"; if the temperature difference is less than the preset temperature difference range, mark the target day as "cooling"; if the temperature difference is equal to the preset temperature difference range, mark the target day as "unchanged"; for example, if the temperature difference range is set to -1 to 1℃, when the temperature difference is higher than 1℃, mark the day as "warming"; when the temperature difference is lower than -1℃, mark the day as "cooling"; and mark the remaining days as "unchanged".
[0083] 2) Obtain the average daily precipitation for the target day; if the average daily precipitation exceeds the preset precipitation (e.g., 20mm / h*100), mark the target day as rainy, otherwise mark it as sunny.
[0084] (2) Based on the time window, the derived load characteristics are obtained for the preprocessed historical load data.
[0085] 1) Within a preset sliding window, calculate the statistics of historical load data, such as mean, median, standard deviation, minimum and maximum values, to capture the behavioral changes of the time series at different time periods;
[0086] 2) Perform Fourier transform on historical load data to extract frequency domain periodic features;
[0087] 3) Calculate the first-order difference or seasonal difference for historical load data to eliminate trends and seasonality;
[0088] 4) Extract timestamp information from historical load data;
[0089] 5) Calculate the variance and range of historical load data within the preset sliding window to characterize the volatility of the sequence.
[0090] In step S3 above, in quantitative investment, the IC (Information Capacity) of a factor is an important indicator for measuring factor effectiveness. The IC measures the correlation between the factor value and its loading; a higher IC value indicates a better predictive effect of the factor on future returns. This is applied to the relationship between the aforementioned features and loadings to test the effectiveness of the feature factors.
[0091] Therefore, in this embodiment of the invention, information coefficients are used to evaluate the correlation between each derived feature (i.e., derived meteorological feature or derived load feature) and the load over a future preset time period; effective derived features are selected based on the correlation; the effective derived features include effective derived meteorological features and effective derived load features;
[0092] The above correlation is expressed as:
[0093]
[0094] Where ρ represents the correlation coefficient; x represents the derived feature; y represents the mean of the derived features; y represents the load over a predetermined future time period. This represents the average load over a predetermined future time period.
[0095] In step S4 above, the effective derived features are input into the trained load prediction model, and the load data for the future preset time period is output.
[0096] The aforementioned load forecasting model is based on the Crossformer framework, an improved Transformer architecture specifically designed for processing long time series. Crossformer establishes a hierarchical encoder-decoder structure, using information at different scales and cross-dimensional dependencies for multivariate time series forecasting. By introducing Dimension-Segment-Wise (DSW) embedding and a Two-Stage Attention (TSA) layer, it effectively captures the complex dependencies between the temporal and spatial dimensions (load and meteorological variables) of load and meteorological data, thereby significantly improving forecasting performance.
[0097] The Crossformer framework includes a DSW embedding layer and hierarchical encoders and decoders; wherein:
[0098] (1) DSW embedding layer:
[0099] A patch segmentation strategy is adopted to divide the input effective derived features (effective derived meteorological features and effective derived load features) into multiple segments, and each segment is transformed into an embedding vector; represented as:
[0100]
[0101] Where T represents the total length of the effective derived features of the input; s represents the number of segments after segmenting the effective derived features; L seq D represents the length of each segment; D represents the number of valid derived features. X represents the embedding vector of the d-th effective derived feature in the i-th segment; 1:T This represents the set of variables after the effective derived features have been processed by the DSW embedding layer, containing the embedding vectors of all effective derived features for all segments;
[0102] Adding positional encoding to the embedding vector enables the load forecasting model to recognize the order of elements in the input load and meteorological data, as shown below:
[0103]
[0104]
[0105] in, This represents the positional encoding function; z i,d Indicates the embedding vector Add position encoding function The new vector generated afterward; Z represents the set of variables after adding the positional encoding function; s represents the total number of segments; for example, pos = 10; d model This represents the model configuration parameters, typically 256 or 518; d model Indicates model configuration parameters;
[0106] The output of this DSW embedding layer retains time and dimensional information, providing data for the subsequent TSA layer;
[0107] (2) Layered encoder-decoder:
[0108] The hierarchical encoder-decoder structure is widely used in multivariate time series prediction tasks. It can make predictions by utilizing information from different levels, merging adjacent vectors, capturing dependencies at different scales, and finally generating prediction results through the decoder.
[0109] 1) Layered encoder:
[0110] In addition to the first layer, each layer of the encoder merges two adjacent vectors in the time domain to obtain a coarser level of representation. Then, a TSA layer is applied to capture this scale dependency; specifically, in each encoder layer, a TSA layer is introduced to extract features from the output of the DSW embedding layer in both the time and spatial dimensions to obtain spatiotemporal features.
[0111] The TSA layer includes a temporal attention phase and a spatial attention phase; where:
[0112] In the temporal attention phase, attention is performed along the time dimension. The time series of each variable is converted into a patch, which is then input into the Transformer. The output is the representation of each variable and each patch after self-attention. The temporal attention phase is represented as follows:
[0113]
[0114] in,; This represents a column of results after time attention; LayerNorm represents the layer normalization function; Z :,d This represents all data in the d-th effective derived feature, such as temperature data; MSA(·) represents the multi-head attention function; D represents the number of effective derived features; Z time This represents the result after applying temporal attention to all columns; MLP stands for Multilayer Feedforward Network.
[0115] In the spatial attention phase, attention is performed between multiple variables (e.g., temperature and load, or rainfall and temperature). The encodings of different variables in the input load and meteorological data at various time steps are aligned. The relationships between pairs of time steps are sought to deeply characterize the influence of one variable on another. The spatial attention phase is represented as follows:
[0116]
[0117] Among them, B i,: Represents the output of the spatial attention stage; R i,: This indicates the router is configured to be connected to... An equal random number matrix, with a constant number of routers, of which 10 can be selected; This represents the first layer of multi-head attention function; L represents the second-layer multi-head attention function; seq Z represents the length of each segment. dim This represents the spatiotemporal features obtained through the TSA layer; The z variable represents a time interval that is empty; The z-variable represents spatial latitude; In Z time The result of a variable after undergoing multi-head attention, i.e., the intermediate computation result; express The result after one layer of normalization.
[0118] The results of changes in the time dimension and the spatial dimension are added together and then processed through a layer normalization function to control the data range of the input load and meteorological variables, as shown below:
[0119] Y = Z dim =TSA(Z)
[0120] Where Z represents the input variable as Y, and the output result obtained after time and space dimension changes is represented by TSA.
[0121] 2) Layered decoder
[0122] Each decoder layer receives N+1 feature arrays from the encoder output and uses N+1 layers (indexed from 0 to N) for prediction. TSA layers and multi-head self-attention (MSA) are also used during decoding to establish connections between the encoder and decoder; the outputs of each decoder layer are linearly projected and then superimposed to form the final load prediction.
[0123] In this embodiment of the invention, during the training process, the load forecasting model combines the aforementioned time features, load features, and meteorological features according to their temporal correspondence to form a complete dataset, which is then divided into a training set, a validation set, and a test set according to a certain ratio (e.g., 7:2:1). The training set is used for model training, the validation set is used to adjust the model's hyperparameters, and the test set is used to evaluate the model's performance; the data organization is as follows: Figure 2 As shown.
[0124] (1) The input and output parameters are designed as follows:
[0125] Sequence length per batch (seq_len): 30 * 96 (30 days of data)
[0126] Length of each batch of sequences (pred_len): 3 * 96 (3 days of data)
[0127] Step length: 96
[0128] batch_size: [16, 32, 64]
[0129] A dataset was created that uses historical load and meteorological data from the previous month to infer the data for the next three days, and then incorporated into the Crossformer model for load forecasting model learning.
[0130] (2) Model Evaluation
[0131] The load forecasting model is evaluated using the Mean Absolute Percentage Error (MAPE), as shown in the following formula:
[0132]
[0133] acc = 1 - MAPE
[0134] Where MAPE represents the mean absolute percentage error; n represents the total number of predicted and true values; k represents the k-th input; y true Represents the true value; y pred This represents the predicted value; acc is the model evaluation metric.
[0135] By comparing the evaluation metrics of conventional algorithms and the Crossformer model, such as... Figure 3 As shown, the crossformer model has better prediction results on day D+3.
[0136] In summary, this invention provides a short-term load forecasting method based on CrossFormer and high-resolution meteorological data. By uniformly embedding grid coordinates, timestamps, and load sequences, it solves the problem of fusing multi-source data at different temporal granularities (e.g., hourly) and spatial scales (e.g., from regional grids to user nodes). Through the superior network architecture of CrossFormer, it can capture long-distance dependencies in the data. By validating the factors, it selects factors that are effective for the model, thereby reducing the use of training computing resources and improving the accuracy of the model.
[0137] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0138] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A short-term load forecasting method based on Crossformer and high-resolution meteorological data, characterized in that, Includes the following steps: S1. Obtain meteorological forecast data and historical load data for the target area, and perform preprocessing; S2. Perform feature analysis on the preprocessed meteorological forecast data and historical load data to obtain the corresponding derived meteorological features and derived load features. S3. Use information coefficients to evaluate the correlation between each derived feature and the load over a future preset time period; Valid derived features are selected based on correlation. S4. Input the effective derived features into the trained load prediction model and output the load data for the future preset time period.
2. The short-term load forecasting method based on Crossformer and high-resolution meteorological data according to claim 1, characterized in that, In S1, the preprocessing specifically includes: (1) Preprocessing the meteorological forecast data, specifically including: Based on a time resolution of 1 hour and a spatial resolution of 9 km, load-related meteorological factors were selected from the meteorological forecast data. For each user's latitude and longitude location, extract the adjacent 3×3 grid point data from the load-related meteorological factors; Interpolate the extracted 3×3 grid meteorological data in the time dimension to improve its resolution from 1 hour to 15 minutes; (2) Preprocessing the historical load data, specifically including: Load data with a time resolution of 15 minutes were selected from the historical load data; For each selected load data point, its multi-order historical load values are extracted as lag feature variables to construct multi-order lag features.
3. The short-term load forecasting method based on Crossformer and high-resolution meteorological data according to claim 1, characterized in that, Step S2 specifically includes: Based on temperature and rainfall indices, derived meteorological characteristics are obtained from the preprocessed meteorological forecast data. Based on the preprocessed historical load data, derived load characteristics are obtained using a time window.
4. The short-term load forecasting method based on Crossformer and high-resolution meteorological data according to claim 3, characterized in that, The process involves obtaining derived meteorological characteristics from the preprocessed meteorological forecast data based on temperature and precipitation indices; specifically including: Calculate the temperature difference between the target day and the previous day; if the temperature difference is greater than the preset temperature difference range, mark the target day as warming; if the temperature difference is less than the preset temperature difference range, mark the target day as cooling; if the temperature difference is equal to the preset temperature difference range, mark the target day as unchanged. Obtain the average daily precipitation for the target day; if the average daily precipitation exceeds the preset precipitation, mark the target day as rainy, otherwise mark it as sunny.
5. The short-term load forecasting method based on Crossformer and high-resolution meteorological data according to claim 3, characterized in that, The process of obtaining derived load characteristics based on a time window from preprocessed historical load data includes: Within a preset sliding window, the statistics of historical load data are calculated to capture the behavioral changes of the time series at different time periods. Perform Fourier transform on historical load data to extract frequency domain periodic features; Calculate the first difference or seasonal difference for historical load data to eliminate trends and seasonality; Extract timestamp information from historical load data; Calculate the variance and range of historical load data within a preset sliding window to characterize the volatility of the sequence.
6. The short-term load forecasting method based on Crossformer and high-resolution meteorological data according to claim 1, characterized in that, In S3, the correlation is represented as: Where ρ represents the correlation coefficient; x represents the derived feature; y represents the mean of the derived features; y represents the load over a predetermined future time period. This represents the average load over a predetermined future time period.
7. The short-term load forecasting method based on Crossformer and high-resolution meteorological data according to claim 1, characterized in that, The load prediction model is based on the Crossformer framework and specifically includes a DSW embedding layer, a hierarchical encoder, and a hierarchical decoder. In the DSW embedding layer, the input effective derived features are divided into multiple segments, and each segment is converted into an embedding vector, while position encoding is added to the embedding vector; In each encoder layer, a TSA layer is introduced to extract features from the output of the DSW embedding layer from both temporal and spatial dimensions, thereby obtaining spatiotemporal features. Each decoder layer receives the output of all layers of the encoder, fuses spatiotemporal features through the TSA layer and multi-head attention mechanism, and gradually generates prediction results. The outputs of each layer of the decoder are linearly projected and then superimposed to form the final load prediction value.
8. A short-term load forecasting method based on Crossformer and high-resolution meteorological data according to claim 7, characterized in that, In the DSW embedding layer: The effective derived features of the input are divided into multiple segments, and each segment is converted into an embedding vector, represented as follows: Where T represents the total length of the effective derived features of the input; s represents the number of segments after segmenting the effective derived features; L seq D represents the length of each segment; D represents the number of valid derived features. X represents the embedding vector of the d-th effective derived feature in the i-th segment; 1:T This represents the set of variables after the effective derived features have been processed by the DSW embedding layer, containing the embedding vectors of all effective derived features for all segments; The addition of positional encoding to the embedding vector is represented as follows: in, This represents the positional encoding function; z i,d Indicates the embedding vector Add position encoding function The new vector generated afterward; Z represents the set of variables after adding the positional encoding function; s represents the total number of segments; d model This indicates the model configuration parameters.
9. A short-term load forecasting method based on Crossformer and high-resolution meteorological data according to claim 7, characterized in that, The TSA layer includes a temporal attention phase and a spatial attention phase. The temporal attention phase is represented as follows: in, This represents a column of results after time attention; LayerNorm represents the layer normalization function; Z :,d Z represents all data in the d-th effective derived feature; MSA(·) represents the multi-head attention function; D represents the number of effective derived features; Z time This represents the result after applying temporal attention to all columns; MLP stands for Multilayer Feedforward Network. The spatial attention phase is represented as follows: Among them, B i,: Represents the output of the spatial attention stage; R i,: This indicates the router is configured to be connected to... Equal random number matrices; This represents the first layer of multi-head attention function; L represents the second-layer multi-head attention function; seq Z represents the length of each segment. dim This represents the spatiotemporal features obtained through the TSA layer; The z variable represents a time interval that is empty; The z-variable represents spatial latitude; In Z time The result of a variable after undergoing multi-head attention, i.e., the intermediate computation result; express The result after one layer of normalization.
10. A short-term load forecasting method based on Crossformer and high-resolution meteorological data according to claim 1, characterized in that, The load forecasting model is evaluated using the mean absolute percentage error, expressed as: acc = 1 - MAPE Where MAPE represents the mean absolute percentage error; n represents the total number of predicted and true values; k represents the k-th input; y true Represents the true value; y pred This represents the predicted value; acc is the model evaluation metric.