A multi-region collaborative power supply and demand forecasting method

Through the combination of wavelet transformation and Transformer encoder, heterogeneous data fusion and non-stationary signal processing problems in multi-region power supply and demand prediction are solved, high-precision power supply and demand prediction is achieved, and energy utilization efficiency and grid flexibility are improved.

CN120184961BActive Publication Date: 2025-07-22ZHEJIANG UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510661360.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-22
Publication Date
2025-07-22
Estimated Expiration
2045-05-22

AI Technical Summary

Technical Problem

Traditional power supply and demand prediction technology is difficult to effectively integrate multiple types of power generation and power consumption data, and cannot capture the time-frequency characteristics of non-stationary signals. The single regional prediction mode cannot adapt to the needs of coordinated scheduling in multiple regions, resulting in the problem of complementary power surplus and shortage across regions.

Method used

Wavelet transform is used to decompose power data, combined with Transformer encoder, model the spatiotemporal correlation of cross-regional power data, and predict multi-regional coordinated power supply and demand through frequency domain filtering and adaptive weight fusion.

Benefits of technology

It realizes high-precision prediction of power supply and demand in multiple regions, improves energy utilization efficiency and grid operation flexibility, and supports dynamic thermal power regulation and cross-regional scheduling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120184961B_ABST
    Figure CN120184961B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of power supply and demand forecasting. A multi-region collaborative power supply and demand forecasting method is provided, including: dividing power data into multiple independent channels, where each channel corresponds to a time series of a variable; using wavelet transform to decompose the time series of each channel respectively to obtain a trend series and a residual series, and adding patches to the trend series and the residual series; using a Transformer encoder to process the trend series and the residual series with added patches to obtain trend prediction data and residual prediction data, performing frequency domain filtering and hybrid processing to obtain target trend prediction data and target residual prediction data; using a fusion weight to fuse the target trend prediction data and the target residual prediction data to obtain a time series prediction result, and performing anti-normalization processing on the time series prediction result to obtain the predicted power supply and demand data. The present invention can achieve more accurate power supply and demand forecasting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power supply and demand forecasting, and more specifically, to a multi-region collaborative power supply and demand forecasting method. Background Art

[0002] Under the background of global energy transformation, traditional thermal power, hydropower, and renewable energy such as wind power and photovoltaic power together constitute the regional power supply system, which not only needs to meet the rigid load demand but also needs to cope with the volatility of new energy output. Accurately forecasting various types of power generation and regional electricity consumption can not only dynamically adjust the thermal power output to reduce carbon emissions but also optimize the cross-regional power dispatching strategy, improving energy utilization efficiency and grid flexibility.

[0003] Current forecasting technologies face multiple challenges: First, power generation and load data are affected by multiple variables such as meteorological conditions, equipment status, and social activities, and traditional models are difficult to effectively integrate heterogeneous data and extract deep features; Second, the time-frequency characteristics of non-stationary signals such as wind power and photovoltaic power are complex, and existing methods (such as LSTM) have insufficient ability to capture long-term time series dependence relationships; In addition, the forecasting mode for a single region or a single energy type cannot meet the requirements of multi-region collaborative dispatching, resulting in difficulties in complementing the power surplus and deficit across regions. Summary of the Invention

[0004] In view of the above problems, the present invention proposes a multi-region collaborative power supply and demand forecasting method based on wavelet transform and Transformer. By decomposing the multi-scale features of data through wavelet transform and denoising, and combining the self-attention mechanism of Transformer to model the spatio-temporal correlation of cross-regional power data, joint forecasting of multiple energy types and multiple geographical regions is achieved.

[0005] To this end, the present invention provides a multi-region collaborative power supply and demand forecasting method, an electronic device, a medium, and a computer program product to solve at least one of the above technical problems.

