Medium and long term energy demand prediction method based on multi-scale step slices

Features are extracted through multi-scale step-by-step slices and spatial channel self-attention mechanisms, and feature fusion is combined with one-dimensional convolutional neural networks, which solves the problem that medium- and long-term energy demand prediction models in the existing technology is difficult to cope with complex dynamic changes, and achieves more efficient and accurate prediction results.

CN120146248APending Publication Date: 2025-06-13SICHUAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510113521.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-24
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

The existing medium- and long-term energy demand prediction models are difficult to cope with complex dynamic changes, especially when processing long-sequence data, the calculation complexity is high, the resource consumption is high, and the long-term dependency relationship is ignored.

Method used

A medium- and long-term energy demand prediction method based on multi-scale striding slices is adopted, and feature extraction is performed through multi-scale striding patches and spatial channel self-attention mechanisms, and feature fusion is performed by combining one-dimensional convolutional neural networks, and finally inputting a full-connection layer for prediction.

Benefits of technology

It improves the accuracy and robustness of medium- and long-term energy demand forecasts, effectively integrates information at different scales, and reduces computing complexity and resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120146248A_ABST
    Figure CN120146248A_ABST
Patent Text Reader

Abstract

The invention discloses a medium and long term energy demand prediction method based on multi-scale stride slices, and the method comprises the steps: firstly segmenting a time sequence through employing a multi-scale stride patch strategy, and obtaining patches of different scales; this process ensures that the CNN can capture dynamic features of energy requirements on multiple time scales. Secondly, each set of patches on a specific scale is input into a feature extraction module, which combines a spatial channel self-attention mechanism to highlight the most relevant prediction features while suppressing irrelevant or redundant information. And finally, fusing the extracted multi-scale features and inputting the fused multi-scale features into a fully connected layer to obtain a final prediction result. In the process, information of different scales is effectively integrated, so that the accuracy and the robustness of a prediction result are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data processing, and particularly relates to a medium- and long-term energy demand prediction method based on multi-scale striding slicing. Background Art

[0002] Existing energy demand prediction models are difficult to cope with complex dynamic changes during medium- and long-term energy demand prediction, resulting in affected prediction accuracy. For example, long short-term memory networks (LSTMs) and gated recurrent units (GRUs) are indeed effective to a certain extent in dealing with the overall dependence relationship of data sequences and can uncover some relatively macroscopic correlation logics. However, when focusing on extracting local features in the sequence, their limitations become prominent. Not only is the computational complexity relatively high, but also many obstacles are faced in the actual operation process. This is mainly due to their complex gating mechanisms and multi-layer structure designs, which make the model extremely complex in the training and inference stages and require a large amount of computing resources. Especially when dealing with long sequence data, this resource consumption is more significant, the training time will be greatly extended, and the demand for computing resources will increase sharply.

[0003] With the gradual rise of the self-attention mechanism in this field, many innovative methods combining self-attention have emerged. In particular, the combination of the self-attention mechanism and convolutional neural networks (CNNs) has achieved remarkable results to a certain extent. The self-attention mechanism can guide the model to focus on the key parts of the input sequence, thus significantly improving the efficiency and accuracy of the model, while CNNs, relying on the weight sharing characteristics of the convolutional layer, effectively capture local features and reduce the number of parameters, making the training difficulty of the entire model somewhat reduced. However, even so, the current models combining the self-attention mechanism and CNNs are not perfect. In the actual application process, most of them adopt a fixed window continuous patching strategy. Although this strategy has certain advantages in dealing with local microscopic details and can generate patches reflecting local features more accurately, it ignores the consideration of the long-term dependence relationship, which is crucial in medium- and long-term energy demand prediction, at the macroscopic structural level, resulting in an unsatisfactory overall performance in the medium- and long-term energy prediction task. Summary of the Invention

[0004] To solve the above problems, the present invention proposes a medium- and long-term energy demand prediction method based on multi-scale striding slicing, which is used to cope with the complex dynamic changes that are difficult to handle during medium- and long-term energy demand prediction. The aim is to more accurately capture the dynamic changes of energy demand and improve the prediction accuracy through comprehensive analysis of features at different scales.

[0005] To achieve the above object, the technical solution adopted by the present invention is: a medium- and long-term energy demand prediction method based on multi-scale striding slicing, including the steps of:

