Big data-driven electric power spot transaction price prediction method

Through the big data-driven power spot trading price prediction method, multi-band features are extracted using wavelet packet decomposition and reconstruction, combined with the random forest model to screen features and use support vector machine regression sub-model weighted integration, the problems of noise interference and low computing efficiency in traditional methods are solved, and high-precision and real-time power spot price prediction is achieved.

CN120509941AInactive Publication Date: 2025-08-19王敏
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510583662.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-07
Publication Date
2025-08-19
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional power spot trading price prediction methods are difficult to effectively deal with high-frequency nonlinear features, resulting in noise interference and model overfitting, and inefficient calculation efficiency, which cannot meet the real-time requirements of high-frequency price updates.

Method used

Data of multi-source influencing factors are obtained through big data, multi-band features are extracted using wavelet packet decomposition and reconstruction, and subset of importance is screened in combination with a random forest model, and the weighted ensemble of support vector machine regression submodel is used for prediction.

Benefits of technology

It significantly improves the accuracy and real-time performance of spot price prediction of power, reduces the calculation load, and solves the problems of high-frequency nonlinear data processing and feature redundancy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120509941A_ABST
    Figure CN120509941A_ABST
Patent Text Reader

Abstract

The invention relates to a big data-driven electric power spot transaction price prediction method. The method comprises the steps of obtaining multi-source influence factor data of an electric power spot transaction price through big data; performing multi-band feature extraction on the multi-source influence factor data by using wavelet packet decomposition and reconstruction, effectively separating high-frequency noise and retaining key signals; a high-importance feature subset is screened based on a random forest model, data redundancy and model complexity are reduced, and parameters of the random forest model are optimized through cross validation and grid search to improve the generalization ability of the model; and finally, the support vector machine sub-model is used for weighting and integrating the output prediction result, and the adaptation advantages of different kernel functions to multi-source features are fused, so that noise interference is inhibited, the calculation load is reduced, the precision and real-time performance of electric power spot price prediction are remarkably improved, and the prediction efficiency is improved. The defects of a traditional method in the aspects of high-frequency nonlinear data processing, feature redundancy and model efficiency are overcome.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of energy forecasting, and in particular relates to a big data-driven electricity spot transaction price forecasting method. Background Art

[0002] Electricity spot price forecasting is a core component of power market operations, and its accuracy directly impacts trading decisions by power generation companies, electricity retailers, and consumers. With the large-scale integration of renewable energy, price fluctuations are increasingly impacted by the random nature of wind and solar power output, the time-varying nature of load demand, and the multi-dimensional coupling of meteorological conditions, posing significant challenges to traditional forecasting methods.

[0003] Existing prediction methods based on time series analysis (such as ARIMA) or single machine learning models (such as BP neural networks) often struggle to effectively handle the high-frequency, nonlinear characteristics of electricity price data. For one thing, high-frequency, random fluctuations in data such as wind and solar output and meteorological factors can be misjudged as valid signals, introducing prediction noise. Furthermore, artificially constructed multidimensional feature sets (such as historical load, temperature, and wind speed) suffer from multicollinearity, leading to model overfitting and low computational efficiency. Furthermore, traditional models such as support vector machines struggle to meet the real-time requirements of high-frequency price updates in the electricity spot market due to the cumbersome parameter tuning process when faced with massive amounts of data.

[0004] Therefore, there is an urgent need for an electricity spot price forecasting method that can collaboratively process high-frequency noise, dynamically screen key features, and balance prediction accuracy and efficiency. Summary of the Invention

[0005] Based on this, it is necessary to provide a big data-driven electricity spot transaction price prediction method to address the above technical problems.

[0006] In a first aspect, the present application provides a big data-driven electricity spot transaction price prediction method, comprising:

[0007] S1. Obtain multi-source influencing factor data on electricity spot transaction prices based on big data; the multi-source influencing factor data includes load data, power generation data, wind and solar output data, historical electricity price data, meteorological data, regulating resource data, and marginal price data;

[0008] S2. Perform wavelet packet decomposition and reconstruction on the multi-source influencing factor data to obtain multi-band feature data;

[0009] S3. Calculate the importance score of each feature in the multi-band feature data using a pre-trained random forest model, screen features with importance scores higher than a set threshold, and generate a screened feature subset; wherein the training process of the random forest model includes: performing cross-validation and grid search using multi-band feature data samples to determine the optimal parameter combination of the random forest model, and generating a random forest model based on the optimal parameter combination of the model;

[0010] S4. Input each feature subset into the corresponding support vector machine regression sub-model to obtain the electricity price prediction value corresponding to each feature subset; average or weighted average each electricity price prediction value to obtain the final electricity price prediction value.

[0011] Secondly, this application also provides a big data-driven electricity spot transaction price prediction system, including:

[0012] A data acquisition module is used to acquire multi-source influencing factor data on electricity spot transaction prices based on big data; the multi-source influencing factor data includes load data, power generation data, wind and solar output data, historical electricity price data, meteorological data, regulating resource data, and marginal price data;

[0013] The feature decomposition module is used to perform wavelet packet decomposition and reconstruction on multi-source influencing factor data to obtain multi-band feature data;