[0006] In the first aspect of the present invention, a multi-region collaborative power supply and demand prediction method is provided, including the following method steps: collecting power data of each region, including traditional energy power generation data, new energy power generation data, and power consumption data; dividing the power data into multiple independent channels, with each channel corresponding to a time series of a variable; using wavelet transform to decompose the time series of each channel respectively to obtain a trend series and a residual series, and adding patches to the trend series and the residual series respectively; using a Transformer encoder to process the trend series and the residual series with patches added to obtain trend prediction data and residual prediction data, performing frequency domain filtering and hybrid processing on the trend prediction data and the residual prediction data to obtain target trend prediction data and target residual prediction data; using a fusion weight to fuse the target trend prediction data and the target residual prediction data to obtain a time series prediction result, and performing inverse normalization processing on the time series prediction result to obtain predicted power supply and demand data; the fusion weight is adaptively adjusted based on the frequency domain energy in the target trend prediction data and the target residual prediction data.

[0007] In the second aspect of the present invention, an electronic device is further provided. The electronic device includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor. When the computer program is executed by the processor, the method described in any one of the foregoing items is implemented.

[0008] In the third aspect of the present invention, a storage medium is further provided. The storage medium stores a computer program that can be executed by a processor to implement the method described in any one of the foregoing items.

[0009] In the fourth aspect of the present invention, a computer program product is further provided. The computer program product includes a computer program that can be executed by a processor to implement the method described in any one of the foregoing items.

[0010] The beneficial effects of the present invention are as follows: Compared with the prior art, the present invention adopts means such as multi-source data channel processing, wavelet transform decomposition, and Transformer encoding to break through the bottlenecks of difficult heterogeneous data fusion, poor non-stationary signal processing, and weak capture of long-time series dependencies. Through frequency domain filtering and adaptive weight fusion, the prediction robustness and adaptability are enhanced. Finally, high-precision prediction of multi-region power supply and demand is achieved, which can effectively support the dynamic regulation of thermal power and cross-region scheduling, and significantly improve the energy utilization efficiency and the flexibility of power grid operation. Description of the Drawings

[0011] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can also be obtained based on these drawings without creative efforts.

[0012] Figure 1 It is a schematic flow chart of a multi-region collaborative power supply and demand prediction method disclosed in an embodiment of the present invention. Specific Embodiments

[0013] The following specific embodiments illustrate the implementation manners of the present application. Those skilled in this technology can easily understand other advantages and effects of the present application from the content disclosed in this specification. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of them. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope protected by the present application.

[0014] In addition, the technical features involved in different implementation manners of the present application described below can be combined with each other as long as they do not conflict with each other.

[0015] Under the background of the global energy transformation, the multi-region power supply system presents a complex pattern with the coexistence of traditional energy and new energy. The power supply and demand are affected by the intertwining of multiple factors such as meteorological conditions, equipment status, and social activities. In particular, the output of new energy sources such as wind power and photovoltaic power has significant volatility, and traditional prediction technologies are difficult to effectively address problems such as heterogeneous data fusion, non-stationary signal processing, and long-term sequence dependence capture.

[0016] Based on this, the present invention provides a high-precision multi-region collaborative power supply and demand prediction solution. As Figure 1 shown, an embodiment of the present invention discloses a multi-region collaborative power supply and demand prediction method, including the following method steps: S100, collecting power data of each region, including traditional energy power generation data, new energy power generation data, and power consumption data; dividing the power data into multiple independent channels, and each channel corresponds to a time series of a variable.

[0017] Considering that traditional prediction models are difficult to fuse multi-source heterogeneous data such as thermal power, wind power, and photovoltaic power and cannot fully explore the spatio-temporal correlation characteristics between variables. The present invention first collects the traditional energy power generation data (such as coal power and hydropower), new energy power generation data (such as wind power and photovoltaic power), and power consumption data of each region.

[0018] Meanwhile, for example, wind power data fluctuates violently under the influence of wind speed, while residential electricity consumption data has obvious diurnal periodicity, and the characteristics of the two are extremely different. To process these data specifically, the present invention divides power data into multiple independent channels according to variable types, and each channel corresponds to a time series of a variable. For example, channels - traditional energy power generation data, channels - new energy power generation data (which can be specifically divided into wind power and photovoltaic), channels - electricity consumption data (which can be specifically divided into residential electricity consumption, enterprise electricity consumption, etc.), etc. multiple channels, making the complex multi-dimensional data structured, facilitating subsequent refined modeling for different variable characteristics, and effectively solving the problem of heterogeneous data fusion.

