Sample construction method and device for power spot price prediction based on price stability
Patent Information
- Application Number
- CN202611144385.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-30
- Publication Date
- 2026-10-27
AI Technical Summary
此时,不同历史日之间即使在部分运行特征上较为接近,其电价曲线形态也可能存在明显差异,进而影响相似日搜索结果与待预测场景之间的匹配程度
1、通过获取历史数据集中各历史日的电价序列以及待预测电价场景对应的电力运行数据,识别各历史日的平稳特征窗口并形成电价平稳窗口集,再基于历史数据集对应的关键平稳特征窗口集合生成相似度指标并输出相似日集合,能够降低局部非平稳电价波动对相似日搜索结果的干扰,提高电力现货电价预测样本构建的稳定性和准确性。
Smart Images

Figure CN122989179A_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 spot electricity price prediction sample based on electricity price stability. Background Technology
[0002] The electricity spot market is a crucial trading link in the new power system, reflecting the supply and demand relationship of electricity and the system's operational status. Market electricity prices are typically influenced by various factors, including load changes, renewable energy output, generating unit operating status, and market bidding behavior. With the increasing installed capacity of renewable energy sources such as wind and solar power, the randomness and intermittency of renewable energy output have increased, leading to more complex fluctuations in electricity spot market prices across different dates and time periods. Constructing electricity price forecasting samples usually requires selecting historical samples that closely resemble the scenario to be predicted, providing a reference for subsequent electricity price trend analysis.
[0003] Existing similar day search methods typically represent historical days and the day to be predicted as multi-dimensional feature vectors, and determine the similarity of samples based on the distance between features such as load, renewable energy output, and electricity price. This type of method can provide some reference for constructing electricity price prediction samples in scenarios where electricity price changes are relatively gradual and the distribution of historical samples is relatively stable. In practical applications, the quality of similar day search results is affected by factors such as the dimension of input features, the number of time periods, the coverage of historical samples, and the degree of electricity price fluctuation.
[0004] However, with a high proportion of renewable energy connected to the grid, the fluctuation pattern of electricity price sequences becomes more complex. Factors such as sudden increases or decreases in renewable energy output, changes in system net load, and shifts in market supply and demand can all cause rapid price changes during certain periods. In this case, even if different historical days share some similar operating characteristics, their electricity price curves may differ significantly, thus affecting the matching degree between search results for similar days and the scenario to be predicted.
[0005] Furthermore, as the number of feature types and time periods involved in the comparison increases, the distance metric in the multidimensional feature space is easily affected by sample distribution, local fluctuations, and differences in feature scale, resulting in decreased distance discriminative power or insufficient stability of matching results. In such cases, existing similar daily search results may fail to consistently reflect the true proximity between the electricity price scenario to be predicted and historical electricity price scenarios, leading to insufficient reliability of historical reference samples used for constructing electricity spot price prediction samples. Summary of the Invention
[0006] The purpose of this invention is to provide a method and apparatus for constructing electricity spot price prediction samples based on electricity price stability, which can reduce the interference of non-stationary electricity price fluctuations on similar daily search results and improve the stability and accuracy of electricity spot price prediction sample construction.
[0007] 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 electricity price stability, comprising: Obtain the electricity price sequence for each historical day from the historical dataset and the power operation data corresponding to the electricity price scenario to be predicted; For each historical day's electricity price sequence, a sliding window process is applied. Based on the window stability index, stationary feature windows are identified, and the stationary feature windows corresponding to the same historical day are integrated into a set of stationary electricity price windows for that historical day. The electricity price stability window set corresponding to each historical day in the historical dataset is aligned with the time axis and the occurrence frequency is statistically analyzed. Based on the statistical results, the key stability feature window set corresponding to the historical dataset is determined. Using the electricity price scenario to be predicted and the historical electricity price scenario in the historical dataset as comparison objects, a similarity index between the electricity price scenario to be predicted and the historical electricity price scenario is generated based on the distance of multiple key features within the time period covered by the key stable feature window set and combined with the feature distance of the entire time period. Based on the similarity index, similar electricity price scenarios are selected from the historical electricity price scenarios, and a set of similar days is output for constructing samples for electricity spot price prediction.
[0008] Furthermore, the window stability index is determined based on the maximum, minimum, and average electricity prices within the sliding window, satisfying the following:
[0009] in, This represents a window stability index. This represents the maximum electricity price within the sliding window. This represents the minimum electricity price within the sliding window. This represents the average electricity price within the sliding window. The threshold value represents the set value of the stability criterion; if the stability index of the window is less than the set value of the stability criterion, the corresponding sliding window is determined as a candidate stable window that satisfies the stability condition.
[0010] Furthermore, a sliding window process is applied to the electricity price series for each historical day, and stationary characteristic windows are identified based on window stability indices, including: The longest window among the candidate stationary windows that meet the stationarity condition is determined as the stationary feature window, and the time periods of different stationary feature windows within the same historical day do not overlap. The start and end time periods of each stationary feature window are recorded. The stationary feature window is represented as follows:
[0011] in, Indicates the first The first historical day A stable feature window, Indicates the first The beginning period of a stable feature window, Indicates the first The end of a smooth feature window.
[0012] Furthermore, the stable characteristic windows corresponding to the same historical date are integrated into a set of stable electricity price windows for that historical date, including: The stable feature windows identified within the same historical day are aggregated to obtain the electricity price stability window set for that historical day. This electricity price stability window set is represented as follows:
[0013] in, Indicates the first A historical period of stable electricity prices Indicates the first The number of historical intraday stable feature windows.
[0014] Furthermore, the electricity price stability window set corresponding to each historical day in the historical dataset is aligned on the time axis and its occurrence frequency is statistically analyzed. Based on the statistical results, the key stability feature window set corresponding to the historical dataset is determined, including: Calculate the occurrence probability of each stationary feature window in the historical dataset, and determine the stationary feature windows whose occurrence probability is greater than the occurrence frequency threshold of key feature windows as key stationary feature windows. The set of key stationary feature windows is represented as follows:
[0015] in, Represents the set of key stationary feature windows. Indicates the first A key stable feature window, Indicates the first The probability of occurrence of a key stationary feature window This represents the frequency threshold of key feature windows.
[0016] Furthermore, generating a similarity index between the electricity price scenario to be predicted and the historical electricity price scenario includes: The distances of multiple key features within the time period covered by each key stable feature window in the set of key stable feature windows are superimposed, and the full-time feature distances between the electricity price scenario to be predicted and the historical electricity price scenario are also superimposed to obtain the similarity index, which satisfies the following:
[0017] in, Indicates similarity index, Represents key stationary feature windows During the period, Indicates the entire time period of a single day. Indicates the number of key features. Indicates the date to be compared. The feature in the first Feature values for each time period Indicates the date to be predicted. The feature in the first Feature values for each time period.
[0018] Furthermore, based on the similarity index, similar electricity price scenarios are selected from the historical electricity price scenarios, and a set of similar days for constructing samples for electricity spot price prediction is output. This includes: traversing the historical electricity price scenarios in the historical dataset, calculating the similarity index between the electricity price scenario to be predicted and each historical electricity price scenario, sorting the historical electricity price scenarios in ascending order of similarity index, and determining the historical electricity price scenarios that meet the similarity index threshold as similar electricity price scenarios, thereby generating a set of similar days, which is represented as follows:
[0019] in, Represents a set of similar days. This indicates the last similar day that meets the similarity index threshold requirements. This represents the similarity index of the last similar day that meets the similarity index threshold requirement. This represents the threshold for the similarity index.
[0020] In a second aspect, the present invention provides an apparatus for constructing a sample for predicting spot electricity prices based on electricity price stability, comprising: The data acquisition module is used to acquire the electricity price sequence for each historical day in the historical dataset and the power operation data corresponding to the electricity price scenario to be predicted; The stable window identification module is used to perform sliding window processing on the electricity price sequence for each historical day, identify stable feature windows based on window stability index, and integrate the stable feature windows corresponding to the same historical day into a set of stable electricity price windows for that historical day. The key window determination module is used to perform time axis alignment and frequency statistics on the electricity price stability window set corresponding to each historical day in the historical dataset, and determine the key stability feature window set corresponding to the historical dataset based on the statistical results. The similarity generation module is used to compare the electricity price scenario to be predicted with the historical electricity price scenario in the historical dataset, and generate a similarity index between the electricity price scenario to be predicted and the historical electricity price scenario based on the distance of multiple key features within the coverage period of the key stable feature window set, and combined with the feature distance of the entire time period. The set output module is used to filter similar electricity price scenarios from the historical electricity price scenarios based on the similarity index, and output a set of similar days for constructing samples for electricity spot price prediction.
[0021] In a third aspect, the present invention provides an electronic device, characterized in that it includes a processor and a memory, wherein the processor is configured to execute a computer program stored in the memory to implement a method for constructing a sample for predicting electricity spot prices based on electricity price stability.
[0022] In a fourth aspect, the present invention provides 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 a method for constructing a spot electricity price prediction sample based on electricity price stability.
[0023] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. By acquiring the electricity price sequence of each historical day in the historical dataset and the power operation data corresponding to the electricity price scenario to be predicted, the stationary feature windows of each historical day are identified and a set of stationary electricity price windows is formed. Then, based on the set of key stationary feature windows corresponding to the historical dataset, a similarity index is generated and a set of similar days is output. This can reduce the interference of local non-stationary electricity price fluctuations on the search results of similar days and improve the stability and accuracy of the construction of electricity spot price prediction samples.
[0024] 2. By determining the window stability index based on the maximum, minimum, and average electricity prices within the sliding window, and further identifying the candidate stable windows that meet the stability conditions as the longest and non-overlapping stable feature windows, we can more accurately characterize the time intervals in which historical intraday electricity price fluctuations are relatively flat, and reduce the impact of repeated windows and short, fragmented windows on the subsequent statistics of key stable feature windows.
[0025] 3. By aligning the electricity price stability window set of each historical day with the time axis and counting the occurrence frequency, a set of key stability feature windows is selected. Then, multiple key feature distances and full-time feature distances are superimposed within the coverage period of the key stability feature windows to generate similarity indicators. This enables the similarity calculation to take into account both the feature matching of stable periods and the overall differences of the whole time period, thereby improving the matching reliability between the set of similar days and the electricity price scenario to be predicted. Attached Figure Description
[0026] 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 A flowchart illustrating the method for constructing electricity spot price prediction samples based on electricity price stability provided in this embodiment of the invention; Figure 2 This is a structural block diagram of the electricity spot price prediction sample construction device based on electricity price stability provided in an embodiment of the present invention; Figure 3 This is a structural block diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0027] 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.
[0028] 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.
[0029] Example 1 This invention provides a method for constructing electricity spot price prediction samples based on electricity price stability. In this embodiment, an electricity operation data processing method processes historical electricity price sequences and electricity operation data corresponding to the electricity price scenario to be predicted in the electricity spot market to obtain a set of similar days for constructing electricity spot price prediction samples. Specifically, this method achieves the search for similar days between the electricity price scenario to be predicted and the historical electricity price scenario by identifying stationary feature windows in the historical electricity price sequences, filtering key stationary feature window sets, and calculating the similarity based on the key stationary feature windows.
[0030] Traditional electricity spot market price similarity day searches typically rely on multi-dimensional feature spatial distance to determine the similarity between two days. This judgment implicitly depends on the relatively stable mean and variance of the price series over time. In scenarios with a high proportion of renewable energy integration, the randomness and intermittency of renewable energy output can cause drastic fluctuations in the system's net load, resulting in a non-stationary characteristic of sharp rises and falls in the price series, and the formation of non-stationary spikes in local periods. If the electricity price and related features of a single day are included in the similarity calculation without differentiation, local extreme spikes will amplify the average distance over the entire period, causing the similarity day search results to deviate from the actual electricity price pattern. Therefore, this embodiment first identifies stationary feature windows for the price series of each historical day in the historical dataset, then reconstructs the similarity index based on the key stationary feature window set corresponding to the historical dataset, and accordingly selects similar price scenarios from the historical price scenarios, outputting a set of similar days for constructing samples for electricity spot market price prediction.
[0031] like Figure 1 As shown, the method includes steps S1 to S5.
[0032] Step S1: Obtain the electricity price sequence for each historical day in the historical dataset and the power operation data corresponding to the electricity price scenario to be predicted. In this embodiment of the invention, the historical dataset includes electricity price sequences corresponding to multiple historical days, and the power operation data corresponding to the electricity price scenario to be predicted is used as the object for subsequent similarity comparison with the historical electricity price scenario.
[0033] Step S2: Perform sliding window processing on the electricity price series for each historical day, identify stationary feature windows based on the window stability index, and integrate the stationary feature windows corresponding to the same historical day into a set of stationary electricity price windows for that historical day.
[0034] Specifically, in this embodiment of the invention, for the electricity price sequence of each historical day, a sliding window method is used to traverse the electricity prices of each time period of that historical day. The window stability index is determined based on the maximum, minimum, and average electricity prices within the sliding window, satisfying the following:
[0035] in, This represents a window stability index. This represents the maximum electricity price within the sliding window. This represents the minimum electricity price within the sliding window. This represents the average electricity price within the sliding window. This represents the threshold value set for the stability criterion; when the window stability index is less than the threshold value set for the stability criterion, the corresponding sliding window is determined as a candidate stationary window that satisfies the stationarity condition.
[0036] In this embodiment of the invention, the step of performing sliding window processing on the electricity price series for each historical day and identifying a stationary feature window based on the window stability index includes: The longest window among the candidate stationary windows that meet the stationarity condition is selected as the stationary feature window, and the time periods of different stationary feature windows within the same historical day do not overlap. The start and end times of each stationary feature window are recorded.
[0037] In this embodiment of the invention, the length of the stable feature window satisfies:
[0038] Furthermore, the final segment of the stationary feature window satisfies:
[0039] Different stationary feature windows within the same historical day satisfy the following:
[0040] The stationary feature window is represented as:
[0041] in, Indicates the first The first historical day The length of a stable feature window, Indicates the length of the candidate window. Indicates the first The first historical day A stable feature window, Indicates the first The beginning period of a stable feature window, Indicates the first At the end of a stable feature window, and This represents different stationary feature windows within the same historical day. Through the above processing, the longest stationary interval can be retained among the candidate windows that meet the stationarity conditions, and the duplicate counting of stationary intervals within the same historical day can be avoided.
[0042] In this embodiment of the invention, the step of integrating the stable feature windows corresponding to the same historical day into a set of stable electricity price windows for that historical day includes: The stable feature windows identified within the same historical day are aggregated to obtain the electricity price stability window set for that historical day. The electricity price stability window set is represented as follows:
[0043] in, Indicates the first A historical period of stable electricity prices Indicates the first The number of stable characteristic windows within a historical day. Thus, each historical day can correspond to a set of stable electricity price windows, which is used to characterize the relatively stable electricity price range within that historical day, and serves as the basis for subsequently selecting high-frequency stable windows from the historical dataset.
[0044] Step S3: Perform time axis alignment and frequency statistics on the electricity price stability window set corresponding to each historical day in the historical dataset, and determine the key stability feature window set corresponding to the historical dataset based on the statistical results.
[0045] In this embodiment of the invention, the step of performing time axis alignment and frequency statistics on the electricity price stability window set corresponding to each historical day in the historical dataset, and determining the key stability feature window set corresponding to the historical dataset based on the statistical results, includes: Calculate the occurrence probability of each stationary feature window in the historical dataset, and determine the stationary feature windows whose occurrence probability is greater than the occurrence frequency threshold of the key feature windows as key stationary feature windows. The set of key stationary feature windows is represented as follows:
[0046] in, Represents the set of key stationary feature windows. Indicates the first A key stable feature window, Indicates the first The probability of occurrence of a key stationary feature window This represents the frequency threshold of key feature windows.
[0047] Specifically, the electricity price stability window sets for all historical days in the historical dataset are aligned along the time axis, allowing stability windows located in the same or corresponding time periods on different historical days to participate in the same frequency statistics process. For common high-frequency stability intervals with an occurrence probability greater than the frequency threshold of key feature windows, these are identified as key stability feature windows. Multiple key stability feature windows are then used to construct the key stability feature window set corresponding to the historical dataset. This process represents a transformation from a single-day stability window set to a common key window set in the historical dataset.
[0048] Step S4: Using the electricity price scenario to be predicted and the historical electricity price scenario in the historical dataset as comparison objects, a similarity index between the electricity price scenario to be predicted and the historical electricity price scenario is generated based on the distance of multiple key features within the time period covered by the key stable feature window set, and combined with the feature distance of the entire time period.
[0049] In this embodiment of the invention, the step of generating a similarity index between the electricity price scenario to be predicted and the historical electricity price scenario includes: The distances of multiple key features within the time period covered by each key stationary feature window in the key stationary feature window set are superimposed, and the full-time feature distances between the electricity price scenario to be predicted and the historical electricity price scenario are also superimposed to obtain a similarity index. The similarity index satisfies the following:
[0050] in, Indicates similarity index, Represents key stationary feature windows During the period, Indicates the entire time period of a single day. Indicates the number of key features. Indicates the date to be compared. The feature in the first Feature values for each time period Indicates the date to be predicted. The feature in the first Feature values for each time period.
[0051] Specifically, the comparison is made between the electricity price scenario to be predicted and a historical electricity price scenario in the historical dataset. First, the comparison is limited to a specific time period covered by the key stable feature window set. Then, multiple key feature values are extracted within the covered time period, and the feature distance between the corresponding time period and the corresponding feature is calculated. Then, the feature distance within the entire time range of a single day is combined to obtain a similarity index based on the key stable feature window weighting. The similarity index is used for subsequent similar day ranking and set output.
[0052] Step S5: Based on the similarity index, similar electricity price scenarios are selected from historical electricity price scenarios, and a set of similar days for constructing samples for electricity spot price prediction is output.
[0053] In this embodiment of the invention, the step of filtering similar electricity price scenarios from historical electricity price scenarios based on a similarity index and outputting a set of similar days for constructing a sample for electricity spot price prediction includes: Iterate through the historical electricity price scenarios in the historical dataset, calculate the similarity index between the electricity price scenario to be predicted and each historical electricity price scenario, sort the historical electricity price scenarios in ascending order of similarity index, and determine the historical electricity price scenarios that meet the similarity index threshold as similar electricity price scenarios, generating a set of similar days, represented as follows:
[0054] in, Represents a set of similar days. This indicates the last similar day that meets the similarity index threshold requirements. This represents the similarity index of the last similar day that meets the similarity index threshold requirement. This represents the threshold for the similarity index.
[0055] Specifically, the similarity index calculation process is repeated for all historical electricity price scenarios in the historical dataset to obtain the similarity index between the electricity price scenario to be predicted and each historical electricity price scenario. Then, the scenarios are sorted in ascending order according to the similarity index, and historical electricity price scenarios with similarity indices greater than the similarity index threshold are removed. Finally, the top-ranked historical electricity price scenarios that meet the threshold requirement are extracted to generate and output a set of similar days. The set of similar days is used to construct samples for electricity spot price prediction.
[0056] Through the above embodiments, this invention, when high-proportion renewable energy access leads to non-stationary spikes in the electricity spot price sequence, first identifies the longest non-overlapping stationary feature windows from the price sequences of each historical day. Then, based on the frequency of occurrence of stationary feature windows in the historical dataset, a set of key stationary feature windows is formed. Finally, a similarity index is constructed using the distances of multiple key features within the coverage period of the key stationary feature windows and the distances of features across the entire time period. This reduces the interference of local non-stationary price spikes on similarity calculations, making the output set of similar days more suitable as the data foundation for constructing electricity spot price prediction samples, and improving the stability and accuracy of historical reference scenario matching during the construction of electricity price prediction samples.
[0057] Example 2 like Figure 2 As shown, based on the same inventive concept as the above embodiments, the present invention also provides an apparatus for constructing a sample for predicting electricity spot prices based on electricity price stability, comprising: The data acquisition module is used to acquire the electricity price sequence for each historical day in the historical dataset and the power operation data corresponding to the electricity price scenario to be predicted; The stable window identification module is used to perform sliding window processing on the electricity price sequence for each historical day, identify stable feature windows based on window stability index, and integrate the stable feature windows corresponding to the same historical day into a set of stable electricity price windows for that historical day. The key window determination module is used to perform time axis alignment and frequency statistics on the electricity price stability window set corresponding to each historical day in the historical dataset, and determine the key stability feature window set corresponding to the historical dataset based on the statistical results. The similarity generation module is used to compare the electricity price scenario to be predicted with the historical electricity price scenario in the historical dataset. Based on the distance of multiple key features within the time period covered by the key stationary feature window set, and combined with the feature distance of the whole time period, it generates a similarity index between the electricity price scenario to be predicted and the historical electricity price scenario. The set output module is used to filter similar electricity price scenarios from historical electricity price scenarios based on similarity indicators, and output a set of similar days for constructing samples for electricity spot price prediction.
[0058] Example 3 like Figure 3 As shown, the present invention also provides an electronic device 100 for constructing a method for predicting electricity spot prices based on electricity price stability; 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.
[0059] The memory 101 can be used to store the computer program 103. The processor 102 implements the electricity spot price prediction sample construction method based on electricity price stability in Embodiment 1 by running or executing the computer program stored in the memory 101 and calling the data stored in the memory 101.
[0060] 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.
[0061] 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.
[0062] The memory 101 in the electronic device 100 stores multiple instructions to implement a method for constructing a spot electricity price prediction sample based on electricity price stability, and the processor 102 can execute multiple instructions to achieve the following: Obtain the electricity price sequence for each historical day from the historical dataset and the power operation data corresponding to the electricity price scenario to be predicted; For each historical day's electricity price sequence, a sliding window process is applied. Based on the window stability index, stationary feature windows are identified, and the stationary feature windows corresponding to the same historical day are integrated into a set of stationary electricity price windows for that historical day. The electricity price stability window set corresponding to each historical day in the historical dataset is aligned with the time axis and the occurrence frequency is statistically analyzed. Based on the statistical results, the key stability feature window set corresponding to the historical dataset is determined. Using the electricity price scenario to be predicted and the historical electricity price scenario in the historical dataset as comparison objects, a similarity index between the electricity price scenario to be predicted and the historical electricity price scenario is generated based on the distance of multiple key features within the time period covered by the key stable feature window set and combined with the feature distance of the entire time period. Based on the similarity index, similar electricity price scenarios are selected from the historical electricity price scenarios, and a set of similar days is output for constructing samples for electricity spot price prediction.
[0063] 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).
[0064] 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.
[0065] 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.
[0066] 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.
[0067] 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.
[0068] 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.
[0069] 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 electricity price stability, characterized in that, include: Obtain the electricity price sequence for each historical day from the historical dataset and the power operation data corresponding to the electricity price scenario to be predicted; For each historical day's electricity price sequence, a sliding window process is applied. Based on the window stability index, stationary feature windows are identified, and the stationary feature windows corresponding to the same historical day are integrated into a set of stationary electricity price windows for that historical day. The electricity price stability window set corresponding to each historical day in the historical dataset is aligned with the time axis and the occurrence frequency is statistically analyzed. Based on the statistical results, the key stability feature window set corresponding to the historical dataset is determined. Using the electricity price scenario to be predicted and the historical electricity price scenario in the historical dataset as comparison objects, a similarity index between the electricity price scenario to be predicted and the historical electricity price scenario is generated based on the distance of multiple key features within the time period covered by the key stable feature window set and combined with the feature distance of the entire time period. Based on the similarity index, similar electricity price scenarios are selected from the historical electricity price scenarios, and a set of similar days is output for constructing samples for electricity spot price prediction.
2. The method according to claim 1, characterized in that, The window stability index is determined based on the maximum, minimum, and average electricity prices within the sliding window, and satisfies the following: in, This represents a window stability index. This represents the maximum electricity price within the sliding window. This represents the minimum electricity price within the sliding window. This represents the average electricity price within the sliding window. The threshold value represents the set value of the stability criterion; if the stability index of the window is less than the set value of the stability criterion, the corresponding sliding window is determined as a candidate stable window that satisfies the stability condition.
3. The method according to claim 2, characterized in that, For each historical day's electricity price series, a sliding window process is applied, and stationary characteristic windows are identified based on window stability indices, including: The longest window among the candidate stationary windows that meet the stationarity condition is determined as the stationary feature window, and the time periods of different stationary feature windows within the same historical day do not overlap. The start and end time periods of each stationary feature window are recorded. The stationary feature window is represented as follows: in, Indicates the first The first historical day A stable feature window, Indicates the first The beginning period of a stable feature window, Indicates the first The end of a smooth feature window.
4. The method according to claim 3, characterized in that, The stable characteristic windows corresponding to the same historical date are integrated into a set of stable electricity price windows for that historical date, including: The stable feature windows identified within the same historical day are aggregated to obtain the electricity price stability window set for that historical day. This electricity price stability window set is represented as follows: in, Indicates the first A historical period of stable electricity prices Indicates the first The number of historical intraday stable feature windows.
5. The method according to claim 4, characterized in that, The electricity price stability window set corresponding to each historical day in the historical dataset is aligned on a time axis and its occurrence frequency is statistically analyzed. Based on the statistical results, the key stability feature window set corresponding to the historical dataset is determined, including: Calculate the occurrence probability of each stationary feature window in the historical dataset, and determine the stationary feature windows whose occurrence probability is greater than the occurrence frequency threshold of key feature windows as key stationary feature windows. The set of key stationary feature windows is represented as follows: in, Represents the set of key stationary feature windows. Indicates the first A key stable feature window, Indicates the first The probability of occurrence of a key stationary feature window This represents the frequency threshold of key feature windows.
6. The method according to claim 5, characterized in that, Generating a similarity index between the electricity price scenario to be predicted and the historical electricity price scenario includes: The distances of multiple key features within the time period covered by each key stable feature window in the set of key stable feature windows are superimposed, and the full-time feature distances between the electricity price scenario to be predicted and the historical electricity price scenario are also superimposed to obtain the similarity index, which satisfies the following: in, Indicates similarity index, Represents key stationary feature windows During the period, Indicates the entire time period of a single day. Indicates the number of key features. Indicates the date to be compared. The feature in the first Feature values for each time period Indicates the date to be predicted. The feature in the first Feature values for each time period.
7. The method according to claim 6, characterized in that, Based on the similarity index, similar electricity price scenarios are selected from the historical electricity price scenarios, and a set of similar days for constructing samples for electricity spot price prediction is output. This includes: traversing the historical electricity price scenarios in the historical dataset, calculating the similarity index between the electricity price scenario to be predicted and each historical electricity price scenario, sorting the historical electricity price scenarios in ascending order of similarity index, and determining the historical electricity price scenarios that meet the similarity index threshold as similar electricity price scenarios, generating a set of similar days, which is represented as follows: in, Represents a set of similar days. This indicates the last similar day that meets the similarity index threshold requirements. This represents the similarity index of the last similar day that meets the similarity index threshold requirement. This represents the threshold for the similarity index.
8. A device for constructing a sample for predicting spot electricity prices based on electricity price stability, characterized in that, include: The data acquisition module is used to acquire the electricity price sequence for each historical day in the historical dataset and the power operation data corresponding to the electricity price scenario to be predicted; The stable window identification module is used to perform sliding window processing on the electricity price sequence for each historical day, identify stable feature windows based on window stability index, and integrate the stable feature windows corresponding to the same historical day into a set of stable electricity price windows for that historical day. The key window determination module is used to perform time axis alignment and frequency statistics on the electricity price stability window set corresponding to each historical day in the historical dataset, and determine the key stability feature window set corresponding to the historical dataset based on the statistical results. The similarity generation module is used to compare the electricity price scenario to be predicted with the historical electricity price scenario in the historical dataset, and generate a similarity index between the electricity price scenario to be predicted and the historical electricity price scenario based on the distance of multiple key features within the coverage period of the key stable feature window set, and combined with the feature distance of the entire time period. The set output module is used to filter similar electricity price scenarios from the historical electricity price scenarios based on the similarity index, and output a set of similar days for constructing 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 spot electricity price forecast sample based on electricity price stability 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 electricity spot price prediction samples based on electricity price stability as described in any one of claims 1 to 7.