Electricity price decomposition integrated prediction method based on snow ablation optimization and attention mechanism

Through the integrated prediction method of electricity price decomposition and attention mechanism, the problem of low short-term electricity price prediction accuracy is solved, more accurate and robust electricity price prediction is achieved, and pattern recognition capabilities are improved.

CN119205167APending Publication Date: 2024-12-27XIDIAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411142541.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-20
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

Short-term electricity price prediction is difficult to accurately capture the complex electricity price fluctuation laws of the power market. Due to the influence of nonlinear and noise characteristics, traditional neural network models have difficulty in selecting hyperparameters during iterative training, resulting in low prediction accuracy.

Method used

The integrated prediction method of electricity price decomposition based on snow ablation optimization and attention mechanism is adopted, and the electricity price time series is decomposed into a stationary subsequence through variational modal decomposition. The parameters are optimized using the snow ablation optimization algorithm, and iterative training is carried out in combination with the convolutional recurrent neural network. Generate an integrated model for electricity price prediction.

Benefits of technology

It improves the accuracy and robustness of short-term electricity price prediction, reduces the difficulty of model training, enhances pattern recognition capabilities, and can more accurately predict electricity price situations in specific scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119205167A_ABST
    Figure CN119205167A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the technical field of artificial intelligence prediction, and discloses an electricity price decomposition integrated prediction method based on snow ablation optimization and an attention mechanism, and the method comprises the steps: generating electricity price sample features, an original sample feature set, and a time correlation feature set, and constructing a total feature set; variational mode decomposition is carried out on the electricity price sample features to obtain K electricity price components, similarities between the total feature set and the K electricity price components are calculated respectively, and a final feature set and a final sample feature data set corresponding to the final feature set are obtained in combination with an attention mechanism; and combining the final sample feature data set with the K electricity price components, performing parameter optimization based on a snow ablation optimization algorithm, inputting the parameters into a convolutional recurrent neural network component model for training, obtaining K electricity price prediction component models, and weighting and integrating the K electricity price prediction component models into an electricity price prediction integrated model, thereby performing electricity price prediction. According to the method, the difficulty of short-term electricity price prediction is reduced, and the accuracy of short-term electricity price prediction is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of artificial intelligence prediction technology, and in particular to an electricity price decomposition and integrated prediction method based on snow melting optimization and attention mechanism. Background Art

[0002] As my country attaches increasing importance to sustainable development, in order to reduce carbon emissions and promote the development of new energy, my country has promulgated a series of emission reduction policies. In the process of achieving the "dual carbon" goal, it is very important to accurately and effectively predict electricity prices. Electricity price forecasting can provide traders of power generation companies with all-round trading auxiliary decision support, helping them to manage spot transactions and formulate power generation strategies more scientifically and effectively, thereby promoting efficient use of energy and reducing waste.

[0003] With the promotion of power market reform and new energy policies, the market structure and operation mode have undergone major changes. These changes have made the market supply and demand relationship more complex and unstable, which in turn makes it difficult for traditional electricity price forecasting models to accurately capture the more complex electricity price fluctuations in the power market. Short-term electricity price data often show nonlinear and unstable characteristics, which brings great difficulties to modeling and forecasting. In addition, electricity prices are affected by a variety of external factors, including weather, market supply and demand, and policy changes. The uncertainty of these factors has increased the complexity of short-term electricity price forecasting. Power generation companies are in urgent need of more data and more comprehensive models for short-term electricity price forecasting.

[0004] In recent years, some research teams have proposed many novel methods for short-term electricity price forecasting. One of the methods is to combine variational mode decomposition (VMD) and gated recurrent unit neural network (GRU). This method decomposes the electricity price curve into multiple smooth and predictable components, and uses GRU to predict each component, and finally integrates the prediction results of each component to obtain the final electricity price prediction result. In addition, as the attention mechanism expands from the field of computer vision to the field of natural language processing, many research teams use it in time series forecasting to capture the temporal dependency of data.

[0005] However, short-term electricity prices are non-stationary and nonlinear, and often produce fluctuations and noise. A single neural network model cannot identify the pattern of electricity prices well. When iteratively training the neural network model, the selection of hyperparameters cannot be simply set arbitrarily, and can only be selected based on experience. The selected parameters are unlikely to be the parameters that allow the model to achieve the best prediction accuracy, and they cannot meet the learning and training of different electricity price data curves. Summary of the invention

[0006] The purpose of the embodiment of the present application is to propose a method for electricity price decomposition and integrated prediction based on snow melt optimization and attention mechanism, which extracts original features through the attention mechanism and uses the snow melt optimization algorithm to perform parameter optimization, thereby shortening the time required for model training, reducing the difficulty of short-term electricity price prediction, and improving the accuracy of short-term electricity price prediction.

[0007] In order to solve the above technical problems, an embodiment of the present application proposes an electricity price decomposition integrated prediction method based on snow melting optimization and attention mechanism, the method comprising the following steps: generating electricity price sample features based on the collected electricity price sample data; generating an original sample feature set based on the collected original sample data, generating a time-related feature set based on the time of each node of each day in the original sample data, and constructing a total feature set based on the original sample feature set and the time-related feature set; wherein the original sample data includes power consumption sample data, power generation sample data and meteorological sample data; performing variational mode decomposition on the electricity price time series of the electricity price sample features to obtain K electricity price components, calculating the similarity between the total feature set and the K electricity price components respectively, and The feature extraction is performed on the collection set to obtain the final feature set and its corresponding final sample feature data set, wherein K is an integer greater than 1; the final sample feature data set is respectively combined with K electricity price components to obtain K component data sets, and parameter optimization is performed based on the snow melting optimization algorithm. The parameters of the pre-built convolutional recurrent neural network component model are set according to the best training parameters obtained by optimization, and the K component data sets are respectively input into the convolutional recurrent neural network component model for iterative training to obtain K electricity price prediction component models; the K electricity price prediction component models are weighted integrated to obtain an electricity price prediction integrated model; based on the original data and electricity price data of t time nodes before the day to be predicted, and the electricity price prediction integrated model, the electricity price prediction result for the day to be predicted is obtained, wherein t is an integer greater than 1.

[0008] An embodiment of the present application also proposes an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the electricity price decomposition integrated prediction method based on snow ablation optimization and attention mechanism as described above.

[0009] An embodiment of the present application also proposes a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it can implement the electricity price decomposition and integrated prediction method based on snow melting optimization and attention mechanism as described above.