[0019] S200, use wavelet transform to decompose the time series of each channel respectively to obtain a trend sequence and a residual sequence, and add patches to the trend sequence and the residual sequence respectively.

[0020] Since the output of new energy sources such as wind power and photovoltaic shows non-stationarity, it is difficult for traditional models such as LSTM to capture their complex time-frequency characteristics. Therefore, wavelet transform is used to decompose the time series in each channel. Taking wind power data as an example, through wavelet transform, it can be decomposed into a trend sequence reflecting long-term change laws (such as the output trend of wind power on a seasonal scale) and a residual sequence containing high-frequency fluctuations and noise (such as power fluctuations caused by instantaneous wind speed changes).

[0021] To further adapt to the change characteristics of the two sequences, patches are added to the trend sequence and the residual sequence respectively, such as 24-hour data segments and 1-hour data segments, to reduce the prediction complexity and enhance the ability to capture the characteristics of non-stationary signals.

[0022] S300, use a Transformer encoder to process the trend sequence and the residual sequence with added patches to obtain trend prediction data and residual prediction data, and perform frequency-domain filtering and hybrid processing on the trend prediction data and the residual prediction data to obtain target trend prediction data and target residual prediction data.

[0023] Aiming at the problem that traditional models are difficult to effectively capture the long-distance dependence relationship between sequences and the prediction results are easily affected by noise when processing long-time series data. The present invention uses a Transformer encoder to process the trend and residual sequences after adding patches. The self-attention mechanism of the Transformer can efficiently capture the dependence relationship at any position within the sequence. For example, it can capture the change laws of electricity load across days and weeks, and then obtain trend prediction data and residual prediction data.

[0024] The Transformer encoder extracts features by processing the patched trend sequence and residual sequence of the input. In this process, positional encoding is used to retain the time order information of the data.

[0025] Assume the input patched data is , where P is the patch length and N is the number of patches. Through a trainable linear projection , it is mapped to the latent space of the Transformer, and a learnable position encoding is added to obtain the data finally input to the Transformer encoder , and its mathematical expression is .

[0026] The multi-head self-attention mechanism is the core component of the Transformer, which allows the model to capture information in different sub-spaces. For the input , each head will transform it into a query matrix , a key matrix and a value matrix , and the specific calculation is: , where .

[0027] The output of the scaled dot-product attention is : .

[0028] The multi-head self-attention mechanism concatenates the outputs of multiple heads to obtain richer information.

[0029] The position-wise feed-forward network further processes the output of the multi-head self-attention mechanism. It consists of two linear layers and an activation function. Assume the output of the multi-head self-attention mechanism is , and the calculation process of the position-wise feed-forward network is:

[0030] First, project from dimension to , that is ; then apply the activation function to obtain ; then perform random inactivation through the Dropout layer to obtain ; finally, project the dimension from back to , that is .

[0031] The prediction head is responsible for transforming the output of the Transformer encoder into the final prediction dimension. In the individual mode, a linear layer is set separately for each variable for prediction. In the non-individual mode, all variables share a linear layer and directly process the input.

[0032] To improve the prediction robustness, the above-mentioned trend prediction data and residual prediction data are also subjected to frequency-domain filtering and hybrid processing. For example, the data is transformed into the frequency domain through FFT, and a band-pass filter is used to remove the power fluctuation noise caused by abnormal weather, and different frequency components are weighted and mixed to enhance the useful signals. Finally, the target trend and residual prediction data are obtained, significantly reducing the impact of abnormal factors on the prediction results. Specifically as follows: Frequency-domain filtering is a signal processing technique based on the Fourier transform. By converting the time-domain signal into the frequency domain, analyzing the components of the signal at different frequencies, and then processing specific frequency components according to needs to achieve the purpose of removing noise or enhancing useful signals. Perform a fast Fourier transform (FFT) on the preliminary prediction results to convert the time-domain data into the frequency domain and obtain the frequency-domain representation. . When performing frequency-domain filtering, assume is the filtering coefficient. By multiplying the frequency-domain signal with corresponding elements, the enhancement or suppression of specific frequency components is achieved. . Here, represents the filtering operation on the last dimension. By adjusting the filtering coefficient, certain frequency components can be selectively retained or removed, thus achieving the effect of removing noise interference.