[0006] S10. Perform multi-scale stride patching on the energy harvesting data. Explore the patterns and trends at different time steps by segmenting the energy demand time series to obtain patches at different scales.

[0007] S20. Perform multi-scale feature extraction on the patches at different scales. The spatial channel self-attention mechanism is incorporated during the multi-scale feature extraction process.

[0008] S30. Fuse the extracted multi-scale features and input them into the fully connected layer to obtain the final medium- and long-term energy demand prediction results.

[0009] Furthermore, in the multi-scale stride patching, the multi-step method is used to perform stride patching on the energy demand time series, including:

[0010] The stride step S j ranges from 1 to the upper limit k, and the density and coverage of the patches are dynamically adjusted through different stride steps;

[0011] Obtain multi-scale subsequences

[0012]

[0013] where represents the subsequences generated by different stride steps, where the subscript * represents different stride steps; each subsequence contains multiple patches, and the number of which is equal to the stride step.

[0014] Furthermore, in the multi-scale feature extraction, it includes the steps:

[0015] A spatial channel self-attention mechanism is adopted to quantify the importance of subsequence information; by enabling the model to learn the data-based importance and context relevance to adjust the focus of attention, the quality and relevance of the feature representation are optimized;

[0016] Use the one-dimensional convolutional neural network 1dCNN to perform feature extraction on the weighted components at different scales to obtain multi-scale features.

[0017] Furthermore, use the one-dimensional convolutional neural network 1dCNN for multi-scale feature fusion, including the steps:

[0018] Before feature fusion, heterogeneous dilation of the multi-scale features is performed to convert the originally heterogeneous tensor dimensions into a consistent space;

[0019] Use the one-dimensional convolutional neural network 1dCNN to learn and fuse the features;

[0020] Perform a pooling operation on the fused features to obtain the final fused features;

[0021] After the multi-scale feature fusion component, the fused feature output result is utilized.

[0022] Furthermore, after the multi-scale feature fusion component, the fused feature output result is utilized, including the steps of:

[0023] Perform one-dimensional stretching on the fused feature vector to convert the multi-dimensional feature mapping into a one-dimensional long vector;

[0024] Input the one-dimensional long vector into a fully connected network, and the fully connected network integrates features through dense neural connections to obtain the final prediction result.

[0025] Beneficial effects of adopting this technical solution:

[0026] The present invention first adopts a multi-scale stride patch strategy to segment the time series, obtaining patches of different scales; this process ensures that the CNN can capture the dynamic characteristics of energy demand at multiple time scales. Secondly, each group of patches at a specific scale is input into a feature extraction module, which combines a spatial channel self-attention mechanism to highlight the most relevant prediction features while suppressing irrelevant or redundant information. Finally, the extracted multi-scale features are fused and input into the fully connected layer to obtain the final prediction result. This process effectively integrates information of different scales, thereby improving the accuracy and robustness of the prediction result. Description of the Drawings

[0027] Figure 1 It is a schematic flow chart of a medium and long-term energy demand prediction method based on multi-scale stride slicing of the present invention;

[0028] Figure 2 It is a schematic diagram of stride slicing in an embodiment of the present invention;

[0029] Figure 3 It is a schematic diagram of the spatial self-attention mechanism;

[0030] Figure 4 It is a schematic diagram of the channel self-attention mechanism. Detailed Embodiments

[0031] In order to make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described below with reference to the accompanying drawings.

[0032] In this embodiment, as shown in Figure 1 the present invention proposes a medium and long-term energy demand prediction method based on multi-scale stride slicing, including the steps of:

[0033] S10, perform multi-scale stride patching on the energy acquisition data, and explore the patterns and trends at different step lengths by segmenting the energy demand time series to obtain patches of different scales;

[0034] S20. Perform multi-scale feature extraction on patches of different scales, and a spatial-channel self-attention mechanism is incorporated during the multi-scale feature extraction process;

[0035] S30. Fuse the extracted multi-scale features and input them into a fully connected layer to obtain the final medium- and long-term energy demand prediction result.

[0036] As an optimized solution of the above embodiment, in the multi-scale strided patch, a multi-step method is used to perform strided patching on the energy demand time series, including:

[0037] The stride length S j ranges from 1 to the upper limit k, and the density and coverage of the patches are dynamically adjusted through different stride lengths;

[0038] Obtain multi-scale subsequences

[0039]

