Electricity price prediction method and device based on multi-scale feature fusion

Through the multi-scale feature fusion method and Transformer technology, the electricity price, time and meteorological data are integrated, and the accuracy of the existing electricity price prediction model under the influence of renewable energy power generation is solved, and the accurate electricity price prediction in the spot trading market is realized, which has improved the Prediction accuracy and reliability.

CN118941345APending Publication Date: 2024-11-12INFORMATION & COMMUNICATION BRANCH STATE GRID JIBEI ELECTRIC POWER CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411048837.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-01
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

The existing electricity price prediction model is difficult to accurately predict the spot trading price of electricity, especially under the influence of renewable energy power generation, which leads to an increase in electricity price volatility and uncertainty, affecting the stability of the power grid operation and market resource allocation.

Method used

Using multi-scale feature fusion method, electricity price, time and meteorological data are collected through measurement devices, the lonely forest algorithm is used to eliminate abnormal points and interpolate the missing values, and the prediction model is constructed in combination with Transformer technology, and multi-dimensional data characteristics are integrated to improve electricity price prediction. Accuracy and robustness.

Benefits of technology

It significantly improves the accuracy and reliability of electricity price prediction, can more effectively capture the complex timing and spatial dependencies in the power market, and provides an accurate electricity price prediction framework, especially when considering the impact of renewable energy generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118941345A_ABST
    Figure CN118941345A_ABST
Patent Text Reader

Abstract

The invention relates to the field of data processing, in particular to an electricity price prediction method and device based on multi-scale feature fusion. The method comprises the following steps: collecting a data set comprising electricity price data and a plurality of corresponding time data, meteorological data and load data through a measuring device, then constructing a data matrix, rejecting abnormal points in the data matrix to generate a non-abnormal data matrix, filling missing values and rejected abnormal points in the non-abnormal data matrix, and obtaining a non-abnormal data matrix; and performing feature fusion to generate a high-dimensional data matrix, generating and training a prediction model according to a time sequence and a regional dependency relationship in the data set, inputting the high-dimensional data matrix into the prediction model, and outputting an electricity price prediction value. In the specification, information extraction and fusion are carried out on the multi-dimensional features, accurate prediction of the electricity price under multiple dimensions is realized, and the problem that the spot transaction price is difficult to accurately predict in the prior art is effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of data processing, and in particular to a method and device for predicting electricity prices by fusion of multi-scale features. Background Art

[0002] In recent years, the construction of the power market has been steadily and orderly promoted, touching all aspects of the power generation, transmission, distribution, sales and use of the entire power system. These measures are aimed at building a new power system framework, and then gradually strengthening the market's open mechanism and competition mechanism. However, with the large-scale grid connection of renewable energy, the power system also presents the characteristics of variability, instability, intermittency and difficulty in accurate prediction, which brings unprecedented challenges to the stability and security of power grid operation. In this context, the accuracy of electricity price forecasting has become particularly important. Accurate electricity price forecasting can help power market participants better adjust market dynamics and formulate corresponding strategies to balance supply and demand, thereby promoting the effective integration of renewable energy. In addition, it plays a key role in designing incentive-compatible market mechanisms, ensuring the economy and reliability of the power system, and guiding the behavior of consumers and producers. Therefore, deepening the reform and development of the power market, realizing the effective allocation of resources, and promoting the further development and utilization of renewable energy, while improving the accuracy and reliability of electricity price forecasting, has become an urgent problem to be solved.

[0003] The fluctuation of electricity prices will affect the allocation and flow of resources in the power market, and will also affect the bidding strategies and economic benefits of market players. Accurate electricity price forecasting is the guarantee for the stable operation of the power grid economy. Electricity price forecasting is very important in the fiercely competitive power market. According to the results of electricity price forecasting, consumers can selectively participate in the peak load regulation of the power system, reasonably plan electricity consumption arrangements, and save costs. Market participants can benefit from competition by accurately predicting electricity prices, but the nonlinearity and volatility of electricity prices bring challenges to forecasting. With the increase in the proportion of renewable energy generation, the balance between production and consumption of the power system is broken. The volatility and intermittent characteristics of renewable energy output lead to a large deviation between the real-time power generation and the forecast results of the previous day, and the uncertainty of electricity prices is more prominent, which greatly increases the probability of low-peak electricity prices and the uncertainty of electricity price series. Therefore, it is very important to include the impact of renewable energy generation when constructing an electricity price forecasting model. In the existing technology, although there are many electricity price forecasting models, most of them are based on the periodic law of electricity price series to build electricity price forecasting models, and few studies have explored the potential impact of renewable energy generation and other factors on electricity prices.