[0033] S400, use the fusion weight to fuse the target trend prediction data and the target residual prediction data to obtain the time series prediction result, and perform inverse normalization processing on the time series prediction result to obtain the predicted power supply and demand data; the fusion weight is adaptively adjusted based on the frequency-domain energy in the target trend prediction data and the target residual prediction data.

[0034] Since a single prediction model is difficult to balance both trend and fluctuation characteristics, and the traditional fixed-weight fusion method cannot adapt to the dynamic changes of the power system. In this step, the present invention calculates the frequency-domain energy of the target trend and residual prediction data, and dynamically adjusts their respective fusion weights according to the frequency-domain energy.

[0035] For example, during the high-temperature period in summer, the air-conditioning load of residents surges, and the power consumption data fluctuates significantly at high frequencies. At this time, the proportion of high-frequency energy in the residual prediction data increases, and the weight of the residual prediction is adaptively increased to pay more attention to short-term load fluctuations; while during the low-power consumption period, the proportion of low-frequency energy is high, and the weight of the trend prediction is adaptively increased to rely on long-term rules for prediction.

[0036] Through adaptive weighted fusion, the impacts of trends and fluctuations can be automatically balanced in different scenarios, and finally a high-precision time series prediction result can be obtained. It is also necessary to perform denormalization on the obtained time series prediction result to restore it to the scale of the original data. Only then can the predicted power supply and demand data be obtained. In this way, the predicted result after denormalization is presented in the unit and magnitude of the original data, which is easier for relevant personnel such as power system managers and engineers to understand and interpret. Without denormalization, the prediction result is only an abstract normalized value, making it difficult to directly establish a connection with the actual power production and consumption situation, which is not conducive to the formulation of relevant decisions.

[0037] Compared with the prior art, the present invention uses means such as multi-source data channel processing, wavelet transform decomposition, and Transformer encoding to break through the bottlenecks of difficult heterogeneous data fusion, poor non-stationary signal processing, and weak capture of long-time series dependencies. Through frequency domain filtering and adaptive weight fusion, the prediction robustness and adaptability are enhanced. Finally, high-precision prediction of power supply and demand in multiple regions is achieved, which can effectively support the dynamic regulation of thermal power and cross-regional scheduling, and significantly improve the energy utilization efficiency and grid operation flexibility.

[0038] Optionally, before decomposing the time series of each channel using wavelet transform, it further includes: performing data preprocessing on each piece of the power data, including checking the consistency of data measurement units, the continuity of time series, and performing RevIN reversible instance normalization on the data.

[0039] Before decomposing the time series of each channel using wavelet transform, the following preprocessing needs to be performed on the time series: Checking the consistency of data measurement units: The sources of power data are extensive, and the data measurement units collected in different regions and by different devices may vary. For example, in some regions, the power generation power is recorded in megawatts (MW), while in others it may be in kilowatts (kW). If the units are inconsistent, it will lead to errors in subsequent calculations and analyses, affecting the accuracy of the prediction results. By unifying the units, the data can be made dimensionally consistent, providing a reliable basis for subsequent processing.

[0040] Checking the continuity of the time series: Power data is time series data, and the continuity of time is crucial. During actual data collection, data may be missing or timestamps may be discontinuous due to equipment failures, communication problems, etc. For example, if the wind power output data at a certain moment is missing and not processed, it will cause a break in the time series, destroying the integrity and regularity of the data. Checking and repairing the continuity of the time series can ensure the coherence of the data in the time dimension, enabling subsequent analyses and model training to more accurately reflect the changing trends of power data.

