Wind and light storage micro-grid load prediction method, device, equipment and storage medium

By combining a global attention mechanism and a dilated convolutional network, the problem of traditional models being limited to local information and fixed encoding in load forecasting of wind, solar, and energy storage microgrids is solved, achieving more accurate load forecasting and enhancing the model's adaptability and stability.

CN122000868APending Publication Date: 2026-05-08WUHAN UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
WUHAN UNIV OF TECH
Filing Date
2025-12-31
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

In existing technologies, traditional attention mechanisms tend to be limited to local information, making it difficult to fully explore the global trend of wind, solar, and energy storage microgrid loads. Moreover, fixed-location coding cannot adapt to dynamic temporal changes in loads, resulting in inaccurate load forecasting.

Method used

A global attention mechanism and a dilated convolutional network are employed. The load sequence is positionally encoded by the dilated convolutional network and then concatenated with global context vectors and local self-attention to construct a load prediction model. The model is then updated temporally through convolutional gated recursive units to improve its adaptability and prediction accuracy.

Benefits of technology

It improves the accuracy and stability of load forecasting for wind-solar-storage microgrids, enabling them to better capture global characteristics and adapt to dynamic temporal changes, providing reliable load forecasting support, and enhancing the safe and efficient operation of wind-solar-storage microgrids.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122000868A_ABST
    Figure CN122000868A_ABST
Patent Text Reader

Abstract

The invention relates to a wind and light storage micro-grid load prediction method and device, equipment and a storage medium. The method comprises the steps of obtaining wind and light storage micro-grid data; the load prediction model comprises a global attention mechanism and an expansion convolutional network; inputting a load sequence in a data set of the wind-solar-storage micro-grid into the load prediction model, and carrying out position coding on the load sequence through an expansion convolutional network to obtain a time sequence load sequence with enhanced position information; splicing the global context vector and the local self-attention of each position in the time sequence load sequence through a global attention mechanism to obtain a power grid load prediction result; a load prediction model comprising a global attention mechanism and an expansion convolutional network is constructed, the expansion convolutional network is adapted to load dynamic time sequence change, global feature capture is enhanced through the global attention mechanism, the accuracy and stability of wind-solar-storage micro-grid load prediction are improved, and the load prediction efficiency is improved. And reliable load prediction support is provided for safe and efficient operation of the wind-solar-storage micro-grid.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power system load forecasting technology, and in particular to a method, apparatus, equipment and storage medium for load forecasting of wind-solar-storage microgrids. Background Technology

[0002] Wind-solar-storage microgrids, as a multi-energy complementary system integrating wind, solar, and energy storage, can effectively balance the volatility and instability of renewable energy, playing a significant role in improving the economy and reliability of the power system. Against the backdrop of renewable energy development, accurate load forecasting, as a core supporting technology, provides an important basis for optimizing power generation resource allocation and reducing operating costs in modern power systems. However, with the rapid development of power systems and the influence of various factors, loads exhibit complex nonlinear and time-series dependent characteristics, posing a significant challenge to the energy supply and demand balance of microgrids. More accurate load forecasting methods are needed to address this challenge.

[0003] In recent years, Transformer models and attention mechanisms have received widespread attention in the field of time series forecasting. By introducing attention mechanisms, models can focus on key time-series features and meteorological correlations in load data, enhancing their ability to capture global dependencies and thus improving forecast accuracy. Nevertheless, current Transformer-based load forecasting methods still face bottlenecks: traditional attention mechanisms tend to be limited to local information, making it difficult to fully explore the global trend of load, and fixed-location encoding cannot adapt to dynamic time-series changes in load.

[0004] Therefore, there is an urgent need to propose a method, device, equipment, and storage medium for load forecasting of wind-solar-storage microgrids to solve the technical problems existing in the current technology, such as the traditional attention mechanism being limited to local information and unable to fully explore the global trend of the load, and the fixed location coding being unable to adapt to the dynamic temporal changes of the load. Summary of the Invention

[0005] In view of this, it is necessary to provide a method, device, equipment and storage medium for load forecasting of wind-solar-storage microgrids to solve the technical problems in the existing technology that traditional attention mechanisms are easily limited to local information and are difficult to fully explore the global trend of load, and that fixed location coding cannot adapt to the dynamic time-series changes of load.