[0010] The embodiment of the present application provides an electricity price decomposition integrated prediction method based on snow melt optimization and attention mechanism. The original features are extracted through the attention mechanism, so that the model training pays more attention to the features that are more relevant to the electricity price. The variational mode decomposition algorithm is used to decompose the electricity price time series into relatively stable subsequences, and the snow melt optimization algorithm is used to optimize the decomposition parameters of the variational mode decomposition and the training parameters of each convolutional recurrent neural network component model, thereby reducing the training difficulty and prediction difficulty of the convolutional recurrent neural network component model. In addition, the electricity price prediction integrated model is obtained by integrating multiple decomposed electricity price prediction component models, and the electricity price prediction integrated model has high robustness in electricity price prediction. Compared with the currently proposed electricity price prediction methods, the electricity price prediction integrated model has stronger pattern recognition capabilities and can more accurately predict the electricity price situation in specific scenarios, thereby helping power generation companies to better arrange power generation tasks.

[0011] In some optional embodiments, the dimension of the original sample feature set F is N, F = {F1, F2, ..., F N}, the electricity price sample feature Y contains the electricity price sample information at M moments, and the original sample feature set F and the electricity price sample feature Y together form an original sample feature data set D with M rows and N+1 columns F , D F =[x i,1 , x i,2 , ..., x i,N ,y i ],i=1,2,...,M,x i,j Represents the feature F at the i-th moment j The value of y i Represents the value of the electricity price sample feature Y at the i-th moment;

[0012] A time-related feature set is generated based on the time of each node in the original sample data every day, and a total feature set is constructed based on the original sample feature set and the time-related feature set, including:

[0013] Based on the original sample feature dataset D F Each row in the table corresponds to the specific time of the target moment in a day, and generates the monthly features F containing twelve months. N+1 、Day and night characteristics F N+2 、Weekend and weekday characteristics F N+3 and the seasonal feature F containing four seasons N+4 ; Among them, F N+1 ={0, 1, 2, ..., 11}, F N+2 ={0,1},F N+2 =0 means daytime characteristics, F N+2 =1 indicates night characteristics, FN+3 ={0, 1, 2}, F N+3 =0 indicates intra-week characteristics, F N+3 =1 indicates Saturday feature, F N+3 =2 indicates Sunday feature, F N+4 ={0, 1, 2, 3};

[0014] Generate business hours feature F based on local business working hours N+5 ; Among them, F N+5 ={0,1},F N+5 =0 means resting characteristics, F N+5 =1 indicates the operating characteristic;

[0015] Based on the month feature F N+1 、Day and night characteristics F N+2 、Weekend and weekday characteristics F N+3 、Seasonal characteristics F N+4 and business hours feature F N+5 , generate a time-related feature set F add , F add ={F N+1 , F N+2 , F N+3 , F N+4 , F N+5};

[0016] Based on the original sample feature set F and the time-related feature set F add Construct the total feature set F tot , F tot ={F1, F2, ..., F N , F N+1 , F N+2 , F N+3 , F N+4 , F N+5}.

[0017] In some optional embodiments, variational modal decomposition is performed on the electricity price time series of the electricity price sample characteristics to obtain K electricity price components, including: based on the maximum and minimum values ​​in the electricity price time series of the electricity price sample characteristics, linear normalization is performed on the electricity price time series to obtain the linearly normalized electricity price time series; using a snow melting optimization algorithm to find the optimal decomposition parameters corresponding to the variational modal decomposition of the linearly normalized electricity price time series, the optimal decomposition parameters including a penalty factor α and the number of modal components K; based on the optimal decomposition parameters found, variational modal decomposition is performed on the linearly normalized electricity price time series to obtain K electricity price components

[0018] In some optional embodiments, the similarity between each feature component in the total feature set and the K electricity price components is calculated respectively, which is implemented by the following formula:

[0019]

[0020] Among them, X ni Represents the total feature set F tot The i-th instance of the n-th feature in y ji represents the i-th instance of the j-th electricity price component, θ nj Represents the total feature set F tot The similarity between the nth characteristic component and the jth electricity price component in ;

[0021] Based on the similarity and attention mechanism, the total feature set is extracted to obtain the final feature set and its corresponding final sample feature dataset, including:

[0022] Let the given target feature be Query, and use Key to represent the total feature set F tot Each feature in, using Value to represent the total feature set F tot The numerical values ​​corresponding to each feature in ;

[0023] Calculate the correlation between the query and different keys, that is, determine and output the weight coefficients of different values;

[0024] Use the S0ftmax function to normalize the weight coefficients of different output Values ​​to obtain the normalized weight coefficients of each Value;

[0025] Each Value is weighted according to the normalized weight coefficient of each Value to obtain the final feature set F sel And its corresponding final sample feature dataset

[0026] In some optional embodiments, the final sample feature data set is combined with K electricity price components respectively, and then input into the pre-built convolutional recurrent neural network component model, and the parameters are optimized based on the snow melting optimization algorithm to obtain K electricity price prediction component models, including: With K electricity price components Combine and construct K component data sets D with M rows and N+6 columns IMFj ;in, Each component data set D IMFj Divide into training set D according to the preset ratio trainj , validation set D valj and the test set D testj; Use the snow melting optimization algorithm to find the optimal training parameters of the pre-built convolutional recurrent neural network component model. The optimal training parameters include the learning rate lr, the number of iterations num_epochs, the number of sample inputs batch_size, the number of nodes of the hidden layer neurons hidden_size, and the number of neural network layers num_layers; each training set D trainj The K electricity price prediction component models M are obtained by iteratively training the convolutional recurrent neural network component models based on the optimal training parameters found. j .

[0027] In some optional embodiments, the convolutional recurrent neural network component model is composed of a convolutional layer, a pooling layer, a Dropout layer, a GRU layer and a fully connected layer; the convolutional layer is used to extract features and mine the correlation between features; the pooling layer is used to compress the feature dimension and simplify the complexity of calculation; the Dropout layer is used to randomly select neurons in the network with a preset probability to prevent overfitting; the GRU layer is used to process the data after dimensionality reduction and learn the dependency relationship between features; the fully connected layer is used to output the results.

[0028] In some optional embodiments, the K electricity price prediction component models are weighted and integrated by the following formula to obtain an electricity price prediction integrated model:

[0029]

[0030] Among them, W j represents the integrated weight coefficient corresponding to the j-th electricity price forecast component model, M tot In the process of variational mode decomposition, the electricity price time series is essentially equal to the sum of the subsequences obtained by decomposition. Therefore, the relationship between the sub-model obtained by sub-sequence training and the integrated model should also be cumulative. The integrated weight coefficient W j It can be set to 1. If other decomposition algorithms are used, it is necessary to consider the relationship between the electricity price time series and the decomposed subsequences, and then change the integrated weight coefficient W j .