[0041] RevIN Reversible Instance Normalization: The numerical range of power data may vary greatly, and the orders of magnitude of different types of data (such as thermal power generation and residential electricity consumption) are different. RevIN reversible instance normalization normalizes the data to a specific range by calculating the mean and standard deviation of each sample. On the one hand, this can accelerate the convergence speed of model training because the normalized data allows the model to more easily learn the data features; on the other hand, after the model training is completed, the recorded mean and standard deviation are used for denormalization to restore the prediction results to the original data scale, facilitating practical application and analysis.

[0042] Optionally, the step of using wavelet transform to decompose each channel's time series respectively to obtain a trend series and a residual series includes: determining a suitable wavelet basis and the number of decomposition levels; independently performing discrete wavelet transform on each channel, calculating different trend sub-data and residual sub-data according to the value of n, combining the trend sub-data corresponding to different values of n to obtain a trend series, and combining the residual sub-data corresponding to different values of n to obtain a residual series; where the value of n is determined according to the length of the time series.

[0043] The wavelet basis is the core of wavelet transform. Different wavelet bases have different characteristics, such as compact support, symmetry, etc., which will have a significant impact on the decomposition results. For example, the db4 wavelet basis has good smoothness and is suitable for processing some relatively smooth signals; while the sym8 wavelet basis performs well in maintaining signal characteristics. When choosing a suitable wavelet basis, the characteristics of power data, such as the fluctuation frequency and noise situation of the data, should be comprehensively considered.

[0044] The number of decomposition levels is also crucial. If the number of decomposition levels is too small, the multi-scale features of the data cannot be fully extracted; if the number of decomposition levels is too large, excessive detail noise may be introduced, increasing the computational complexity. The decomposition effect under different numbers of decomposition levels can be compared through experiments, and combined with the actual situation of power data, such as the time span and variation law of the data, to determine a number of decomposition levels that can effectively extract features without excessive calculation.

[0045] Each channel of power data corresponds to the time series of different variables, such as wind power, thermal power generation, residential electricity consumption, etc., and they each have unique variation laws and characteristics. Independently performing discrete wavelet transform on each channel can analyze and process according to the characteristics of each variable. Taking the wind power channel as an example, its data is affected by factors such as wind speed and wind direction, with large fluctuations and obvious randomness. Through discrete wavelet transform, this complex fluctuation can be decomposed into different frequency components, facilitating a clearer understanding of its change trend and fluctuation characteristics. For the thermal power generation channel, its change is relatively stable, and the results of discrete wavelet transform will also show different characteristics. This independent processing method can fully explore the potential information of each variable and provide richer features for subsequent prediction.

[0046] Meanwhile, in the discrete wavelet transform, the value of n plays a key role. In the present invention, the value of n is determined based on the length of the time series. Taking one - layer wavelet decomposition as an example, the description is as follows:

[0047] Trend sub - data: 。

[0048] Residual sub - data: 。

[0049] Among them, is the scaling function, is the wavelet function. When performing one - layer wavelet decomposition, the value range of n is related to L / 2, where L is the length of the time series. As the value of n changes, using the above - mentioned wavelet transform formula, different trend sub - data and residual sub - data can be calculated. These sub - data respectively reflect the trends and fluctuations of power data at different times and different frequencies.

[0050] Combining the trend sub - data corresponding to all different values of n forms a trend sequence, which can reflect the long - term change trend of power data, such as the seasonal growth trend of monthly electricity consumption in a certain area. Combining the residual sub - data corresponding to all different values of n constitutes a residual sequence, which contains high - frequency fluctuations and noise information of the data. For example, the abnormal fluctuations in electricity consumption within a short period due to sudden weather changes are reflected in the residual sequence.

[0051] In the above - mentioned way, the original complex power time series is decomposed into a trend sequence and a residual sequence.

[0052] Optionally, adding patches to the trend sequence and the residual sequence respectively includes: analyzing the energy distribution of the trend sequence and the residual sequence, determining the first patch corresponding to the trend sequence and the second patch corresponding to the residual sequence according to the energy part; the patch lengths of the first patch and the second patch are different; adding the first patch to the trend sequence and adding the second patch to the residual sequence.