[0014] The feature screening module is used to calculate the importance score of each feature in the multi-band feature data using a pre-trained random forest model, screen features with importance scores above a set threshold, and generate a screened feature subset. The training process of the random forest model involves performing cross-validation and grid search using multi-band feature data samples to determine the optimal parameter combination of the random forest model, and then generating a random forest model based on the optimal model parameter combination.

[0015] The prediction module is used to input each feature subset into the corresponding support vector machine regression sub-model to obtain the electricity price prediction value corresponding to each feature subset; and average or weighted average each electricity price prediction value to obtain the final electricity price prediction value.

[0016] In a third aspect, the present application also provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements a big data-driven electricity spot transaction price prediction method as in the first aspect.

[0017] In a fourth aspect, the present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a big data-driven electricity spot transaction price prediction method as in the first aspect.

[0018] The above-mentioned big data-driven electricity spot transaction price prediction method obtains multi-source influencing factor data of electricity spot transaction prices through big data, wherein the multi-source influencing factor data includes load data, power generation data, wind and solar output data, historical electricity price data, meteorological data, regulating resource data and marginal price data; uses wavelet packet decomposition and reconstruction to extract multi-band features of the multi-source influencing factor data, effectively separates high-frequency noise and retains key signals; based on the random forest model, a high-importance feature subset is screened to reduce data redundancy and model complexity. The parameters of the random forest model are optimized through cross-validation and grid search to improve the model generalization ability; finally, the prediction results of the weighted integrated output of the support vector machine sub-model are used to integrate the adaptation advantages of different kernel functions to multi-source features, thereby significantly improving the accuracy and real-time performance of electricity spot price prediction while suppressing noise interference and reducing computing load, and solving the defects of traditional methods in high-frequency nonlinear data processing, feature redundancy and model efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0020] Figure 1 A schematic diagram of a flow chart of a big data-driven electricity spot transaction price prediction method provided by the present invention;

[0021] Figure 2 A schematic diagram of a process for generating multi-band feature data in an optional embodiment of the present invention;

[0022] Figure 3 This is a structural diagram of a big data-driven electricity spot trading price prediction system provided by the present invention. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0024] refer to Figure 1 , which presents a flow chart of a big data-driven electricity spot transaction price prediction method provided by this application, the method comprising the following steps:

[0025] S1. Obtain multi-source influencing factor data on electricity spot transaction prices based on big data; wherein, the multi-source influencing factor data includes load data, power generation data, wind and solar output data, historical electricity price data, meteorological data, regulating resource data and marginal price data.

[0026] Specifically, the spot transaction price of electricity is affected by a combination of factors, which come from a wide range of sources and are of various types, including but not limited to load data, power generation data, wind and solar output data, historical electricity price data, meteorological data, regulating resource data and marginal price data.

[0027] Load data reflects the dynamic changes in electricity demand at different time scales and is one of the core factors affecting the spot price of electricity. Its daily load curve can show the fluctuations in electricity demand at different times of the day.

[0028] The power generation data reflects the total level of electricity supply, including the power generation of conventional power generation methods such as traditional thermal power and hydropower, as well as the power generation of new energy power generation (such as wind power and photovoltaic power). It and the load data together determine the supply and demand balance in the electricity market.

[0029] Wind and solar power output data, as a key indicator of renewable energy power generation, is characterized by intermittency, volatility and randomness. Its fluctuations will directly affect the real-time supply and demand balance of the power system, and thus have a significant impact on electricity prices.

[0030] Historical electricity price data contains the historical patterns and trends of electricity market price changes over time, providing historical information for forecasting models and helping to capture the cyclical and trend characteristics of electricity price fluctuations.

[0031] Meteorological data, such as temperature, humidity, wind speed, wind direction, and light intensity, have a direct impact on power load and renewable energy power generation output, and thus indirectly affect the spot price of electricity. For example, high temperatures will lead to an increase in air conditioning load, thereby increasing electricity prices.

[0032] Regulatory resource data involves the configuration and operating status of resources such as reserve capacity, frequency regulation services, and energy storage equipment in the power grid. These resources play an important role in maintaining the stable operation of the power system and balancing supply and demand. Their cost and availability will also affect electricity prices.

[0033] Marginal price data reflects the power generation cost of the last batch of power generation units that meet electricity demand within a specific period of time. It is usually used as one of the pricing bases for electricity spot transactions and has a direct indicative significance for the formation of predicted electricity prices.

[0034] The aforementioned multi-source influencing factor data is typically stored in different databases and systems, such as power companies' internal production management systems, meteorological departments' meteorological observation stations, and energy trading market transaction record databases. To obtain this data, a multi-source data access and integration mechanism can be established. Through data interfaces, data crawling, and other technical means, relevant data scattered across various data sources can be aggregated into a unified data platform. Preprocessing operations such as data cleaning, missing value processing, and outlier detection can then be performed.

[0035] S2. Perform wavelet packet decomposition and reconstruction on the multi-source influencing factor data to obtain multi-band feature data.

[0036] Specifically, electricity spot price data and its influencing factors are typically non-stationary, nonlinear, and multi-band. This means the data contains fluctuations across different frequency ranges, including low-frequency long-term trends and cyclical fluctuations, as well as high-frequency short-term random fluctuations and spikes. To better extract and analyze the characteristic information of these different frequency bands, wavelet packet decomposition and reconstruction is an effective wavelet analysis tool.