[0004] Therefore, there is an urgent need for an electricity price forecasting method that integrates multi-scale features to provide an accurate electricity price forecasting framework in the electricity spot trading market, while taking into account the conditions of factors affecting renewable energy generation to solve the current forecasting problems in the market. Summary of the invention

[0005] In order to solve the above-mentioned problems in the prior art, the embodiments of this specification provide a method and device for predicting electricity prices with multi-scale feature fusion. Based on comprehensive consideration of multiple time windows, multiple meteorological factors, and multiple energy types, accurate prediction of electricity prices in multiple dimensions is achieved by extracting and fusing information from multiple features, and it is applicable to the field of price prediction in electricity spot trading. Combining feature fusion technology and Transformer technology significantly improves the accuracy, robustness, and applicability of the prediction model, thereby effectively solving the problem of difficulty in accurately predicting spot trading prices in the prior art.

[0006] The embodiment of this specification provides a method for predicting electricity prices by fusion of multi-scale features, the method comprising:

[0007] Collecting a data set by a measuring device, including a data set including electricity price data and a plurality of corresponding time data, meteorological data and load data, and constructing a data matrix according to the data set;

[0008] Based on the lonely forest algorithm, outliers in the data matrix are removed to generate an outlier-free data matrix;

[0009] Filling the missing values ​​and the removed abnormal points in the non-abnormal data matrix based on the interpolation method, and performing feature fusion to generate a high-dimensional data matrix;

[0010] A prediction model is generated and trained according to the time series and regional dependencies in the data set, the high-dimensional data matrix is ​​input into the prediction model and a predicted electricity price value is output.

[0011] Furthermore, constructing a data matrix according to the data set further includes,

[0012] Extract features from multiple time data and their corresponding electricity price data to generate time features of the electricity price data;

[0013] Extract features from multiple meteorological data and their corresponding electricity price data to generate meteorological factor features of electricity price data;

[0014] Extract features of different energy types and their corresponding electricity price data to generate energy type features of electricity price data;

[0015] The data matrix is ​​generated by performing feature fusion on the time features, meteorological factor features and energy type features of the electricity price data.

[0016] Furthermore, removing the abnormal points in the data matrix based on the lonely forest algorithm to generate a data set without abnormalities further includes:

[0017] Constructing a plurality of random trees according to the data matrix to form a random forest, and calculating the path length of each data point in the data matrix in the random forest;

[0018] Measuring the degree of abnormality of the data point according to the path length, and determining whether the data point in the data matrix is ​​abnormal;

[0019] Data points whose path lengths are less than a preset threshold are set as abnormal points and removed to generate the non-abnormal data set.

[0020] Furthermore, filling the missing values ​​and the removed abnormal points in the non-abnormal data set based on the interpolation method further includes:

[0021] Select known data points in the data set as interpolation nodes, define segmentation intervals according to the interpolation nodes and construct an interpolation function;

[0022] Establishing a corresponding interpolation function for each segmented interval according to continuity and interpolation conditions;

[0023] Determine the missing values ​​in the non-abnormal data set and the locations of the removed abnormal points, and determine the segmented intervals in which they are located;

[0024] The estimated values ​​of the missing values ​​are calculated according to the interpolation function within the interval and filled.

[0025] Furthermore, performing feature fusion to generate a high-dimensional data matrix further includes:

[0026] Select multiple time data, meteorological data and load data for data sampling;

[0027] Select multiple time window data at sampling time t, multivariate meteorological factor data and different energy type data to form the corresponding N-dimensional node column vector:

[0028] x t =[x 1,t ·x 2,t· ·····x N,t ] T

[0029] Among them, x 1,t 、x 2,t 、x N,t is the data of different dimensions at time t;

[0030] As the sampling time increases, multiple column vector data with different sampling times t are formed to form the time series X:

[0031] X=[x1,x2…x t …]

[0032] According to the plurality of node column vectors x t And the time series X is standardized to generate the high-dimensional data matrix X T .

[0033] Furthermore, inputting the high-dimensional data matrix into the prediction model and outputting the electricity price prediction value further includes:

[0034] Performing Pearson correlation coefficient analysis on data features between different dimensions in the high-dimensional data matrix to obtain the correlation strength of the data in the high-dimensional data matrix;

[0035] Input the features with correlation strength higher than a threshold value as input variables into a prediction model, and output the electricity price prediction value;

[0036] The data features in different dimensions include:

[0037] Multiple time data one year before the forecast base date, multivariate meteorological data, system load data, interconnection line load data, hydropower output data, thermal power output data forecast, new energy output data and actual clearing price data.

[0038] Furthermore, inputting the high-dimensional data matrix into the prediction model and outputting the electricity price prediction value further includes:

[0039] Generating discrete feature identifiers in the high-dimensional data matrix, mapping the feature identifiers into vector representations and adding position codes;

[0040] The vector representation carrying the position code is normalized by addition and transformed nonlinearly, and the normalized output is a multi-level feature.

[0041] Mapping the multi-level features to a prediction space and generating a probability distribution according to prediction requirements;

[0042] The electricity price prediction value with the highest probability is output as the electricity price prediction value.

[0043] The embodiment of this specification also provides a multi-scale feature fusion electricity price prediction device, including:

[0044] A data collection unit, used to collect a data set through a measuring device, collect a data set including electricity price data and a plurality of corresponding time data, meteorological data and load data, and construct a data matrix according to the data set;

[0045] An outlier elimination unit is used to eliminate outliers in the data matrix based on a lonely forest algorithm to generate an outlier-free data matrix;

[0046] A feature fusion unit, used to fill the missing values ​​and the removed abnormal points in the non-abnormal data matrix based on the interpolation method, and perform feature fusion to generate a high-dimensional data matrix;

[0047] The electricity price prediction unit is used to generate and train a prediction model according to the time series and regional dependencies in the data set, input the high-dimensional data matrix into the prediction model and output the electricity price prediction value.

[0048] An embodiment of the present specification provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the operation boot method is implemented when the processor executes the computer program.

[0049] The embodiment of the present specification also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the operation boot method is implemented.

[0050] The embodiments of the present specification also provide a computer program product, wherein the computer program product includes a computer program, and the computer program is executed by a processor to perform the operation boot method.

[0051] In the embodiment of the present specification, a method for predicting electricity prices is provided. First, electricity price data and related data of multiple dimensions related to electricity prices are collected and obtained, so that in-depth feature extraction of data such as multiple time windows, multiple meteorological factors and different energy types can be achieved, so as to obtain the relationship between multidimensional data and electricity prices; then, outliers in the data matrix are eliminated based on the lonely forest algorithm, and the missing values ​​and the eliminated outliers are filled by interpolation method, and the input data set is reconstructed to ensure the continuity and accuracy of the data; then, a multi-scale input feature framework is constructed based on multi-dimensional data and feature fusion technology is used to effectively integrate data information from different scales and dimensions, so that the complex time series and spatial dependencies in electricity prices can be effectively captured, and the ability of the prediction algorithm in parsing variable electricity market data is significantly improved, thereby improving the accuracy and reliability of the prediction. The problem that the electricity price prediction model in the prior art is built based on the periodic law of the electricity price sequence cannot deeply explore the potential impact of renewable energy generation and other factors on electricity prices. Therefore, the method of multi-scale feature fusion electricity price prediction proposed in the embodiments of this specification can provide an accurate electricity price prediction framework for the electricity spot trading market, especially under the condition of considering the influencing factors of renewable energy power generation, so as to solve the prediction problems in the current market. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0053] Figure 1 It is a flowchart of a method for predicting electricity prices by integrating multi-scale features according to an embodiment of this specification;

[0054] Figure 2 The flowchart of the method for constructing a data matrix according to the data set in the embodiment of this specification is shown;

[0055] Figure 3 The flowchart of the method for removing abnormal points in the data matrix based on the lonely forest algorithm to generate a data set without abnormalities in the embodiment of this specification is shown;

[0056] Figure 4 It is a flow chart of a method for inputting the high-dimensional data matrix into a prediction model and outputting a predicted value of electricity price according to an embodiment of this specification;

[0057] Figure 5 It is a flow chart of a method for inputting the high-dimensional data matrix into a prediction model and outputting a predicted value of electricity price according to an embodiment of this specification;

[0058] Figure 6 The figure shows a schematic diagram of the structure of the electricity price prediction device with multi-scale feature fusion according to an embodiment of this specification;

[0059] Figure 7 The figure shows a schematic diagram of the structure of a computer device according to an embodiment of the present specification.

[0060] Description of the accompanying symbols:

[0061] 601, data acquisition unit;

[0062] 602, abnormal point elimination unit;

[0063] 603, feature fusion unit;

[0064] 604. Electricity price prediction unit;

[0065] 802. Computer equipment;

[0066] 804, processor;

[0067] 806. Memory;

[0068] 808, driving mechanism;

[0069] 810, input / output module;

[0070] 812. Input device;

[0071] 814. Output device;

[0072] 816. Presentation equipment;

[0073] 818. Graphical user interface;

[0074] 820, network interface;

[0075] 822, communication link;

[0076] 824. Communication bus. DETAILED DESCRIPTION

[0077] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.