[0006] To address the aforementioned problems, in a first aspect, the present invention provides a load forecasting method for wind-solar-storage microgrids, comprising: Acquire wind-solar-storage microgrid data for the period to be predicted; Construct a load prediction model; the load prediction model includes a global attention mechanism and an dilated convolutional network; The load sequence from the wind-solar-storage microgrid dataset is input into the load prediction model. The load sequence is then position-encoded using the dilated convolutional network to obtain a time-series load sequence with enhanced position information. Finally, the global attention mechanism is used to concatenate the global context vector and local self-attention for each position in the time-series load sequence to obtain the grid load prediction result.

[0007] In one possible implementation, the step of concatenating the global context vector and local self-attention at each position in the time-series load sequence through the global attention mechanism to obtain the power grid load prediction result includes: The global attention mechanism is used to calculate the global attention weight for each key vector in the time-series load sequence. The time-series load sequence is processed by a local self-attention mechanism to obtain self-attention at each position; The global context vector is obtained by taking a weighted average of the value vectors of all positions in the time-series load sequence and the global attention weights. The global context vector and the self-attention are concatenated to obtain the global attention sequence; The global attention sequence is output to obtain the power grid load prediction result.

[0008] In one possible implementation, the dilated convolutional network includes a residual module; the step of performing position encoding on the load sequence through the dilated convolutional network to obtain a position-enhanced temporal load sequence includes: The load sequence is dynamically extracted using the dilated convolutional network, and cross-layer information is transferred through the residual module during the extraction process to obtain a temporal load sequence with enhanced location information.

[0009] In one possible implementation, the load forecasting model further includes a convolutionally gated recursive unit; the step of outputting the global attention sequence to obtain the power grid load forecasting result includes: The convolutional gating recursive unit performs time-series updates and outputs adjacent load data in the global attention sequence to obtain the power grid load prediction result.

[0010] In one possible implementation, the training process of the load prediction model includes: Acquire historical wind-solar-storage microgrid data; the historical wind-solar-storage microgrid data includes static data and dynamic data; Missing values ​​are filled and normalized in the dynamic data of the historical wind-solar-storage microgrid data to obtain preprocessed dynamic data. Based on the preprocessed dynamic data and the static data, a historical wind-solar-storage microgrid dataset is constructed. The load prediction model is trained based on the historical wind-solar-storage microgrid dataset to obtain the trained load prediction model.

[0011] In one possible implementation, training the load forecasting model based on the historical wind-solar-storage microgrid dataset to obtain the trained load forecasting model includes: The historical wind-solar-storage microgrid dataset is divided into a training set and a test set. The load prediction model is trained using the training set and then tested using the test set to obtain the predicted value. The deviation between the actual and predicted load values ​​of the wind-solar-storage microgrid in the test set was verified by using accuracy evaluation indicators to obtain the verification results; the accuracy evaluation indicators include mean absolute error, root mean square error, and score. When the verification results meet the verification conditions, the trained load prediction model is obtained.

[0012] In one possible implementation, the global attention weights are calculated as follows:

[0013] In the formula, For global attention weights, n The length of the time-series load sequence. For global query vectors, For the time-series load sequence, the first... i The key vector corresponding to each position For the time-series load sequence, the first... j The key vector corresponding to each position.

[0014] Secondly, the present invention also provides a load forecasting device for a wind-solar-storage microgrid, comprising: The data acquisition module is used to acquire wind, solar and energy storage microgrid data for the period to be predicted. The model building module is used to build a load prediction model; the load prediction model includes a global attention mechanism and a dilated convolutional network. The load forecasting module is used to input the load sequence from the wind-solar-storage microgrid dataset into the load forecasting model, perform position encoding on the load sequence through the dilated convolutional network to obtain a time-series load sequence with enhanced position information, and concatenate the global context vector and local self-attention of each position in the time-series load sequence through the global attention mechanism to obtain the power grid load forecasting result.

[0015] Thirdly, embodiments of the present invention disclose an electronic device, including: a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, it implements the various steps of the above-described embodiments of the wind-solar-storage microgrid load forecasting method.

[0016] Fourthly, embodiments of the present invention disclose a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the various steps of the above-described embodiments of the wind-solar-storage microgrid load forecasting method.

