Sample construction method and device for power spot price prediction based on multi-factor fusion
By constructing a sample for electricity spot price forecasting through multi-factor fusion, and using Pearson correlation and cross-weighting to correct the differences between electricity operation characteristics and electricity price characteristics, the method solves the problem of insufficient adaptability in existing electricity price forecasting methods and achieves more accurate electricity price forecasting.
Patent Information
- Application Number
- CN202611144388.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-30
- Publication Date
- 2026-11-03
AI Technical Summary
Existing electricity spot market price forecasting methods cannot simultaneously reflect the correlation differences of different electricity operation characteristics, the timeliness of historical data, and the cross-relationship between bidding space characteristics and electricity price characteristics, resulting in insufficient adaptability of forecast samples to the electricity price scenarios to be predicted.
A sample construction method for predicting spot electricity prices based on multi-factor fusion is adopted. By calculating the Pearson correlation between electricity operation characteristics and electricity price data, the difference in characteristics throughout the time period, the time proximity weight, and the cross weight of bidding space-electricity price, a comprehensive similarity index is constructed to screen the set of similar days.
It improves the adaptability of the electricity spot price forecast sample to the electricity price scenario to be predicted, enhances the ability to identify the characteristics of electricity price fluctuations and inflection points, and improves the accuracy of the forecast results.
Smart Images