[0078] It should be noted that the terms "first", "second", etc. in the description and claims of this specification and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of this specification described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, device, product or equipment that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0079] This specification provides method operation steps as described in the embodiments or flow charts, but more or fewer operation steps may be included based on routine or non-creative work. The order of steps listed in the embodiments is only one way of executing the order of many steps and does not represent the only execution order. When the system or device product is executed in practice, it can be executed in the order of the method shown in the embodiments or the drawings or in parallel.

[0080] It should be noted that the operation guidance method of this specification can be used in the computer field as well as in the financial technology field, and this specification does not limit the application field of the operation guidance method and device.

[0081] The acquisition, transmission, storage, use, and processing of data in the technical solution of this application are in compliance with the relevant provisions of national laws and regulations. It should be noted that in the embodiments of this application, some existing solutions in the industry such as certain software, components, and models may be mentioned, and they should be considered as exemplary. Their purpose is only to illustrate the feasibility of the implementation of the technical solution of this application, but it does not mean that the applicant has or will necessarily use the solution.

[0082] Figure 1 The flowchart of a method for predicting electricity prices by integrating multi-scale features in an embodiment of this specification is shown, which specifically includes the following steps:

[0083] Step 101: Collecting a data set through a measuring device, including a data set including electricity price data and a plurality of corresponding time data, meteorological data and load data, and constructing a data matrix according to the data set;

[0084] In this step, the multiple time window elements contained in the collected data may include year, month, day, hour, and minute, the multivariate meteorological data may include temperature and humidity, and the load data may include system load data, interconnection line load data, wind power output data, photovoltaic output data, and other 11-dimensional nodes for data sampling.

[0085] Step 102: removing abnormal points in the data matrix based on the lonely forest algorithm to generate a data matrix without abnormalities.

[0086] In this step, a random forest is constructed through the lonely forest algorithm to estimate the degree of isolation of the data point, so as to determine whether it is an abnormal point. The lonely forest algorithm is sensitive to abnormal value points in the high-dimensional data matrix composed of time data, meteorological data and load data in the electricity price data, and can isolate, separate and segment them efficiently and quickly. In this embodiment, the matrix data collected by the measuring device, the constituent elements include time data, meteorological data, load data and new energy forecast data, etc., and there may be some abnormal points caused by error values ​​or storage errors, so they are eliminated by the lonely forest algorithm. It should be noted that the element information in the embodiment is not limited to the above types. In the execution of other embodiments, it can be freely increased or decreased according to the actual task needs.

[0087] Step 103: filling the missing values ​​and the removed abnormal points in the non-abnormal data matrix based on the interpolation method, and performing feature fusion to generate a high-dimensional data matrix;

[0088] In this step, in order to fill the missing items that may exist in the collected data set and the abnormal points removed in the non-abnormal data matrix, the missing values ​​in the data are filled by interpolation. In this embodiment, a cubic sample interpolation function is selected to perform sample filling processing. At the same time, after completing the repair of the collected data, a reasonable high-dimensional data matrix is ​​constructed to ensure that the model can smoothly receive input data and perform subsequent calculation processes in the next step.

[0089] Step 104: Generate and train a prediction model based on the time series and regional dependencies in the data set, input the high-dimensional data matrix into the prediction model and output the electricity price prediction value.

[0090] In this step, feature fusion technology and Transformer technology are used to accurately predict electricity prices. This can significantly improve the accuracy, robustness and applicability of the prediction model, thereby effectively solving the problem of the difficulty in accurately predicting spot transaction prices in existing technologies. This multi-dimensional feature fusion strategy provides a new solution for modeling the complex relationship between renewable energy generation and price fluctuations in the power market.

[0091] In the embodiment of the present specification, a method for predicting electricity prices is provided. First, electricity price data and related data of multiple dimensions related to electricity prices are collected and obtained, so that in-depth feature extraction of data such as multiple time windows, multiple meteorological factors and different energy types can be achieved, so as to obtain the relationship between multidimensional data and electricity prices; then, outliers in the data matrix are eliminated based on the lonely forest algorithm, and the missing values ​​and the eliminated outliers are filled by interpolation method, and the input data set is reconstructed to ensure the continuity and accuracy of the data; then, a multi-scale input feature framework is constructed according to the multi-dimensional data and feature fusion technology is used to effectively integrate data information from different scales and dimensions, so that the complex time series and spatial dependencies in electricity prices can be effectively captured, and the ability of the prediction algorithm in parsing variable electricity market data is significantly improved, thereby improving the accuracy and reliability of the prediction. The problem that the electricity price prediction model in the prior art is built based on the periodic law of the electricity price sequence cannot deeply explore the potential impact of renewable energy generation and other factors on electricity prices. Therefore, the method of multi-scale feature fusion electricity price prediction proposed in the embodiments of this specification can provide an accurate electricity price prediction framework for the electricity spot trading market, especially under the condition of considering the influencing factors of renewable energy power generation, so as to solve the prediction problems in the current market.