[0040] Among them, represents the subsequences generated by using different stride lengths, where the subscript * represents different stride lengths; each subsequence contains multiple patches, and the number of them is equal to the stride length.

[0041] As Figure 2 shown, a smaller stride length is beneficial for the convolutional network to perceive local information, and a larger stride length is beneficial for the convolutional network to perceive global information. By adopting variable stride lengths, the proposed method includes not only short strides for capturing microscopic details but also long strides for integrating macroscopic structural features. This ensures that the features of the energy demand time series at different time scales are fully reflected.

[0042] As an optimized solution of the above embodiment, in the multi-scale feature extraction, it includes the steps:

[0043] To enhance the understanding of the inter-region and inter-channel correlations in the subsequence data, a spatial-channel self-attention mechanism is adopted to quantify the importance of the subsequence information; by enabling the model to learn to adjust the focus of attention based on the importance and context relevance of the data, the quality and relevance of the feature representation are optimized.

[0044] As Figure 3 shown, the spatial self-attention mechanism enables the model to identify and emphasize the key local regions within each patch. By calculating the degree of association between each position and all other positions, the model selects the local features that best reflect the task requirements while ignoring background noise or irrelevant details. This mechanism enables the model to effectively capture the information of the energy demand time series data regardless of their spatial distribution within the patch.

[0045] The channel self-attention mechanism focuses on handling the dependencies between different channels in the feature map, such as Figure 4 shown. In a deep learning model, the output of each layer consists of multiple channels, where each channel carries a specific type of abstract information. Through the channel self-attention mechanism, the model learns which channel combinations are most crucial for the final task. This enables the model to intelligently weigh the contributions of different channels, ensuring that the feature representation is comprehensive.

[0046] The present invention combines the dual advantages of the spatial-channel self-attention mechanism, significantly improving the model's ability to perceive and utilize multi-scale information. This provides a more accurate input for subsequent feature extraction and classification tasks, thereby enhancing the overall performance and generalization ability of the model.

[0047] Use a one-dimensional convolutional neural network 1dCNN to extract features from weighted components of different scales to obtain multi-scale features.

[0048] Combined with the multi-scale strategy, 1dCNN can not only perceive local patterns but also effectively capture the complex dynamics and macroscopic structures in the energy demand time series data. By extracting features from components of different scales, 1dCNN learns a series of features from fine-grained to coarse-grained. This comprehensive feature extraction method enhances the model's ability to accurately represent the potential patterns in the data, contributing to improved performance and generalization ability.

[0049] As an optimized solution of the above embodiment, in order to integrate features from different scales and enable them to work together to drive the prediction process, use a one-dimensional convolutional neural network 1dCNN for multi-scale feature fusion, including the steps of:

[0050] Before feature fusion, heterogeneous dilation of multi-scale features is performed to transform the originally heterogeneous tensor dimensions into a consistent space; this step ensures the consistency of the model input for the subsequent fusion process.

[0051] Use a one-dimensional convolutional neural network 1dCNN for learning to fuse features; this process refines the complex patterns and deep associations hidden in the energy demand time series data.

[0052] Perform a pooling operation on the fused features to obtain the final fused features. The pooling operation not only enhances the model's sensitivity to local details of the input data but also reduces the parameter count through the built-in weight sharing mechanism, improving the computational efficiency.

[0053] After passing through the multi-scale feature fusion component, use the fused feature to output the result.

[0054] Including the steps of:

[0055] Perform a one-dimensional stretching on the fused feature vector to convert the multi-dimensional feature mapping into a one-dimensional long vector; this step ensures the continuity and integrity of the feature information and prepares for the subsequent processing of the fully connected layer.

[0056] Input the one-dimensional long vector into the fully connected network, and the fully connected network integrates features through dense neural connections to obtain the final prediction result.

[0057] To verify the effectiveness of the method proposed in the present invention for long-term prediction of energy demand data, the natural gas and crude oil demand data are used as the experimental objects. Among them, the natural gas data and the crude oil data refer to the natural gas consumption data in China and the crude oil import data in China respectively.