[0017] The beneficial effects of this invention are: acquiring wind-solar-storage microgrid data for the period to be predicted; constructing a load forecasting model; the load forecasting model includes a global attention mechanism and a dilated convolutional network; inputting the load sequence from the wind-solar-storage microgrid dataset into the load forecasting model, using a dilated convolutional network to encode the load sequence at location, obtaining a time-series load sequence with enhanced location information, and using a global attention mechanism to concatenate the global context vector and local self-attention at each location in the time-series load sequence to obtain the grid load forecasting result. This invention constructs a load forecasting model including a global attention mechanism and a dilated convolutional network. The dilated convolutional network adapts to dynamic temporal changes in load, and the global attention mechanism strengthens the capture of global features, thereby improving the accuracy and stability of wind-solar-storage microgrid load forecasting, providing reliable load forecasting support for the safe and efficient operation of wind-solar-storage microgrids. Attached Figure Description

[0018] Figure 1 A schematic flowchart of an embodiment of the wind-solar-storage microgrid load forecasting method provided by the present invention; Figure 2 For the present invention Figure 1 A schematic flowchart of an embodiment of step S103; Figure 3 A schematic diagram of an embodiment of the improved Transformer model structure provided by the present invention; Figure 4 This is a schematic diagram of an embodiment of the wind-solar-storage microgrid load forecasting device provided by the present invention; Figure 5 A schematic diagram of an embodiment of the electronic device provided by the present invention. Detailed Implementation

[0019] Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.

[0020] like Figure 1As shown in the figure, a specific embodiment of the present invention discloses a load forecasting method for wind-solar-storage microgrids, comprising: S101. Obtain wind-solar-storage microgrid data for the period to be predicted.

[0021] This invention can obtain wind-solar-storage microgrid data for the predicted period from the wind-solar-storage microgrid system. The predicted period can be in units of hours, days, etc. When it is necessary to preset data for one day or one time period, the grid load prediction result is the data to be predicted. When it is necessary to preset data for multiple days or multiple time periods, the grid load prediction result is the predicted data sequence.

[0022] S102. Construct a load prediction model; the load prediction model includes a global attention mechanism and an inflated convolutional network.

[0023] In this embodiment of the invention, the preferred load characteristic analysis and prediction model for wind-solar-storage microgrids is selected. The load variation of wind-solar-storage microgrids is influenced not only by meteorological factors but also by a combination of factors such as social activities and seasonal changes. To more clearly observe the temporal characteristics of load variation, load variation trends are displayed on a daily and yearly basis, analyzing the characteristics exhibited by the wind-solar-storage microgrid load. Based on these characteristics, the optimal prediction model, Transformer, is selected and improved. Improvements may include a global attention mechanism and a dilated convolutional network, which are incorporated into the encoder of the load prediction model.

[0024] S103. Input the load sequence from the wind-solar-storage microgrid dataset into the load prediction model. Encode the load sequence by location using an dilated convolutional network to obtain a time-series load sequence with enhanced location information. Then, use a global attention mechanism to concatenate the global context vector and local self-attention of each location in the time-series load sequence to obtain the power grid load prediction result.

[0025] The wind-solar-storage microgrid load forecasting method provided in this application can be applied to a wind-solar-storage microgrid load forecasting system. The wind-solar-storage microgrid load forecasting method can be a software system running on a terminal device. The terminal device can be a server, tablet computer, augmented reality (AR) / virtual reality (VR) device, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), mobile phone, etc. This application does not impose any restrictions on the specific type of terminal device.

[0026] After obtaining the wind-solar-storage microgrid data for the forecast period, this embodiment of the invention can input the wind-solar-storage microgrid data into the improved load forecasting model. The location of the load data in the load sequence can be dynamically encoded through an dilated convolutional network to obtain a time-series load sequence with enhanced location information. Then, a global attention mechanism can be used to calculate the global context vector of the data at each location in the time-series load sequence. After local processing of the time-series load sequence to obtain local self-attention, the global context vector and the local self-attention are concatenated, and then the grid load forecasting result is obtained through the output layer.