[0092] Figure 2The flowchart of a method for constructing a data matrix according to a data set is shown in an embodiment of the present specification. In the embodiment of the present specification, the data set is collected by a measuring device and the data therein needs to be processed, and a data matrix is ​​constructed according to the data features of different dimensions therein. The method specifically includes the following steps:

[0093] Step 201: extracting features from a plurality of time data and their corresponding electricity price data to generate time features of the electricity price data;

[0094] Step 202: extracting features from a plurality of meteorological data and their corresponding electricity price data to generate meteorological factor features of the electricity price data;

[0095] Step 203: extracting features of different energy types and their corresponding electricity price data to generate energy type features of the electricity price data;

[0096] Step 204: Fusing the time features, meteorological factor features, and energy type features of the electricity price data to generate the data matrix.

[0097] Specifically, the multiple time data contained in the collected data may include year, month, day, hour, minute and their corresponding electricity price data; the multi-dimensional meteorological data may include temperature, humidity and their corresponding electricity price data; the load data may include system load data, interconnection line load data, wind power output data, photovoltaic output data corresponding to electricity price data and other electricity price data in multiple dimensions, thereby realizing feature extraction of different energy types and their corresponding electricity price data.

[0098] Figure 3 The flowchart of a method for removing abnormal points in the data matrix based on the lonely forest algorithm to generate a data set without abnormalities is shown in an embodiment of this specification, which specifically includes the following steps:

[0099] Step 301: construct multiple random trees according to the data matrix to form a random forest, and calculate the path length of each data point in the data matrix in the random forest;

[0100] Step 302: Measuring the degree of abnormality of the data point according to the path length, and determining whether the data point in the data matrix is ​​abnormal;

[0101] Step 303: Data points whose path lengths are less than a preset threshold are set as abnormal points and removed to generate the non-abnormal data set.

[0102] Specifically, randomly select a data point in the data matrix and randomly select a cutting point within the range of eigenvalues, then use the selected data point and cutting point as segmentation rules to segment the data point into two subsets; repeat the above steps until there is only one data point in each subset, or the maximum depth of the predefined tree is reached, then build multiple such random trees, and form a random forest, calculate the path length of each data point in the random forest, that is, the average value of the number of edges from the root node to the data point, and use the path length to measure the degree of abnormality of the data point. A shorter path length indicates an abnormal point that is easily isolated, while a longer path length indicates a normal point in the sample. By setting a threshold, the path length can be compared with the probability of the abnormal point to determine which data points are classified as abnormal. At the same time, in this embodiment, the prefabricated parameters of the lonely forest can be flexibly adjusted according to the needs of a specific data set. The degree of isolation of the data point is estimated by constructing a random forest to determine whether it is an abnormal point. The lonely forest algorithm is sensitive to abnormal value points in a high-dimensional data matrix composed of time data, meteorological data, and load data in the electricity price data, and can isolate and separate them efficiently and quickly. In this embodiment, the matrix data collected by the measuring device includes elements such as time data, meteorological data, load data and new energy forecast data.

[0103] In one embodiment of the present specification, in order to fill the missing items that may exist in the collected data set and the abnormal points eliminated in the abnormal data matrix, the missing values ​​in the data are filled by interpolation. In this embodiment, a cubic sample interpolation function is selected for sample filling processing.

[0104] Select known data points in the data set as interpolation nodes, define segmentation intervals according to the interpolation nodes and construct an interpolation function;

[0105] Establishing a corresponding interpolation function for each segmented interval according to continuity and interpolation conditions;

[0106] Determine the missing values ​​in the non-abnormal data set and the locations of the removed abnormal points, and determine the segmented intervals in which they are located;

[0107] The estimated values ​​of the missing values ​​are calculated according to the interpolation function within the interval and filled.

[0108] Among them, filling the missing values ​​and the removed abnormal points in the non-abnormal data set based on the interpolation method further includes setting the function S(x)∈[a,b], in each small interval [x i ,x i+1 ] is a cubic polynomial, where S(x) is a cubic polynomial, a and b are constants, and i is the reference point;

[0109] When a=x0 <x1<...<x n =b,y j =f(x j )(j=0,1,...,n), then the cubic spline interpolation function S(x) at the node is expressed as S(x j )=y j ,j=0,1,…,n, where x0-x n is the sampling value at a specific time point between a and b; y is meaningless, and j is a natural number;