[0031] In some optional embodiments, the original sample features generated based on the meteorological sample data include air pressure feature pressure, light irradiance feature light, ambient temperature feature temperature, humidity humidity, wind speed feature velocity, whether it is raining feature rain and whether it is snowing feature snow; wherein, rain = {0, 1}, rain = 0 means no rain, rain = 1 means rain, snow = {0, 1}, snow = means no snow, snow = 1 means snow. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] One or more embodiments are exemplarily described by the pictures in the corresponding drawings, and these exemplary descriptions do not constitute limitations on the embodiments.

[0033] Figure 1 is a flowchart of an electricity price decomposition integrated prediction method based on snow melting optimization and attention mechanism provided by an embodiment of the present application;

[0034] Figure 2 is a flowchart of finding optimal parameters using a snow melting optimization algorithm provided by an embodiment of the present application;

[0035] Figure 3 is a schematic diagram of the principle of the attention mechanism provided in one embodiment of the present application;

[0036] Figure 4 is a schematic diagram of the network structure of a convolutional recurrent neural network component model provided in one embodiment of the present application;

[0037] Figure 5 It is a schematic diagram of the change of the envelope entropy value in the process of optimizing the decomposition parameters of the variational mode decomposition provided in one embodiment of the present application;

[0038] Figure 6 is the electricity price component provided in one embodiment of the present application Schematic diagram of

[0039] Figure 7 is the electricity price component provided in one embodiment of the present application Schematic diagram of

[0040] Figure 8 is the R of M1 provided in one embodiment of the present application 2 Schematic diagram of value changes;

[0041] Fig. 9 is the R of M2 provided in one embodiment of the present application 2 Schematic diagram of value changes;

[0042] Fig.10 It is a structural schematic diagram of an electronic device provided by another embodiment of the present application. DETAILED DESCRIPTION

[0043] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in the present application, many technical details are proposed in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can also be implemented. The division of the following embodiments is for the convenience of description, and the specific implementation of the present application should not be construed as any limitation, and the various embodiments can be combined and referenced with each other under the premise of no contradiction.

[0044] In order to solve the technical problem of low accuracy of short-term electricity price prediction, an embodiment of the present application proposes an electricity price decomposition and integrated prediction method based on snow melting optimization and attention mechanism, which is applied to an electronic device, wherein the electronic device can be a terminal or a server. In this embodiment and the following embodiments, the electronic device is illustrated by taking the server as an example. The implementation details of the electricity price decomposition and integrated prediction method based on snow melting optimization and attention mechanism proposed in this embodiment are specifically described below. The following content is only the implementation details provided for easy understanding and is not necessary for the implementation of this solution.

[0045] The specific process of the electricity price decomposition integrated prediction method based on snow melting optimization and attention mechanism proposed in this embodiment can be as follows: Figure 1 As shown, including:

[0046] Step 101: Generate electricity price sample features based on collected electricity price sample data.

[0047] In a specific implementation, the server can collect electricity price sample data on the regional power grid website with a time granularity of 1 hour, and generate electricity price sample feature Y based on the collected electricity price sample data. The electricity price sample feature Y includes electricity price sample information at M moments, where M is an integer greater than 1.

[0048] Step 102, generating an original sample feature set based on the collected original sample data, generating a time-related feature set based on the time of each node of each day in the original sample data, and constructing a total feature set based on the original sample feature set and the time-related feature set.