[0027] Compared with existing technologies, this embodiment provides the following improvements: acquiring wind-solar-storage microgrid data for the period to be predicted; constructing a load forecasting model; the load forecasting model includes a global attention mechanism and a dilated convolutional network; inputting the load sequence from the wind-solar-storage microgrid dataset into the load forecasting model; using the dilated convolutional network to perform position encoding on the load sequence to obtain a time-series load sequence with enhanced position information; and using the global attention mechanism to concatenate the global context vector and local self-attention of each position in the time-series load sequence to obtain the grid load forecasting result. This invention constructs a load forecasting model including a global attention mechanism and a dilated convolutional network. By adapting the dilated convolutional network to the dynamic temporal changes of the load and by strengthening the capture of global features through the global attention mechanism, the accuracy and stability of wind-solar-storage microgrid load forecasting are improved, providing reliable load forecasting support for the safe and efficient operation of wind-solar-storage microgrids.

[0028] In some embodiments of the present invention, the dilated convolutional network includes a residual module; step S103 includes: Dynamic temporal features of the load sequence are extracted by dilated convolutional network, and cross-layer information is transferred through residual module during the extraction process to obtain a temporal load sequence with enhanced location information.

[0029] In this embodiment of the invention, the load fluctuation trend needs to reflect changes in the time step dynamically. However, traditional location encoding strategies use a static approach, which cannot flexibly adapt to the dynamic characteristics of load data. Therefore, dilated convolution is introduced to solve the problem that the location encoding of the Transformer model cannot capture dynamic changes in the time step.

[0030] For the input sequence convolution kernel dilated convolution formula As shown in formula (1): (1) In the formula, k The kernel size is [size]. For convolution operations, Data representing the past, d It is the expansion factor. ,in b Based on the expansion factor, n The number of network layers is used to expand the receptive field by sampling the input interval during convolution using a dilation factor. w The calculation formula is shown in formula (2): (2) As network depth increases, the receptive field becomes more dependent on network depth and dilation factor, enabling the network to capture complex temporal features over longer time scales. However, with increasing network depth, phenomena such as vanishing gradients and overfitting may occur. To mitigate this problem, a residual module is introduced. The residual module consists of two dilated convolutional layers and a ReLU activation function, with each convolutional filter employing normalized batch processing. After each convolutional expansion, a dropout layer is added to prevent overfitting. The 1×1 convolution ensures the additivity of the network's input and output data, while the residual module allows information to be transferred across layers, ensuring that networks with this structural property can be trained optimally and promoting the fusion of multi-scale information within the receptive field. It transforms the theoretically large receptive field *w* into a practically efficient and robust information acquisition capability, addressing the performance degradation problem that occurs with increasing network depth.

[0031] In some embodiments of the present invention, such as Figure 2 As shown, step S103 includes: S201. The global attention weight is obtained by calculating the global attention weight for each key vector in the time-series load sequence through a global attention mechanism.

[0032] This invention addresses the problem that traditional Transformer multi-head attention is easily limited to local information and struggles to capture global load patterns across time periods by introducing a global context vector. Global attention weights Sum value vector This is to capture holistic information across all positions in the load sequence. A learnable global query vector is also introduced. Through calculation With each key vector in the load sequence Obtain global attention weights The global attention weights are calculated as shown in formula (3): (3) In the formula, For global attention weights, n The length of the time-series load sequence. For global query vectors, For the time-series load sequence, the first... i The key vector corresponding to each position For the time-series load sequence, the first... j The key vector corresponding to each position.

[0033] S202. The time-series load sequence is processed through a local self-attention mechanism to obtain the self-attention at each position.

[0034] The embodiments of the present invention can process vectors in a time-series load sequence through a local self-attention mechanism to obtain self-attention for the vector at each position.

[0035] S203. Take a weighted average of the value vectors of all positions in the time-series load sequence and the global attention weights to obtain the global context vector.

[0036] This invention embodiment is based on global attention weights, through the value vectors of all positions. The weighted average yields the global context vector. The calculation is shown in formula (4): (4) S204. Concatenate the global context vector and the self-attention to obtain the global attention sequence.

[0037] In order to combine the global context vector with the local self-attention output, this embodiment of the invention performs the following steps for each position: Self-attention output With global context vector The sequences are concatenated and then passed through a linear transformation layer to generate the final output global attention sequence. As shown in formula (5): (5) In the formula, This is a learnable weight matrix used to map the concatenated features to the target dimension.

[0038] S205. Output the global attention sequence to obtain the power grid load prediction result.