[0058] The present invention compares three classical energy demand time series prediction methods and comprehensively evaluates the performance of the proposed method. The first type of benchmark method is the statistical model, including exponential smoothing (ES) and autoregressive moving average model (ARIMA); these models have a strong theoretical basis and good performance in predicting stationary time series. The second type of baseline method is the ensemble learning model, including random forest (RF) and extreme gradient boosting (XGBoost); these models significantly improve the prediction accuracy and model robustness by aggregating the prediction results of multiple weak learners, and are especially good at dealing with non-linear relationships and high-dimensional data. The third type of baseline method is the deep learning model, such as deep neural network (DNN), 1dCNN, LSTM and GRU; these models dominate in complex sequence prediction tasks due to their strong non-linear mapping ability and the ability to capture long-term dependencies in time series data. Three widely recognized evaluation metrics: mean squared error (MSE), mean absolute error (MAE) and mean absolute percentage error (MAPE) are used to evaluate the performance of the model to comprehensively measure the accuracy and stability of the prediction results.

[0059] The experimental results of medium-term energy demand prediction are shown in Table 1.

[0060] Table 1 Medium-term Energy Demand Prediction Results

[0061]

[0062]

[0063] In Table 1, bold represents the optimal result and underlined represents the sub-optimal result. By analyzing the results in Table 1, it can be found that the method proposed in the present invention performs well in the medium-term prediction task. The performance of this method is the best on the natural gas data and the second best on the crude oil data.

[0064] The experimental results of long-term energy demand prediction are shown in Table 2.

[0065] Table 2 Long-term Energy Demand Prediction Results

[0066]

[0067] By analyzing the results in Table 2, it can be found that the present invention shows good performance in long-term prediction tasks. This method achieves optimal performance on both natural gas data and crude oil data. Moreover, compared with the medium-term prediction results, the MSE and MAE of each method have been improved. However, compared with the increased errors of other benchmark methods in the medium and long terms, the error increase of the present invention is smaller.

[0068] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments. What is described in the above embodiments and the specification only illustrates the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention will have various changes and improvements, and these changes and improvements all fall within the scope of the present invention claimed. The scope of the present invention claimed is defined by the appended claims and their equivalents.

Claims

1. A medium- and long-term energy demand forecasting method based on multi-scale stride slicing, characterized in that: Includes steps: S10, multi-scale step patching of energy collection data is performed to explore patterns and trends under different step lengths by segmenting the energy demand time series to obtain patches of different scales; S20, multi-scale feature extraction is performed on patches of different scales, and the spatial channel self-attention mechanism is combined in the multi-scale feature extraction process; S30, the extracted multi-scale features are fused and input into the fully connected layer to obtain the final medium- and long-term energy demand forecast results.

2. The method for predicting medium- and long-term energy demand based on multi-scale stride slices according to claim 1 is characterized in that: In the multi-scale step patching, the energy demand time series is stepped and patched using a multi-step method, including: Stride length S j The range is from 1 to the upper limit k, and the density and coverage of the patch are dynamically adjusted by different stride lengths; Get multi-scale subsequences in, Represents subsequences generated with different stride lengths, where the subscript * represents different stride lengths; each subsequence contains multiple patches, the number of which is equal to the stride length.

3. The method for predicting medium- and long-term energy demand based on multi-scale stride slices according to claim 1 is characterized in that: In multi-scale feature extraction, the steps include: A spatial channel self-attention mechanism is used to quantify the importance of subsequence information; the quality and relevance of feature expression are optimized by enabling the model to learn to adjust the focus based on the importance and contextual relevance of the data; A one-dimensional convolutional neural network (1dCNN) is used to extract features of weighted components of different scales to obtain multi-scale features.

4. The method for predicting medium- and long-term energy demand based on multi-scale stride slices according to claim 1 is characterized in that: Use one-dimensional convolutional neural network 1dCNN for multi-scale feature fusion, including the following steps: Before feature fusion, the heterogeneity of multi-scale features expands, transforming the originally heterogeneous tensor dimensions into a consistent space; Use one-dimensional convolutional neural network 1dCNN to learn and fuse features; The pooling operation is performed on the fusion features to obtain the final fusion features; After multi-scale feature fusion components, the fused features are used to output the results.

5. The method for predicting medium- and long-term energy demand based on multi-scale stride slices according to claim 4 is characterized in that: After the multi-scale feature fusion components, the fused features are used to output the results, including the following steps: Perform one-dimensional stretching on the fused feature vector to transform the multi-dimensional feature map into a one-dimensional long vector; The one-dimensional long vector is input into the fully connected network, which integrates the features through dense neural connections to obtain the final prediction result.