[0053] The trend sequence and the residual sequence contain information on different aspects of power data, and the energy distribution can reflect the severity of data changes and the main features. By analyzing the energy distribution, it can be understood where the energy of the trend sequence and the residual sequence is concentrated under different frequency components. Methods such as spectrum analysis can be used to calculate the energy distribution. For example, performing Fourier transforms on the trend sequence and the residual sequence respectively to obtain their frequency - domain representations, and then calculating the energy of each frequency component.

[0054] Based on the analysis of the energy distributions of the trend sequence and the residual sequence, it can be concluded that the characteristics of their energy distributions are different. The trend sequence usually reflects the long-term and slowly changing part, and the energy is mostly concentrated in the low-frequency band; while the residual sequence contains high-frequency fluctuations and noise, and the energy is relatively prominent in the high-frequency band. Therefore, the present invention sets patches of different lengths for the two to enable the Transformer encoder to more effectively learn different features of the sequence. Specifically: for the trend sequence, since its data changes slowly and the energy of the low-frequency components dominates, it is suitable for a longer first patch. The long patch can contain more data points, thereby capturing the long-term change trends and patterns. For example, when analyzing the annual thermal power generation trend, a longer patch (such as a data segment in quarterly units) can better reflect the seasonal changes and the long-term growth or decline trends.

[0055] However, the residual sequence data changes rapidly and the energy of the high-frequency components is high, so it is suitable for a shorter second patch. The short patch can focus on local rapid fluctuations and detailed information. For example, the short-term power fluctuations of wind power affected by instantaneous wind speed changes can be more accurately captured using a shorter patch (such as a data segment in minute units).

[0056] After determining the first patch and the second patch, add them to the trend sequence and the residual sequence respectively. Adding the first patch to the trend sequence can integrate the data information of a longer time period. When the Transformer encoder processes the trend data, it can learn the long-term change patterns from a more macroscopic perspective. Adding the second patch to the residual sequence can highlight the local details and high-frequency fluctuations of the data. When the Transformer encoder processes this part of the data, it can keenly capture the instantaneous changes.

[0057] Optionally, the fusion weights are adaptively adjusted based on the frequency-domain energy in the target trend prediction data and the target residual prediction data, including: performing a fast Fourier transform on the target trend prediction data and the target residual prediction data refined by the LeadRefiner module to obtain the frequency-domain representations of the target trend prediction data and the target residual prediction data, and respectively calculating the first frequency-domain energy of the target trend prediction data and the second frequency-domain energy of the target residual prediction data according to the frequency-domain representations; calculating the first fusion weight and the second fusion weight according to the first frequency-domain energy and the second frequency-domain energy.

[0058] Before calculating the frequency-domain energy, first perform FFT on the target trend prediction data and the target residual prediction data refined by the LeadRefiner module. The LeadRefiner module can optimize the target trend prediction data and the target residual prediction data, remove some interference information, and improve the data quality. The role of FFT is to convert the prediction data in the time domain to the frequency domain because the power data shows complex changes in the time domain and it is difficult to directly analyze the characteristics of different frequency components.

[0059] After the FFT conversion, the data can clearly show the different frequency components in the frequency domain. For example, after converting the power load prediction data over a period of time from the time domain to the frequency domain, it can be seen that the low-frequency part corresponds to the long-term trend of the load (such as the periodic changes on weekdays and weekends), and the high-frequency part reflects the short-term fluctuations (such as the load changes caused by the instantaneous startup of equipment).

[0060] According to the frequency-domain representation obtained by FFT, calculate the first frequency-domain energy of the target trend prediction data and the second frequency-domain energy of the target residual prediction data respectively. The calculation of the frequency-domain energy is obtained by summing the squared amplitudes of the frequency-domain signals. The calculation formula is: ; where is the frequency-domain representation of the target trend prediction data, represents different frequency points in the frequency domain, is the total number of frequency points.

[0061] ; where is the frequency-domain representation of the target residual prediction data, represents different frequency points in the frequency domain, is the total number of frequency points.

[0062] The frequency-domain energy reflects the relative importance of each frequency component in the entire data. If the frequency-domain energy of a certain frequency component is high, it means that the signal corresponding to this frequency accounts for a relatively large proportion in the original data and has a greater impact on the prediction result.