[0039] In this embodiment of the invention, a global attention sequence is output from the Transformer coding layer. Subsequently, a linear fully connected layer decodes the global attention sequence into the load forecast value in the power grid load forecast result. Specifically, the time-series load sequence is transformed into a key... k Sum v To learnable global queries Interacting to generate a global pattern that reflects the entire sequence To the general By fusing with local attention results, the model's ability to capture the "global correlation" features of the load is enhanced.

[0040] In existing Transformer-based load forecasting methods, traditional multi-head attention mechanisms tend to be limited to local information, making it difficult to fully explore global load trends. The linear layer's update mechanism for historical information is rigid and cannot respond to dynamic fluctuations in load data in real time, further limiting the model's applicability and prediction accuracy in wind-solar-storage microgrid load forecasting scenarios. In some embodiments of this invention, the load forecasting model further includes a convolutionally gated recursive unit; step S205 includes: By using a convolutional gated recursive unit to perform time-series updates and outputs of adjacent load data in the global attention sequence, the power grid load forecast results are obtained.

[0041] In this embodiment of the invention, to address the problem that traditional Transformer linear layers process historical information with a fixed weight matrix and cannot dynamically respond to sudden load fluctuations, Convolutional Gated Recurrent Units (ConvGRU) are used to replace the fully connected linear layers to achieve time-series dynamic updates of historical information. ConvGRU enhances the ability to capture local features by replacing the fully connected operations of traditional GRU with convolutional operations. Its calculation is shown in formulas (6)-(9):

[0042] In the formula, This is the current input; for The state of the hidden layer is always hidden; W These are the kernel weights; To update the door, To reset the door; This represents the candidate state of the hidden layer at the current moment. Multiply corresponding elements.

[0043] ConvGRU receives the target attention sequence output by the Transformer encoder. It comes from h Start with 1, process sequentially until... By updating the door and reset door ConvGRU dynamically determines how much historical information to retain. And how much current new information is incorporated () This addresses the drawback of the original problem: "traditional linear layers have fixed weights and cannot respond to sudden fluctuations." Faced with sudden increases or decreases in load, ConvGRU's gating mechanism can quickly adjust the information fusion ratio. After processing the last input... Then, the hidden state of ConvGRU (Right now The updated results contain the final information summary learned from the entire historical sequence, which has been dynamically filtered and fused over time, to obtain the power grid load forecast results and generate the final forecast value.

[0044] In some embodiments of the present invention, the training process of the load prediction model includes: Acquire historical wind-solar-storage microgrid data; historical wind-solar-storage microgrid data includes static data and dynamic data.

[0045] The historical wind-solar-storage microgrid data in this embodiment of the invention can be obtained from a provincial power company and includes both static and dynamic data. Static data includes basic information on wind turbines, photovoltaic systems, and energy storage systems, providing basic configuration and performance parameters of the system equipment within the microgrid. Dynamic data consists of real-time monitoring data that changes constantly over time, reflecting the microgrid's operational status.

[0046] Missing values ​​were filled and normalized in the dynamic data of historical wind, solar and energy storage microgrid data to obtain preprocessed dynamic data.

[0047] In this embodiment of the invention, all static data are complete, thus eliminating the need for data preprocessing. For dynamic data, since real-time monitoring data originates from sensors or monitoring equipment, it is susceptible to environmental interference, potentially leading to missing values. Furthermore, significant differences in the dimensions of different meteorological data can result in uneven weighting during model training, affecting the stability of the results. Therefore, it is necessary to perform missing value imputation and normalization on the real-time monitoring data to improve data quality. To provide more effective input for subsequent prediction models, characteristic selection is also performed on the meteorological data to identify meteorological factors with a key impact on load forecasting.

[0048] Based on preprocessed dynamic and static data, a historical wind-solar-storage microgrid dataset is constructed.

[0049] This invention can integrate the static data in the historical wind-solar-storage microgrid data with the preprocessed dynamic data obtained in the previous step to obtain a historical wind-solar-storage microgrid dataset.

[0050] The load forecasting model is trained based on historical wind, solar and energy storage microgrid datasets to obtain the trained load forecasting model.

[0051] In this embodiment of the invention, the load prediction model is trained using historical wind, solar and energy storage microgrid datasets to obtain the trained load prediction model.