[0049] In the specific implementation, in addition to the electricity price sample data, the server also needs to collect electricity consumption sample data and power generation sample data on the regional power grid website with a time granularity of 1 hour, and collect meteorological sample data on the regional meteorological website with a time granularity of 1 hour. The electricity consumption sample data, power generation sample data, and meteorological sample data are used as raw sample data for model training. The server generates an original sample feature set F based on the collected raw sample data. The dimension of the original sample feature set F is N, F = {F1, F2, ..., F N After obtaining the original sample feature set F, the server needs to generate a time-related feature set F based on the time of each node in the original sample data. add , and finally based on the original sample feature set F and the time-related feature set F add Construct the total feature set F tot .

[0050] In an example, the original sample features generated by the server based on the meteorological sample data include air pressure feature pressure, light irradiance feature light, ambient temperature feature temperature, humidity humidity, wind speed feature velocity, whether it is raining feature rain and whether it is snowing feature snow; wherein rain = {0, 1}, rain = 0 means no rain, rain = 1 means rain, snow = {0, 1}, snow = means no snow, snow = 1 means snow.

[0051] In an example, the original sample feature set F and the electricity price sample feature Y are jointly constructed into an original sample feature data set D with M rows and N+1 columns. F , D F =[x i,1 , x i,2 , ..., x i,N ,y i ],i=1,2,...,M,x i,j Represents the feature F at the i-th moment j The value of y i Represents the value of the electricity price sample feature Y at the i-th moment.

[0052] In one example, the server generates a time-related feature set F based on the time of each node in the original sample data. add When, first based on the original sample feature dataset D F Each row in the table corresponds to the specific time of the target moment in a day, and generates the monthly features F containing twelve months. N+1 、Day and night characteristics F N+2 、Weekend and weekday characteristics F N+3and the seasonal feature F containing four seasons N+4 Among them, F N+1 ={0, 1, 2, ..., 11}, F N+2 ={0,1},F N+2 =0 means daytime characteristics, F N+2 =1 indicates night characteristics, F N+3 ={0, 1, 2}, F N+3 =0 indicates intra-week characteristics, F N+3 =1 indicates Saturday feature, F N+3 =2 indicates Sunday feature, F N+4 ={0, 1, 2, 3}. In addition, the server also needs to generate the business hours feature F based on the local enterprise working hours. N+5 , F N+5 ={0,1},F N+5 =0 means resting characteristics, F N+5 =1 indicates the feature of being in business. The server finally calculates the monthly feature F N+1 、Day and night characteristics F N+2 、Weekend and weekday characteristics F N+3 、Seasonal characteristics F N+4 and business hours feature F N+5 , generate a time-related feature set F add , F add ={F N+1 , F N+2 , F N+3 , F N+4 , F N+5}.

[0053] In one example, the server calculates the feature set F of the original sample and the feature set F of the time correlation. add Construct the total feature set F tot , F tot ={F1, F2, ..., F N , F N+1 , F N+2 , F N+3 , F N+4 , F N+5}.

[0054] In an example, the time granularity of obtaining electricity price forecast data in this embodiment is 15 minutes, and meteorological sample data needs to be obtained every 15 minutes. When collecting meteorological sample data from the meteorological website, the time granularity is 1 hour. Therefore, it is necessary to fill the missing values ​​in the four 15-minute moments in 1 hour by linear interpolation. Taking the ambient temperature temm as an example, the specific calculation method for filling the missing values ​​is:

[0055]

[0056] Among them, τ represents the time to be filled, x0 represents a certain time before the time τ, tem0 represents the ambient temperature corresponding to the time x0, x1 represents a certain time after the time τ, tem1 represents the ambient temperature corresponding to the time x1, tem τ Indicates the ambient temperature corresponding to the time τ.

[0057] Step 103, performing variational mode decomposition on the electricity price time series of the electricity price sample features to obtain K electricity price components, calculating the similarity between the total feature set and the K electricity price components respectively, performing feature extraction on the total feature set based on the similarity and attention mechanism, and obtaining the final feature set and its corresponding final sample feature data set.

[0058] In the specific implementation, the server constructs the total feature set F tot After that, the electricity price time series of the electricity price sample feature Y can be subjected to variational mode decomposition to obtain K electricity price components, and then the total feature set F can be calculated respectively. tot The similarity between the K electricity price components is calculated based on the similarity and attention mechanism for the total feature set F tot Perform feature extraction to obtain the final feature set F sel And its corresponding final sample feature dataset Then calculate the total feature set F tot The similarity between the K electricity price components is calculated based on the similarity and attention mechanism for the total feature set F tot Perform feature extraction to obtain the final feature set F sel And its corresponding final sample feature dataset Wherein, K is an integer greater than 1.

[0059] In one example, when the server performs variational mode decomposition on the electricity price time series of the electricity price sample feature Y, it first calculates the maximum value y in the electricity price time series based on the electricity price sample feature Y. max and the minimum value y min , linear normalization is performed on the electricity price time series to obtain the linearly normalized electricity price time series, and then the snow melting optimization algorithm is used to find the optimal decomposition parameters corresponding to the variational modal decomposition of the linearly normalized electricity price time series. The optimal decomposition parameters to be found include the penalty factor α and the number of modal components K. Finally, based on the optimal decomposition parameters found, the variational modal decomposition of the linearly normalized electricity price time series is performed to obtain K electricity price components Considering that the effect of electricity price time series decomposition is greatly affected by relevant parameters, and the selection of parameters usually involves strong subjectivity, which will directly affect the decomposition effect and the accuracy of the final electricity price forecast, the server uses the snow melting optimization algorithm to find the optimal parameters to achieve the best decomposition effect.

[0060] It should be noted that the server only needs to perform variational mode decomposition on the electricity price time series, and does not need to decompose each feature series. max and min The selection is based only on the training set and the validation set, and does not involve the data in the test set, to prevent the decomposition and electricity price prediction from being affected by the test set.

[0061] In one example, the process of finding the optimal decomposition parameters by using the snow ablation optimization algorithm can be as follows: Figure 2 As shown in the figure, the penalty factor α and the number of modal components K are the most critical parameters in variational modal decomposition. In the search process, the minimum value of the envelope entropy representing the sparse characteristics of the original signal is selected as the fitness function. When there is more noise in the modal component and less feature information, the value of the envelope entropy is larger, otherwise, the value of the envelope entropy is smaller.

[0062] In the process of variational modal decomposition of the electricity price time series of the electricity price sample feature Y, the snow ablation optimization algorithm is used to find the optimal values ​​of the penalty factor α and the number of modal components K. It is necessary to calculate the envelope entropy of the electricity price time series, and use the minimum value of the envelope entropy as the fitness function in the snow ablation optimization algorithm. The specific calculation formula of the envelope entropy is as follows:

[0063]

[0064] Where d(i) represents the K modal components obtained after the variational modal decomposition of the electricity price sample feature Y The discretized envelope signal obtained by Hilbert demodulation, N represents the number of points after the envelope signal is discretized, E j represents the jth modal component The envelope entropy when performing variational mode decomposition is used as a fitness function, also known as the objective function.

[0065] Specifically, the snow melting optimization algorithm is used to search for the best, generate the individual positions, calculate the envelope entropy values ​​of multiple IMF components of the electricity price time series after variational mode decomposition under the parameters corresponding to each individual position, and take the individual with the smallest envelope entropy value among all individuals as the optimal individual, and take the individuals with the top 50% of envelope entropy values ​​as the leader. The fitness function (objective function) is set to the corresponding envelope entropy minimum value in the optimization process, and the number of modal components K and the penalty factor α are optimized through the snow melting optimization algorithm.

[0066] Metaheuristic optimization algorithm is a commonly used method for solving global optimization problems. It mainly achieves the optimal solution by simulating nature and human intelligence. Its core is exploration and development. The optimal solution may exist anywhere in the entire search space. Exploration refers to exploring the entire search space as much as possible to find possible solutions, while development refers to optimizing known solutions by making full use of the correlation between known solutions in the exploration space.

[0067] The snow melting optimization algorithm is a meta-heuristic intelligent optimization algorithm that simulates the snow melting process. The algorithm finds the optimal solution by simulating the sublimation and melting behavior of snow in nature. Figure 2 As shown in the figure, before optimizing, we first need to set the range of optimization parameters, the number of iterations to be terminated during the optimization process, the number of search units, and the fitness function. Then, according to the set conditions, initialize the population position to a set of N×Dim matrices Z, which are expressed as follows:

[0068]

[0069] Among them, H represents the number of search units, Dim represents the number of parameters to be optimized, and Z H,Dim represents the Dimth parameter of the Hth individual.

[0070] The positions of H individuals are initialized, and each individual has Dim parameters to represent its position in space. According to the parameters corresponding to each individual position and the set fitness function, its corresponding fitness value can be calculated. The purpose of the entire optimization algorithm is to find the position of the optimal individual so that its corresponding fitness value is minimized. Therefore, the fitness value of the corresponding individual is calculated according to the fitness function, and the individual with the smallest fitness value is recorded as the optimal individual.

[0071] Next, the population is divided into two sub-populations of equal size. One sub-population, Pa, is responsible for exploration, simulating the process of converting snow or liquid water converted from snow into steam; the other sub-population, Pb, is assigned to perform development, simulating the process of converting melted snow into liquid water.

[0072] When exploring, the subpopulation Pa simulates the process of converting snow or liquid water from snow into steam. Due to the irregularity of the movement, the search individuals are highly dispersed, so Brownian motion can be used to simulate this situation. For standard Brownian motion, the mathematical formula is as follows:

[0073]

[0074] Among them, x represents an individual, f BM represents Brownian motion.

[0075] Brownian motion uses dynamic and uniform step sizes to explore some potential areas in the space, so it can well reflect the diffusion of steam in the search space. In the process of exploring the entire search space, the formula for calculating the individual position is as follows:

[0076]

[0077] Elite(t)∈[G(t),Z second (t),Z third (t),Z c (t)]

[0078]

[0079] Among them, Z i (t) represents the i-th individual in the t-th iteration process, including Dim parameters, BM i (t) represents the i-th vector containing random numbers based on Gaussian distribution, which is used to represent Brownian motion. represents element-by-element multiplication, i.e., Hadamard product, θ1 represents a number randomly selected from [0,1], G(t) represents the optimal individual at the current iteration, represents the centroid of the entire population, N represents the total number of individuals in the population, and Z second (t) and Z third (t) represents the second and third best individuals in the population in the current iteration, Z c (t) represents the centroid position of the individuals whose fitness values ​​rank in the top 50%, and the individuals whose fitness values ​​rank in the top 50% are called elites. N1 represents the total number of elites. represents the i-th elite, and Elite(t) is an individual randomly selected from multiple elite individuals in the group.

[0080] When developing the subpopulation Pb, the process of snow melting into liquid water is simulated, the position of each individual is optimized around the current best individual, and the degree-day method is used to reflect the snow melting process. The mathematical formula is as follows:

[0081] M S =DDF×T(t)

[0082]

[0083] Among them, t max Indicates the number of terminations of optimization iterations, M S represents the snow melting rate (snow melting efficiency), T(t) represents the daily average temperature difference, and DDF represents the degree-day coefficient ranging from 0.35 to 0.6. In each iteration, the mathematical formula for updating the DDF value is as follows:

[0084]

[0085] In the simulation of snow melting, the formula for calculating the individual position is as follows:

[0086]

[0087] Here, θ2 is a number randomly selected from [-1,1].

[0088] Subpopulations Pa and Pb update the position of each individual according to the above algorithm, calculate the fitness value of each individual again, and update the position of the optimal individual and its fitness value. Then, they return to the step before dividing the subpopulations, and randomly divide the subpopulations again to perform exploration and development behaviors respectively. This cycle is repeated until the iteration reaches the termination round, and the position of the optimal individual and its optimal fitness value are output to complete the optimization process of the snow melting algorithm.

[0089] The final optimal individual is denoted as G * =[K * ,α * ]. Take the K obtained by the optimization * and α * The number of modal components and penalty factors used for variational modal decomposition of the electricity price time series.

[0090] Variational mode decomposition is a completely non-recursive signal processing method. It is used to decompose the electricity price time series into multiple relatively stable subsequences with different frequency scales. The decomposition constraint is that the mode and the decomposed subsequences need to be equal to the original electricity price time series. The specific formula is as follows:

[0091]

[0092] Among them, {k m}、{ω m} respectively represent the mth IMF modal component and center frequency after decomposition, and the parameter M * It represents the optimal number of modal components of the electricity price series obtained by the snow melting optimization algorithm. δ(t) is the Diklak function, * is the convolution operator, and all modal components obtained by decomposition are equal to the electricity price time series.

[0093] The solution to the above constraint formula can be transformed into an unconstrained variational problem by introducing Lagrange multipliers and penalty factors. The specific unconstrained formula is as follows:

[0094]

[0095] Among them, λ is the Lagrangian operator, α * Represents the optimal penalty factor obtained by the snow melting optimization algorithm.

[0096] Then, the alternating direction multiplier method is used to update and obtain each modal component k m , whose corresponding center frequency is w m and the Lagrange operator λ. The specific calculation formulas are as follows:

[0097]

[0098] Among them, γ represents the noise tolerance, which can meet the requirements of variational mode decomposition and fidelity. k i (t), Y(t) and λ(t) can be obtained by performing the inverse Fourier transform on k i (ω), Y(ω) and λ(ω).

[0099] Perform variational mode decomposition on the electricity price time series under the electricity price feature Y. The steps are as follows: First, initialize λ 1 and other related parameters, and set the maximum number of iterations T and the expected decomposition accuracy ε. Next, update the parameters k m , ω m , λ through the above formulas, and then calculate the decomposition accuracy and check whether it meets and n < N. If not, continue the calculation and continuously update the parameters. If satisfied, end the algorithm and output the modal component Y IMFj and the corresponding center frequency.

[0100] In an example, the server calculates the similarity between each feature component in the total feature set and the K electricity price components respectively through the following formula:

[0101]

[0102] Among them, X ni represents the i-th instance of the n-th feature in the total feature set F tot , y ji represents the i-th instance of the j-th electricity price component, and θ nj represents the similarity between the n-th feature component and the j-th electricity price component in the total feature set F tot ;

[0103] In an example, the principle of the attention mechanism can be as Figure 3 shown. Its purpose is to selectively focus on features by assigning different weights to different feature vectors, in order to attach importance to important features and ignore useless features. The server sets the given target feature as Query, uses Key to represent each feature in the total feature set F tot , and uses Value to represent the total feature set F totThe numerical values ​​corresponding to each feature in the query are then calculated, and the correlation between the query and different keys is then calculated, that is, the weight coefficients of different valves are determined and output, and then the Softmax function is used to normalize the output weight coefficients of different valves to obtain the normalized weight coefficients of each valve. Finally, each value is weighted according to the normalized weight coefficients of each valve to obtain the final feature set F. sel And its corresponding final sample feature dataset

[0104] The specific calculation formula for normalizing the weights of different output Values ​​using the Softmax function is as follows:

[0105]

[0106] Among them, x i Represents the i-th element in the weight coefficient.

[0107] Step 104, respectively combine the final sample feature data set with K electricity price components to obtain K component data sets, perform parameter optimization based on the snow melting optimization algorithm, set the parameters of the pre-constructed convolutional recurrent neural network component model according to the best training parameters obtained by the optimization, and respectively input the K component data sets into the convolutional recurrent neural network component model for iterative training to obtain K electricity price prediction component models.

[0108] In the specific implementation, the server obtains K electricity price components After that, the final sample feature dataset can be With K electricity price components Combine to get K component data sets D IMFj Then, the parameters of the pre-built convolutional recurrent neural network component model are set according to the optimal training parameters obtained by the snow melting optimization algorithm. Finally, the K component data sets D IMFj They are respectively input into the convolutional recurrent neural network component model for iterative training to obtain K electricity price prediction component models M j .

[0109] In one example, the server sends the final sample feature dataset With K electricity price components Combine and construct K component data sets D with M rows and N+6 columns IMFj , Then, each component data set D IMFj Divide into training set D according to the preset ratio trainj , validation set D valj and the test set D testjThen, the optimal training parameters of the pre-built convolutional recurrent neural network component model are found by using the snow melting optimization algorithm, and the parameters of the convolutional recurrent neural network component model are set according to the optimal training parameters obtained. The optimal training parameters include the learning rate lr, the number of iterations num_epochs, the number of sample inputs batch_size, the number of nodes of the hidden layer neurons hidden_size, and the number of neural network layers num_layers. Finally, each training set D trainj They are respectively input into the convolutional recurrent neural network component model, and the convolutional recurrent neural network component model is iteratively trained until convergence to obtain K electricity price prediction component models M j .

[0110] In one example, the server takes component dataset D IMFj 25% of the total number of samples is used as the test set D testj The remaining 75% is divided into training set D according to the ratio of 3:1 trainj and validation set D valj .

[0111] The process of finding the optimal training parameters of the convolutional recurrent neural network component model using the snow melt optimization algorithm is similar to the process of finding the optimal decomposition parameters of the variational mode decomposition using the snow melt optimization algorithm. The server first initializes the position of the population [lr, num_epochs, batch_size, hidden_size, num_layers], and then calculates the determination coefficient R between the predicted value and the actual value (label) after the convolutional recurrent neural network component model is trained 2 , R 2 The calculation formula is as follows:

[0112]

[0113] in, is the i-th predicted value, y i is the ith actual value, is the mean.

[0114] Followed by R 2 The value is used as the fitness function, and the individual with the smallest fitness value is taken as the optimal individual G * , record its position, that is, the training parameter [lr * ,num_epochs * ,batch_size * ,hidden_size * ,num_layers * ] and the optimal fitness value Fitness *. Then the population is randomly divided into two sub-populations of equal size, Pa and Pb, for exploration and development respectively, and then the positions and shapes of all individuals are updated according to the algorithm. The fitness value Fitness of each individual after the update in this iteration is calculated again, and the optimal individual G is updated * The position and fitness value of the population are calculated, and then the process returns to the step before the subpopulation division, and the cycle is repeated until the iteration reaches the termination round t max , output the final optimal individual G * =[lr * ,num_epochs * ,batch_size * ,hidden_size * ,num_layers * ].

[0115] In one example, the network structure of the convolutional recurrent neural network component model can be as follows Figure 4 As shown in the figure, the convolutional recurrent neural network component model consists of a convolutional layer, a pooling layer, a Dropout layer, a GRU layer, and a fully connected layer.

[0116] The convolution layer is used to extract features and mine the correlation between features. The calculation formula of one-dimensional convolution is as follows:

[0117]

[0118] Among them, y i is the i-th element in the output sequence of the convolutional layer, f is the activation function, w is the weight of the convolution kernel, x is the input sequence, b is the bias term, and k is the size of the convolution kernel.

[0119] The pooling layer is used to compress the feature dimension and simplify the complexity of calculation. The calculation formula of the maximum pooling is as follows:

[0120]

[0121] Among them, y kij Represents the rectangular area R related to the kth feature map ij The maximum pooling output value, x kpq Represents the rectangular area R ij The element at (p,q) in .

[0122] The Dropout layer is used to randomly select neurons in the network with a preset probability to prevent overfitting.

[0123] The GRU layer is used to process the reduced-dimensional data and learn the dependencies between features. The calculation formula of the gated recurrent unit is as follows:

[0124] Rt =σ(X t W xr +H t-1 W hr +b r )

[0125] Z t =σ(X t W xc +H t-1 W hc +b z )

[0126]

[0127] R t , Z t , and H t are the reset gate, update gate, candidate hidden state and hidden state of the GRU layer respectively, and W xr , W hr , W xz , W hz , W xh , W hh , b r , b z , b h They are reset gate weight parameter, update gate weight parameter, candidate hidden state weight parameter, reset gate bias parameter, update gate bias parameter, candidate hidden state bias parameter, ⊙ represents the element-wise product operator, σ is the sigmoid function, σ(x)=1 / 1+e -x , tanh is the hyperbolic tangent function.

[0128] The input of the GRU layer is X t The final output is H t , and finally the fully connected layer converts the output data into a one-dimensional structure to obtain the final component result.

[0129] In one example, the validation set D valj It is used to observe the effect of model training during optimization and training. The mean square error (MSE) is used as a reference in each iteration. The calculation formula is:

[0130] Step 105 , weighted integration of the K electricity price prediction component models to obtain an electricity price prediction integrated model.

[0131] In the specific implementation, the server obtains K electricity price prediction component models M j After that, the K electricity price prediction component models M j Perform weighted integration to obtain the electricity price prediction integrated model M tot, the calculation formula of weighted integration is as follows:

[0132]

[0133] Among them, W j represents the integrated weight coefficient corresponding to the j-th electricity price forecast component model, M tot In the process of variational mode decomposition, the electricity price time series is essentially equal to the sum of the subsequences obtained by decomposition. Therefore, the relationship between the sub-model obtained by sub-sequence training and the integrated model should also be cumulative. The integrated weight coefficient W j It can be set to 1. If other decomposition algorithms are used, it is necessary to consider the relationship between the electricity price time series and the decomposed subsequences, and then change the integrated weight coefficient W j .

[0134] Step 106, based on the original data and electricity price data of t time nodes before the day to be predicted, and the electricity price prediction integrated model, obtain the electricity price prediction result for the day to be predicted.

[0135] In the specific implementation, the server will obtain the electricity price prediction integrated model M by weighted integration. tot Deployment is carried out to obtain the original data and electricity price data of t time nodes before the day to be predicted, and the original data and electricity price data of t time nodes before the day to be predicted are input into the electricity price prediction integrated model to obtain the electricity price prediction result for the day to be predicted output by the electricity price prediction integrated model.

[0136] In this embodiment, the original features are extracted through the attention mechanism, so that the model training pays more attention to the features that are more relevant to the electricity price. The variational mode decomposition algorithm is used to decompose the electricity price time series into relatively stable subsequences, and the snow melting optimization algorithm is used to optimize the decomposition parameters of the variational mode decomposition and the training parameters of each convolutional recurrent neural network component model, thereby reducing the training difficulty and prediction difficulty of the convolutional recurrent neural network component model. In addition, the electricity price prediction integrated model is obtained by integrating multiple decomposed electricity price prediction component models. The electricity price prediction integrated model has high robustness in electricity price prediction. Compared with the currently proposed electricity price prediction methods, the electricity price prediction integrated model has stronger pattern recognition capabilities and can more accurately predict the electricity price situation in specific scenarios, helping power generation companies to better arrange power generation tasks.

[0137] The step division of the above methods is only for clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this application; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this application.

[0138] In one embodiment, taking the electricity consumption, generation, pricing and weather data of Spain from 2015 to 2018 as an example, the data is first preprocessed, and features with a large amount of missing data are directly removed, and features with a small amount of missing data are filled by linear interpolation to obtain a 12-dimensional original sample feature set F = {F1, F2, ..., F 12} and the sample information of the electricity price sample feature Y at 35040 time nodes, and construct an original sample feature dataset D with 35040 rows and 13 columns F =[x i,1 ,x i,2 ,…,x i,N ,y i ], i = 1, 2, …, 35040, where 35040 is the number of time nodes obtained with a time granularity of 1 hour in the past four years.

[0139] According to the original sample feature dataset D F Each row corresponds to a specific time of the day, and generates the month feature F 13 , including twelve months corresponding to F 13 ={0,1,2,…,11}; day and night characteristics F 14 , corresponding to F 14 = {0,1}; weekend and weekday feature F 15 , including Monday to Friday corresponding to F 15 = {0}, Saturday corresponds to F 15 = {1}, weekends correspond to F 15 ={2}; Seasonal characteristics F 16 , including four seasons, spring, summer, autumn and winter, corresponding to F 16 ={0,1,2,3}. Generate the feature F of business hours based on the working hours of local enterprises 17 , including rest F 17 ={0}, Open for business 17 ={1}.

[0140] According to the above steps, based on the original sample feature data set D F The corresponding 35040 specific times generate the time-related feature set F add ={F 13 ,F14 ,F 15 ,F 16 ,F 17}, then based on the newly generated time-related feature set F add , combined with the original feature set F to construct the total feature set F tot , F tot ={F1,F2,…,F 17}.

[0141] Based on the above electricity price sample feature Y, variational mode decomposition is performed on its electricity price time series. First, the snow melting optimization algorithm is used to optimize the decomposition parameters. Figure 5 This is a schematic diagram of the change of the envelope entropy value during the optimization process of the decomposition parameters of the variational mode decomposition. The optimal decomposition parameters finally obtained are [K * ,α * ]=[2,2567], according to the number of modal components K * and penalty factor α * The variational mode decomposition of the electricity price time series under the electricity price sample feature Y is performed, and the following are obtained respectively: Figure 6 shown Quantity and Figure 7 shown Quantity.

[0142] According to the total feature set F tot , calculate the cosine similarity between the 17 features and the two electricity price components, apply the attention mechanism, extract the 17 features, and get the final feature set F sel And its corresponding final sample feature dataset

[0143] Final sample feature dataset The two electricity price components after the variational mode decomposition are used to construct component data sets for input into the convolutional recurrent neural network component model for training.

[0144] The snow melting optimization algorithm is used to find the optimal training parameters of the convolutional recurrent neural network component model, including: learning rate lr, number of iterations num_epochs, number of sample input batch_size, number of nodes of hidden layer neurons hidden_size, and number of neural network layers num_layers.

[0145] Figure 8 is the R of the first electricity price prediction component model in the training parameter optimization process 2 Schematic diagram of value changes, Fig. 9 is the R of the second electricity price prediction component model in the training parameter optimization process 2Schematic diagram of the change of values. The final optimal training parameters of the first electricity price prediction component model are [0.0017, 40, 64, 1, 1], and the final optimal training parameters of the second electricity price prediction component model are [0.0052, 40, 135, 3, 1].

[0146] The two electricity price forecast component models are weighted and integrated to form the electricity price forecast integrated model M tot , the characteristic quantities of t nodes before the forecast date and the IMF components of the actual electricity price are input into the electricity price forecast integrated model M tot The electricity price forecast result for the day to be predicted is obtained.

[0147] Another embodiment of the present application provides an electronic device, the structure of which is as follows: Fig.10 As shown, it includes: at least one processor 201; and a memory 202 that is communicatively connected to the at least one processor 201; wherein the memory 202 stores instructions that can be executed by the at least one processor 201, and the instructions are executed by the at least one processor 201 so that the at least one processor 201 can execute the electricity price decomposition integrated prediction method based on snow melting optimization and attention mechanism as described in the above-mentioned method embodiments.

[0148] Among them, the memory and the processor are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors and memories together. The bus can also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known to technicians in the field and will not be further described in this article. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor is transmitted on a wireless medium through an antenna, and further, the antenna also receives data and transmits the data to the processor.

[0149] The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory can be used to store data used by the processor when performing operations.

[0150] Another embodiment of the present application proposes a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the electricity price decomposition and integrated prediction method based on snow melting optimization and attention mechanism as described in the above method embodiments is implemented.

[0151] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as: ROM), random access memory (Random Access Memory, referred to as: RAM), disk or optical disk and other media that can store program codes.