[0037] Wavelet packet decomposition is a multi-resolution analysis method that can gradually decompose a signal into sub-signals of different frequency bands. Specifically, wavelet packet decomposition achieves a subdivision of the signal frequency by continuously decomposing the signal into low-frequency and high-frequency components, thereby decomposing a complex data sequence into multiple sub-sequences of different frequency bands. Each sub-sequence corresponds to a specific frequency range and reflects the characteristic information of the data in that frequency band. For example, for power load data, the low-frequency component may reflect the daily cyclical change trend of the load, while the high-frequency component may contain short-term fluctuations and random interference of the load.

[0038] When performing wavelet packet decomposition, the appropriate wavelet basis function and number of decomposition levels are selected. Different wavelet basis functions have different localization characteristics in the time and frequency domains, making them suitable for different types of signal analysis. The number of decomposition levels is determined based on the characteristics of the data and the purpose of the analysis. The more decomposition levels, the richer the frequency details that can be obtained, but the corresponding computational complexity also increases. After wavelet packet decomposition, the resulting subsequences contain information from different frequency bands, but may still contain noise interference and other issues. Therefore, these subsequences can be further reconstructed and denoised.

[0039] Wavelet packet reconstruction reconstructs the decomposed subsequences to obtain characteristic representations of the original signal across different frequency bands. During the reconstruction process, subsequences in different frequency bands can be processed differently based on analysis requirements and noise levels. For example, threshold denoising can be applied to high-frequency subsequences while retaining the main trend information of low-frequency subsequences. Wavelet packet decomposition and reconstruction ultimately yields multi-band feature data that more clearly demonstrates the inherent patterns and characteristics of the original data across different time scales and frequency ranges, providing valuable input for subsequent feature screening and predictive model training.

[0040] S3. Calculate the importance score of each feature in the multi-band feature data through the pre-trained random forest model, screen features with importance scores higher than the set threshold, and generate a screened feature subset; the training process of the random forest model is as follows: use multi-band feature data samples for cross-validation and grid search to determine the optimal parameter combination of the random forest model, and generate the random forest model based on the optimal parameter combination of the model.

[0041] Specifically, in electricity spot price forecasting, although multi-band feature data is extracted through wavelet packet decomposition and reconstruction, not all features are equally important to the forecasting objective. Some features may contribute little to electricity price forecasting or even introduce noise and interference, affecting the performance and generalization ability of the forecasting model. Therefore, we screen the features to extract the feature subset that has the greatest impact on electricity price forecasting.

[0042] The random forest model is an ensemble learning algorithm composed of multiple decision trees. It constructs multiple different decision trees through random sampling and feature selection, and integrates the prediction results of these decision trees to improve the model's accuracy and stability. In this paper, the feature importance assessment function of the random forest model is used to calculate the importance score of each feature in the multi-band feature data to the prediction target (electricity spot trading price).

[0043] Specifically, during training, the random forest model constructs multiple decision trees, each of which is based on a randomly sampled training set and a randomly selected subset of features. During the node splitting process in each decision tree, the sample is partitioned based on the selected features, with the goal of minimizing the node impurity (such as the Gini index) and selecting the optimal splitting features and split points. In this way, the random forest model can assess the importance of each feature in the classification or regression task, that is, the degree to which the feature contributes to the model's predictive performance.

[0044] When calculating the importance score of each feature, the random forest model can use two methods: one is the feature importance based on the Gini index, that is, in the process of building each decision tree, the reduction of the Gini index of each feature when the node is split is calculated, and then all decision trees are averaged to obtain the importance score of each feature; the other is the feature importance based on feature arrangement, that is, after the model training is completed, each feature is arranged (that is, the order of the value of the feature is disrupted), and then the decline in the prediction performance of the model on the arranged data is calculated. The greater the decline, the more important the feature is to the prediction performance of the model.

[0045] After calculating the importance score for each feature using the above method, we filter out features with scores above a set threshold, generating a filtered feature subset. This filtered feature subset contains the features most influential in predicting electricity spot prices. This effectively reduces feature dimensionality, lowers model complexity, and improves model training efficiency and predictive performance. It also helps improve model interpretability, enabling us to better understand the factors that play a key role in electricity price fluctuations.

[0046] During the training process of the random forest model, cross-validation and grid search can be performed using multi-band feature data samples to determine the optimal parameter combination for the model. Cross-validation is a method for evaluating the generalization ability of a model. The dataset is divided into multiple subsets (usually K-fold), with K-1 subsets used as the training set each time and the remaining subset used as the validation set. This is repeated K times to obtain the average performance index of the model under different data partitioning conditions. Grid search is an exhaustive search method that performs a combinatorial search for the model's hyperparameters (such as the number of decision trees in the random forest, the maximum depth of the tree, the number of feature selections, etc.) within a predefined parameter space. The model performance under each set of parameter combinations is evaluated through cross-validation, and the parameter combination with the best performance index is finally selected as the optimal parameter combination for the random forest model. Based on this optimal parameter combination of the model, the final random forest model is generated for feature importance scoring and feature screening.