[0052] In some embodiments of the present invention, a load forecasting model is trained based on a historical wind-solar-storage microgrid dataset to obtain a trained load forecasting model, including: The historical wind-solar-storage microgrid dataset is divided into a training set and a test set. The load forecasting model is trained using a training set and then tested using a test set to obtain the predicted values. The deviation between the actual and predicted load values ​​of the wind-solar-storage microgrid in the test set was verified by using accuracy evaluation indicators, and the verification results were obtained. The accuracy evaluation indicators include mean absolute error, root mean square error, and score. When the verification results meet the verification conditions, the trained load prediction model is obtained.

[0053] In this embodiment of the invention, the historical wind-solar-storage microgrid dataset can be divided into a training set and a test set in a 7:3 ratio. To quantitatively evaluate the accuracy of the wind-solar-storage microgrid load prediction model in this chapter and its superiority over other mainstream algorithms, accuracy evaluation indicators such as mean absolute error (MAE), root mean square error (RMSE), and R² score are selected to measure the deviation between the actual and predicted load values ​​of the wind-solar-storage microgrid.

[0054] The improved Transformer model structure of this invention is as follows: Figure 3 As shown, the improved Transformer model can include a dilated convolutional network, a global attention mechanism, and a convolutionally gated recursive unit. When wind-solar-storage microgrid data is input into the improved Transformer model, the sequence data of the wind-solar-storage microgrid is first dynamically position-encoded through the dilated convolutional network. Then, in the encoder, the global attention mechanism is used to concatenate the global context vector and local self-attention at each position in the load sequence. The decoder then decodes the data, and finally, the convolutionally gated recursive unit performs dynamic time-series updates to output the grid load prediction result. The processing in the encoder and decoder includes residual connections, layer normalization, and the global attention mechanism of the feedforward network.

[0055] Validation of the effectiveness of the improved strategy in this invention embodiment (ablation experiment): Using the original Transformer model as a baseline, the individual and combined effects of the three improvement strategies, namely "global information enhancement attention mechanism", "dilated convolution dynamic position encoding" and "convolution gated recursive unit information update", were verified. The experimental results are shown in Table 1.

[0056] Table 1. Ablation Experiment Results of Load Prediction Model

[0057] Experimental results show that individual improvement strategies can enhance prediction performance: "Dilated Convolutional Dynamic Position Encoding" significantly improves day-ahead prediction (MAE decreases by 28.74%, R² increases by 17.11%), while "Global Information Enhanced Attention" most significantly improves the capture of local fluctuations in intraday prediction (MAE decreases by 17.29%). The combination of the three strategies yields the best results: compared to the original Transformer, day-ahead prediction MAE and RMSE decrease by 29.90% and 59.61% respectively, and R² increases by 19.74%, accurately capturing global features such as seasonal load trends and holiday load differences; intraday prediction MAE and RMSE decrease by 36.17% and 40.33% respectively, and R² increases by 11.91%, effectively addressing load fluctuations caused by temporary start-ups and shutdowns of industrial equipment and sudden weather events.

[0058] Comparison and validation with mainstream time series forecasting models: The method of this invention embodiment is compared with current mainstream load forecasting models such as RNN, GRU, LSTM, and TCN to verify its superiority. The experimental results are shown in Table 2.

[0059] Table 2. Load Prediction Comparison Experiment

[0060] Comparative results show that the method of this invention outperforms mainstream models in all evaluation metrics: compared with traditional deep learning models (RNN / GRU / LSTM), the average R² of day-ahead prediction is improved by 17.0%, and the average R² of intraday prediction is improved by 13.8%, solving the problems of long sequence gradient vanishing and insufficient global feature capture in traditional models; compared with TCN models, which are also good at local feature extraction, the MAE of day-ahead prediction is reduced by 3.2%, RMSE is reduced by 35.5%, and the R² of intraday prediction is improved by 5.6%. The core advantage lies in the fact that by using dynamic positional encoding and global attention, it takes into account the collaborative modeling of local load fluctuations and global temporal trends, avoiding the problem of poor dynamic adaptability caused by TCN static encoding.

[0061] Thus, the embodiments of the present invention have been validated through effectiveness experiments, demonstrating the effectiveness of the wind-solar-storage microgrid load forecasting method based on the improved Transformer.