[0152] Those skilled in the art will appreciate that the above embodiments are specific embodiments for implementing the present application, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present application.

Claims

1. A method for electricity price decomposition and integrated prediction based on snow melt optimization and attention mechanism, characterized in that: include: generating electricity price sample features based on the collected electricity price sample data; Generate an original sample feature set based on the collected original sample data, generate a time-related feature set based on the time of each node of each day in the original sample data, and construct a total feature set based on the original sample feature set and the time-related feature set; wherein the original sample data includes power consumption sample data, power generation sample data and meteorological sample data; Perform variational mode decomposition on the electricity price time series of the electricity price sample features to obtain K electricity price components, calculate the similarity between each feature component in the total feature set and the K electricity price components, extract features from the total feature set based on the similarity and attention mechanism, and obtain the final feature set and its corresponding final sample feature data set, where K is an integer greater than 1; The final sample feature data set is combined with K electricity price components to obtain K component data sets, and parameter optimization is performed based on the snow melting optimization algorithm. The parameters of the pre-built convolutional recurrent neural network component model are set according to the best training parameters obtained by optimization, and the K component data sets are respectively input into the convolutional recurrent neural network component model for iterative training to obtain K electricity price prediction component models; Perform weighted integration of K electricity price forecast component models to obtain an electricity price forecast integrated model; Based on the original data and electricity price data of t time nodes before the day to be predicted, and the electricity price prediction integrated model, the electricity price prediction result for the day to be predicted is obtained, where t is an integer greater than 1.