[0110] The missing values ​​and the removed abnormal points are inferred and filled by using the cubic spline interpolation function S(x).

[0111] In one embodiment of the present specification, in order to ensure that the model can smoothly receive input data and perform subsequent calculation processes in the next step, after completing the repair of the collected data, a reasonable high-dimensional data matrix X is constructed. T .

[0112] Performing feature fusion to generate a high-dimensional data matrix further includes:

[0113] Select multiple time data, meteorological data and load data for data sampling;

[0114] Select multiple time window data at sampling time t, multivariate meteorological factor data and different energy type data to form the corresponding N-dimensional node column vector:

[0115] x t =[x 1,t ·x 2,t· ·····x N,t ] T

[0116] Among them, x 1,t 、x 2,t 、x N,t is the data of different dimensions at time t;

[0117] As the sampling time increases, multiple column vector data with different sampling times t are formed to form the time series X:

[0118] X=[x1,x2…x t …]

[0119] According to the plurality of node column vectors x t And the time series X is standardized, where the standardization formula is In the formula, μ represents the mean of the data, δ represents the standard deviation of the data, and the high-dimensional data matrix X is generated. T , thereby ensuring that the high-dimensional data matrix X is obtainedT In the next steps, the input data can be received smoothly and the subsequent calculation process can be carried out.

[0120] In one embodiment of the present specification, in order to obtain the electricity price forecast value, such as Figure 4 As shown, it is also necessary to input the high-dimensional data matrix into the prediction model and output the electricity price prediction value. The specific steps are:

[0121] Step 401: performing Pearson correlation coefficient analysis on data features between different dimensions in the high-dimensional data matrix to obtain the correlation strength of the data in the high-dimensional data matrix;

[0122] Step 402: inputting the features with correlation strength higher than a threshold into a prediction model as input variables, and outputting the electricity price prediction value;

[0123] The data features in different dimensions include:

[0124] Multiple time data one year before the forecast base date, multivariate meteorological data, system load data, interconnection line load data, hydropower output data, thermal power output data forecast, new energy output data and actual clearing price data.

[0125] Specifically, by applying data fusion technology to deeply process multi-scale data, a coupled feature set can be effectively constructed, thereby providing a preprocessing basis for the input layer of the neural network model and effectively improving the data processing capabilities of the network model in complex data analysis.

[0126] For example, in one embodiment, among multiple time window information, the “year” feature and the “day” feature have little correlation and are not selected as input features. As a supplement to the passed information, the “working day or rest day” feature of the time window is added through data transformation. Similarly, in the execution of other embodiments, the selection of features is not entirely based on correlation analysis, and manual correction links can be added as needed to increase the executable degree of the data and the prediction accuracy.

[0127] In one embodiment of the present specification, in order to obtain the electricity price forecast value, it is also necessary to input the high-dimensional data matrix into the forecast model for forecasting, such as Figure 5 As shown, inputting the high-dimensional data matrix into the prediction model and outputting the electricity price prediction value further includes:

[0128] Step 501: Generate discrete feature identifiers in the high-dimensional data matrix, map the feature identifiers into vector representations and add position codes;

[0129] Step 502: performing additive normalization processing and nonlinear transformation on the vector representation carrying the position code, and the normalized output is a multi-level feature;

[0130] Step 503: Mapping the multi-level features to the prediction space and generating a probability distribution according to the prediction requirements;

[0131] Step 504: Output the electricity price prediction value with the highest probability as the electricity price prediction value.

[0132] Specifically, in one embodiment of the specification, the deep learning framework of pytorch can be built and implemented using python language. Data features are imported, including multi-window time features, multivariate meteorological data, system load data, historical actual clearing price data and other multi-scale data, which are divided into training set, validation set and test set, which are used for model training, validation and evaluation respectively.

[0133] Specifically, the discrete feature identifiers are first mapped to dense vector representations. Next, these vectors are positionally encoded, giving each sequence position a unique identifier by introducing a set of predefined vectors, thereby providing the model with key position information. The results are then processed by additive normalization. The processed results are input into a feedforward neural network for further nonlinear transformation to normalize the output. Finally, according to the forecasting requirements, the model extracts and refines key information from the high-dimensional feature space, thereby outputting the price forecast value corresponding to the highest probability as an estimate of the target variable.

[0134] In another embodiment of the present specification, after obtaining the prediction results, the prediction performance can be evaluated, and the mean absolute percentage error (MAPE) is used as the main evaluation index of the prediction performance of each model, and the mean absolute error (MAE) is selected as the auxiliary evaluation index. The calculation formulas of MAPE and MAE are as follows:

[0135]

[0136] Where: y t is the actual power load data; The predicted power load data; is the mean value of the power load; n is the number of samples of the power load data. This evaluation index is only one embodiment provided in this specification. In other embodiments, a performance index that is closer to the project requirements can also be selected for implementation according to the task needs.

[0137] like Figure 6The figure shows a schematic diagram of the structure of a multi-scale feature fusion electricity price prediction device according to an embodiment of the present specification. The figure describes the basic structure of the electricity price prediction device, wherein the functional units and modules can be implemented in software, or a general chip or a specific chip can be used to implement operation guidance. The device specifically includes:

[0138] The data collection unit 601 is used to collect a data set through a measuring device, including a data set including electricity price data and a plurality of corresponding time data, meteorological data and load data, and construct a data matrix according to the data set;

[0139] An outlier elimination unit 602 is used to eliminate outliers in the data matrix based on a lonely forest algorithm to generate an outlier-free data matrix;

[0140] A feature fusion unit 603 is used to fill the missing values ​​and the removed abnormal points in the non-abnormal data matrix based on the interpolation method, and perform feature fusion to generate a high-dimensional data matrix;

[0141] The electricity price prediction unit 604 is used to generate and train a prediction model according to the time series and regional dependencies in the data set, input the high-dimensional data matrix into the prediction model and output the electricity price prediction value.

[0142] like Figure 7 As shown, a computer device provided by an embodiment of this specification, the computer device 802 may include one or more processors 804, such as one or more central processing units (CPUs), and each processing unit may implement one or more hardware threads. The computer device 802 may also include any memory 806, which is used to store any kind of information such as code, settings, data, etc. Non-restrictive, for example, the memory 806 may include any one or more combinations of the following: any type of RAM, any type of ROM, flash memory device, hard disk, optical disk, etc. More generally, any memory may use any technology to store information. Further, any memory may provide volatile or non-volatile retention of information. Further, any memory may represent a fixed or removable component of the computer device 802. In one case, when the processor 804 executes an associated instruction stored in any memory or a combination of memories, the computer device 802 may perform any operation of the associated instruction. The computer device 802 also includes one or more drive mechanisms 808 for interacting with any memory, such as a hard disk drive mechanism, an optical disk drive mechanism, etc.

[0143] The computer device 802 may also include an input / output module 810 (I / O) for receiving various inputs (via input devices 812) and for providing various outputs (via output devices 814). A specific output mechanism may include a presentation device 816 and an associated graphical user interface (GUI) 818. In other embodiments, the input / output module 810 (I / O), the input device 812, and the output device 814 may not be included, and the computer device 802 may be used as a computer device in a network. The computer device 802 may also include one or more network interfaces 820 for exchanging data with other devices via one or more communication links 822. One or more communication buses 824 couple the components described above together.

[0144] The communication link 822 may be implemented in any manner, for example, through a local area network, a wide area network (e.g., the Internet), a point-to-point connection, etc., or any combination thereof. The communication link 822 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc. governed by any protocol or combination of protocols.

[0145] Corresponds to Figures 1 to 5 The method in the embodiment of the present specification also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above method are executed.

[0146] The embodiment of the present specification also provides a computer-readable instruction, wherein when the processor executes the instruction, the program therein causes the processor to execute the following Figures 1 to 5 The method shown.

[0147] The embodiment of the present specification also provides a computer program product, the computer program product includes a computer program, and the computer program is executed by a processor as follows Figures 1 to 5 The method shown.

[0148] It should be understood that in the various embodiments of this specification, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this specification.

[0149] It should also be understood that in the embodiments of this specification, the term "and / or" is only a description of the association relationship of the associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this specification generally indicates that the associated objects before and after are in an "or" relationship.

[0150] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in this specification can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this specification.

[0151] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0152] In the several embodiments provided in this specification, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or it can be an electrical, mechanical or other form of connection.

[0153] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of this specification.

[0154] In addition, each functional unit in each embodiment of this specification may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0155] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this specification is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of this specification. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0156] Specific embodiments are used in this specification to illustrate the principles and implementation methods of this specification. The description of the above embodiments is only used to help understand the methods and core ideas of this specification. At the same time, for those skilled in the art, according to the ideas of this specification, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on this specification.

Claims

1. A method for predicting electricity prices based on multi-scale feature fusion, characterized in that: The method comprises: Collecting a data set by a measuring device, including a data set including electricity price data and a plurality of corresponding time data, meteorological data and load data, and constructing a data matrix according to the data set; Based on the lonely forest algorithm, outliers in the data matrix are removed to generate an outlier-free data matrix; Filling the missing values ​​and the removed abnormal points in the non-abnormal data matrix based on the interpolation method, and performing feature fusion to generate a high-dimensional data matrix; A prediction model is generated and trained according to the time series and regional dependencies in the data set, the high-dimensional data matrix is ​​input into the prediction model and a predicted electricity price value is output.