Figure CN123030950A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of power system dispatch automation technology, and in particular relates to a method and apparatus for constructing a sample for predicting spot electricity prices based on multi-factor fusion. Background Technology
[0002] With the continuous advancement of the electricity spot market construction, electricity prices in the spot market are influenced by various factors, including supply and demand, renewable energy output, grid operation status, and market participants' trading behavior. Existing electricity price forecasting methods typically search historical datasets for historical days with similar operating conditions to the day to be predicted, and use these selected historical days to construct forecast samples for training machine learning or deep learning models and for electricity price prediction. Current similarity day searches usually use multiple electricity operation characteristics such as system load, renewable energy output, and bidding space as comparison criteria, determining the degree of similarity by calculating the feature distance between the day to be predicted and each historical day.
[0003] Existing similar day search methods are unable to simultaneously reflect the differences in correlation between different power operation characteristics and electricity prices, the timeliness of historical data, and the cross-relationship between bidding space characteristics and electricity price characteristics. This can easily lead to the inclusion of low-correlation features or historical data that are far from the date to be predicted into the prediction sample, resulting in insufficient adaptability of the constructed prediction sample to the electricity price scenario to be predicted. Summary of the Invention
[0004] The purpose of this invention is to provide a method and apparatus for constructing electricity spot price prediction samples based on multi-factor fusion, so as to solve the problem that it is difficult to take into account the correlation differences of different electricity operation characteristics, the timeliness of historical data, and the cross relationship between bidding space characteristics and electricity price characteristics in the existing electricity price prediction sample construction process.
[0005] To achieve the above objectives, the present invention adopts the following technical solution: In a first aspect, the present invention provides a method for constructing a sample for predicting spot electricity prices based on multi-factor fusion, comprising: Obtain electricity price data and power operation characteristic data for each historical day from the historical dataset, as well as power operation characteristic data for the day to be predicted. The power operation characteristic data includes bidding space characteristic data. Based on the Pearson correlation between various power operation characteristics and the electricity price data in the historical dataset, the correlation weights corresponding to various power operation characteristics are determined. For each historical day in the historical dataset, based on the difference in feature values of the same type of power operation characteristics between the predicted day and the historical day in the corresponding time period, the full-time feature difference of each type of power operation characteristic is determined; based on the correlation weights corresponding to each type of power operation characteristic, the full-time feature difference of each type of power operation characteristic is weighted and fused to obtain the feature correlation weighted distance between the predicted day and the historical day. The time proximity weight is determined based on the date position of the historical day in the historical dataset. The time proximity weight is then used to correct the weighted distance of the feature relevance to obtain the corrected time distance between the date to be predicted and the historical day. For each time period of the historical day, the bidding space-electricity price cross difference value between the electricity price characteristics and bidding space characteristics of the time period is determined; based on the dispersion of the bidding space-electricity price cross difference value of all time periods of the historical day, the bidding space-electricity price cross weight corresponding to the historical day is determined; the time correction distance is corrected using the bidding space-electricity price cross weight to obtain the comprehensive similarity index between the day to be predicted and the historical day; Historical days are selected from the historical dataset based on the comprehensive similarity index corresponding to each historical day, and a set of similar days is output for constructing samples for electricity spot price prediction.
[0006] The above scheme uses the Pearson correlation between various power operation characteristics and historical electricity price data to differentiate the time-period characteristic differences of different power operation characteristics. It further uses time proximity weights and bidding space-electricity price cross weights to correct the distance calculation results. This can simultaneously reflect the differentiated contribution of different power operation characteristics to electricity price changes, the timeliness of historical data, and the cross relationship between bidding space characteristics and electricity price characteristics. It improves the adaptability of similar day screening results to the electricity price scenario to be predicted and provides corresponding prediction samples for electricity spot price prediction.
[0007] Furthermore, the determination of the bidding space-electricity price cross-difference value includes: Regarding the first The first historical day For each time period, the bidding space – electricity price crossover difference value for that time period is calculated using the following formula:
[0008] In the formula, Indicates the first The first historical day in China Bidding space for each time period – electricity price cross-difference value. Indicates the first The first historical day in China Normalized values of electricity price characteristics for each time period Indicates the first The first historical day in China Normalized values of bidding space characteristics for each time period; The determination of the bidding space-electricity price cross-weight includes: Calculate the first The average of the bidding range - electricity price cross difference for all periods of a historical day. ; Based on the degree of dispersion of each bidding space-electricity price cross-difference value relative to the mean, the following formula is used to calculate the first... Bidding space corresponding to each historical day – electricity price cross-weighting:
[0009] In the formula, Indicates the first Bidding space corresponding to each historical day - electricity price cross-weighting Indicates the first The number of time periods contained in a historical day; The step of adjusting the time correction distance using the bidding space-electricity price cross-weight includes: Calculate the first The bidding space corresponding to the historical days – electricity price cross weight and the predicted day and the 1st The product of the time-corrected distances between historical days is used to determine the product between the predicted day and the 1st historical day. A comprehensive similarity index between historical days.
[0010] The above-mentioned further scheme uses the normalized values of electricity price characteristics and the normalized values of bidding space characteristics in each time period to determine the cross differences, and constructs the cross weights based on the dispersion of cross differences in all time periods. This enables the comprehensive similarity index to reflect the stability of the cross relationship between historical intraday bidding space characteristics and electricity price characteristics, and improves the ability to identify electricity price fluctuation characteristics and inflection points of electricity price changes.
[0011] Furthermore, the step of determining the full-time characteristic difference of various power operation characteristics based on the characteristic value differences of the same type of power operation characteristics between the predicted date and the historical date in the corresponding time period includes: For each type of power operation characteristic, the square of the characteristic value difference between the day to be predicted and the historical day in each corresponding time period is calculated, and the square of the characteristic value difference in all corresponding time periods is accumulated to obtain the full-time characteristic difference of the power operation characteristic. The method of weighted fusion of the feature differences of various power operation features across all time periods based on the correlation weights corresponding to various power operation features to obtain the feature correlation weighted distance between the day to be predicted and the historical day includes: Calculate the product of the full-time characteristic difference of various power operation characteristics and the corresponding correlation weight, accumulate the obtained products, and perform a square root operation on the accumulated results to obtain the feature correlation weighted distance between the day to be predicted and the historical day.
[0012] The above-mentioned further scheme first summarizes the feature value differences of similar power operation characteristics in the time period dimension, and then uses the corresponding correlation weight to fuse the feature differences of different categories throughout the time period. This can reduce the feature aliasing caused by the equal weighting of different features in the distance calculation, and make the feature correlation weighted distance more accurately reflect the differences in power operation status between the day to be predicted and the historical day.
[0013] Furthermore, determining the correlation weights corresponding to various power operation characteristics based on the Pearson correlation between various power operation characteristics and electricity price data in the historical dataset includes: Regarding the first Based on the characteristics of electricity operation, the electricity price deviation of each data point in the historical dataset relative to the average electricity price is determined, and the first value of each data point is... The characteristic deviation of a power operation characteristic value relative to the corresponding characteristic mean; The product of the electricity price deviation and the characteristic deviation corresponding to each data point is accumulated, and the accumulated result is normalized using the accumulated squares of the electricity price deviation and the accumulated squares of the characteristic deviation to obtain the first... Pearson correlation between electricity operation characteristics and the electricity price data; According to the Pearson correlation coefficients corresponding to power operation characteristics are used to determine the first Relevance weights corresponding to power operation characteristics.
[0014] The above-mentioned further scheme adopts a unified Pearson correlation calculation method to quantify the degree of linear correlation between different categories of power operation characteristics and electricity price data, providing a quantifiable basis for determining the correlation weights corresponding to various types of power operation characteristics, which is conducive to improving the consistency of the weighted fusion process of multiple feature differences.
[0015] Furthermore, determining the time proximity weight based on the date position of the historical day in the historical dataset includes: According to the time interval between each historical day and the day to be predicted in ascending order, a date number is assigned to each historical day, and the time proximity weight corresponding to the historical day is determined according to the ratio between the date number corresponding to the historical day and the total number of historical days contained in the historical dataset. The step of correcting the weighted distance of the feature relevance using the time proximity weight to obtain the time-corrected distance between the date to be predicted and the historical date includes: Calculate the product of the time proximity weight corresponding to the historical day and the feature correlation weighted distance between the day to be predicted and the historical day, and determine the resulting product as the time correction distance between the day to be predicted and the historical day.
[0016] The above-mentioned further scheme sets the date sequence according to the time interval between the historical date and the date to be predicted, and introduces the proportional relationship between the date sequence and the total number of historical days into the feature correlation weighted distance, so that historical days that are far away from the date to be predicted correspond to a larger distance after time correction, thereby reducing the possibility of long-term historical data entering the similar day set and improving the adaptability of the prediction sample to the current power market operation status.
[0017] Furthermore, the step of filtering historical days from the historical dataset based on the comprehensive similarity index corresponding to each historical day, and outputting a set of similar days for constructing samples for electricity spot price prediction, includes: The historical days are sorted in ascending order of comprehensive similarity index. Historical days with comprehensive similarity index less than the preset similarity index threshold are identified as similar days. Based on the sorting results, the similar days are combined into a set of similar days for constructing the sample for electricity spot price prediction.
[0018] The above-mentioned further scheme uses both index ranking and threshold screening to select historical days. This can retain the order of the similarity of historical days while eliminating historical days that do not meet the requirements of the comprehensive similarity index, thereby improving the effectiveness of the predicted samples in the set of similar days and the orderliness of the output results.
[0019] Furthermore, the electricity price data includes the nodal marginal electricity price for each time period in each historical day; the power operation characteristic data also includes system net load data and renewable energy output data; each historical day and the day to be predicted are divided into 24 time periods or 96 time periods respectively.
[0020] The aforementioned further scheme uses the marginal electricity price at the node, as well as the operating data of the electricity spot market such as system net load, renewable energy output, and bidding space to compare similar days. It also achieves time alignment between data from different dates by dividing the time into 24 or 96 time periods, which helps to improve the accuracy of the calculation of the differences in characteristic values of each corresponding time period.
[0021] In a second aspect, the present invention provides an apparatus for constructing a sample for predicting spot electricity prices based on multi-factor fusion, comprising: The data acquisition module is used to acquire electricity price data and power operation characteristic data for each historical day in the historical dataset, as well as power operation characteristic data for the day to be predicted. The power operation characteristic data includes bidding space characteristic data. The correlation weight determination module is used to determine the correlation weights corresponding to various power operation characteristics based on the Pearson correlation between various power operation characteristics and the electricity price data in the historical dataset. The feature distance determination module is used to determine the full-time feature difference of each type of power operation feature for each historical day in the historical dataset, based on the feature value difference of the same type of power operation feature between the predicted day and the historical day in the corresponding time period; and to perform weighted fusion of the full-time feature difference of each type of power operation feature based on the correlation weights corresponding to each type of power operation feature to obtain the feature correlation weighted distance between the predicted day and the historical day. The time correction module is used to determine the time proximity weight based on the date position of the historical day in the historical dataset, and use the time proximity weight to correct the weighted distance of the feature correlation to obtain the time correction distance between the date to be predicted and the historical day. The comprehensive similarity determination module is used to determine the bidding space-electricity price cross difference value between the electricity price characteristics and bidding space characteristics of each time period of the historical day; determine the bidding space-electricity price cross weight corresponding to the historical day based on the dispersion of the bidding space-electricity price cross difference value of all time periods of the historical day; and use the bidding space-electricity price cross weight to correct the time correction distance to obtain the comprehensive similarity index between the day to be predicted and the historical day. The sample output module is used to filter historical days from the historical dataset based on the comprehensive similarity index corresponding to each historical day, and output a set of similar days for the construction of samples for electricity spot price prediction.
[0022] The aforementioned device and method are based on the same inventive concept and can achieve the same or corresponding technical effects.
[0023] In a third aspect, the present invention provides an electronic device including a processor and a memory, the processor being configured to execute a computer program stored in the memory to implement a method for constructing a sample for predicting spot electricity prices based on multi-factor fusion.
[0024] In a fourth aspect, the present invention provides a computer-readable storage medium storing at least one instruction that, when executed by a processor, implements a method for constructing a sample for predicting spot electricity prices based on multi-factor fusion. Attached Figure Description
[0025] The accompanying drawings, which form part of this application, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings: Figure 1 This is a flowchart of a method for constructing a sample for predicting spot electricity prices based on multi-factor fusion, as described in an embodiment of the present invention. Figure 2 This is a structural block diagram of the sample construction device for electricity spot price prediction based on multi-factor fusion according to an embodiment of the present invention; Figure 3 This is a structural block diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0026] The present invention will now be described in detail with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other.
[0027] The following detailed description is exemplary and intended to provide further detailed explanation of the invention. Unless otherwise specified, all technical terms used in this invention have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. The terminology used in this invention is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention.
[0028] Example 1 This invention provides a method for constructing a sample for predicting spot electricity prices based on multi-factor fusion, such as... Figure 1 As shown, the method includes steps S1 to S6.
[0029] Step S1: Obtain electricity price data and power operation characteristic data for each historical day in the historical dataset, as well as power operation characteristic data for the day to be predicted. The power operation characteristic data includes bidding space characteristic data.
[0030] Specifically, the historical dataset includes electricity price data and power operation characteristic data for multiple historical days. The electricity price data includes the nodal marginal electricity price for each time period within each historical day, while the power operation characteristic data includes system net load data, renewable energy output data, and bidding space characteristic data. The power operation characteristic data corresponding to the day to be predicted shares the same characteristic categories as the power operation characteristic data corresponding to the historical days, facilitating comparisons of similar power operation characteristics between the day to be predicted and each historical day.
[0031] Each historical day and the day to be predicted are divided into either 24 or 96 time periods. With 24 time periods, each period corresponds to one hour; with 96 time periods, each period corresponds to 15 minutes. The same time period division method is used for both historical days and the day to be predicted, allowing the power operation characteristic value of any time period on the day to be predicted to be compared with the corresponding power operation characteristic value of the same type on the historical day.
[0032] By acquiring data such as nodal marginal electricity prices, system net load, renewable energy output, and bidding space characteristics, the operating status of the electricity spot market on each historical day can be characterized from aspects such as electricity price changes, supply and demand status, renewable energy fluctuations, and market bidding status. By uniformly dividing the time periods of historical days and the days to be predicted, it is possible to ensure that the data of different dates correspond on the time axis, providing a data foundation for subsequent calculation of characteristic value differences for corresponding time periods.
[0033] Step S2: Determine the correlation weights of various power operation characteristics based on the Pearson correlation between various power operation characteristics and electricity price data in historical datasets.
[0034] Specifically, regarding the first Based on the characteristics of electricity operation, the electricity price deviation of each data point in the historical dataset relative to the average electricity price is determined, and the first value of each data point is... The characteristic deviation of a power operation characteristic value relative to its corresponding characteristic mean is calculated; the product of the electricity price deviation and the characteristic deviation for each data point is accumulated, and the accumulated result is normalized using the accumulated squares of the electricity price deviation and the accumulated squares of the characteristic deviation to obtain the first... The Pearson correlation between the characteristics of electricity operation and the electricity price data.
[0035] That is, calculate the first according to the following formula. Pearson correlation between power operation characteristics and electricity price data in historical datasets:
[0036] In the formula, Indicates the first The Pearson correlation between power operation characteristics and electricity price data in historical datasets. Indicates the first The value of electricity per data point Indicates the first The first data point Electricity operation characteristic values, This represents the mean value of electricity in the historical dataset. Indicates the first The mean of power operation characteristic values, This indicates the number of data points involved in the Pearson correlation calculation.
[0037] To avoid negative Pearson correlation directly participating in distance calculation, the first... The absolute value of the Pearson correlation coefficient corresponding to the power operation characteristics was determined as the first... Relevance weights corresponding to power operation characteristics:
[0038] In the formula, Indicates the first Relevance weights corresponding to power operation characteristics.
[0039] In this system, the same data point corresponds to the same time period within the same historical day, ensuring that the value of electricity and the characteristic value of electricity operation remain consistent over time. Pearson correlations are calculated between various electricity operation characteristics, such as system net load, renewable energy output, and bidding space, and centralized electricity price data in historical datasets. Based on the Pearson correlation for each type of electricity operation characteristic, corresponding correlation weights are determined.
[0040] Pearson correlation is used to quantify the degree of linear correlation between corresponding categories of power operation characteristics and electricity price data. By determining correlation weights based on the Pearson correlations corresponding to each type of power operation characteristic, it is possible to distinguish the differentiated contributions of different categories of power operation characteristics to electricity price changes, providing a quantitative basis for the subsequent weighted fusion of differences in multiple types of characteristics across all time periods.
[0041] Step S3: For each historical day in the historical dataset, determine the full-time feature difference of each type of power operation feature based on the feature value difference of the same type of power operation feature between the predicted day and the historical day in the corresponding time period; and perform weighted fusion of the full-time feature difference of each type of power operation feature based on the correlation weights corresponding to each type of power operation feature to obtain the feature correlation weighted distance between the predicted day and the historical day.
[0042] Specifically, for the first in the historical dataset For each historical day, calculate the date to be predicted and the date of prediction. The difference in all-time characteristics of various power operation features on each historical day.
[0043] For the Similar to power operation characteristics, calculate the forecast date and the number of days. The squares of the eigenvalue differences for each corresponding time period on the th historical day are then accumulated to obtain the th... The difference in characteristics across all time periods corresponding to the power operation characteristics:
[0044] In the formula, Indicates the date to be predicted and the number On the 1st historical day The difference in the characteristics of power operation across all time periods Represents the set of all time periods in the day dimension. Indicates a time period, This indicates that the forecast for the middle of the day is pending. The first time period Electricity operation characteristic values, Indicates the first The first historical day in China The first time period Characteristic values of power operation.
[0045] Calculate the product of the full-time characteristic difference of various power operation characteristics and the corresponding correlation weight, accumulate the products, and then perform a square root operation on the accumulated results to obtain the relationship between the predicted day and the predicted day. Weighted distance of feature correlation between historical days:
[0046] In the formula, Indicates the date to be predicted and the number Weighted distance of feature correlation between historical days Indicates the first The correlation weights corresponding to the power operation characteristics This indicates the number of power operation characteristic categories participating in the weighted fusion. Indicates the date to be predicted and the number On the 1st historical day Differences in the characteristics of power operation across all time periods.
[0047] The above calculation first summarizes the differences in similar power operation characteristics between the day to be predicted and historical days in the time period dimension, and then uses the correlation weight to perform weighted fusion in the feature category dimension. This can reduce the feature aliasing caused by the equal participation of different categories of power operation characteristics in the distance calculation, and make the feature correlation weighted distance more accurately reflect the differences in power operation status between the day to be predicted and historical days.
[0048] Step S4: Determine the time proximity weight based on the date position of the historical day in the historical dataset, and use the time proximity weight to correct the weighted distance of feature relevance to obtain the time correction distance between the day to be predicted and the historical day.
[0049] Specifically, each historical day in the historical dataset is assigned a date number in ascending order of the time interval between each historical day and the day to be predicted. Historical days closer to the day to be predicted have smaller date numbers, and historical days farther away from the day to be predicted have larger date numbers.
[0050] According to the The proportional relationship between the date sequence number corresponding to the th historical day and the total number of historical days in the historical dataset is determined according to the following formula. Time proximity weights for each historical day:
[0051] In the formula, Indicates the first The time proximity weight corresponding to each historical day Indicates the first The date sequence number corresponding to each historical day This represents the total number of historical days contained in the historical dataset.
[0052] Calculate the first The time proximity weight of each historical day and the predicted day and the number of... The product of the feature correlation weighted distances between historical days yields:
[0053] In the formula, Indicates the date to be predicted and the number Time correction distance between historical days Indicates the date to be predicted and the number The feature correlation weighted distance between historical days.
[0054] Since the date sequence number increases with the time interval between the historical date and the date to be predicted, the historical date further away from the date to be predicted has a greater time proximity weight. Using the time proximity weight to correct the weighted distance of feature correlation can increase the corrected time distance corresponding to distant historical dates, reduce the likelihood of distant historical dates being selected into the similar date set, and improve the adaptability of the prediction sample to the current operating state of the electricity market.
[0055] Step S5: For each time period of the historical day, determine the bidding space-electricity price cross difference value between the electricity price characteristics and bidding space characteristics of the time period; determine the bidding space-electricity price cross weight corresponding to the historical day based on the dispersion of the bidding space-electricity price cross difference value of all time periods of the historical day; use the bidding space-electricity price cross weight to correct the time correction distance to obtain the comprehensive similarity index between the day to be predicted and the historical day.
[0056] Specifically, regarding the first The first historical day For each time period, the bidding space – electricity price crossover difference value for that time period is calculated using the following formula:
[0057] In the formula, Indicates the first The first historical day in China Bidding space for each time period – electricity price cross-difference value. Indicates the first The first historical day in China Normalized values of electricity price characteristics for each time period Indicates the first The first historical day in China Normalized values of bidding space characteristics for each time period.
[0058] Calculate the first according to the following formula. The average of the bidding range – electricity price cross difference across all time periods of a historical day:
[0059] In the formula, Indicates the first The average of the bidding range - electricity price cross difference for all time periods of a historical day. Indicates the first The number of time periods contained in a historical day.
[0060] Based on the degree of dispersion of each bidding space-electricity price cross-difference value relative to the mean, the following formula is used to calculate the first... Bidding space corresponding to each historical day – electricity price cross-weighting:
[0061] In the formula, Indicates the first Bidding space corresponding to each historical day - electricity price cross weight.
[0062] Calculate the first Bidding space corresponding to each historical day – electricity price cross-weighting and the day to be predicted and the 1st The product of the time-corrected distances between historical days yields:
[0063] In the formula, Indicates the date to be predicted and the number A comprehensive similarity index between historical days Indicates the date to be predicted and the number The time correction distance between historical days.
[0064] The bidding space-electricity price cross-difference value reflects the difference between electricity price characteristics and bidding space characteristics within the same historical day and time period. The dispersion of the bidding space-electricity price cross-difference value across all time periods reflects the fluctuation of the cross-relationship between bidding space characteristics and electricity price characteristics within historical days. Constructing bidding space-electricity price cross-weights using this dispersion allows historical days with larger fluctuations in the cross-relationship to correspond to larger comprehensive similarity indices, thereby improving the comprehensive similarity index's ability to identify the cross-relationship between bidding space characteristics and electricity price characteristics.
[0065] Step S6: Based on the comprehensive similarity index corresponding to each historical day, filter historical days from the historical dataset and output a set of similar days for constructing samples for electricity spot price prediction.
[0066] Specifically, after executing steps S1 and S2, steps S3 to S5 are executed for each historical day in the historical dataset to obtain the comprehensive similarity index corresponding to each historical day. The historical days are sorted in ascending order of comprehensive similarity index, and historical days with comprehensive similarity indexes less than a preset similarity index threshold are identified as similar days. Based on the sorting results, the similar days are combined into a set of similar days for constructing the electricity spot price prediction sample.
[0067] The set of similar days can be represented as:
[0068] In the formula, Represents a set of similar days. This represents historical days arranged in ascending order of comprehensive similarity index and meeting the threshold condition. Representing historical days The corresponding comprehensive similarity index, This indicates the preset similarity index threshold.
[0069] The lower the overall similarity index, the more similar the corresponding historical day is to the day to be predicted. Sorting preserves the similarity relationships between historical days, while threshold filtering removes historical days that differ significantly from the day to be predicted, thus improving the effectiveness of the predicted samples in the similar day set and the orderliness of the output results. The output similar day set is used to construct electricity spot price prediction samples and can serve as training or input samples for the electricity price prediction model.
[0070] This embodiment uses correlation weight, time proximity weight, and bidding space-electricity price cross weight to progressively correct the differences between the prediction date and historical dates. This allows the final comprehensive similarity index to simultaneously reflect the correlation differences between different power operation characteristics and electricity prices, the timeliness of historical data, and the cross relationship between bidding space characteristics and electricity price characteristics, thereby improving the adaptability of the constructed prediction sample to the electricity price scenario to be predicted.
[0071] Example 2 like Figure 2 As shown in the figure, this embodiment of the invention also provides a sample construction device for predicting spot electricity prices based on multi-factor fusion, including a data acquisition module, a correlation weight determination module, a feature distance determination module, a time correction module, a comprehensive similarity determination module, and a sample output module.
[0072] The data acquisition module is used to acquire electricity price data and power operation characteristic data for each historical day in the historical dataset, as well as power operation characteristic data for the day to be predicted. The power operation characteristic data includes bidding space characteristic data.
[0073] The correlation weight determination module is used to determine the correlation weights corresponding to various power operation characteristics based on the Pearson correlation between various power operation characteristics and electricity price data in historical datasets.
[0074] The feature distance determination module is used to determine the full-time feature difference of each type of power operation feature for each historical day in the historical dataset, based on the feature value difference of the same type of power operation feature between the predicted day and the historical day in the corresponding time period. Based on the correlation weights corresponding to each type of power operation feature, the full-time feature difference of each type of power operation feature is weighted and fused to obtain the feature correlation weighted distance between the predicted day and the historical day.
[0075] The time correction module is used to determine the time proximity weight based on the date position of the historical day in the historical dataset, and to correct the weighted distance of feature relevance using the time proximity weight, so as to obtain the time correction distance between the day to be predicted and the historical day.
[0076] The comprehensive similarity determination module is used to determine the bidding space-electricity price cross difference value between the electricity price characteristics and bidding space characteristics of each time period of a historical day; determine the bidding space-electricity price cross weight corresponding to the historical day based on the dispersion of the bidding space-electricity price cross difference value of all time periods of the historical day; and use the bidding space-electricity price cross weight to correct the time correction distance to obtain the comprehensive similarity index between the day to be predicted and the historical day.
[0077] The sample output module is used to filter historical days from the historical dataset based on the comprehensive similarity index corresponding to each historical day, and output a set of similar days for the construction of samples for electricity spot price prediction.
[0078] Each module in this embodiment is used to perform the corresponding processing in the method described in Embodiment 1. The specific processing procedures and technical effects of each module can be referred to the corresponding content in Embodiment 1.
[0079] Example 3 like Figure 3 As shown, the present invention also provides an electronic device 100 for constructing a sample for predicting electricity spot prices based on multi-factor fusion; The electronic device 100 includes a memory 101, at least one processor 102, a computer program 103 stored in the memory 101 and executable on at least one processor 102, and at least one communication bus 104.
[0080] The memory 101 can be used to store the computer program 103. The processor 102 implements the sample construction method for electricity spot price prediction based on multi-factor fusion in Embodiment 1 by running or executing the computer program stored in the memory 101 and calling the data stored in the memory 101.
[0081] The memory 101 may primarily include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created based on the use of the electronic device 100 (such as audio data), etc. In addition, the memory 101 may include non-volatile memory, such as hard disk, RAM, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other non-volatile solid-state storage device.
[0082] At least one processor 102 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Processor 102 may be a microprocessor or any conventional processor. Processor 102 is the control center of electronic device 100, connecting various parts of electronic device 100 via various interfaces and lines.
[0083] The memory 101 in the electronic device 100 stores multiple instructions to implement a method for constructing a sample for predicting electricity spot prices based on multi-factor fusion. The processor 102 can execute multiple instructions to achieve: acquiring electricity price data and electricity operation characteristic data for each historical day in the historical dataset, as well as electricity operation characteristic data corresponding to the day to be predicted. The electricity operation characteristic data includes bidding space characteristic data. Based on the Pearson correlation between various power operation characteristics and the electricity price data in the historical dataset, the correlation weights corresponding to various power operation characteristics are determined. For each historical day in the historical dataset, based on the difference in feature values of the same type of power operation characteristics between the predicted day and the historical day in the corresponding time period, the full-time feature difference of each type of power operation characteristic is determined; based on the correlation weights corresponding to each type of power operation characteristic, the full-time feature difference of each type of power operation characteristic is weighted and fused to obtain the feature correlation weighted distance between the predicted day and the historical day. The time proximity weight is determined based on the date position of the historical day in the historical dataset. The time proximity weight is then used to correct the weighted distance of the feature relevance to obtain the corrected time distance between the date to be predicted and the historical day. For each time period of the historical day, the bidding space-electricity price cross difference value between the electricity price characteristics and bidding space characteristics of the time period is determined; based on the dispersion of the bidding space-electricity price cross difference value of all time periods of the historical day, the bidding space-electricity price cross weight corresponding to the historical day is determined; the time correction distance is corrected using the bidding space-electricity price cross weight to obtain the comprehensive similarity index between the day to be predicted and the historical day; Historical days are selected from the historical dataset based on the comprehensive similarity index corresponding to each historical day, and a set of similar days is output for constructing samples for electricity spot price prediction.
[0084] Example 4 If the modules / units integrated in the electronic device 100 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, and read-only memory (ROM).
[0085] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0086] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0087] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0088] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0089] In the description of this specification, references to terms such as "an embodiment," "example," "specific example," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0090] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions 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 constructing a sample for predicting spot electricity prices based on multi-factor fusion, characterized in that, include: Obtain electricity price data and power operation characteristic data for each historical day from the historical dataset, as well as power operation characteristic data for the day to be predicted. The power operation characteristic data includes bidding space characteristic data. Based on the Pearson correlation between various power operation characteristics and the electricity price data in the historical dataset, the correlation weights corresponding to various power operation characteristics are determined. For each historical day in the historical dataset, based on the difference in characteristic values of the same type of power operation characteristics between the day to be predicted and the historical day in the corresponding time period, the full-time characteristic difference of each type of power operation characteristic is determined. Based on the correlation weights corresponding to various power operation characteristics, the feature differences of various power operation characteristics throughout the time period are weighted and fused to obtain the feature correlation weighted distance between the day to be predicted and the historical day. The time proximity weight is determined based on the date position of the historical day in the historical dataset. The time proximity weight is then used to correct the weighted distance of the feature relevance to obtain the corrected time distance between the date to be predicted and the historical day. For each time period of the historical day, determine the bidding space-electricity price cross difference value between the electricity price characteristics and bidding space characteristics of the time period; determine the bidding space-electricity price cross weight corresponding to the historical day based on the dispersion of the bidding space-electricity price cross difference value of all time periods of the historical day. The time correction distance is corrected by using the bidding space-electricity price cross weight to obtain a comprehensive similarity index between the day to be predicted and the historical day; Historical days are selected from the historical dataset based on the comprehensive similarity index corresponding to each historical day, and a set of similar days is output for constructing samples for electricity spot price prediction.
2. The method for constructing a sample for predicting spot electricity prices according to claim 1, characterized in that, The determination of the bidding space-electricity price cross difference value includes: Regarding the first The first historical day For each time period, the bidding space – electricity price crossover difference value for that time period is calculated using the following formula: In the formula, Indicates the first The first historical day in China Bidding space for each time period – electricity price cross-difference value. Indicates the first The first historical day in China Normalized values of electricity price characteristics for each time period Indicates the first The first historical day in China Normalized values of bidding space characteristics for each time period; The determination of the bidding space-electricity price cross-weight includes: Calculate the first The average of the bidding range - electricity price cross difference for all periods of a historical day. ; Based on the degree of dispersion of each bidding space-electricity price cross-difference value relative to the mean, the following formula is used to calculate the first... Bidding space corresponding to each historical day – electricity price cross-weighting: In the formula, Indicates the first Bidding space corresponding to each historical day - electricity price cross-weighting Indicates the first The number of time periods contained in a historical day; The step of adjusting the time correction distance using the bidding space-electricity price cross-weight includes: Calculate the first The bidding space corresponding to the historical days – electricity price cross weight and the predicted day and the 1st The product of the time-corrected distances between historical days is used to determine the product between the predicted day and the 1st historical day. A comprehensive similarity index between historical days.
3. The method for constructing a sample for predicting spot electricity prices according to claim 1, characterized in that, The step of determining the time-period characteristic difference of various power operation characteristics based on the characteristic value differences of similar power operation characteristics between the predicted date and the historical date in the corresponding time period includes: For each type of power operation characteristic, the square of the characteristic value difference between the day to be predicted and the historical day in each corresponding time period is calculated, and the square of the characteristic value difference in all corresponding time periods is accumulated to obtain the full-time characteristic difference of the power operation characteristic. The method of weighted fusion of the feature differences of various power operation features across all time periods based on the correlation weights corresponding to various power operation features to obtain the feature correlation weighted distance between the day to be predicted and the historical day includes: Calculate the product of the full-time characteristic difference of various power operation characteristics and the corresponding correlation weight, accumulate the obtained products, and perform a square root operation on the accumulated results to obtain the feature correlation weighted distance between the day to be predicted and the historical day.
4. The method for constructing a sample for predicting spot electricity prices according to claim 1, characterized in that, The step of determining the correlation weights corresponding to various power operation characteristics based on the Pearson correlation between various power operation characteristics and electricity price data in the historical dataset includes: Regarding the first Based on the characteristics of electricity operation, the electricity price deviation of each data point in the historical dataset relative to the average electricity price is determined, and the first value of each data point is... The characteristic deviation of a power operation characteristic value relative to the corresponding characteristic mean; The product of the electricity price deviation and the characteristic deviation corresponding to each data point is accumulated, and the accumulated result is normalized using the accumulated squares of the electricity price deviation and the accumulated squares of the characteristic deviation to obtain the first... Pearson correlation between power operation characteristics and the electricity price data; According to the Pearson correlation coefficients corresponding to power operation characteristics are used to determine the first Relevance weights corresponding to power operation characteristics.
5. The method for constructing a sample for predicting spot electricity prices according to claim 1, characterized in that, The step of determining the time proximity weight based on the date position of the historical day in the historical dataset includes: According to the time interval between each historical day and the day to be predicted in ascending order, a date number is assigned to each historical day, and the time proximity weight corresponding to the historical day is determined according to the ratio between the date number corresponding to the historical day and the total number of historical days contained in the historical dataset. The step of correcting the weighted distance of the feature relevance using the time proximity weight to obtain the time-corrected distance between the date to be predicted and the historical date includes: Calculate the product of the time proximity weight corresponding to the historical day and the feature correlation weighted distance between the day to be predicted and the historical day, and determine the resulting product as the time correction distance between the day to be predicted and the historical day.
6. The method for constructing a sample for predicting spot electricity prices according to claim 1, characterized in that, The step of filtering historical days from the historical dataset based on the comprehensive similarity index corresponding to each historical day, and outputting a set of similar days for constructing samples for electricity spot price prediction, includes: The historical days are sorted in ascending order of comprehensive similarity index. Historical days with comprehensive similarity index less than the preset similarity index threshold are identified as similar days. Based on the sorting results, the similar days are combined into a set of similar days for constructing the sample for electricity spot price prediction.
7. The method for constructing a sample for predicting spot electricity prices according to claim 1, characterized in that, The electricity price data includes the marginal electricity price at each time period of each historical day; The power operation characteristic data also includes system net load data and new energy output data; Each historical day and the day to be predicted are divided into 24 or 96 time periods, respectively.
8. A device for constructing a sample for predicting spot electricity prices based on multi-factor fusion, characterized in that, include: The data acquisition module is used to acquire electricity price data and power operation characteristic data for each historical day in the historical dataset, as well as power operation characteristic data for the day to be predicted. The power operation characteristic data includes bidding space characteristic data. The correlation weight determination module is used to determine the correlation weights corresponding to various power operation characteristics based on the Pearson correlation between various power operation characteristics and the electricity price data in the historical dataset. The feature distance determination module is used to determine the full-time feature difference of various power operation features for each historical day in the historical dataset, based on the feature value difference between the same type of power operation features of the day to be predicted and the historical day in the corresponding time period. Based on the correlation weights corresponding to various power operation characteristics, the feature differences of various power operation characteristics throughout the time period are weighted and fused to obtain the feature correlation weighted distance between the day to be predicted and the historical day. The time correction module is used to determine the time proximity weight based on the date position of the historical day in the historical dataset, and use the time proximity weight to correct the weighted distance of the feature correlation to obtain the time correction distance between the date to be predicted and the historical day. The comprehensive similarity determination module is used to determine the bidding space-electricity price cross difference value between the electricity price characteristics and bidding space characteristics of each time period of the historical day. Based on the dispersion of the bidding space-electricity price cross difference value for all time periods of the historical day, determine the bidding space-electricity price cross weight corresponding to the historical day; The time correction distance is corrected by using the bidding space-electricity price cross weight to obtain a comprehensive similarity index between the day to be predicted and the historical day; The sample output module is used to filter historical days from the historical dataset based on the comprehensive similarity index corresponding to each historical day, and output a set of similar days for the construction of samples for electricity spot price prediction.
9. An electronic device, characterized in that, It includes a processor and a memory, the processor being used to execute a computer program stored in the memory to implement the method for constructing a sample for predicting spot electricity prices based on multi-factor fusion as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one instruction, which, when executed by a processor, implements the method for constructing a sample for predicting electricity spot prices based on multi-factor fusion as described in any one of claims 1 to 7.