2. The electricity price decomposition integrated prediction method based on snow melting optimization and attention mechanism according to claim 1 is characterized in that: The dimension of the original sample feature set F is N, F = {F1, F2, ..., F N }, the electricity price sample feature Y contains the electricity price sample information at M moments, and the original sample feature set F and the electricity price sample feature Y together form an original sample feature data set D with M rows and N+1 columns F , D F =[x i,1 ,x i,2 ,…,x i,N ,y i ],i=1,2,…,M,x i,j Represents the feature F at the i-th moment j The value of y i Represents the value of the electricity price sample feature Y at the i-th moment; A time-related feature set is generated based on the time of each node in the original sample data every day, and a total feature set is constructed based on the original sample feature set and the time-related feature set, including: Based on the original sample feature dataset D F Each row in the table corresponds to the specific time of the target moment in a day, and generates the monthly features F containing twelve months. N+1 、Day and night characteristics F N+2 、Weekend and weekday characteristics F N+3 and the seasonal feature F containing four seasons N+4 Among them, F N+1 ={0,1,2,…,11}, F N+2 ={0,1},F N+2 =0 means daytime characteristics, F N+2 =1 indicates night characteristics, F N+3 ={0,1,2},F N+3 =0 indicates intra-week characteristics, F N+3 =1 indicates Saturday feature, F N+3 =2 indicates Sunday feature, F N+4 ={0,1,2,3}; Generate business hours feature F based on local business working hours N+5 Among them, F N+5 ={0,1},F N+5 =0 means resting characteristics, F N+5 =1 indicates the operating characteristic; Based on the month feature F N+1 、Day and night characteristics F N+2 、Weekend and weekday characteristics F N+3 、Seasonal characteristics F N+4 and business hours feature F N+5 , generate a time-related feature set F add , F add ={F N+1 ,F N+2 ,F N+3 ,F N+4 ,F N+5 }; Based on the original sample feature set F and the time-related feature set F add Construct the total feature set F tot , F tot ={F1,F2,…,F N ,F N+1 ,F N+2 ,F N+3 ,F N+4 ,F N+5 }.