[0062] To better implement the wind-solar-storage microgrid load forecasting method in this embodiment of the invention, correspondingly, this embodiment of the invention also provides a wind-solar-storage microgrid load forecasting device, such as... Figure 4 As shown, the wind-solar-storage microgrid load forecasting device 400 includes: Data acquisition module 401 is used to acquire wind-solar-storage microgrid data for the period to be predicted; Model building module 402 is used to build a load prediction model; the load prediction model includes a global attention mechanism and a dilated convolutional network; The load prediction module 403 is used to input the load sequence from the wind-solar-storage microgrid dataset into the load prediction model. The load sequence is position-encoded through an dilated convolutional network to obtain a time-series load sequence with enhanced location information. The global attention mechanism is used to concatenate the global context vector and local self-attention of each position in the time-series load sequence to obtain the power grid load prediction result.

[0063] The wind-solar-storage microgrid load forecasting device 400 provided in the above embodiments can realize the technical solutions described in the above embodiments of the wind-solar-storage microgrid load forecasting method. The specific implementation principles of each module or unit can be found in the corresponding content in the above embodiments of the wind-solar-storage microgrid load forecasting method, which will not be repeated here.

[0064] like Figure 5 As shown, the present invention also provides an electronic device 500. The electronic device 500 includes a processor 501, a memory 502, and a display 503. Figure 5 Only some components of the electronic device 500 are shown, but it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented instead.

[0065] In some embodiments, memory 502 may be an internal storage unit of electronic device 500, such as a hard disk or memory of electronic device 500. In other embodiments, memory 502 may also be an external storage device of electronic device 500, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. equipped on electronic device 500.

[0066] Furthermore, the memory 502 may include both internal storage units of the electronic device 500 and external storage devices. The memory 502 is used to store application software and various types of data installed on the electronic device 500.

[0067] In some embodiments, processor 501 may be a central processing unit (CPU), a microprocessor, or other data processing chip, used to run program code stored in memory 502 or process data, such as the wind-solar-storage microgrid load forecasting method of the present invention.

[0068] In some embodiments, display 503 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. Display 503 is used to display information from electronic device 500 and to display a visual user interface. Components 501-503 of electronic device 500 communicate with each other via a system bus.

[0069] In some embodiments of the present invention, when the processor 501 executes the wind-solar-storage microgrid load forecasting program in the memory 502, the following steps can be implemented: Acquire wind-solar-storage microgrid data for the period to be predicted; Construct a load prediction model; the load prediction model includes a global attention mechanism and an dilated convolutional network; The load sequence from the wind-solar-storage microgrid dataset is input into the load prediction model. The load sequence is then location-encoded using an dilated convolutional network to obtain a time-series load sequence with enhanced location information. Finally, the global context vector and local self-attention of each location in the time-series load sequence are concatenated using a global attention mechanism to obtain the grid load prediction result.

[0070] It should be understood that when the processor 501 executes the wind-solar-storage microgrid load forecasting program in the memory 502, in addition to the functions mentioned above, it can also perform other functions, as detailed in the description of the corresponding method embodiments above.

[0071] Furthermore, the embodiments of the present invention do not specifically limit the type of electronic device 500 mentioned. Electronic device 500 can be a mobile phone, tablet computer, personal digital assistant (PDA), wearable device, laptop computer, or other portable electronic device. Exemplary embodiments of portable electronic devices include, but are not limited to, portable electronic devices running iOS, Android, Microsoft, or other operating systems. The aforementioned portable electronic device can also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of the present invention, electronic device 500 may not be a portable electronic device, but rather a desktop computer with a touch-sensitive surface (e.g., a touch panel).

[0072] Accordingly, this application also provides a computer-readable storage medium for storing computer-readable programs or instructions. When the programs or instructions are executed by a processor, they can implement the steps or functions of the wind-solar-storage microgrid load forecasting method provided in the above-described method embodiments.

[0073] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.), and the computer program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.

[0074] The above provides a detailed description of the wind-solar-storage microgrid load forecasting method, apparatus, equipment, and storage medium provided by this invention. Specific examples have been used to illustrate the principles and implementation methods of this invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this invention. At the same time, those skilled in the art will recognize that there will be changes in the specific implementation methods and application scope based on the ideas of this invention. Therefore, the content of this specification should not be construed as a limitation of this invention.

Claims

