Quantitative design-based spot market electricity purchase quantity declaration and redisk method and system
The CNN-LSTM model based on quantitative design is used to process spot market electricity purchase data, which solves the subjectivity and inaccuracy problems of electricity purchase review in the existing technology, achieves efficient and accurate review of electricity purchase, and improves the efficiency of agent purchasing. The quality and efficiency of electricity business.
Patent Information
- Application Number
- CN202410838489.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2024-10-01
AI Technical Summary
In the existing technology, the review of power purchase declarations in the spot market is highly subjective and data analysis and processing is contingency, making it difficult to accurately meet user needs, and there is a lack of effective review tools, which affects the quality and efficiency of agency power purchase business.
Adopt a method based on quantitative design to collect data on meteorology, market supply and demand, and volume and price factors, preprocess and train through the CNN-LSTM review model, generate scientific electricity purchase review results, and use weighted moving factors to quantify and match curve decomposition factors Quantitatively process data, combine one-dimensional convolutional neural networks and long short-term memory networks to extract features, and optimize the loss function to improve model accuracy.
It improves the accuracy and efficiency of power purchase review, reduces the error rate, provides scientific decision-making guidance, realizes the stable and efficient development of agency power purchase business, reduces energy costs, and improves energy efficiency.
Smart Images

Figure CN118735562A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric power spot market transactions, and in particular to a method and system for declaring and reviewing electric power purchase quantity in the spot market based on quantitative design. Background Art
[0002] In order to ensure the safe supply of electricity and accelerate the reform of electricity marketization, the country is steadily promoting industrial and commercial users to enter the electricity market and promoting users to fully participate in spot market transactions. The electricity spot market is a place for electricity transactions based on market supply and demand and prices. Electricity consumption demand planning is the basis of power system planning, power safety and power supply reliability. In order to better realize the power consumption demand planning, it is necessary to conduct irregular transaction reviews of previous agency power purchase results. Through the analysis and comparison of various market data, a more scientific and reasonable declaration strategy can be formulated. A good transaction review of the agency power purchase business can enable the quantity and quality of the power purchased by the agency power purchase business to meet the needs of users at the lowest operating cost.
[0003] At present, most of the declarations for spot market electricity purchases are reviewed through manual experience, and the review results are highly subjective. This method requires a relatively high level of technical skills from business personnel, making it difficult to train relevant technical talents in batches, which is not conducive to standardized management. Some regions use single machine learning models such as LSTM (Long Short-Term Memory Network) and XGBoost (Distributed Gradient Boosting Library) for review. This method has problems such as randomness in data analysis and inaccurate review results. Therefore, it is necessary to propose a new method for spot market electricity purchase declaration review to better help power purchase agents participate in the spot market and provide auxiliary decision-making, improve the transaction quality of power purchase agents, provide scientific guidance for subsequent power purchase agent transactions, and promote the stable and efficient development of power purchase agents. Summary of the invention
[0004] In order to address the deficiencies in the prior art, the present invention provides a method for reporting and reviewing electricity purchase amounts in the spot market based on quantitative design, which provides scientific guidance for electricity purchase agents to participate in the spot market, promotes the stable and efficient development of electricity purchase agent business, and overcomes the technical problems that the current electricity purchase agent review is mostly based on manual experience reporting and lacks review tools.
[0005] The present invention adopts the following technical solution:
[0006] In a first aspect, the present invention provides a method for declaring and reviewing electricity purchase in a spot market based on quantitative design, the method comprising:
[0007] Collect characteristic data that affects the amount of electricity purchased in the spot market;
[0008] Perform preprocessing based on quantitative design on the collected feature data to generate a complete and usable quantitative data set;
[0009] The preprocessed quantitative data set is input into the pre-built and trained CNN-LSTM re-analysis model to obtain the re-analysis results of spot market electricity purchases;
[0010] The CNN-LSTM re-analysis model is trained by using the historical electricity purchase amount and the corresponding historical feature data with the goal of minimizing the XHFP loss function.
[0011] In combination with the first aspect, optionally, the characteristic data includes data on meteorological factors, market supply and demand factors, and quantity and price factors;
[0012] The meteorological factors include temperature, humidity, precipitation and wind speed in the area to be reviewed;
[0013] The market supply and demand factors include the photovoltaic load and wind power load in the region;
[0014] The quantity and price factors include medium- and long-term electricity prices, spot market electricity prices and medium- and long-term decomposed electricity volume.
[0015] In combination with the first aspect, optionally, the preprocessing step includes:
[0016] The collected feature data is tested for missing values and outliers. If there are missing values, the mean is selected by interpolation to fill the missing values. If there are outliers, the adjacent normal values are used to replace the outliers to obtain a complete initial data set.
[0017] Performing different quantitative designs on various types of feature data in the initial data set to obtain corresponding quantitative data sets;
[0018] The quantitative data set is normalized and standardized to finally obtain a complete and usable quantitative data set.
[0019] In conjunction with the first aspect, optionally, the step of performing different quantitative designs on each type of feature data in the initial data set includes:
[0020] The medium- and long-term electricity prices, spot market electricity prices, meteorological factors, and market supply and demand factors in the quantity and price factors are all quantified by weighted moving factors;
[0021] The mid- and long-term decomposition of electricity volume in quantity and price factors is quantified by matching curve decomposition factors.
[0022] In combination with the first aspect, optionally, the quantized expression of the weighted moving factor is as follows:
[0023]
[0024] In the formula, represents the value of the weighted moving factor at time t, X t , X t-1 and X t-2 represents the data value of feature X at time t, time t-1 and time t-2 respectively; w 1 represents the weight corresponding to the mobile quantization factor at time t, w 2 represents the weight corresponding to the mobile quantization factor at time t-1, w 3 Indicates the weight corresponding to the moving quantization factor at time t-2.
[0025] In combination with the first aspect, optionally, for different types of features X, their corresponding w 1 、w 2 and w 3 The value of w is different. 1 、w 2 and w 3 The following constraints are met:
[0026]
[0027] In combination with the first aspect, optionally, quantifying the matching curve decomposition factors of the medium- and long-term decomposed electricity in the quantity-price factor includes the following steps:
[0028] Use the average distribution curve to calculate the annual electricity purchase quantity Q dpy 、Monthly electricity purchase amount Q dpm and weekly power purchase Q dpw The historical data is corrected to obtain the corresponding daily medium- and long-term electricity purchase quantity Q dp , which is expressed as follows:
[0029]
[0030] In the formula, k N Indicates the day of the year in which the corresponding day falls; k y Indicates the day of the month in which the corresponding day falls;
[0031] According to the daily user load curve, the medium- and long-term power purchase amount Q of each day will be obtained. dp They are decomposed into curves that are consistent with the corresponding mid-day user load curves.
[0032] In combination with the first aspect, optionally, the CNN-LSTM re-analysis model includes a one-dimensional convolutional neural network CNN and a long short-term memory network LSTM; the one-dimensional deep convolutional neural network includes a first convolutional layer, a pooling layer, a second convolutional layer and a fully connected layer, and the long short-term memory network LSTM is embedded in the one-dimensional deep convolutional neural network;
[0033] The convolution kernel size of the first convolution layer is 5*1, and the step size is 2; the kernel size of the pooling layer is 2*1, and the step size is 1; the convolution kernel size of the second convolution layer is 3*1, and the step size is 2; the hidden layer nodes of the bidirectional long short-term memory network LSTM are 64.
[0034] In combination with the first aspect, optionally, the XHFP loss function is as follows:
[0035]
[0036] In the formula, The table shows the XHFP loss function value; Ω is the dataset used to train the CNN-LSTM replay model; y i represents the loss function value obtained by the i-th training sample; α∈(0,1) represents the quantile level N is the total number of samples in the data set Ω; Qu(α) is the quantile function of the spot market electricity purchase: in, represents the cumulative distribution function, which is expressed as:
[0037]
[0038] In the formula, XHFP(F Y ,y) represents the cumulative distribution level loss assessment for the re-ordered power purchase volume y, P y<z represents the probability distribution of the electricity purchase amount, and z represents the upper limit of the electricity purchase variable.
[0039] In a second aspect, the present invention provides a spot market electricity purchase declaration and review system based on quantitative design, which runs the steps of the method described in any one of the first aspects, and the system includes:
[0040] The collection module is used to collect characteristic data that affects the amount of electricity purchased in the spot market.
[0041] The quantization module is used to pre-process the collected feature data based on the quantitative design to generate a complete and usable quantitative data set;
[0042] The review module is used to input the preprocessed quantitative data set into the pre-built and trained CNN-LSTM review model to obtain the review results of spot market electricity purchases;
[0043] The CNN-LSTM re-analysis model is trained by using the historical electricity purchase amount and the corresponding historical feature data with the goal of minimizing the XHFP loss function.
[0044] In conjunction with the second aspect, optionally, the quantization module includes:
[0045] The first quantification unit is used to quantify the weighted moving factors of the medium- and long-term electricity prices, spot market electricity prices, meteorological factors, and various characteristic data in market supply and demand factors in the quantity and price factors;
[0046] The second quantification unit is used to quantify the matching curve decomposition factors of the medium and long-term decomposition of the quantity and price factors.
[0047] In conjunction with the second aspect, optionally, an expression for quantizing the weighted moving factor in the first quantization unit is as follows:
[0048]
[0049] In the formula, represents the value of the weighted moving factor at time t, X t , X t-1 and X t-2 represents the data value of feature X at time t, time t-1 and time t-2 respectively; w 1 represents the weight corresponding to the mobile quantization factor at time t, w 2 represents the weight corresponding to the mobile quantization factor at time t-1, w 3 Indicates the weight corresponding to the moving quantization factor at time t-2;
[0050] Among them, for different types of features X, their corresponding w 1 、w 2 and w 3 The value of w is different. 1 、w 2 and w 3 The following constraints are met:
[0051]
[0052] In conjunction with the second aspect, optionally, the second quantization unit includes:
[0053] The correction subunit is used to use the averaging curve to adjust the annual power purchase amount Q dpy 、Monthly electricity purchase amount Q dpm and weekly power purchase Q dpw The historical data is corrected to obtain the corresponding daily medium- and long-term electricity purchase quantity Q dp , which is expressed as follows:
[0054]
[0055] In the formula, k N Indicates the day of the year in which the corresponding day falls; k y Indicates the day of the month in which the corresponding day falls;
[0056] The decomposition subunit is used to obtain the daily medium- and long-term power purchase amount Q according to the daily user load curve. dp They are decomposed into curves that are consistent with the corresponding mid-day user load curves.
[0057] In conjunction with the second aspect, optionally, the XHFP loss function in the replay module is as follows:
[0058]
[0059] In the formula, The table shows the XHFP loss function value; Ω is the dataset used to train the CNN-LSTM replay model; y i represents the loss function value obtained by the i-th training sample; α∈(0,1) represents the quantile level N is the total number of samples in the data set Ω; Qu(α) is the quantile function of the spot market electricity purchase: in, represents the cumulative distribution function, which is expressed as:
[0060]
[0061] In the formula, XHFP(F Y ,y) represents the cumulative distribution level loss assessment for the re-ordered power purchase volume y, P y<z represents the probability distribution of the electricity purchase amount, and z represents the upper limit of the electricity purchase variable.
[0062] In a third aspect, the present invention provides a terminal, including a processor and a storage medium;
[0063] The storage medium is used to store instructions;
[0064] The processor is used to operate according to the instructions to execute the steps of any one of the methods described in the first aspect of the present invention.
[0065] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any one of the methods described in the first aspect of the present invention.
[0066] The beneficial effect of the present invention is that, compared with the prior art,
[0067] 1. The present invention first screens the data set of proxy electricity purchase, selects appropriate features to construct a data set, and then performs quantitative design on the data set. Different quantization methods are selected according to different features, including a weighted moving factor quantization method and an adaptive curve decomposition method to process the data set of proxy electricity purchase to obtain a quantitatively designed data set. The quantitatively designed data set retains the real-time nature of the data while retaining the smoothness of the data, which helps to improve the learning efficiency and accuracy of the proxy electricity purchase data set in the machine learning model.
[0068] 1. The present invention first screens the data set of proxy electricity purchase, selects appropriate features to construct a data set, and then performs quantitative design on the data set. Different quantization methods are selected according to different features, including a weighted moving factor quantization method and an adaptive curve decomposition method to process the data set of proxy electricity purchase to obtain a quantitatively designed data set. The quantitatively designed data set retains the real-time nature of the data while retaining the smoothness of the data, which helps to improve the learning efficiency and accuracy of the proxy electricity purchase data set in the machine learning model.
[0069] 2. Compared with the existing single machine learning model, the CNN-LSTM re-analysis model constructed by the present invention takes advantage of the one-dimensional convolutional neural network CNN to effectively extract the local features in the time series data, and uses the long short-term memory network LSTM to effectively capture the long-term dependencies of the data features, thereby improving the credibility of the feature extraction. At the same time, the XHFP loss function designed by the present invention is used to optimize the model parameters for training, which is beneficial to improving the computational efficiency of training the CNN-LSTM re-analysis model, and further improves the compatibility of evaluating the probability distribution of real data and the probability distribution of predicted values, more accurately determines the uncertainty of the re-analysis model, and improves the accuracy of the model re-analysis.
[0070] 3. The present invention reduces the error rate of the power purchase amount review and improves the accuracy of the model review, thereby greatly improving the review effect, providing scientific guidance for subsequent users to conduct transaction review and reasonable power purchase on the agency power purchase business, thereby reducing energy costs, improving energy efficiency, and promoting the efficient development of the agency power purchase business. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] Figure 1 It is a flow chart of the method for declaring and reviewing the spot market electricity purchase quantity based on quantitative design in the present invention;
[0072] Figure 2 It is a schematic diagram of data preprocessing in the present invention;
[0073] Figure 3 It is a structural block diagram of the CNN-LSTM replay model in the present invention;
[0074] Figure 4This is a structural principle block diagram of the spot market electricity purchase amount declaration and review system based on quantitative design in the present invention. DETAILED DESCRIPTION
[0075] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. The embodiments described in the present invention are only part of the embodiments of the present invention, not all of the embodiments. Based on the spirit of the present invention, other embodiments obtained by ordinary technicians in this field without creative work are all within the scope of protection of the present invention.
[0076] Embodiment 1:
[0077] Reference Figure 1 The embodiment of the present invention provides a method for declaring and reviewing electricity purchase in the spot market based on quantitative design, which specifically includes the following steps:
[0078] Step S1: Collect characteristic data that affects the amount of electricity purchased in the spot market;
[0079] Specifically, a review is conducted on the spot market electricity purchase volume. The existing review of electricity purchase volume only considers economic conditions such as quantity and price constraints. The embodiment of the present invention takes into account meteorological factors and market supply and demand factors on the basis of quantity and price constraints. Compared with the existing single data, the advantage is that more factors are considered from the meteorological perspective and the market supply and demand perspective, and the factors considered are more comprehensive, so that the review result is more in line with the actual scenario; among which, meteorological factors include temperature, humidity, precipitation and wind speed; market supply and demand factors include photovoltaic load electricity and wind power load electricity in the region; quantity and price factors include medium- and long-term decomposed electricity, medium- and long-term electricity prices and spot market electricity prices.
[0080] This embodiment uses characteristic data such as medium- and long-term decomposed electricity volume, medium- and long-term electricity prices, spot market electricity prices, temperature, humidity, wind speed, precipitation, photovoltaic load electricity volume, wind power load electricity volume as inputs of the review model to review the output of spot market electricity purchases.
[0081] Step S2: preprocessing the collected feature data based on quantitative design to generate a complete and usable quantitative data set;
[0082] like Figure 2 As shown, the preprocessing steps include:
[0083] S2.1: Detect missing values and outliers on the collected feature data. If there are missing values, use the interpolation method to select the mean to fill the missing values. If there are outliers, use the adjacent normal values to replace the outliers to obtain a complete initial data set;
[0084] Furthermore, Z-Score is used to calculate whether there are outliers in different data sets. If the value of Z-Score is greater than 3, it is determined to be an outlier, and the outlier is deleted and replaced with adjacent normal values.
[0085] S2.2: Perform different quantitative designs on various types of feature data in the initial data set to obtain corresponding quantitative data sets;
[0086] 1) The medium- and long-term electricity prices, spot market electricity prices, weather factors, and various characteristic data in market supply and demand factors in the quantity and price factors are all quantified by weighted moving factors; the expression for quantifying the weighted moving factors is as follows:
[0087]
[0088] In the formula, represents the value of the weighted moving factor at time t, X t , X t-1 and X t-2 represents the data value of feature X at time t, time t-1 and time t-2 respectively; w 1 represents the weight corresponding to the mobile quantization factor at time t, w 2 represents the weight corresponding to the mobile quantization factor at time t-1, w 3 Indicates the weight corresponding to the moving quantization factor at time t-2, which plays the role of weighted assignment; for different types of features X, the corresponding w 1 、w 2 and w 3 The value of w is different. 1 、w 2 and w 3 The following constraints are met:
[0089]
[0090] The present invention is based on the real-time performance and data smoothing of relevant data sets, and combines the relevant constraints in the formula to determine the indicator weights through an expert scoring method.
[0091] Specifically, in this embodiment, considering that the temperature, humidity, wind speed, and precipitation in the meteorological factors all follow the principle of strong real-time performance, w is selected in the value of the weight. 1 =9, w 2 =0.5, w 3 =0.5 for weighting. Considering the impact of market supply and demand factors on historical daily factors, the weights of photovoltaic load and wind power load in the market supply and demand influencing factors are selected as w 1 =7, w 2 =2, w 3= 1 to assign weights. Considering the medium- and long-term electricity prices and spot market electricity prices in terms of quantity and price factors, while requiring strong real-time performance, they also need to retain smoothness. The weights are selected as w 1 =8, w 2 =1.5, w 31 =0.5 to assign weights.
[0092] 2) Quantify the matching curve decomposition factors of the medium- and long-term decomposition of the quantity and price factors, including the following steps:
[0093] Use the average distribution curve to calculate the annual electricity purchase quantity Q dpy 、Monthly electricity purchase amount Q dpm and weekly power purchase Q dpw The historical data is corrected to obtain the corresponding daily medium- and long-term electricity purchase quantity Q dp , which is expressed as follows:
[0094]
[0095] In the formula, k N Indicates the day of the year in which the corresponding day falls; k y Indicates the day of the month in which the corresponding day falls;
[0096] According to the daily user load curve, the medium- and long-term power purchase amount Q of each day will be obtained. dp They are decomposed into curves that are consistent with the corresponding user load curves during the day; for example, if the user's load is higher during the day and lower at night, the decomposition method of the purchased electricity should follow the principle of more decomposition during the day and less decomposition at night, and different decomposition methods should be used according to the rules of the load curves of different users.
[0097] S2.3: normalize and standardize the quantitative data set to finally obtain a complete and usable quantitative data set. The normalization and standardization expressions are as follows:
[0098]
[0099] Where, X gy represents the normalized data, X min is the minimum value of the original data, X max is the maximum value of the original data; X z represents the standardized data, σ is the standard deviation of the sample data, and μ is the mean of the sample data.
[0100] Step S3: Input the preprocessed quantitative data set into the pre-built and trained CNN-LSTM re-analysis model to obtain the re-analysis results of spot market electricity purchases;
[0101] Among them, the CNN-LSTM re-analysis model includes a one-dimensional convolutional neural network CNN and a long short-term memory network LSTM; the one-dimensional deep convolutional neural network includes a first convolutional layer, a pooling layer, a second convolutional layer and a fully connected layer, and the long short-term memory network LSTM is embedded in the one-dimensional deep convolutional neural network; wherein, the convolution kernel size of the first convolutional layer is 5*1, and the step size is 2; the kernel size of the pooling layer is 2*1, and the step size is 1; the convolution kernel size of the second convolutional layer is 3*1, and the step size is 2; the hidden layer nodes of the bidirectional long short-term memory network LSTM are 64; in addition, the bias bisp of the LSTM network in this embodiment is set to true, nonlinearity is introduced to increase the flexibility of the network, and the droopout layer ratio is set to 0.2 to prevent overfitting of the model.
[0102] Reference Figure 3 As shown, the input data is feature extracted through a one-dimensional convolutional neural network CNN, the extracted features are flattened and then input into a long short-term memory network LSTM to further capture long-term dependencies of the features, and finally the review results are output through a fully connected layer. Experiments show that the CNN-LSTM review model constructed by the present invention has a significant improvement in the review results of spot market electricity purchases.
[0103] As an embodiment of the present invention, the optimizer for training the CNN-LSTM replay model is selected as the Adam optimizer, and the training learning rate is 0.005; the specific training process is as follows:
[0104] Step a, collecting multiple sets of historical electricity purchase amount and corresponding historical characteristic data according to preset time intervals, and constructing an original data set;
[0105] Step b: preprocess the original data set based on quantitative design to obtain multiple sets of complete and available data combinations containing historical electricity purchase amount and corresponding feature data to form a sample set; in this embodiment, the sample set is divided into a training set, a test set and a validation set in the manner of 8:1:1.
[0106] Step c: Based on the training set, multiple groups of data are selected and input into the CNN-LSTM replay model for training;
[0107] Step d: Based on the training results of the training set, the parameters of the CNN-LSTM re-test model are optimized in combination with the test set with the goal of minimizing the XHFP loss function to obtain the final trained CNN-LSTM re-test model.
[0108] It is further explained that the present invention develops a closed form solution for the integral required to calculate XHFP, which is beneficial to improve the computational efficiency of training the CNN-LSTM model; the distribution of the purchased electricity is determined by using a quantile function, where the quantile function of the purchased electricity Y represents a real-valued replay of the purchased electricity output, and is set as:
[0109]
[0110] In the formula, α∈(0,1) represents the quantile level, Qu(α) is the quantile function of the purchased electricity, where is the cumulative distribution function, and its expression is:
[0111]
[0112] In the formula, XHFP(F Y ,y) represents the cumulative distribution level loss assessment for the power purchase quantity y, z represents the upper limit of the power purchase variable, P y<z Indicates the probability distribution of the amount of electricity purchased. XHFP can evaluate the value between 0 and 1.
[0114] The infinite number of quantile predictions between the training samples is a statistical measure used to evaluate the accuracy of the replay model. This embodiment calculates the average XHFP minimum value of all training samples. To find the optimal value of a specific parameter, that is, to evaluate the consistency between the proposed model's replay and the observed results by traversing the optimal value; therefore, the expression of the XHFP loss function is as follows:
[0115]
[0116] In the formula, The table shows the XHFP loss function value; Ω is the dataset used to train the CNN-LSTM replay model; y i Represents the loss function value obtained for the i-th training sample; α∈(0,1) represents the quantile level and N is the total number of samples in the data set Ω.
[0117] Finally, the effectiveness of the replay model is evaluated through the validation set.
[0118] Table 1
[0119]
[0120] As shown in Table 1, R2 is used as the evaluation index of the model, where R2 is the coefficient of determination, which is used to evaluate the quality of the model. The value range is between (0, 1]. The closer it is to 1, the better the fitting effect of the model. In this embodiment, a single LSTM model, a CMM-LSTM model and a CNN-LSTM model with quantized input data are used for experimental comparison; among them, the CNN-LSTM model is improved by about 14.5% compared with the LSTM model, and the CNN-SLTM model with the input of the quantized data set is improved by about 12% compared with the CNN-LSTM model with the input of the original data set; the experimental results show that the use of the CNN-LSTM model is better than the traditional single model, and the use of the quantized data set as the input of the CNN-LSTM model for review can effectively reduce the error rate and further improve the accuracy of the model. It can be seen that the data set after quantization design in the present invention retains the real-time performance of the data while retaining the smoothness of the data, thereby improving the learning efficiency and accuracy of the agent power purchase data set in the machine learning model.
[0121] The beneficial effects of the present invention are as follows:
[0122] 1. The present invention first screens the data set of proxy electricity purchase, selects appropriate features to construct a data set, and then performs quantitative design on the data set. Different quantization methods are selected according to different features, including a weighted moving factor quantization method and an adaptive curve decomposition method to process the data set of proxy electricity purchase to obtain a quantitatively designed data set. The quantitatively designed data set retains the real-time nature of the data while retaining the smoothness of the data, which helps to improve the learning efficiency and accuracy of the proxy electricity purchase data set in the machine learning model.
[0123] 2. Compared with the existing single machine learning model, the CNN-LSTM re-analysis model constructed by the present invention takes advantage of the one-dimensional convolutional neural network CNN to effectively extract the local features in the time series data, and uses the long short-term memory network LSTM to effectively capture the long-term dependencies of the data features, thereby improving the credibility of the feature extraction. At the same time, the XHFP loss function designed by the present invention is used to optimize the model parameters for training, which is beneficial to improving the computational efficiency of training the CNN-LSTM re-analysis model, and further improves the compatibility of evaluating the probability distribution of real data and the probability distribution of predicted values, more accurately determines the uncertainty of the re-analysis model, and improves the accuracy of the model re-analysis.
[0124] 3. The present invention reduces the error rate of the power purchase amount review and improves the accuracy of the model review, thereby greatly improving the review effect, providing scientific guidance for subsequent users to conduct transaction review and reasonable power purchase on the agency power purchase business, thereby reducing energy costs, improving energy efficiency, and promoting the efficient development of the agency power purchase business.
[0125] Embodiment 2:
[0126] like Figure 4 As shown, the present invention provides a spot market electricity purchase declaration and review system based on quantitative design, the system is used to implement the steps of the method in the above embodiment 1, and the system specifically includes:
[0127] The collection module is used to collect characteristic data that affects the amount of electricity purchased in the spot market.
[0128] The quantization module is used to pre-process the collected feature data based on the quantitative design to generate a complete and usable quantitative data set;
[0129] The review module is used to input the preprocessed quantitative data set into the pre-built and trained CNN-LSTM review model to obtain the review results of spot market electricity purchases;
[0130] The CNN-LSTM re-analysis model is trained by using the historical electricity purchase amount and the corresponding historical feature data with the goal of minimizing the XHFP loss function.
[0131] In this embodiment, the quantization module includes:
[0132] The first quantification unit is used to quantify the weighted moving factors of the medium- and long-term electricity prices, spot market electricity prices, meteorological factors, and various characteristic data in market supply and demand factors in the quantity and price factors;
[0133] The second quantification unit is used to quantify the matching curve decomposition factors of the medium and long-term decomposition of the quantity and price factors.
[0134] Further, the expression for quantifying the weighted moving factor in the first quantization unit is as follows:
[0135]
[0136] In the formula, represents the value of the weighted moving factor at time t, X t , X t-1 and X t-2 represents the data value of feature X at time t, time t-1 and time t-2 respectively; w 1 represents the weight corresponding to the mobile quantization factor at time t, w 2 represents the weight corresponding to the mobile quantization factor at time t-1, w 3 Indicates the weight corresponding to the moving quantization factor at time t-2;
[0137] Among them, for different types of features X, their corresponding w 1 、w 2 and w 3 The value of w is different. 1 、w2 and w 3 The following constraints are met:
[0138]
[0139] Furthermore, the second quantization unit includes:
[0140] The correction subunit is used to use the averaging curve to adjust the annual power purchase amount Q dpy 、Monthly electricity purchase amount Q dpm and weekly power purchase Q dpw The historical data is corrected to obtain the corresponding daily medium- and long-term electricity purchase quantity Q dp , which is expressed as follows:
[0141]
[0142] In the formula, k N Indicates the day of the year in which the corresponding day falls; k y Indicates the day of the month in which the corresponding day falls;
[0143] The decomposition subunit is used to obtain the daily medium- and long-term power purchase amount Q according to the daily user load curve. dp They are decomposed into curves that are consistent with the corresponding mid-day user load curves.
[0144] As an embodiment of the present invention, the XHFP loss function in the replay module is as follows:
[0145]
[0146] In the formula, The table shows the XHFP loss function value; Ω is the dataset used to train the CNN-LSTM replay model; y i represents the loss function value obtained by the i-th training sample; α∈(0,1) represents the quantile level N is the total number of samples in the data set Ω; Qu(α) is the quantile function of the spot market electricity purchase: in, represents the cumulative distribution function, which is expressed as:
[0147]
[0148] In the formula, XHFP(F Y ,y) represents the cumulative distribution level loss assessment for the re-ordered power purchase volume y, P y<z represents the probability distribution of the electricity purchase amount, and z represents the upper limit of the electricity purchase variable.
[0149] The spot market electricity purchase quantity declaration and review system based on quantitative design provided in the embodiment of the present invention and the spot market electricity purchase quantity declaration and review method based on quantitative design provided in Example 1 are based on the same technical concept, and can produce the beneficial effects as described in Example 1. For the contents not fully described in this embodiment, please refer to Example 1.
[0150] Embodiment three:
[0151] A terminal provided by an embodiment of the present invention includes a processor and a storage medium;
[0152] The storage medium is used to store instructions;
[0153] The processor is used to operate according to the instruction to execute the steps of the method according to any one of the first embodiments.
[0154] Embodiment 4:
[0155] An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the steps of any method described in Embodiment 1 are implemented.
[0156] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0157] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0158] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0159] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0160] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for reporting and reviewing spot market electricity purchases based on quantitative design. It is characterized in that Methods include: Collect characteristic data that affects the amount of electricity purchased in the spot market; Perform preprocessing based on quantitative design on the collected feature data to generate a complete and usable quantitative data set; The preprocessed quantitative data set is input into the pre-built and trained CNN-LSTM re-analysis model to obtain the re-analysis results of spot market electricity purchases; The CNN-LSTM re-analysis model is trained by using the historical electricity purchase amount and the corresponding historical feature data with the goal of minimizing the XHFP loss function.
2. The method for declaring and reviewing the amount of electricity purchased in the spot market based on quantitative design according to claim 1, It is characterized in that The characteristic data include data on meteorological factors, market supply and demand factors, and quantity and price factors; The meteorological factors include temperature, humidity, precipitation and wind speed in the area to be reviewed; The market supply and demand factors include the photovoltaic load and wind power load in the region; The quantity and price factors include medium- and long-term electricity prices, spot market electricity prices and medium- and long-term decomposed electricity volume.
3. The method for declaring and reviewing the amount of electricity purchased in the spot market based on quantitative design according to claim 2, It is characterized in that The pre-processing steps include: The collected feature data is tested for missing values and outliers. If there are missing values, the mean is selected by interpolation to fill the missing values. If there are outliers, the adjacent normal values are used to replace the outliers to obtain a complete initial data set. Performing different quantitative designs on various types of feature data in the initial data set to obtain corresponding quantitative data sets; The quantitative data set is normalized and standardized to finally obtain a complete and usable quantitative data set.
4. The method for declaring and reviewing the amount of electricity purchased in the spot market based on quantitative design according to claim 3, It is characterized in that The steps of performing different quantitative designs on various types of feature data in the initial data set include: The medium- and long-term electricity prices, spot market electricity prices, meteorological factors, and market supply and demand factors in the quantity and price factors are all quantified by weighted moving factors; The mid- and long-term decomposition of electricity volume in quantity and price factors is quantified by matching curve decomposition factors.
5. The method for declaring and reviewing the amount of electricity purchased in the spot market based on quantitative design according to claim 4, It is characterized in that The expression for quantizing the weighted moving factor is as follows: In the formula, represents the value of the weighted moving factor at time t, X t , X t-1 and X t-2 represents the data value of feature X at time t, time t-1 and time t-2 respectively; w 1 represents the weight corresponding to the mobile quantization factor at time t, w 2 represents the weight corresponding to the mobile quantization factor at time t-1, w 3 Indicates the weight corresponding to the moving quantization factor at time t-2.
6. The method for declaring and reviewing the amount of electricity purchased in the spot market based on quantitative design according to claim 5, It is characterized in that For different types of features X, their corresponding w 1 、w 2 and w 3 The value of w is different. 1 、w 2 and w 3 The following constraints are met:
7. The method for declaring and reviewing the amount of electricity purchased in the spot market based on quantitative design according to claim 4, It is characterized in that The quantification of the matching curve decomposition factors for the medium- and long-term decomposition of the quantity and price factors includes the following steps: Use the average distribution curve to calculate the annual electricity purchase quantity Q dpy 、Monthly electricity purchase amount Q dpm and weekly power purchase Q dpw The historical data is corrected to obtain the corresponding daily medium- and long-term electricity purchase quantity Q dp , which is expressed as follows: In the formula, k N Indicates the day of the year in which the corresponding day falls; k y Indicates the day of the month in which the corresponding day falls; According to the daily user load curve, the medium and long-term power purchase amount Q of each day will be obtained. dp They are decomposed into curves that are consistent with the corresponding mid-day user load curves.
8. The method for declaring and reviewing the amount of electricity purchased in the spot market based on quantitative design according to claim 1, It is characterized in that The CNN-LSTM re-analysis model includes a one-dimensional convolutional neural network CNN and a long short-term memory network LSTM; the one-dimensional deep convolutional neural network includes a first convolutional layer, a pooling layer, a second convolutional layer and a fully connected layer, and the long short-term memory network LSTM is embedded in the one-dimensional deep convolutional neural network; The convolution kernel size of the first convolution layer is 5*1, and the step size is 2; the kernel size of the pooling layer is 2*1, and the step size is 1; the convolution kernel size of the second convolution layer is 3*1, and the step size is 2; the hidden layer nodes of the bidirectional long short-term memory network LSTM are 64.
9. The method for declaring and reviewing the amount of electricity purchased in the spot market based on quantitative design according to claim 1, It is characterized in that The XHFP loss function is as follows: In the formula, The table shows the XHFP loss function value; Ω is the dataset used to train the CNN-LSTM replay model; y i represents the loss function value obtained by the i-th training sample; α∈(0,1) represents the quantile level N is the total number of samples in the data set Ω; Qu(α) is the quantile function of the spot market electricity purchase: in, represents the cumulative distribution function, which is expressed as: In the formula, XHFP(F Y ,y) represents the cumulative distribution level loss assessment for the re-ordered power purchase volume y, P y<z represents the probability distribution of the electricity purchase amount, and z represents the upper limit of the electricity purchase variable.
10. A spot market electricity purchase declaration and review system based on quantitative design, running the spot market electricity purchase declaration and review method based on quantitative design as claimed in any one of claims 1 to 9, It is characterized in that The system includes: The collection module is used to collect characteristic data that affects the amount of electricity purchased in the spot market. The quantization module is used to pre-process the collected feature data based on the quantitative design to generate a complete and usable quantitative data set; The review module is used to input the preprocessed quantitative data set into the pre-built and trained CNN-LSTM review model to obtain the review results of spot market electricity purchases; The CNN-LSTM re-analysis model is trained by using the historical electricity purchase amount and the corresponding historical feature data with the goal of minimizing the XHFP loss function.
11. The spot market electricity purchase amount declaration and review system based on quantitative design according to claim 10, It is characterized in that The quantization module comprises: The first quantification unit is used to quantify the weighted moving factors of the medium- and long-term electricity prices, spot market electricity prices, meteorological factors, and various characteristic data in market supply and demand factors in the quantity and price factors; The second quantification unit is used to quantify the matching curve decomposition factors of the medium and long-term decomposition of the quantity and price factors.
12. The spot market electricity purchase amount declaration and review system based on quantitative design according to claim 11, It is characterized in that The expression for quantizing the weighted moving factor in the first quantization unit is as follows: In the formula, represents the value of the weighted moving factor at time t, X t , X t-1 and X t-2 represents the data value of feature X at time t, time t-1 and time t-2 respectively; w 1 represents the weight corresponding to the mobile quantization factor at time t, w 2 represents the weight corresponding to the mobile quantization factor at time t-1, w 3 Indicates the weight corresponding to the moving quantization factor at time t-2; Among them, for different types of features X, their corresponding w 1 、w 2 and w 3 The value of w is different. 1 、w 2 and w 3 The following constraints are met:
13. The spot market electricity purchase amount declaration and review system based on quantitative design according to claim 11, It is characterized in that The second quantization unit comprises: The correction subunit is used to use the averaging curve to adjust the annual power purchase amount Q dpy 、Monthly electricity purchase amount Q dpm and weekly power purchase Q dpw The historical data is corrected to obtain the corresponding daily medium- and long-term electricity purchase quantity Q dp , which is expressed as follows: In the formula, k N Indicates the day of the year in which the corresponding day falls; k y Indicates the day of the month in which the corresponding day falls; The decomposition subunit is used to obtain the daily medium- and long-term power purchase amount Q according to the daily user load curve. dp They are decomposed into curves that are consistent with the corresponding mid-day user load curves.
14. The spot market electricity purchase amount declaration and review system based on quantitative design according to claim 10, It is characterized in that The XHFP loss function in the replay module is as follows: In the formula, The table shows the XHFP loss function value; Ω is the dataset used to train the CNN-LSTM replay model; y i represents the loss function value obtained by the i-th training sample; α∈(0,1) represents the quantile level N is the total number of samples in the data set Ω; Qu(α) is the quantile function of the spot market electricity purchase: in, represents the cumulative distribution function, which is expressed as: In the formula, XHFP(F Y ,y) represents the cumulative distribution level loss assessment for the re-ordered power purchase volume y, P y<z represents the probability distribution of the electricity purchase amount, and z represents the upper limit of the electricity purchase variable.
15. A terminal comprising a processor and a storage medium; Features: The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the steps of the method according to any one of claims 1-9.
16. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.