[0047] S4. Input each feature subset into the corresponding support vector machine regression sub-model to obtain the electricity price prediction value corresponding to each feature subset; average or weighted average each electricity price prediction value to obtain the final electricity price prediction value.

[0048] Specifically, after completing feature screening and generating filtered feature subsets, these feature subsets are input into the prediction model to perform electricity price forecasting. This invention uses a Support Vector Machine (SVM) regression submodel as the basic prediction unit, constructing a corresponding SVM regression submodel for each feature subset to fully explore the contribution of different feature subsets to electricity price forecasting.

[0049] Support vector machine regression is a machine learning algorithm based on statistical learning theory. It effectively predicts the target variable by finding an optimal hyperplane in a high-dimensional feature space that best fits the training sample data while controlling the model's complexity. In support vector machine regression models, an ε-insensitive loss function can be used to measure the error between the predicted value and the true value. This loss function does not penalize errors less than ε, but applies a linear penalty for errors greater than ε. This effectively improves the model's robustness to noisy data.

[0050] For each feature subset, when constructing the corresponding support vector machine regression submodel, key model parameters are determined, such as the kernel function type (such as linear kernel, polynomial kernel, radial basis kernel function, etc.), kernel function parameters, penalty parameter C (used to control the degree of error penalty imposed by the model), and ε value. The selection of these parameters has a significant impact on the model's predictive performance and can be optimized through methods such as cross-validation and grid search.

[0051] After obtaining the electricity price prediction values corresponding to each support vector machine regression sub-model, these prediction values are fused to obtain the final electricity price prediction result. The fusion method can be simple averaging or weighted averaging. Simple averaging directly takes the arithmetic average of the prediction values of each sub-model, assuming that the prediction results of each sub-model have equal importance; while weighted averaging assigns different weights to each sub-model based on its prediction performance (such as prediction error and explained variance on the validation set). Sub-models with higher weights contribute more to the final prediction result. In this way, the advantages of different feature subsets and different support vector machine regression sub-models can be comprehensively utilized to improve the accuracy and stability of the prediction results, and ultimately obtain the predicted value of the electricity spot trading price.

[0052] The above-mentioned big data-driven electricity spot transaction price prediction method obtains multi-source influencing factor data of electricity spot transaction prices through big data, wherein the multi-source influencing factor data includes load data, power generation data, wind and solar output data, historical electricity price data, meteorological data, regulating resource data and marginal price data; uses wavelet packet decomposition and reconstruction to extract multi-band features of the multi-source influencing factor data, effectively separates high-frequency noise and retains key signals; based on the random forest model, a high-importance feature subset is screened to reduce data redundancy and model complexity. The parameters of the random forest model are optimized through cross-validation and grid search to improve the model generalization ability; finally, the prediction results of the weighted integrated output of the support vector machine sub-model are used to integrate the adaptation advantages of different kernel functions to multi-source features, thereby significantly improving the accuracy and real-time performance of electricity spot price prediction while suppressing noise interference and reducing computing load, and solving the defects of traditional methods in high-frequency nonlinear data processing, feature redundancy and model efficiency.

[0053] refer to Figure 2 In an optional embodiment, S2 includes the following steps:

[0054] S21. Perform wavelet packet decomposition layer by layer on each data source in the multi-source influencing factor data according to a binary tree structure to generate multiple sub-band sequences of each data source.

[0055] Specifically, for each data source (such as load data, power generation data, wind and solar power output data, etc.), wavelet packet decomposition is performed layer by layer according to a binary tree structure. For example, the initial data sequence is represented as S. During the first-level decomposition, it is decomposed into two sub-band sequences: an approximate coefficient sequence (low-frequency portion) and a detail coefficient sequence (high-frequency portion), denoted as S{1,0} and S{1,1}, respectively. The low-frequency portion S{1,0} obtained from the first-level decomposition is then further decomposed into an approximate coefficient sequence and a detail coefficient sequence, namely S{2,0} and S{2,1}. Simultaneously, the high-frequency portion S{1,1} of the first level is further decomposed into S{2,2} and S{2,3}. This decomposition continues layer by layer until the set number of decomposition levels M is reached. The number of decomposition levels M can be determined by comprehensively considering factors such as the data characteristics, the signal frequency range, and computing resources. A greater number of decomposition levels yields richer frequency details, but also increases computational complexity.

[0056] Through layer-by-layer decomposition, each data source ultimately generates multiple sub-band sequences. Each sub-band sequence corresponds to a specific frequency range and reflects the characteristic information of the data in that frequency band. For example, low-frequency sub-band sequences primarily reflect long-term trends and large-scale changes in the data, while high-frequency sub-band sequences capture detailed information such as short-term fluctuations and random noise.

[0057] S22: Calculate the energy ratio of each sub-band sequence, and delete the sub-band sequences whose energy ratio is lower than a set threshold.

[0058] Specifically, after obtaining multiple sub-band sequences from each data source, energy proportions of these sub-band sequences are calculated and screened to remove noise bands that contribute less to electricity price prediction and retain feature bands containing valid information.