1. A method for load forecasting of wind-solar-storage microgrids, characterized in that, include: Acquire wind-solar-storage microgrid data for the period to be predicted; Construct a load prediction model; the load prediction model includes a global attention mechanism and an dilated convolutional network; The load sequence from the wind-solar-storage microgrid dataset is input into the load prediction model. The load sequence is then position-encoded using the dilated convolutional network to obtain a time-series load sequence with enhanced position information. Finally, the global attention mechanism is used to concatenate the global context vector and local self-attention for each position in the time-series load sequence to obtain the grid load prediction result.

2. The load forecasting method for wind-solar-storage microgrids according to claim 1, characterized in that, The process of concatenating the global context vector and local self-attention at each position in the time-series load sequence using the global attention mechanism to obtain the power grid load prediction result includes: The global attention mechanism is used to calculate the global attention weight for each key vector in the time-series load sequence. The time-series load sequence is processed by a local self-attention mechanism to obtain self-attention at each position; The global context vector is obtained by taking a weighted average of the value vectors of all positions in the time-series load sequence and the global attention weights. The global context vector and the self-attention are concatenated to obtain the global attention sequence; The global attention sequence is output to obtain the power grid load prediction result.

3. The load forecasting method for wind-solar-storage microgrids according to claim 1, characterized in that, The dilated convolutional network includes a residual module; the step of performing position encoding on the load sequence through the dilated convolutional network to obtain a position-enhanced temporal load sequence includes: The load sequence is dynamically extracted using the dilated convolutional network, and cross-layer information is transferred through the residual module during the extraction process to obtain a temporal load sequence with enhanced location information.

4. The load forecasting method for wind-solar-storage microgrids according to claim 2, characterized in that, The load forecasting model further includes a convolutionally gated recursive unit; the step of outputting the global attention sequence to obtain the power grid load forecasting result includes: The convolutional gating recursive unit performs time-series updates and outputs adjacent load data in the global attention sequence to obtain the power grid load prediction result.

5. The load forecasting method for wind-solar-storage microgrids according to claim 1, characterized in that, The training process of the load prediction model includes: Acquire historical wind-solar-storage microgrid data; the historical wind-solar-storage microgrid data includes static data and dynamic data; Missing values ​​are filled and normalized in the dynamic data of the historical wind-solar-storage microgrid data to obtain preprocessed dynamic data. Based on the preprocessed dynamic data and the static data, a historical wind-solar-storage microgrid dataset is constructed. The load prediction model is trained based on the historical wind-solar-storage microgrid dataset to obtain the trained load prediction model.

6. The load forecasting method for wind-solar-storage microgrids according to claim 5, characterized in that, The process of training the load forecasting model based on the historical wind-solar-storage microgrid dataset to obtain the trained load forecasting model includes: The historical wind-solar-storage microgrid dataset is divided into a training set and a test set. The load prediction model is trained using the training set and then tested using the test set to obtain the predicted value. The deviation between the actual and predicted load values ​​of the wind-solar-storage microgrid in the test set was verified by using accuracy evaluation indicators to obtain the verification results; the accuracy evaluation indicators include mean absolute error, root mean square error, and score. When the verification results meet the verification conditions, the trained load prediction model is obtained.

7. The load forecasting method for wind-solar-storage microgrids according to claim 2, characterized in that, The global attention weights are calculated as follows: In the formula, For global attention weights, n The length of the time-series load sequence. For global query vectors, The first in the time-series load sequence i The key vector corresponding to each position The first in the time-series load sequence j The key vector corresponding to each position.

8. A load forecasting device for a wind-solar-storage microgrid, characterized in that, include: The data acquisition module is used to acquire wind, solar and energy storage microgrid data for the period to be predicted. The model building module is used to build a load prediction model; the load prediction model includes a global attention mechanism and a dilated convolutional network. The load forecasting module is used to input the load sequence from the wind-solar-storage microgrid dataset into the load forecasting model, perform position encoding on the load sequence through the dilated convolutional network to obtain a time-series load sequence with enhanced position information, and concatenate the global context vector and local self-attention of each position in the time-series load sequence through the global attention mechanism to obtain the power grid load forecasting result.

9. An electronic device, characterized in that, include: A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the wind-solar-storage microgrid load forecasting method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the steps of the wind-solar-storage microgrid load forecasting method as described in any one of claims 1-7.