[0063] Optionally, calculating the first fusion weight and the second fusion weight according to the first frequency-domain energy and the second frequency-domain energy includes: ; ; where is the first fusion weight, is the second fusion weight; is the first frequency-domain energy, is the second frequency-domain energy, is a minimum value to prevent the denominator from being 0.

[0064] According to the calculated first frequency-domain energy and second frequency-domain energy, the first fusion weight and the second fusion weight are calculated through the above formula. The principle of this calculation method is to allocate weights based on the ratio of frequency-domain energy: when the first frequency-domain energy (corresponding to the target trend prediction data) is relatively high, it indicates that the trend dominates in the prediction result. At this time, set to be larger, which means that in the final prediction result fusion, the contribution of the trend prediction data is greater; conversely, when the second frequency-domain energy (corresponding to the target residual prediction data) is high, set to be larger, and the role of the residual prediction data in the fusion result is more prominent.

[0065] This method of adaptively adjusting the fusion weight according to the frequency-domain energy can dynamically balance the influence of trends and fluctuations in the prediction result. In different power scenarios, the importance of trends and residuals for prediction is different. For example, when predicting long-term power supply and demand, the trend prediction data is more critical. At this time, the frequency-domain energy of the trend prediction data is higher, and its corresponding fusion weight will also be larger; while in dealing with emergencies (such as sudden load changes caused by extreme weather), the residual prediction data can better reflect short-term fluctuations, its frequency-domain energy will increase, and the fusion weight will also increase accordingly, so that the prediction result is more in line with the actual situation and improves the accuracy and adaptability of the prediction.

[0066] Optionally, the step of using wavelet transform to decompose each channel's time series respectively to obtain a trend sequence and a residual sequence includes: during the discrete wavelet transform process, the reduction amplitude of n is controlled by adjusting the scaling factor; wherein, the scaling factor is determined according to the time span between the predicted power supply and demand data and the current moment.

[0067] Discrete wavelet transform is an important means to decompose a time series into different frequency components, and the value range of n affects the detail degree of different frequency components in the decomposition result. In the original wavelet transform process, as the decomposition level increases, the value range of n usually shrinks exponentially to gradually focus on finer frequency features. For example, at the j-th layer of decomposition, the value range of n is: , where is the length of the time series.

[0068] On this basis, the present invention introduces a scaling factor. By changing the value of the scaling factor, the speed at which the value range of n shrinks as the decomposition level increases can be changed. For example, , is the scaling factor.

[0069] For example, when the scaling factor increases, the range of n values shrinks faster, meaning that finer high-frequency components can be focused on within fewer decomposition levels; conversely, when the scaling factor decreases, the range of n values shrinks more slowly, and relatively coarser-grained information can be retained across more decomposition levels. This allows for flexible control over the extraction of different frequency components according to actual requirements.

[0070] At the same time, power supply and demand data exhibit different variation characteristics over different time spans. For longer prediction time spans, such as predicting power supply and demand for the next month or quarter, more attention is paid to the long-term trends and low-frequency characteristics of power data, such as seasonal variations, electricity consumption patterns on weekdays and weekends, etc. At this time, to retain more low-frequency information in the wavelet transform, a smaller scaling factor is set. The smaller scaling factor causes the range of n values to shrink less, and a certain amount of low-frequency information can be included across more decomposition levels, thus better capturing the long-term trends.

[0071] In contrast, when the prediction time span is short, such as predicting power supply and demand for the next week, more attention needs to be paid to the high-frequency fluctuations in the data, such as changes in power consumption caused by sudden equipment failures, short-term power consumption peaks, etc. In this case, a larger scaling factor is set, causing the range of n values to shrink rapidly, enabling the wavelet transform to quickly focus on the high-frequency components and accurately capture these short-term fluctuation characteristics.

[0072] An embodiment of the present invention also provides an electronic device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor. When the computer program is executed by the processor, it implements the method described in any one of the foregoing.

[0073] An embodiment of the present invention also provides a storage medium that stores a computer program executable by a processor to implement the method described in any one of the foregoing.