[0059] The energy contribution of each sub-band sequence can be determined by calculating the ratio of the sum of the squares of all data points in that sub-band sequence to the sum of the squares of the original data sequence. Mathematically, for the original data sequence S, its total energy is E_total = ∑(S(t))²; for a sub-band sequence S_sub, its energy is E_sub = ∑(S_sub(t))². Therefore, the energy contribution of the sub-band sequence is P_sub = E_sub / E_total.

[0060] Set an energy percentage threshold (e.g., 5%). Sub-band sequences with energy percentages below this threshold are considered to contain little information and likely to be primarily noise or invalid signals, and are therefore deleted. This process helps reduce data dimensionality and the computational effort for subsequent processing, while also improving the quality of feature data and enhancing the model's ability to capture valid information.

[0061] S23. Concatenate the retained sub-band sequences according to data categories to generate multi-band feature data.

[0062] Specifically, after calculating and filtering the energy proportions of the sub-band sequences of each data source, the remaining sub-band sequences are spliced together according to data categories to generate multi-band feature data. For example, the sub-band sequences of load data after wavelet packet decomposition and filtering, the sub-band sequences corresponding to power generation data, and the sub-band sequences corresponding to wind and solar output data are spliced together to form a comprehensive multi-band feature data set. This feature data set contains valid information from different data sources in multiple frequency bands, and can more comprehensively and meticulously characterize the characteristics of the factors affecting the spot transaction price of electricity, providing high-quality input data for subsequent feature importance evaluation and prediction model training.

[0063] In an optional embodiment, calculating the energy proportion of each sub-band sequence includes the following steps:

[0064] S221 : Calculate the sum of squares of discrete wavelet coefficients of each sub-band sequence as the energy value of each sub-band sequence.

[0065] S222. Count the proportion of the energy value of each sub-band sequence to the total energy to obtain an energy proportion.

[0066] Specifically, during the wavelet packet decomposition process, each sub-band sequence is represented by a series of discrete wavelet coefficients. These discrete wavelet coefficients reflect the signal intensity information at the corresponding frequency band and position. To calculate the energy value of each sub-band sequence, it is first necessary to calculate the sum of the squares of its discrete wavelet coefficients. Mathematically, for a sub-band sequence S_sub, its corresponding discrete wavelet coefficient sequence is {d_1, d_2, ..., d_n}, then the energy value E_sub of the sub-band sequence can be defined as: Where n is the length of the sub-band sequence, and d_i is the i-th discrete wavelet coefficient. By squaring and summing the discrete wavelet coefficients, we can obtain the total energy value of the sub-band sequence. The squaring operation makes the energy value more sensitive to changes in the signal amplitude and can effectively reflect the strength and fluctuation characteristics of the signal in the frequency band.

[0067] After obtaining the energy values of each sub-band sequence, we further calculate the ratio of each sub-band sequence's energy value to the total energy of the original data sequence, i.e., the energy contribution. This quantifies the relative energy contribution of each sub-band sequence in the overall signal, thus providing a basis for subsequent screening.

[0068] In an optional embodiment, cross-validation and grid search are performed using multi-band feature data samples to determine the optimal parameter combination of the random forest model, including the following steps:

[0069] S31. Use the multi-band feature data samples as a training set, and divide the training set into K parts on average.

[0070] S32. Setting the grid search range and grid division accuracy of the random forest parameters according to preset conditions.

[0071] S33. Based on the grid search range and the grid division accuracy, a group of model parameters is selected as the model parameter group.

[0072] S34. Select k-1 pieces of data in the training set as a training sample combination, and generate a random forest based on the model parameter group and the training sample combination.

[0073] S35. Calculate the first error evaluation index of all trees in the random forest on the remaining data in the training set.

[0074] S36. After traversing all k-1 training sample combinations, select the average value of the first error evaluation index of all training sample combinations as the second error evaluation index of the model parameter group.

[0075] S37. After traversing all model parameter groups, select the model parameter group with the best performance of the second error evaluation index as the optimal parameter combination of the random forest model.

[0076] Specifically, when training a random forest model using multi-band feature data samples, a combination of cross-validation and grid search is used to determine the optimal model parameter combination. This method can comprehensively explore the parameter space within a certain computational cost, thereby finding the parameter combination that maximizes the model's predictive performance.

[0077] The multi-band feature data samples are used as the training set, and the training set is evenly divided into K parts (K can be 5 or 10). This division method is to ensure the representativeness of each subset during the cross-validation process while effectively utilizing limited data resources. For example, when K = 5, the training set is divided into 5 parts, each containing approximately 20% of the data. This allows the model to be trained on 80% of the data in each iteration and then validated on the remaining 20% of the data, thereby evaluating the model's performance on unseen data.

[0078] The grid search range and grid division accuracy of the random forest model parameters are set according to the preset conditions. There are several key parameters that need to be optimized in the random forest model, such as:

[0079] Number of decision trees (n_estimators): This parameter determines the number of decision trees in the random forest. Generally, more decision trees improve model stability and accuracy, but also increase computational cost. The grid search range can be set from 10 to 200, in increments of 10, i.e., examining 10, 20, 30, ..., 200 decision trees.

[0080] Maximum number of features (max_features): The maximum number of features randomly selected when building each decision tree. This parameter affects the diversity and accuracy of the model. Grid search ranges can include "sqrt" (the square root of the total number of features), "log2" (the logarithm of the total number of features), and specific integer values such as 5, 10, 15, etc.