3. The electricity price decomposition integrated prediction method based on snow melting optimization and attention mechanism according to claim 2 is characterized in that: The electricity price time series with electricity price sample characteristics is subjected to variational mode decomposition to obtain K electricity price components, including: Based on the maximum and minimum values ​​in the electricity price time series of the electricity price sample characteristics, the electricity price time series is linearly normalized to obtain the electricity price time series after linear normalization; The snow melting optimization algorithm is used to find the optimal decomposition parameters corresponding to the variational modal decomposition of the electricity price time series after linear normalization. The optimal decomposition parameters include the penalty factor α and the number of modal components K. Based on the optimal decomposition parameters found, the linear normalized electricity price time series is subjected to variational mode decomposition to obtain K electricity price components. j=1,2,…,K.

4. The electricity price decomposition integrated prediction method based on snow melting optimization and attention mechanism according to claim 3 is characterized in that: The similarity between each feature component in the total feature set and the K electricity price components is calculated separately, which is achieved by the following formula: n=1,2,…,N,N+1,N+2,N+3,N+4,N+5 Among them, X ni Represents the total feature set F tot The i-th instance of the n-th feature in y ji represents the i-th instance of the j-th electricity price component, θ nj Represents the total feature set F tot The similarity between the nth characteristic component and the jth electricity price component in ; Based on the similarity and attention mechanism, the total feature set is extracted to obtain the final feature set and its corresponding final sample feature dataset, including: Let the given target feature be Query, and use Key to represent the total feature set F tot Each feature in, using Value to represent the total feature set F tot The numerical values ​​corresponding to each feature in ; Calculate the correlation between the query and different keys, that is, determine and output the weight coefficients of different values; Use the Softmax function to normalize the weight coefficients of different output Values ​​to obtain the normalized weight coefficients of each Value; Each Value is weighted according to the normalized weight coefficient of each Value to obtain the final feature set F sel And its corresponding final sample feature dataset 5. The electricity price decomposition integrated prediction method based on snow melting optimization and attention mechanism according to claim 4 is characterized in that: The final sample feature data set is combined with K electricity price components to obtain K component data sets. Parameter optimization is performed based on the snow melting optimization algorithm. The parameters of the pre-built convolutional recurrent neural network component model are set according to the optimal training parameters obtained by optimization. The K component data sets are respectively input into the convolutional recurrent neural network component model for iterative training to obtain K electricity price prediction component models, including: The final sample feature dataset D Fsel With K electricity price components Combine and construct K component data sets D with M rows and N+6 columns IMFj ; Among them, D IMFj =[D Fsel ,Y IMFj ]; Each component data set D IMFj Divide into training set D according to the preset ratio trainj , validation set D valj and the test set D testj ; The optimal training parameters of the pre-built convolutional recurrent neural network component model are found by using the snow melting optimization algorithm, and the parameters of the convolutional recurrent neural network component model are set according to the best training parameters obtained. The optimal training parameters include the learning rate lr, the number of iterations num_epochs, the number of sample inputs batch_size, the number of nodes of hidden layer neurons hidden_size, and the number of neural network layers num_layers; Each training set D trainj They are respectively input into the convolutional recurrent neural network component model, and the convolutional recurrent neural network component model is iteratively trained until convergence to obtain K electricity price prediction component models M j .