[0074] An embodiment of the present invention also provides a computer program product that includes a computer program executable by a processor to implement the method described in any one of the foregoing.

[0075] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been generally described according to their functions in the above description. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.

[0076] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of various equivalent modifications or substitutions, and these modifications or substitutions should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A multi-region collaborative power supply and demand forecasting method, characterized in that: It includes the following method steps: Collect power data for each region, including traditional energy generation data, new energy generation data, and power consumption data; divide the power data into multiple independent channels, and each channel corresponds to a time series of a variable; Use wavelet transform to decompose the time series of each channel respectively to obtain a trend series and a residual series, and add patches to the trend series and the residual series respectively; Use a Transformer encoder to process the trend series and the residual series with patches added to obtain trend prediction data and residual prediction data, perform frequency domain filtering and hybrid processing on the trend prediction data and the residual prediction data to obtain target trend prediction data and target residual prediction data; Use a fusion weight to fuse the target trend prediction data and the target residual prediction data to obtain a time series prediction result, and perform inverse normalization processing on the time series prediction result to obtain predicted power supply and demand data; The fusion weight is adaptively adjusted based on the frequency domain energy in the target trend prediction data and the target residual prediction data; The use of wavelet transform to decompose the time series of each channel respectively to obtain a trend series and a residual series includes: Determine a suitable wavelet basis and decomposition level; Perform discrete wavelet transform on each channel independently, calculate different trend sub-data and residual sub-data according to the value of n, combine the trend sub-data corresponding to different values of n to obtain a trend series, and combine the residual sub-data corresponding to different values of n to obtain a residual series; where the value of n is determined according to the length of the time series; The adding patches to the trend series and the residual series respectively includes: Analyze the energy distribution of the trend series and the residual series, and determine the first patch corresponding to the trend series and the second patch corresponding to the residual series according to the energy distribution; the patch lengths of the first patch and the second patch are different; Add the first patch to the trend series and add the second patch to the residual series.

2. The multi-region collaborative power supply and demand forecasting method according to claim 1, wherein: Before using wavelet transform to decompose the time series of each channel respectively, it further includes: Perform data preprocessing on each piece of power data, including checking the consistency of data measurement units, time series continuity, and performing RevIN reversible instance normalization on the data.

3. A multi-region collaborative power supply and demand forecasting method according to claim 1, characterized in that: The fusion weight is adaptively adjusted based on the frequency domain energy in the target trend prediction data and the target residual prediction data, including: Perform fast Fourier transform on the target trend prediction data and the target residual prediction data refined by the LeadRefiner module to obtain the frequency domain representations of the target trend prediction data and the target residual prediction data, and calculate the first frequency domain energy of the target trend prediction data and the second frequency domain energy of the target residual prediction data respectively according to the frequency domain representations; Calculate a first fusion weight and a second fusion weight according to the first frequency domain energy and the second frequency domain energy.

4. A multi-region collaborative power supply and demand forecasting method according to claim 3, characterized in that: Calculating a first fusion weight and a second fusion weight according to the first frequency-domain energy and the second frequency-domain energy includes: ; wherein, is the first fusion weight, is the second fusion weight; is the first frequency-domain energy, is the second frequency-domain energy, is a minimum value to prevent the denominator from being zero.

5. A multi-region collaborative power supply and demand forecasting method according to claim 4, characterized in that: The use of wavelet transform to decompose the time series of each channel respectively to obtain a trend series and a residual series includes: During the discrete wavelet transform process, the reduction amplitude of n is controlled by adjusting the scaling factor; wherein, the scaling factor is determined according to the predicted power supply and demand data and the time span of the current moment.

6. An electronic device, characterized in that: The electronic device includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, and the computer program, when executed by the processor, implements the method according to any one of claims 1-5.

7. A storage medium, characterized in that: The storage medium stores a computer program executable by a processor to implement the method according to any one of claims 1-5.

8. A computer program product, characterized in that: The computer program product contains a computer program executable by a processor to implement the method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Power consumption prediction method and device, and terminal

    CN117094451A

  • Power load prediction method and system based on variational mode decomposition multi-granularity

    CN118100142A