[0081] Max depth of the tree (max_depth): controls the maximum depth of the decision tree to prevent overfitting. The grid search range can be set from 5 to 30, increasing by a step of 5, i.e. 5, 10, 15, ..., 30.

[0082] Minimum number of leaf node samples (min_samples_leaf): The minimum number of samples required for leaf nodes to control overfitting. Grid search ranges can include 1, 2, 5, etc.

[0083] Gridding accuracy refers to the step size or interval at which parameter values are tried within the parameter range. For example, for the number of decision trees, the step size is 10; for the maximum depth, the step size is 5, etc.

[0084] Based on the set grid search range and accuracy, select a set of model parameters as the model parameter group. For example, start with n_estimators = 10, max_features = "sqrt", max_depth = 5, min_samples_leaf = 1, and then try different parameter combinations in sequence according to the set step size and range.

[0085] During the cross-validation process, in each cross-validation iteration, k-1 data sets are selected from the K training sets as the training sample combination for training the random forest model. For example, when K = 5, in the first iteration, the first 4 data sets are used as the training sample combination.

[0086] Based on the selected set of model parameters and training sample combinations, a random forest model is trained. The model training process involves constructing each decision tree, where each decision tree is sampled from the training sample combination using random sampling with replacement (i.e., bootstrapping) and splitting using a randomly selected subset of features.

[0087] Use the trained random forest model to predict the remaining data in the training set (i.e., the validation set), and calculate the first error evaluation index between the predicted result and the actual value. Error evaluation indicators may include but are not limited to: mean square error (MSE), mean absolute error (MAE), R 2 Scores, etc.

[0088] After traversing all k-1 training sample combinations, K cross-validation iterations are completed (reserving a different validation set each time). The average of the first error evaluation index in all K iterations is calculated as the second error evaluation index of the model parameter group. For example, if K = 5, the average of the five MSEs is calculated to obtain the average MSE of the model parameter group, which is used as the basis for evaluating the quality of the parameter combination.

[0089] After traversing all the model parameter groups, compare the second error evaluation index of each parameter group and select the model parameter group with the best performance, that is, the one with the smallest MSE or MAE value, or the largest R 2 The scores are used as the optimal parameter combination for the random forest model. This optimal parameter combination is considered to be the parameter setting that enables the random forest model to achieve the best performance in predicting electricity spot trading prices under the current data and set conditions.

[0090] In an optional embodiment, generating a random forest based on a combination of a model parameter set and a training sample includes the following steps:

[0091] S341. Extract a total number of samples with replacement from the training sample combination as training samples for a single decision regression tree.

[0092] S342. Randomly select multiple features from the training sample according to the model parameter group as the node branch condition feature range of the current decision regression tree.

[0093] S343. Based on the node branch condition feature range, determine the branch condition of the current decision regression tree using the minimum mean square error principle until the tree branch threshold is reached.

[0094] S344, looping from S341 to S343 until the number of generated decision regression trees reaches a preset number.

[0095] Specifically, after determining the optimal parameter combination for the random forest model, a random forest model is generated based on these parameters and the training sample combination. The random forest model consists of multiple decision regression trees, each of which is trained by random sampling and feature selection of the training data. The specific steps are as follows:

[0096] First, samples equal to the total number of original training samples are extracted from the training sample set with replacement to serve as training samples for building a single decision regression tree. For example, if the original training sample set contains 1,000 samples, then 1,000 samples are randomly sampled with replacement to serve as the training set for a single decision regression tree. This sampling method with replacement is called bootstrap, which allows some samples to be repeatedly sampled during the sampling process, while other samples may not be selected. This provides each decision tree with a different perspective on the training data, increasing the diversity and robustness of the model.

[0097] In the process of building a decision regression tree, the splitting of each node needs to be based on features. According to the maximum number of features (max_features) set in the model parameter group, multiple features are randomly selected from the training samples of the current node. These features will serve as the candidate feature range for the branching condition of the node. For example, if max_features is set to "sqrt", the square root of the total number of features is randomly selected at each node for examination to determine the optimal branching features and splitting points. This method of randomly selecting features further increases the diversity of the model, avoids the model's over-reliance on certain features, and also helps improve the performance of the model on high-dimensional data.

[0098] For each node, within the selected range of branching condition features, the optimal branching feature and splitting point are determined using the minimum mean square error (MSE) principle. Specifically, for each candidate feature, different splitting points are tried, the data is divided into two groups, the mean square error of the two groups of data after the split is calculated, and the feature and splitting point that minimizes the mean square error are selected as the branching condition for the current node. This process continues until the stopping threshold of the tree branch is reached. Common tree branching thresholds include:

[0099] Maximum depth of the tree (max_depth): When the depth of the decision tree reaches the preset maximum depth, stop splitting.

[0100] Minimum number of leaf node samples (min_samples_leaf): When the number of samples in the leaf node after splitting is less than the preset minimum value, the splitting is stopped.

[0101] Minimum number of sample splits (min_samples_split): When the number of samples in a node is less than the preset minimum number of split samples, the split will stop.