2. The method for predicting electricity prices by fusion of multi-scale features according to claim 1, characterized in that: Constructing a data matrix based on the data set further comprises, Extract features from multiple time data and their corresponding electricity price data to generate time features of the electricity price data; Extract features from multiple meteorological data and their corresponding electricity price data to generate meteorological factor features of electricity price data; Extract features of different energy types and their corresponding electricity price data to generate energy type features of electricity price data; The data matrix is ​​generated by performing feature fusion on the time features, meteorological factor features and energy type features of the electricity price data.

3. The method for predicting electricity prices by fusion of multi-scale features according to claim 1, characterized in that: Eliminating abnormal points in the data matrix based on the lonely forest algorithm to generate a data set without abnormalities further includes: Constructing a plurality of random trees according to the data matrix to form a random forest, and calculating the path length of each data point in the data matrix in the random forest; Measuring the degree of abnormality of the data point according to the path length, and determining whether the data point in the data matrix is ​​abnormal; Data points whose path lengths are less than a preset threshold are set as abnormal points and removed to generate the abnormal-free data set.

4. The method for predicting electricity prices by fusion of multi-scale features according to claim 1, characterized in that: Filling the missing values ​​and the removed abnormal points in the non-abnormal data set based on the interpolation method further includes: Select known data points in the data set as interpolation nodes, define segmentation intervals according to the interpolation nodes and construct an interpolation function; Establishing a corresponding interpolation function for each segmented interval according to continuity and interpolation conditions; Determine the missing values ​​in the non-abnormal data set and the locations of the removed abnormal points, and determine the segmented intervals in which they are located; The estimated values ​​of the missing values ​​are calculated according to the interpolation function within the interval and filled.

5. The method for predicting electricity prices by fusion of multi-scale features according to claim 1, characterized in that: Performing feature fusion to generate a high-dimensional data matrix further includes: Select multiple time data, meteorological data and load data for data sampling; Select multiple time window data at sampling time t, multivariate meteorological factor data and different energy type data to form the corresponding N-dimensional node column vector: x t =[x 1,t ·x 2,t ······x N,t ] T Among them, x 1,t 、x 2,t 、x N,t is the data of different dimensions at time t; As the sampling time increases, multiple column vector data with different sampling times t are formed to form the time series X: X=[x1,x2…x t …] According to the plurality of node column vectors x t And the time series X is standardized to generate a high-dimensional data matrix X T .

6. The method for predicting electricity prices by fusion of multi-scale features according to claim 1, characterized in that: Inputting the high-dimensional data matrix into the prediction model and outputting the electricity price prediction value further includes, Performing Pearson correlation coefficient analysis on data features between different dimensions in the high-dimensional data matrix to obtain the correlation strength of the data in the high-dimensional data matrix; Input the features with correlation strength higher than a threshold value as input variables into a prediction model, and output the electricity price prediction value; The data features in different dimensions include: Multiple time data one year before the forecast base date, multivariate meteorological data, system load data, interconnection line load data, hydropower output data, thermal power output data forecast, new energy output data and actual clearing price data.

7. The method for predicting electricity prices by fusion of multi-scale features according to claim 1, characterized in that: Inputting the high-dimensional data matrix into the prediction model and outputting the electricity price prediction value further includes: Generating discrete feature identifiers in the high-dimensional data matrix, mapping the feature identifiers into vector representations and adding position codes; The vector representation carrying the position code is normalized by addition and transformed nonlinearly, and the normalized output is a multi-level feature. Mapping the multi-level features to a prediction space and generating a probability distribution according to prediction requirements; The electricity price prediction value with the highest probability is output as the electricity price prediction value.

8. A multi-scale feature fusion electricity price prediction device, characterized in that: A data collection unit, used to collect a data set through a measuring device, collect a data set including electricity price data and a plurality of corresponding time data, meteorological data and load data, and construct a data matrix according to the data set; An outlier elimination unit is used to eliminate outliers in the data matrix based on a lonely forest algorithm to generate an outlier-free data matrix; A feature fusion unit, used to fill the missing values ​​and the removed abnormal points in the non-abnormal data matrix based on the interpolation method, and perform feature fusion to generate a high-dimensional data matrix; The electricity price prediction unit is used to generate and train a prediction model according to the time series and regional dependencies in the data set, input the high-dimensional data matrix into the prediction model and output the electricity price prediction value.

9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

11. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.