6. The electricity price decomposition integrated prediction method based on snow melting optimization and attention mechanism according to claim 5 is characterized in that: The convolutional recurrent neural network component model consists of a convolutional layer, a pooling layer, a Dropout layer, a GRU layer, and a fully connected layer; the convolutional layer is used to extract features and mine the correlation between features; the pooling layer is used to compress the feature dimension and simplify the complexity of calculation; the Dropout layer is used to randomly select neurons in the network with a preset probability to prevent overfitting; the GRU layer is used to process the data after dimensionality reduction and learn the dependency relationship between features; the fully connected layer is used to output the results.

7. The electricity price decomposition integrated prediction method based on snow melting optimization and attention mechanism according to claim 5 is characterized in that: The K electricity price prediction component models are weighted and integrated by the following formula to obtain the electricity price prediction integration model: Among them, W j represents the integrated weight coefficient corresponding to the j-th electricity price forecast component model, M tot It represents the integrated model of electricity price prediction obtained by weighted integration, and the integrated weight coefficient W j Set to 1, or set based on the relationship between the electricity price time series and the decomposed subsequences.

8. The electricity price decomposition integrated prediction method based on snow melting optimization and attention mechanism according to any one of claims 1 to 7, characterized in that: The original sample features generated based on the meteorological sample data include air pressure feature pressure, light irradiance feature light, ambient temperature feature temperature, humidity humidity, wind speed feature velocity, whether it is raining feature rain and whether it is snowing feature snow; among them, rain = {0,1}, rain = 0 means no rain, rain = 1 means rain, snow = {0,1}, snow = means no snow, snow = 1 means snow.

9. An electronic device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the electricity price decomposition integrated prediction method based on snow ablation optimization and attention mechanism as described in any one of claims 1 to 8.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the electricity price decomposition integrated prediction method based on snow melting optimization and attention mechanism as described in any one of claims 1 to 8 is implemented.