[0102] The above thresholds are set to control the complexity of the decision tree, prevent overfitting, and ensure that the performance of the model on the training data can be well generalized to unseen data.

[0103] Repeat steps S341 to S343, generating one decision regression tree each time, until the number of generated decision regression trees reaches a preset number (n_estimators). For example, if n_estimators is set to 100, the above process is repeated until 100 decision regression trees are generated, thus forming a complete random forest model. Each decision regression tree is trained on a different self-sampling data set, and a different random feature subset is used at each node for splitting. This makes the random forest model highly diverse and stable, and can effectively improve the accuracy and generalization ability of predictions.

[0104] The above-mentioned big data-driven electricity spot transaction price prediction method obtains multi-source influencing factor data of electricity spot transaction prices through big data, wherein the multi-source influencing factor data includes load data, power generation data, wind and solar output data, historical electricity price data, meteorological data, regulating resource data and marginal price data; uses wavelet packet decomposition and reconstruction to extract multi-band features of the multi-source influencing factor data, effectively separates high-frequency noise and retains key signals; based on the random forest model, a high-importance feature subset is screened to reduce data redundancy and model complexity. The parameters of the random forest model are optimized through cross-validation and grid search to improve the model generalization ability; finally, the prediction results of the weighted integrated output of the support vector machine sub-model are used to integrate the adaptation advantages of different kernel functions to multi-source features, thereby significantly improving the accuracy and real-time performance of electricity spot price prediction while suppressing noise interference and reducing computing load, and solving the defects of traditional methods in high-frequency nonlinear data processing, feature redundancy and model efficiency.

[0105] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0106] Based on the same inventive concept, the present application also provides a system for implementing the aforementioned big data-driven electricity spot transaction price prediction method. The implementation solution provided by this system is similar to the implementation solution described in the aforementioned method. Therefore, the specific limitations of one or more big data-driven electricity spot transaction price prediction system embodiments provided below can be found in the above-mentioned limitations of the big data-driven electricity spot transaction price prediction method, and will not be repeated here.

[0107] In an exemplary embodiment, Figure 3 As shown, a big data driven electricity spot transaction price prediction system 30 is provided, comprising:

[0108] The data acquisition module 31 is used to obtain multi-source influencing factor data of electricity spot transaction prices based on big data; wherein the multi-source influencing factor data includes load data, power generation data, wind and solar output data, historical electricity price data, meteorological data, regulating resource data and marginal price data.

[0109] The feature decomposition module 32 is used to perform wavelet packet decomposition and reconstruction on the multi-source influencing factor data to obtain multi-band feature data.

[0110] The feature screening module 33 is used to calculate the importance score of each feature in the multi-band feature data through a pre-trained random forest model, screen features with importance scores higher than a set threshold, and generate a screened feature subset; wherein, the training process of the random forest model is: using multi-band feature data samples to perform cross-validation and grid search, determine the optimal parameter combination of the random forest model, and generate a random forest model based on the optimal parameter combination of the model.

[0111] The prediction module 34 is used to input each feature subset into the corresponding support vector machine regression sub-model to obtain the electricity price prediction value corresponding to each feature subset; and average or weighted average each electricity price prediction value to obtain the final electricity price prediction value.

[0112] Optionally, the eigendecomposition module includes:

[0113] The wavelet packet decomposition unit is used to perform wavelet packet decomposition on each data source in the multi-source influencing factor data layer by layer according to the binary tree structure to generate multiple sub-band sequences of each data source.

[0114] The energy proportion screening unit is used to calculate the energy proportion of each sub-band sequence and delete the sub-band sequences whose energy proportion is lower than a set threshold.

[0115] The feature splicing unit is used to splice the retained sub-band sequences according to data categories to generate multi-band feature data.

[0116] Optionally, the energy proportion screening unit is configured to perform the following steps:

[0117] S221 : Calculate the sum of squares of discrete wavelet coefficients of each sub-band sequence as the energy value of each sub-band sequence.

[0118] S222. Count the proportion of the energy value of each sub-band sequence to the total energy to obtain an energy proportion.

[0119] Optionally, the feature screening module includes a random forest model training unit for performing the following steps:

[0120] S31. Use the multi-band feature data samples as a training set, and divide the training set into K parts on average.

[0121] S32. Setting the grid search range and grid division accuracy of the random forest parameters according to preset conditions.

[0122] S33. Based on the grid search range and the grid division accuracy, a group of model parameters is selected as the model parameter group.

[0123] S34. Select k-1 pieces of data in the training set as a training sample combination, and generate a random forest based on the model parameter group and the training sample combination.

[0124] S35. Calculate the first error evaluation index of all trees in the random forest on the remaining data in the training set.

[0125] S36. After traversing all k-1 training sample combinations, select the average value of the first error evaluation index of all training sample combinations as the second error evaluation index of the model parameter group.

[0126] S37. After traversing all model parameter groups, select the model parameter group with the best performance of the second error evaluation index as the optimal parameter combination of the random forest model.

[0127] The random forest is generated based on the model parameter group and the training sample combination, which specifically includes the following steps:

[0128] S341. Extract a total number of samples with replacement from the training sample combination as training samples for a single decision regression tree.

[0129] S342. Randomly select multiple features from the training sample according to the model parameter group as the node branch condition feature range of the current decision regression tree.

[0130] S343. Based on the node branch condition feature range, determine the branch condition of the current decision regression tree using the minimum mean square error principle until the tree branch threshold is reached.

[0131] S344, looping from S341 to S343 until the number of generated decision regression trees reaches a preset number.

[0132] An embodiment of the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0133] An embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0134] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the partial description of the method embodiments. The device embodiments described above are merely illustrative, wherein the components described as separate parts may or may not be physically separated, and the parts displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the disclosed solution. A person of ordinary skill in the art can understand and implement it without expending creative work.

[0135] The above-described embodiments merely represent several implementation methods of the embodiments of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that a person skilled in the art may make various modifications and improvements without departing from the concept of the embodiments of the present application, and these modifications and improvements fall within the scope of protection of the embodiments of the present application.

Claims

1. A big data driven electricity spot transaction price prediction method, characterized in that: The method comprises: S1. Obtaining multi-source influencing factor data on electricity spot transaction prices based on big data; wherein the multi-source influencing factor data includes load data, power generation data, wind and solar output data, historical electricity price data, meteorological data, regulating resource data, and marginal price data; S2. performing wavelet packet decomposition and reconstruction on the multi-source influencing factor data to obtain multi-band feature data; S3. Calculating the importance score of each feature in the multi-band feature data using a pre-trained random forest model, screening the features whose importance scores are higher than a set threshold, and generating a screened feature subset; wherein the training process of the random forest model comprises: performing cross-validation and grid search using multi-band feature data samples to determine the optimal parameter combination of the random forest model, and generating the random forest model based on the optimal parameter combination of the model; S4. Input each of the feature subsets into the corresponding support vector machine regression sub-model to obtain the electricity price prediction value corresponding to each of the feature subsets; average or weighted average each of the electricity price prediction values to obtain the final electricity price prediction value.

2. The method according to claim 1, characterized in that The S2 includes: S21, performing wavelet packet decomposition layer by layer on each data source in the multi-source influencing factor data according to a binary tree structure to generate multiple sub-band sequences for each data source; S22. Calculate the energy proportion of each sub-frequency band sequence, and delete the sub-frequency band sequence whose energy proportion is lower than a set threshold; S23 , splicing the retained sub-band sequences according to data categories to generate the multi-band feature data.

3. The method according to claim 2, characterized in that The calculating the energy proportion of each sub-band sequence includes: S221. Calculate the sum of squares of discrete wavelet coefficients of each sub-frequency band sequence as the energy value of each sub-frequency band sequence; S222: Count the proportion of the energy value of each sub-frequency band sequence to the total energy to obtain the energy proportion.

4. The method according to claim 1, wherein The cross-validation and grid search using multi-band feature data samples to determine the optimal parameter combination of the random forest model includes: S31, using the multi-band feature data samples as a training set, and dividing the training set into K parts on average; S32, setting the grid search range and grid division accuracy of the random forest parameters according to preset conditions; S33. Based on the grid search range and the grid division accuracy, select a set of model parameters as a model parameter set; S34, selecting k-1 pieces of data in the training set as a training sample combination, and generating a random forest based on the model parameter group and the training sample combination; S35, calculating a first error evaluation index of all trees in the random forest on the remaining data in the training set; S36. After traversing all k-1 training sample combinations, select the average value of the first error evaluation index of all the training sample combinations as the second error evaluation index of the model parameter group; S37. After traversing all the model parameter groups, select the model parameter group with the best performance of the second error evaluation index as the optimal parameter combination of the random forest model.

5. The method according to claim 4, characterized in that The generating a random forest based on the model parameter group and the training sample combination includes: S341, extracting a total number of samples with replacement from the training sample combination as training samples for a single decision regression tree; S342: Randomly select multiple features from the training sample according to the model parameter group as the node branch condition feature range of the current decision regression tree; S343. Based on the node branch condition feature range, determine the current branch condition of the decision regression tree using the minimum mean square error principle until the tree branch threshold is reached; S344, looping from S341 to S343 until the number of generated decision regression trees reaches a preset number.

6. A big data driven electricity spot transaction price prediction system, characterized by: The system comprises: A data acquisition module is used to acquire multi-source influencing factor data of electricity spot transaction prices based on big data; wherein the multi-source influencing factor data includes load data, power generation data, wind and solar output data, historical electricity price data, meteorological data, regulating resource data and marginal price data; A feature decomposition module is used to perform wavelet packet decomposition and reconstruction on the multi-source influencing factor data to obtain multi-band feature data; a feature screening module, configured to calculate the importance score of each feature in the multi-band feature data using a pre-trained random forest model, screen the features whose importance scores are higher than a set threshold, and generate a screened feature subset; wherein the training process of the random forest model comprises: performing cross-validation and grid search using multi-band feature data samples to determine the optimal parameter combination of the random forest model, and generating the random forest model based on the optimal parameter combination of the model; The prediction module is used to input each of the feature subsets into the corresponding support vector machine regression sub-model to obtain the electricity price prediction value corresponding to each of the feature subsets; and average or weighted average each of the electricity price prediction values to obtain the final electricity price prediction value.

7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.