Power market price forecasting method and system based on time period modeling and iTransformer

CN122989170APending Publication Date: 2026-10-27SHANDONG YUEHANG ENERGY TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611470159.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-21
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0004](1)以LSTM为代表的循环神经网络模型在处理长序列数据时存在梯度消失问题,且由于其串行计算机制,难以实现高效的并行训练

Benefits of technology

[0062]本发明通过对电网运行数据与电价数据进行统一构建,并引入负荷、新能源出力、竞价空间、节气周期及净负荷等特征,将影响电价变化的运行信息、时间周期信息与目标电价进行关联;同时按照1时至8时、9时至16时以及17时至次日0时划分独立时间区间,并针对各时间区间分别建立归一化参数及预测模型,使不同负荷水平、新能源出力状态及市场供需特征对应的数据分布能够分别参与建模,减少全天统一建模过程中不同时段数据分布相互混杂的问题,提高对电价非平稳性及分时段波动特征的刻画能力。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122989170A_ABST
    Figure CN122989170A_ABST
Patent Text Reader

Abstract

The application discloses a power market electricity price prediction method and system based on time period modeling and iTransformer. Power grid operation data and historical electricity price data are obtained, the data is cleaned and time-aligned, and features such as load, new energy output, bidding space, seasonal cycle and new energy penetration rate are constructed; according to the intraday operation characteristics, the whole day data is divided into three independent time periods of 1-8 hours, 9-16 hours and 17-0 hours of the next day, and data processing is respectively performed; the historical measured data, the historical electricity price and the future known covariates are spliced by using a sliding window to form a multi-dimensional time series prediction sample; a deep time series prediction model with variable inversion structure is established for the three time periods, the correlation between the load, the new energy output and the electricity price in the variable dimension is extracted, and electricity price prediction results of each time period are generated; finally, the prediction results of each time period are merged in time sequence, and the prediction results are evaluated through a prediction error index.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of power system operation and power market trading technology, and in particular to a method and system for predicting electricity market prices based on time-of-use modeling and iTransformer. Background Technology

[0002] With the deepening of power market reforms, day-ahead and real-time electricity prices have become the core signals guiding the power generation and consumption behavior of market participants and reflecting the power supply and demand relationship. Accurate electricity price forecasts can not only help power generation companies optimize their pricing strategies and increase revenue, but also assist power sales companies and large users in mitigating market risks and reducing electricity costs. However, against the backdrop of the construction of new power systems, the integration of high-proportion renewable energy sources such as wind and solar power has led to increased fluctuations in the net load of the power grid. Coupled with the multiple impacts of extreme weather, holiday effects, and the macroeconomic environment, the electricity price series exhibits strong non-stationarity, non-linearity, and volatility clustering characteristics.

[0003] Currently, traditional electricity price forecasting methods mainly rely on time series statistical models (such as ARIMA) or shallow machine learning models (such as SVR and random forests). In recent years, deep learning technology has been widely introduced into this field, but existing mainstream methods still have significant drawbacks:

[0004] (1) Recurrent neural network models represented by LSTM suffer from the gradient vanishing problem when processing long sequence data, and due to their serial computing mechanism, it is difficult to achieve efficient parallel training.

[0005] (2) Although the traditional Transformer model solves the problems of parallel computing and long-distance dependencies, its attention mechanism is mainly calculated between time steps. In the scenario of the power market, which contains dozens of covariates (such as various types of loads, renewable energy output, external power reception, etc.), the physical meaning and dimensions of different variables are very different. The traditional Transformer model is difficult to effectively capture the complex cross-dependencies between extreme multivariate variables, and may even exhibit attention graph degradation.

[0006] (3) The power supply and demand game in the whole day is highly heterogeneous (for example, the load trough in the early morning is very different from the photovoltaic peak during the day and the evening peak). Traditional methods usually use a single model to fit the data of the whole day, which makes it difficult to take into account the specific data distribution characteristics of different time periods at the same time.

[0007] Therefore, how to provide a method and system for electricity market price forecasting based on time-segmented modeling and iTransformer is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0008] One objective of this invention is to propose a method and system for predicting electricity market prices based on time-segmented modeling and iTransformer. This invention constructs electricity market characteristics such as load, renewable energy output, bidding space, and seasonal cycles, divides the entire day's data into multiple independent time periods, and uses a sliding window to fuse historical measured data with known future covariates. Then, it uses a variable inversion mechanism to model the correlation between multiple variables, generates electricity price prediction results for each time period, and fuses them in chronological order. This invention has the advantages of strong ability to characterize complex multivariate relationships, good adaptability to non-stationary electricity price sequences throughout the day, high accuracy of day-ahead and real-time electricity price prediction, and strong prediction stability.

[0009] The electricity market price forecasting method and system based on time-of-use modeling and iTransformer according to embodiments of the present invention includes the following steps:

[0010] Acquire and align power grid operation data and electricity price data, construct load, new energy, bidding space and seasonal characteristics, and generate an electricity price prediction feature matrix;

[0011] The electricity price forecast feature matrix is ​​divided into three feature subsets: 1:00 to 8:00, 9:00 to 16:00, and 17:00 to 0:00 the next day. Normalized parameter sets are established for each subset, and normalized feature subsets are generated.

[0012] Sliding window segmentation is performed on each normalized feature subset. The historical measured covariates and the target electricity price constitute the historical segment, and the future known covariates and the target electricity price occupy the position column to constitute the future segment. When predicting the day-ahead, the known day-ahead electricity price is written into the historical segment, and when predicting the real-time, zero value is written into the unknown position. The segments are then spliced ​​along the time dimension to form time-series samples in different time periods.

[0013] By exchanging the time dimension and variable dimension of time series samples in different time periods, the window sequences of each variable form independent variable representations, and self-attention encoding is performed on the variable dimension to generate time-series variable correlation features;

[0014] The correlation features of the three time-period variables are input into the corresponding independent iTransformer prediction models to generate three normalized electricity price prediction sequences.

[0015] The normalization parameter set corresponding to each normalized electricity price prediction sequence is called to perform inverse normalization, and then concatenated in timestamp order to generate the electricity price prediction result for the complete operating cycle.

[0016] Optionally, the electricity market price forecasting system based on time-of-use modeling and iTransformer includes the following modules:

[0017] The feature construction module acquires and aligns power grid operation data and electricity price data, constructs load, new energy, bidding space and seasonal cycle features, and generates an electricity price prediction feature matrix.

[0018] The time-segmented mapping module divides the electricity price prediction feature matrix into three feature subsets: 1:00 to 8:00, 9:00 to 16:00, and 17:00 to 0:00 the next day. Normalized parameter sets are established for each subset, and normalized feature subsets are generated.

[0019] The sample reconstruction module performs sliding window segmentation on each normalized feature subset, constructs a historical segment by combining historical measured covariates and target electricity prices, and constructs a future segment by combining known future covariates and target electricity prices. During day-ahead forecasting, known day-ahead electricity prices are written into the historical segment, and zero values ​​are written into unknown positions during real-time forecasting. The samples are then spliced ​​along the time dimension to form time-series samples.

[0020] The variable inversion encoding module swaps the time dimension and variable dimension of time series samples in different time periods, so that the window sequence of each variable forms an independent variable representation, and performs self-attention encoding in the variable dimension to generate time-series variable correlation features;

[0021] The time-of-use forecasting module inputs the correlation features of the three time-of-use variables into the corresponding independent iTransformer forecasting models to generate three normalized electricity price forecasting sequences.

[0022] The results fusion module calls the normalization parameter set corresponding to each normalized electricity price prediction sequence to perform inverse normalization, and splices them in the order of timestamps to generate the electricity price prediction results for the complete operating cycle.

[0023] Optionally, the feature construction module includes:

[0024] The system acquires the actual and predicted values ​​of direct load, tie-line load, total renewable energy load, bidding space, total electricity consumption, and total other load load from the power market trading platform and power grid dispatch system, as well as the day-ahead electricity price and real-time electricity price. The system then performs time granularity matching, abnormal record removal, and time alignment on the acquired data using a unified timestamp to form basic time series data.

[0025] Based on the date attributes corresponding to each timestamp in the basic time series data, the weekday sequence number and the identifiers of statutory holidays and weekends are extracted to determine the ordinal number of the twenty-four solar terms for the corresponding date. and in accordance with:

[0026] ;

[0027] Generate the sine and cosine characteristics of the solar terms;

[0028] Based on the actual values ​​of direct-dispatch load and total actual value of renewable energy corresponding to the same timestamp in the basic time-series data, according to Generate net load characteristics, among which, Indicates net load characteristics, This represents the actual value of the directly controlled load. This represents the total actual value of new energy sources.

[0029] Based on the electricity price forecasting task, select the corresponding electricity price data from the day-ahead electricity price and the real-time electricity price as the target electricity price column, and match the target electricity price column with the basic time series data, week number, rest day identifier, solar term sine characteristic, solar term cosine characteristic and net load characteristic according to the timestamp;

[0030] The actual values, predicted values, time characteristics, net load characteristics, and target electricity price columns corresponding to the completed timestamps are arranged column-wise according to the feature dimensions, and the data in each row is organized according to the timestamp order to generate an electricity price prediction feature matrix.

[0031] Optionally, the time-segmented mapping module includes:

[0032] Receive the electricity price forecast feature matrix, read the hour attribute corresponding to each row of data, and while keeping the correspondence between timestamp and feature field unchanged, divide the data corresponding to 1:00 to 8:00 into the first feature subset, the data corresponding to 9:00 to 16:00 into the second feature subset, and the data corresponding to 17:00 to 0:00 the next day into the third feature subset.

[0033] The historical input features and target electricity prices in the first feature subset, the second feature subset, and the third feature subset are statistically analyzed independently. The maximum and minimum values ​​of each feature in the corresponding time interval are determined one by one. The maximum and minimum values ​​of each feature in the same time interval are associated according to the feature fields to form a normalized parameter set that corresponds one-to-one with the three time intervals.

[0034] Call the normalization parameter set corresponding to each time interval, and normalize each feature in the corresponding feature subset;

[0035] After normalization, the features are rearranged according to their original timestamps and feature fields to form the first normalized feature subset, the second normalized feature subset, and the third normalized feature subset, respectively, and the mapping relationship between each normalized feature subset and the corresponding normalization parameter set is retained.

[0036] Optionally, the sample reconstruction module includes:

[0037] Receive the first normalized feature subset, the second normalized feature subset, and the third normalized feature subset. Arrange the data according to the timestamp order in each normalized feature subset. Read the column position of each feature field in the normalized feature subset. Determine the time range covered by a single sliding window by the sum of the historical input time step and the future prediction time step.

[0038] For each sliding window, the data within the window is divided into a historical time range and a future prediction time range based on the boundary corresponding to the historical input time step. The actual observed direct load, tie line load, total renewable energy, bidding space, total electricity consumption, total other load, and time cycle characteristics are extracted step by step from the historical time range. The target electricity price corresponding to each time step is extracted simultaneously, and the historical segments are formed according to the arrangement order of the feature fields in the electricity price prediction feature matrix.

[0039] For time steps in the historical segment that belong to the current forecast date but for which the actual target electricity price has not yet been formed, the target electricity price field is reconstructed. When the forecast task is day-ahead electricity price forecast, the day-ahead electricity price already obtained for the current forecast date is written into the corresponding target electricity price field. When the forecast task is real-time electricity price forecast, the historical real-time electricity price that has been formed is retained, and the target electricity price field corresponding to the time step in the current forecast date for which the real-time electricity price has not yet been formed is written to zero.

[0040] Read the forecast covariates that can be obtained at the forecast time step by step from the future forecast time range of the same sliding window, write the forecast values ​​of direct load, tie line load, total new energy, bidding space, total electricity consumption, other load, and corresponding time period characteristics into the same feature field position as the historical segment, and write the target electricity price field of each time step in the future forecast time range to zero value, forming a future segment with the same number of variables, the same field order, and the same field position relationship as the historical segment;

[0041] Historical segments are placed before future segments according to their chronological order, and historical and future segments are continuously spliced ​​together along the time dimension to form a single historical-future joint time series sample. The column position correspondence between historical measured covariates, target electricity prices, future predicted covariates, and target electricity price placeholder fields in the joint time series sample is maintained, and the joint time series sample is organized according to the batch dimension, time dimension, and variable dimension.

[0042] The sliding window truncation, historical segment construction, target electricity price field reconstruction, future segment construction, and time dimension splicing are repeatedly performed on the first normalized feature subset, the second normalized feature subset, and the third normalized feature subset to form time-series samples that correspond one-to-one with the three time intervals of 1:00 to 8:00, 9:00 to 16:00, and 17:00 to 0:00 the next day. The correspondence between each time-series sample and its source normalized feature subset is retained.

[0043] Optionally, the variable inversion encoding module includes:

[0044] Receive time series samples in different time periods, read the input tensor according to the batch dimension, time dimension and variable dimension in each time series sample, and convert the input tensor from the arrangement of batch dimension, time dimension and variable dimension to the arrangement of batch dimension, variable dimension and time dimension, so that the continuous time series corresponding to the same variable within the complete sliding window form an independent variable sequence, and maintain the correspondence between the variable sequence and the original feature field.

[0045] Read all time step data from each independent variable sequence, perform linear embedding mapping on each independent variable sequence, transform the time series corresponding to different variables to a unified hidden feature dimension, and perform random deactivation on the hidden features that have completed the linear embedding mapping to generate variable embedding features that correspond one-to-one with each variable.

[0046] The embedded features of each variable within the same time segment are input into the Transformer encoder. The embedded features are used as the objects of self-attention calculation. Attention associations between each variable and the other variables are calculated in the variable dimension. The embedded features of each variable are weighted and aggregated according to the obtained attention associations. During the encoding process, layer normalization, self-attention processing, feedforward feature transformation and GELU activation processing are performed in sequence to obtain variable encoding features containing information about the associations between variables.

[0047] Based on the correspondence of the feature fields of each variable in the time-series samples before variable inversion, the variable coding features are reorganized to form time-series variable association features corresponding to the three time intervals of 1:00 to 8:00, 9:00 to 16:00, and 17:00 to 0:00 the next day, respectively. The time-series variable association features are then passed to the time-series prediction module.

[0048] Optionally, the time-segmented prediction module:

[0049] Based on three time intervals—1:00 to 8:00, 9:00 to 16:00, and 17:00 to 0:00 the next day—iTransformer prediction models with independent parameters are established. The time-series samples and time-series variable correlation features corresponding to each time interval are used as the training input of the corresponding model, and the normalized target electricity price corresponding to the prediction time range in each time-series sample is used as the supervision data.

[0050] Input the variable association features of each time period into the prediction projection layer of the corresponding iTransformer prediction model. According to the prediction time step set by the time series samples of each time period, perform linear projection on the variable association features to convert each variable association feature into a prediction representation covering each prediction time step. Then, convert the prediction representation from the arrangement of variable dimension and prediction time dimension to the arrangement of prediction time dimension and variable dimension.

[0051] Based on the position of the target electricity price in the feature field of the electricity price prediction feature matrix, the predicted target electricity price value for each prediction time step is extracted from the transformed prediction representation, and the average absolute error loss is calculated with the normalized target electricity price corresponding to the same time interval.

[0052] ;

[0053] in, This indicates the number of target electricity price samples participating in the current iteration. Indicates the first A normalized target electricity price, This represents the corresponding target electricity price forecast;

[0054] Backpropagation is performed using an adaptive moment estimator based on the mean absolute error loss, updating the network parameters of the three iTransformer prediction models respectively, and saving the corresponding model weights after completing the iteration of the training samples in each time interval.

[0055] In the electricity price forecasting stage, the corresponding model weights are loaded according to the time interval to which the time series sample to be predicted belongs. The time-segment variable association features generated by the variable inversion encoding module are input into the matching iTransformer prediction model. Prediction projection, dimension transformation and target electricity price field extraction are performed in sequence to generate the first normalized electricity price prediction sequence, the second normalized electricity price prediction sequence and the third normalized electricity price prediction sequence, respectively.

[0056] Optionally, the result fusion module includes:

[0057] Receive the electricity price forecast sequence for each time period, and read the start day intra-day step sequence, end day intra-day step sequence, and forecast step number for each time period in the target business day. Establish the correspondence between the electricity price forecast sequence for each time period and the intra-day position of the target business day according to the start day intra-day step sequence, so that the first forecast value in the electricity price forecast sequence for each time period corresponds to the start day intra-day step sequence of the corresponding time period, and the subsequent forecast values ​​correspond to the adjacent day intra-day step sequence in turn, until the corresponding end day intra-day step sequence is reached.

[0058] A complete prediction position sequence is established based on the intraday step sequence corresponding to the target business day in the unified business day sequence. For each time period, starting from the intraday step sequence of the beginning of the time period, the predicted electricity price value is read item by item according to the order of the predicted values ​​inside the time period's electricity price prediction sequence. The read electricity price predicted values ​​are written sequentially into the positions with the same intraday step sequence in the complete prediction position sequence, so that the prediction results of each time period are restored to the original time position in the target business day.

[0059] According to the time sequence of each forecast period in the target business day, the position of the electricity price forecast value of each period is written in sequence, so that the step sequence of the end day of the previous forecast period directly inherits the step sequence of the start day of the next forecast period, and the order of the forecast values ​​within each forecast period remains unchanged. In this way, the independently generated electricity price forecast sequence of each period is converted into a continuous forecast result on the same target business day time axis.

[0060] After writing the positions for all forecast periods, the electricity price forecast values ​​in the complete forecast position sequence are read from front to back according to the intraday step sequence of the target business day. Based on the business day identifier and intraday step sequence, the target day time position corresponding to each electricity price forecast value is restored. The time position and electricity price forecast value are then associated item by item to form a complete electricity spot price forecast sequence covering all forecast time points of the target business day, and this sequence is output.

[0061] The beneficial effects of this invention are:

[0062] This invention unifies the construction of power grid operation data and electricity price data, and incorporates features such as load, renewable energy output, bidding space, seasonal cycles, and net load to correlate operational information and time cycle information that affect electricity price changes with the target electricity price. Simultaneously, it divides the time intervals into independent time zones: 1:00-8:00, 9:00-16:00, and 17:00-00:00 the next day. Normalized parameters and prediction models are established for each time interval, allowing data distributions corresponding to different load levels, renewable energy output status, and market supply and demand characteristics to participate in modeling separately. This reduces the problem of data distributions from different time periods being mixed during the unified modeling process throughout the day, and improves the ability to characterize the non-stationarity and time-period fluctuations of electricity prices.

[0063] This invention reconstructs data for each time period using a sliding window, forming a historical segment by combining historical measured covariates and historical target electricity prices, and a future segment by combining future prediction covariates and target electricity price placeholder data. Corresponding target electricity price fields are configured for both day-ahead and real-time electricity price prediction tasks, enabling historical information and future information available at the prediction time to form continuous time-series samples under a unified feature dimension. This allows for the input of historical operating status, future load, and renewable energy prediction information into the prediction model without altering the positional relationships of the input variables. It also ensures that day-ahead and real-time electricity price predictions use a consistent data organization structure, improving the data consistency between the training and prediction phases. Attached Figure Description

[0064] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0065] Figure 1The following is a flowchart of the electricity market price prediction method and system based on time-segmented modeling and iTransformer proposed in this invention.

[0066] Figure 2 This is a structural diagram of the multi-source data processing and sliding window dataset construction proposed in this invention. Detailed Implementation

[0067] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0068] refer to Figures 1-2 The electricity market price forecasting method and system based on time-of-use modeling and iTransformer includes the following steps:

[0069] The feature construction module is used to acquire and align power grid operation data and electricity price data, construct load, new energy, bidding space and seasonal cycle features, and generate an electricity price prediction feature matrix.

[0070] The time-segmented mapping module is used to divide the electricity price prediction feature matrix into three feature subsets: 1:00 to 8:00, 9:00 to 16:00, and 17:00 to 0:00 the next day. Normalized parameter sets are established for each subset, and normalized feature subsets are generated.

[0071] The sample reconstruction module is used to perform sliding window segmentation on each normalized feature subset, forming a historical segment by combining historical measured covariates and target electricity prices, and forming a future segment by combining known future covariates and target electricity prices. During day-ahead forecasting, known day-ahead electricity prices are written into the historical segment, and zero values ​​are written into unknown positions during real-time forecasting. The modules are then spliced ​​along the time dimension to form time-series samples divided into time periods.

[0072] The variable inversion encoding module is used to swap the time dimension and variable dimension of time series samples in different time periods, so that the window sequence of each variable forms an independent variable representation, and performs self-attention encoding in the variable dimension to generate time-series variable correlation features;

[0073] The time-of-use forecasting module is used to input the correlation features of the three time-of-use variables into the corresponding independent iTransformer forecasting models to generate three normalized electricity price forecasting sequences.

[0074] The results fusion module is used to call the normalization parameter set corresponding to each normalized electricity price prediction sequence to perform inverse normalization, and splice them in the order of timestamps to generate the electricity price prediction results for the complete running cycle.

[0075] In this embodiment, the feature construction module includes:

[0076] The system acquires the actual and predicted values ​​of direct load, tie-line load, total renewable energy load, bidding space, total electricity consumption, and total other load load from the power market trading platform and power grid dispatch system, as well as the day-ahead electricity price and real-time electricity price. The system then performs time granularity matching, abnormal record removal, and time alignment on the acquired data using a unified timestamp to form basic time series data.

[0077] Based on the date attributes corresponding to each timestamp in the basic time series data, the weekday sequence number and the identifiers of statutory holidays and weekends are extracted to determine the ordinal number of the twenty-four solar terms for the corresponding date. and in accordance with

[0078] ;

[0079] Generate the sine and cosine characteristics of the solar terms;

[0080] Based on the actual values ​​of direct-dispatch load and total actual value of renewable energy corresponding to the same timestamp in the basic time-series data, according to Generate net load characteristics, among which, Indicates net load characteristics, This represents the actual value of the directly controlled load. This represents the total actual value of new energy sources.

[0081] Based on the electricity price forecasting task, select the corresponding electricity price data from the day-ahead electricity price and the real-time electricity price as the target electricity price column, and match the target electricity price column with the basic time series data, week number, rest day identifier, solar term sine characteristic, solar term cosine characteristic and net load characteristic according to the timestamp;

[0082] After completing the timestamp, the actual values, predicted values, time characteristics, net load characteristics, and target electricity price columns are arranged column-wise according to the feature dimensions, and the data in each row is organized according to the timestamp order to generate an electricity price prediction feature matrix for use by the time-of-use mapping module.

[0083] In this embodiment, the time-segmented mapping module includes:

[0084] The system receives the electricity price prediction feature matrix generated by the feature construction module, reads the hour attribute corresponding to each row of data, and divides the data corresponding to 1:00 to 8:00 into the first feature subset, the data corresponding to 9:00 to 16:00 into the second feature subset, and the data corresponding to 17:00 to 0:00 the next day into the third feature subset, while keeping the correspondence between the timestamp and the feature field unchanged.

[0085] The historical input features and target electricity prices in the first feature subset, the second feature subset, and the third feature subset are statistically analyzed independently. The maximum and minimum values ​​of each feature in the corresponding time interval are determined one by one. The maximum and minimum values ​​of each feature in the same time interval are associated according to the feature fields to form a normalized parameter set that corresponds one-to-one with the three time intervals.

[0086] Call the normalized parameter set corresponding to each time interval, and apply the following to each feature in the corresponding feature subset:

[0087] ;

[0088] Normalization was performed, where, Indicates the first The original data values ​​of each feature. Indicates the first Normalized data values ​​of each feature, and They represent the first time interval within the corresponding time interval. The maximum and minimum values ​​of each feature;

[0089] After normalization, the features are rearranged according to their original timestamps and feature fields to form the first normalized feature subset, the second normalized feature subset, and the third normalized feature subset. The mapping relationship between each normalized feature subset and the corresponding normalization parameter set is retained for use by the sample reconstruction module.

[0090] In this embodiment, the sample reconstruction module includes:

[0091] The system receives the first normalized feature subset, the second normalized feature subset, and the third normalized feature subset. The data is arranged in the order of the timestamps in each normalized feature subset. The column position of each feature field in the normalized feature subset is read. The time range covered by a single sliding window is determined by the sum of the historical input time step and the future prediction time step. The sliding window extracts continuous data in chronological order within each normalized feature subset without splicing across different time intervals.

[0092] For each sliding window, the data within the window is divided into a historical time range and a future prediction time range based on the boundary corresponding to the historical input time step. From the historical time range, the actual observed direct load, tie line load, total renewable energy, bidding space, total electricity consumption, total other load, and time cycle characteristics are extracted step by step. At the same time, the target electricity price corresponding to each time step is extracted. The historical segments are formed according to the arrangement order of the feature fields in the electricity price prediction feature matrix, so that each time step in the historical segment retains the variable positions consistent with the electricity price prediction feature matrix.

[0093] For time steps in the historical segment that belong to the current forecast date but for which the actual target electricity price has not yet been formed, the target electricity price field is reconstructed. When the forecast task is day-ahead electricity price forecast, the day-ahead electricity price already obtained for the current forecast date is written into the corresponding target electricity price field. When the forecast task is real-time electricity price forecast, the historical real-time electricity price that has already been formed is retained, and the target electricity price field corresponding to the time step in the current forecast date for which the real-time electricity price has not yet been formed is written to zero. This allows the two types of forecast tasks to form a historical segment with a consistent structure without changing the position of the target electricity price field.

[0094] Read the forecast covariates that can be obtained at the forecast time step by step from the future forecast time range of the same sliding window, write the forecast values ​​of direct load, tie line load, total new energy, bidding space, total electricity consumption, other load, and corresponding time period characteristics into the same feature field position as the historical segment, and write the target electricity price field of each time step in the future forecast time range to zero value, forming a future segment with the same number of variables, the same field order, and the same field position relationship as the historical segment;

[0095] Historical segments are placed before future segments according to their chronological order, and historical and future segments are continuously spliced ​​along the time dimension, so that data at any time step is organized according to the same feature field template, forming a single historical-future joint time series sample; the column position correspondence between historical measured covariates, target electricity price, future predicted covariates, and target electricity price placeholder fields in the joint time series sample is maintained, and the joint time series sample is organized according to the batch dimension, time dimension, and variable dimension;

[0096] The sliding window extraction, historical segment construction, target electricity price field reconstruction, future segment construction, and time dimension splicing are repeatedly performed on the first normalized feature subset, the second normalized feature subset, and the third normalized feature subset to form time-series samples that correspond one-to-one with the three time intervals of 1:00 to 8:00, 9:00 to 16:00, and 17:00 to 0:00 the next day. The correspondence between each time-series sample and its source normalized feature subset is retained for use by the variable inversion encoding module.

[0097] In this embodiment, the variable inversion encoding module includes:

[0098] Receive time series samples in different time periods, read the input tensor according to the batch dimension, time dimension and variable dimension in each time series sample, and convert the input tensor from the arrangement of batch dimension, time dimension and variable dimension to the arrangement of batch dimension, variable dimension and time dimension, so that the continuous time series corresponding to the same variable within the complete sliding window form an independent variable sequence, and maintain the correspondence between the variable sequence and the original feature field.

[0099] Read all time step data from each independent variable sequence, perform linear embedding mapping on each independent variable sequence, transform the time series corresponding to different variables to a unified hidden feature dimension, and perform random deactivation on the hidden features that have completed the linear embedding mapping to generate variable embedding features that correspond one-to-one with each variable.

[0100] The embedded features of each variable within the same time segment are input into the Transformer encoder. The embedded features are used as the objects of self-attention calculation. Attention associations between each variable and the other variables are calculated in the variable dimension. The embedded features of each variable are weighted and aggregated according to the obtained attention associations. During the encoding process, layer normalization, self-attention processing, feedforward feature transformation and GELU activation processing are performed in sequence to obtain variable encoding features containing information about the associations between variables.

[0101] Based on the correspondence of the feature fields of each variable in the time series samples before variable inversion, the variable coding features are reorganized to form time-series variable association features corresponding to the three time intervals of 1:00 to 8:00, 9:00 to 16:00, and 17:00 to 0:00 the next day, respectively. The time-series variable association features are then passed to the time-series prediction module.

[0102] In this embodiment, the time-segmented prediction module includes:

[0103] Based on three time intervals—1:00 to 8:00, 9:00 to 16:00, and 17:00 to 0:00 the next day—iTransformer prediction models with independent parameters are established. The time-series samples and time-series variable correlation features corresponding to each time interval are used as the training input of the corresponding model, and the normalized target electricity price corresponding to the prediction time range in each time-series sample is used as the supervision data.

[0104] The variable association features of each time period are input into the prediction projection layer of the corresponding iTransformer prediction model. According to the prediction time step set by the time series samples of each time period, the variable association features are linearly projected to convert each variable association feature into a prediction representation covering each prediction time step. Then, the prediction representation is converted from the arrangement of variable dimension and prediction time dimension to the arrangement of prediction time dimension and variable dimension.

[0105] Based on the position of the target electricity price in the feature field of the electricity price prediction feature matrix, the predicted target electricity price value for each prediction time step is extracted from the transformed prediction representation, and the average absolute error loss is calculated with the normalized target electricity price corresponding to the same time interval.

[0106] ;

[0107] in, This indicates the number of target electricity price samples participating in the current iteration. Indicates the first A normalized target electricity price, This represents the corresponding target electricity price forecast;

[0108] Backpropagation is performed using an adaptive moment estimator based on the mean absolute error loss, updating the network parameters of the three iTransformer prediction models respectively, and saving the corresponding model weights after completing the iteration of the training samples in each time interval.

[0109] In the electricity price forecasting stage, the corresponding model weights are loaded according to the time interval to which the time series sample to be predicted belongs. The time-segment variable association features generated by the variable inversion encoding module are input into the matching iTransformer prediction model. Prediction projection, dimension transformation and target electricity price field extraction are performed in sequence to generate the first normalized electricity price prediction sequence, the second normalized electricity price prediction sequence and the third normalized electricity price prediction sequence, and then passed to the result fusion module.

[0110] In this embodiment, the result fusion module includes:

[0111] Receive the electricity price forecast sequence for each time period, and read the start day intra-day step sequence, end day intra-day step sequence, and forecast step number for each time period in the target business day. Establish the correspondence between the electricity price forecast sequence for each time period and the intra-day position of the target business day according to the start day intra-day step sequence, so that the first forecast value in the electricity price forecast sequence for each time period corresponds to the start day intra-day step sequence of the corresponding time period, and the subsequent forecast values ​​correspond to the adjacent day intra-day step sequence in turn, until the corresponding end day intra-day step sequence is reached.

[0112] A complete prediction position sequence is established based on the intraday step sequence corresponding to the target business day in the unified business day sequence. For each time period, starting from the intraday step sequence of the beginning of the time period, the predicted electricity price value is read item by item according to the order of the predicted values ​​inside the time period's electricity price prediction sequence. The read electricity price predicted values ​​are written sequentially into the positions with the same intraday step sequence in the complete prediction position sequence, so that the prediction results of each time period are restored to the original time position in the target business day.

[0113] According to the time sequence of each forecast period in the target business day, the position of the electricity price forecast value of each period is written in sequence, so that the step sequence of the end day of the previous forecast period directly inherits the step sequence of the start day of the next forecast period, and the order of the forecast values ​​within each forecast period remains unchanged. In this way, the independently generated electricity price forecast sequence of each period is converted into a continuous forecast result on the same target business day time axis.

[0114] After the positions for all forecast periods are written, the electricity price forecast values ​​in the complete forecast position sequence are read from front to back according to the intraday step sequence of the target business day. Based on the business day identifier and intraday step sequence, the target day time position corresponding to each electricity price forecast value is restored. The time position and the electricity price forecast value are associated item by item to form a complete electricity spot price forecast sequence covering all forecast time points of the target business day and output it.

[0115] In this embodiment, the iTransformer prediction model is a Transformer time series prediction model built based on a variable inversion mechanism. Its input consists of time series samples organized according to batch, time, and variable dimensions. The model first transforms the input tensor from a "batch-time-variable" arrangement to a "batch-variable-time" arrangement, so that the time series of each feature variable within the complete input window is represented as an independent variable. A variable-inverted data embedding layer performs a linear mapping on the time series corresponding to each independent variable, projecting them into a unified hidden feature space and performing random deactivation. After embedding, the variable representations are input into the Transformer encoder, which performs multi-head encoding in the variable dimension. Self-attention computation, combined with pre-layer normalization and GELU activation function, obtains encoded features containing multivariate correlations; the encoded features are then input into the prediction projection layer, mapping the hidden features to the set prediction time step dimension, and the target electricity price prediction sequence is obtained by dimension transpose; in this technical solution, the model is used under the following conditions: the input data has been independently divided and normalized according to different time intervals, and a unified time series sample is formed by splicing historical observation data and future known covariates through a sliding window, with consistent feature dimensions at each time step, and independent iTransformer prediction models are established and trained for different time intervals to handle the time-segmented data from 1:00 to 8:00, 9:00 to 16:00, and 17:00 to 0:00 the next day.

[0116] Example:

[0117] This embodiment applies a time-segmented modeling and iTransformer-based electricity market price forecasting method and system to day-ahead and real-time electricity price forecasting scenarios in the electricity spot market. This market generates electricity price settlement data at fixed time intervals, and price changes are simultaneously influenced by direct-dispatch load, tie-line load, renewable energy output, bidding space, total electricity consumption, and other load variations. In actual operation, the supply and demand states differ significantly between the early morning, daytime, and evening / overnight periods. During the early morning, the overall system load is low, and photovoltaic (PV) output from renewable energy sources has not yet materialized; during the daytime, PV output gradually increases, and the system's net load changes significantly with renewable energy output; after evening, renewable energy output declines, while residential and industrial loads are at high levels, making rapid price increases likely. If a single model is used to process continuous data throughout the day, the variable distributions and price formation relationships at different time periods will all participate in updating the same model parameters, easily leading to a mixture of characteristic relationships between peak, off-peak, and renewable energy high-output periods.

[0118] In this embodiment, the day-ahead and real-time electricity prices are first obtained from the electricity market trading platform. The actual and predicted values ​​for directly dispatched loads, tie-line receiving loads, total renewable energy load, bidding space, total electricity consumption, and other load loads are obtained from the power grid dispatch system. The system reads the timestamps of various data types and cleans and aligns the data from different data sources with a uniform hourly granularity, ensuring that each timestamp corresponds to a complete set of power grid operating status data and target electricity price data.

[0119] After completing the construction of basic time-series data, the system reads the date attribute corresponding to each timestamp, extracts the weekday attribute, and identifies statutory rest days and weekends, and determines the ordinal number of the twenty-four solar terms based on the corresponding date. The ordinal numbers of the solar terms are converted into sine and cosine features, respectively, so that the position of the solar term in the annual cycle can be written into the feature matrix in the form of continuous values. At the same time, the system reads the actual value of direct-controlled load and the actual value of total renewable energy corresponding to the same timestamp, and subtracts the actual value of total renewable energy from the actual value of direct-controlled load to form the net load feature.

[0120] The system then uses a unified timestamp to map the actual and predicted values ​​of directly controlled load, tie-line load, total renewable energy load, bidding space, total electricity consumption, and total other load load to the weekday attribute, rest day identifier, solar term sine characteristic, solar term cosine characteristic, net load characteristic, and target electricity price column. When performing day-ahead electricity price forecasting, the day-ahead price is used as the target electricity price field; when performing real-time electricity price forecasting, the real-time price is used as the target electricity price field. After completing the field association, a time-continuously arranged electricity price forecast feature matrix is ​​generated, with one timestamp corresponding to one row of data and different columns corresponding to different operating variables and time characteristics. This feature matrix serves as the unified input for subsequent time-segmented mapping processing.

[0121] After obtaining the electricity price forecast feature matrix, the system reads the hourly attribute corresponding to each row, keeping the timestamp and feature field positions unchanged. Data from 1:00 to 8:00 is extracted as the first feature subset, data from 9:00 to 16:00 as the second feature subset, and data from 17:00 to 00:00 the next day as the third feature subset. These three feature subsets are stored separately, and subsequent data processing relationships are established for each subset, without re-mixing the data from the three time intervals.

[0122] For the first feature subset, the system calculates the maximum and minimum values ​​of each input field and the target electricity price field in the historical data of that time interval, forming the first normalized parameter set. The second and third feature subsets are processed using the same data processing method to form the second and third normalized parameter sets, respectively. Then, using the maximum and minimum values ​​corresponding to each time interval, maximum-minimum normalization is performed on the operating variables and target electricity price within that time interval, generating the first, second, and third normalized feature subsets, respectively. These three normalized parameter sets are stored separately and used for inverse normalization of the prediction results after the model prediction is completed. In other words, the normalization parameters are not only data preprocessing parameters but are also continuously invoked during the prediction result recovery process, thus forming a corresponding data link.

[0123] After the three normalized feature subsets are formed, the system constructs sliding window samples within each time interval. Each sliding window consists of a historical input range and a future prediction range, with the total window length being the sum of the historical input time step and the future prediction time step. The system first reads the actual directly controlled load, tie-line power receiving load, total renewable energy load, bidding space, total electricity consumption, total other load load, and corresponding time period features from the historical range step by step according to the timestamp. At the same time, it reads the already formed target electricity price and assembles historical segments according to the original field order of the electricity price prediction feature matrix.

[0124] Once the sliding window enters the current forecast day, the target electricity price field is configured with different data according to the forecast task. When forecasting day-ahead electricity prices, the day-ahead electricity prices that are already available at the forecast time are written into the corresponding historical time positions. When forecasting real-time electricity prices, real-time electricity prices that have already been generated in the historical range are retained, while positions where no real-time price has been formed for the current forecast day are occupied by zero values ​​in the target electricity price field. Here, the zero values ​​are only used to maintain the field position and input structure and are not used as actual electricity prices in supervised training.

[0125] The system then reads the predicted values ​​of direct-load, tie-line load, total renewable energy, bidding space, total electricity consumption, and time period characteristics from the future prediction range within the same sliding window, and writes them in the same field positions as the historical segments. Since the future target electricity price has not yet been determined, the target electricity price field is uniformly written to zero for the future time range. The resulting future segments have the exact same number of variables, variable order, and field positions as the historical segments.

[0126] The historical segment is located at the beginning, and the future segment is located at the end. The system concatenates the two segments sequentially along the time dimension to generate a single historical-future joint time series sample. Each joint time series sample is organized according to the batch dimension, time dimension, and variable dimension. The first normalized feature subset, the second normalized feature subset, and the third normalized feature subset respectively perform the above window construction process to finally obtain the time series samples corresponding to the three time intervals.

[0127] Before time-series samples are input into the iTransformer prediction model, the system first performs variable inversion on the tensor dimensions. The original time-series samples are organized according to batch, time, and variable dimensions. For example, a single time step may contain multiple variables such as direct-controlled load, total renewable energy addition, bidding space, net load, and target electricity price. Variable inversion swaps the time and variable dimensions, transforming the input structure into batch, variable, and time dimensions. After the transformation, continuous values ​​of the same variable throughout the entire sliding window are organized into a sequence of independent variables.

[0128] For example, all values ​​of the directly controlled load from the start to the end of the sliding window form the directly controlled load variable sequence; all values ​​of the total renewable energy load within the same time range form the renewable energy variable sequence; the bidding space, net load, and target electricity price each form an independent variable sequence in the same way. The system maintains the mapping relationship between each variable sequence and the original feature fields, so that after subsequent coding, the specific power grid operation indicators corresponding to the coding results of each variable can be determined.

[0129] Each independent variable sequence is transformed into a unified hidden feature space through linear embedding mapping, and then subjected to random deactivation to form variable embedding features. Subsequently, all variable embedding features within the same time interval are fed into the Transformer encoder. Unlike traditional methods that use time points as attention objects, this embodiment directly uses the complete window sequence of each variable as the attention object, calculating the correlation between different running variables at the variable dimension.

[0130] In variable-dimensional self-attention processing, the direct-load variable representation can establish an attentional association with the total renewable energy variable representation, the total renewable energy variable can establish an attentional association with the net load, and the bidding space can establish an attentional association with the target electricity price. Each variable aggregates the encoded information of other variables according to its attention weight. After layer normalization, self-attention processing, feedforward feature transformation, and GELU activation, the variable encoding features that simultaneously contain their own time variation information and the correlation information with other operating variables are obtained.

[0131] Independent iTransformer prediction models are established for the first, second, and third time intervals. The first prediction model is trained using only time-series samples from 1:00 to 8:00, the second prediction model using only samples from 9:00 to 16:00, and the third prediction model using only samples from 17:00 to 00:00 the next day. Each model receives variable correlation features from its corresponding time interval and undergoes supervised training using the normalized real target electricity price within the prediction range.

[0132] Each model feeds the variable association encoding results into the prediction projection layer, mapping the variable encoding results to predicted representations within the future time range according to the future prediction time step length. Then, a dimensionality transformation is performed to restore the output structure with the prediction time as the primary dimension. Based on the field position of the target electricity price in the original electricity price prediction feature matrix, the predicted value corresponding to the target electricity price is extracted, and the mean absolute error is calculated between the predicted value and the actual normalized electricity price within the corresponding time range. Backpropagation is performed based on this loss value to update the network parameters of the three time interval models respectively. After the three models are trained, their respective model weights are saved, enabling the appropriate model to be called based on the time interval of the input sample during subsequent predictions.

[0133] When performing actual electricity price forecasting, the system first identifies the time interval to which the sample to be predicted belongs. If the sample corresponds to 1:00 to 8:00, the first forecasting model is called; if it corresponds to 9:00 to 16:00, the second forecasting model is called; if it corresponds to 17:00 to 0:00 the next day, the third forecasting model is called. The three models output the first normalized electricity price forecast sequence, the second normalized electricity price forecast sequence, and the third normalized electricity price forecast sequence, respectively.

[0134] Subsequently, the system reads the correspondence between the three normalized prediction sequences and the three normalized parameter sets. The first prediction sequence is inversely normalized using the maximum and minimum values ​​corresponding to the target electricity price field in the first time interval; the second prediction sequence is restored using the parameters of the second time interval; and the third prediction sequence is restored using the parameters of the third time interval. This yields three time-of-use electricity price prediction sequences with a true price scale.

[0135] The three time-of-use electricity price forecast sequences retain the correspondence between the forecast time steps and the original timestamps. The system writes the forecast results from 1:00 to 8:00 into the corresponding hour positions, the forecast results from 9:00 to 16:00 into the subsequent time positions, and the forecast results from 17:00 to 0:00 the next day into the remaining time positions. Then, it reads the forecast values ​​of each time point in sequence from front to back according to the timestamp, and finally forms the electricity price forecast results covering the complete operating cycle.

[0136] To verify the effectiveness of this embodiment, backtesting was conducted using six consecutive months of hourly electricity market operation data. The data from the first four months was used to train the three time-segmented models, the data from the following month was used to check the training process, and the data from the last month served as independent test data, totaling 720 hours of test data. To ensure consistent comparison conditions, the comparison models used the exact same data training interval, testing interval, and basic operating variables; only the model organization and time-segmentation processing methods were changed. The table below shows exemplary backtesting results used to illustrate the technical effectiveness of the implementation method.

[0137] Table 1 Backtesting results of the present invention and different electricity price forecasting schemes

[0138] Long Short-Term Memory Network 720 46.8 18.4% 36.5 47.1 56.8 Unified Transformer all day 720 42.7 16.9% 33.2 43.6 51.3 Unified iTransformer all day 720 37.9 15.1% 29.4 38.8 45.5 This invention is a time-segmented iTransformer system. 720 27.6 10.9% 21.5 28.6 32.7

[0139] As shown in Table 1, under the same test sample conditions, the average absolute error of this invention is 27.6 yuan / MWh, which is about 27.2% lower than the 37.9 yuan / MWh of the unified iTransformer model throughout the day, and about 35.4% lower than the 42.7 yuan / MWh of the unified iTransformer model throughout the day. Specifically, the period from 5 PM to midnight the next day is a time interval with significant changes in net load and strong price fluctuations. The average absolute error of the unified iTransformer model throughout the day is 45.5 yuan / MWh, while this invention, using an independent time interval model, reduces it to 32.7 yuan / MWh.

[0140] The above results correspond to the specific technical features in this embodiment. Time-segmented mapping establishes normalized scales and prediction parameters for data from different time intervals, reducing the common interference of data distribution from different time periods on the same model; historical-future joint time-series samples ensure that historical real-time operational information and future predictable covariates maintain the same field structure for continuous input; variable inversion enables each grid operation variable to form an independent representation of its time change within a complete window, and directly establishes the correlation between load, renewable energy output, net load, bidding space, and target electricity price at the variable dimension; the three independent prediction models further learn the variable-electricity price correspondence within different time intervals. Thus, this embodiment not only provides the results of prediction error changes, but also fully demonstrates the technical implementation process from the input of raw grid operation data into the system to the output of a complete electricity price prediction sequence.

[0141] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A method for predicting electricity market prices based on time-of-use modeling and iTransformer, characterized in that, include: Acquire and align power grid operation data and electricity price data, construct load, new energy, bidding space and seasonal characteristics, and generate an electricity price prediction feature matrix; The electricity price forecast feature matrix is ​​divided into three feature subsets: 1:00 to 8:00, 9:00 to 16:00, and 17:00 to 0:00 the next day. Normalized parameter sets are established for each subset, and normalized feature subsets are generated. Sliding window segmentation is performed on each normalized feature subset. The historical measured covariates and the target electricity price constitute the historical segment, and the future known covariates and the target electricity price occupy the position column to constitute the future segment. When predicting the day-ahead, the known day-ahead electricity price is written into the historical segment, and when predicting the real-time, zero value is written into the unknown position. The segments are then spliced ​​along the time dimension to form time-series samples of different time periods. By exchanging the time dimension and variable dimension of time series samples in different time periods, the window sequences of each variable form independent variable representations, and self-attention encoding is performed on the variable dimension to generate time-series variable correlation features; The correlation features of the three time-period variables are input into the corresponding independent iTransformer prediction models to generate three normalized electricity price prediction sequences. The normalization parameter set corresponding to each normalized electricity price prediction sequence is called to perform inverse normalization, and then concatenated in timestamp order to generate the electricity price prediction result for the complete operating cycle.

2. A power market price forecasting system based on time-of-use modeling and iTransformer, characterized in that, Includes the following modules: The feature construction module acquires and aligns power grid operation data and electricity price data, constructs load, new energy, bidding space and seasonal cycle features, and generates an electricity price prediction feature matrix. The time-segmented mapping module divides the electricity price prediction feature matrix into three feature subsets: 1:00 to 8:00, 9:00 to 16:00, and 17:00 to 0:00 the next day. Normalized parameter sets are established for each subset, and normalized feature subsets are generated. The sample reconstruction module performs sliding window segmentation on each normalized feature subset, constructs a historical segment by combining historical measured covariates and target electricity prices, and constructs a future segment by combining known future covariates and target electricity prices. During day-ahead forecasting, known day-ahead electricity prices are written into the historical segment, and zero values ​​are written into unknown positions during real-time forecasting. The samples are then spliced ​​along the time dimension to form time-series samples divided into time periods. The variable inversion encoding module swaps the time dimension and variable dimension of time series samples in different time periods, so that the window sequence of each variable forms an independent variable representation, and performs self-attention encoding in the variable dimension to generate time-series variable correlation features; The time-of-use forecasting module inputs the correlation features of the three time-of-use variables into the corresponding independent iTransformer forecasting models to generate three normalized electricity price forecasting sequences. The results fusion module calls the normalization parameter set corresponding to each normalized electricity price prediction sequence to perform inverse normalization, and splices them in the order of timestamps to generate the electricity price prediction results for the complete operating cycle.

3. The electricity market price forecasting system based on time-of-use modeling and iTransformer as described in claim 2, characterized in that, The feature construction module includes: The system acquires the actual and predicted values ​​of direct load, tie-line load, total renewable energy load, bidding space, total electricity consumption, and total other load load from the power market trading platform and power grid dispatch system, as well as the day-ahead electricity price and real-time electricity price. The system then performs time granularity matching, abnormal record removal, and time alignment on the acquired data using a unified timestamp to form basic time series data. Based on the date attributes corresponding to each timestamp in the basic time series data, the weekday sequence number and the identifiers of statutory holidays and weekends are extracted to determine the ordinal number of the twenty-four solar terms for the corresponding date. and in accordance with: ; Generate the sine and cosine characteristics of the solar terms; Based on the actual values ​​of direct-dispatch load and total actual value of renewable energy corresponding to the same timestamp in the basic time-series data, according to Generate net load characteristics, among which, Indicates net load characteristics, This represents the actual value of the directly controlled load. This represents the total actual value of new energy sources. Based on the electricity price forecasting task, select the corresponding electricity price data from the day-ahead electricity price and the real-time electricity price as the target electricity price column, and match the target electricity price column with the basic time series data, week number, rest day identifier, solar term sine characteristic, solar term cosine characteristic and net load characteristic according to the timestamp; The actual values, predicted values, time characteristics, net load characteristics, and target electricity price columns corresponding to the completed timestamps are arranged column-wise according to the feature dimensions, and the data in each row is organized in the order of the timestamps to generate an electricity price prediction feature matrix.

4. The electricity market price forecasting system based on time-sharing modeling and iTransformer as described in claim 2, characterized in that, The time-segmented mapping module includes: Receive the electricity price forecast feature matrix, read the hour attribute corresponding to each row of data, and while keeping the timestamp and feature field correspondence unchanged, divide the data corresponding to 1:00 to 8:00 into the first feature subset, the data corresponding to 9:00 to 16:00 into the second feature subset, and the data corresponding to 17:00 to 0:00 the next day into the third feature subset. The historical input features and target electricity prices in the first feature subset, the second feature subset, and the third feature subset are statistically analyzed independently. The maximum and minimum values ​​of each feature in the corresponding time interval are determined one by one. The maximum and minimum values ​​of each feature in the same time interval are associated according to the feature fields to form a normalized parameter set that corresponds one-to-one with the three time intervals. Call the normalization parameter set corresponding to each time interval and normalize each feature in the corresponding feature subset; After normalization, the features are rearranged according to their original timestamps and feature fields to form the first normalized feature subset, the second normalized feature subset, and the third normalized feature subset, respectively, and the mapping relationship between each normalized feature subset and the corresponding normalization parameter set is retained.

5. The electricity market price forecasting system based on time-sharing modeling and iTransformer according to claim 2, characterized in that, The sample reconstruction module includes: Receive the first normalized feature subset, the second normalized feature subset, and the third normalized feature subset. Arrange the data according to the timestamp order in each normalized feature subset. Read the column position of each feature field in the normalized feature subset. Determine the time range covered by a single sliding window by the sum of the historical input time step and the future prediction time step. For each sliding window, the data within the window is divided into a historical time range and a future prediction time range based on the boundary corresponding to the historical input time step. The actual observed direct load, tie line load, total renewable energy, bidding space, total electricity consumption, total other load, and time cycle characteristics are extracted step by step from the historical time range. The target electricity price corresponding to each time step is extracted simultaneously, and the historical segments are formed according to the arrangement order of the feature fields in the electricity price prediction feature matrix. For time steps in the historical segment that belong to the current forecast date but for which the actual target electricity price has not yet been formed, the target electricity price field is reconstructed. When the forecast task is day-ahead electricity price forecast, the day-ahead electricity price already obtained for the current forecast date is written into the corresponding target electricity price field. When the forecast task is real-time electricity price forecast, the historical real-time electricity price that has been formed is retained, and the target electricity price field corresponding to the time step in the current forecast date for which the real-time electricity price has not yet been formed is written to zero. Read the forecast covariates that can be obtained at the forecast time step by step from the future forecast time range of the same sliding window, write the forecast values ​​of direct load, tie line load, total new energy, bidding space, total electricity consumption, other load, and corresponding time period characteristics into the same feature field position as the historical segment, and write the target electricity price field of each time step in the future forecast time range to zero value, forming a future segment with the same number of variables, the same field order, and the same field position relationship as the historical segment; Historical segments are placed before future segments according to their chronological order, and historical and future segments are continuously spliced ​​together along the time dimension to form a single historical-future joint time series sample. The column position correspondence between historical measured covariates, target electricity prices, future predicted covariates, and target electricity price placeholder fields in the joint time series sample is maintained, and the joint time series sample is organized according to the batch dimension, time dimension, and variable dimension. The sliding window truncation, historical segment construction, target electricity price field reconstruction, future segment construction, and time dimension splicing are repeatedly performed on the first normalized feature subset, the second normalized feature subset, and the third normalized feature subset to form time-series samples that correspond one-to-one with the three time intervals of 1:00 to 8:00, 9:00 to 16:00, and 17:00 to 0:00 the next day. The correspondence between each time-series sample and its source normalized feature subset is retained.

6. The electricity market price forecasting system based on time-of-use modeling and iTransformer according to claim 2, characterized in that, The variable inversion encoding module includes: Receive time series samples in different time periods, read the input tensor according to the batch dimension, time dimension and variable dimension in each time series sample, and convert the input tensor from the arrangement of batch dimension, time dimension and variable dimension to the arrangement of batch dimension, variable dimension and time dimension, so that the continuous time series corresponding to the same variable within the complete sliding window form an independent variable sequence, and maintain the correspondence between the variable sequence and the original feature field. Read all time step data from each independent variable sequence, perform linear embedding mapping on each independent variable sequence, transform the time series corresponding to different variables to a unified hidden feature dimension, and perform random deactivation on the hidden features that have completed the linear embedding mapping to generate variable embedding features that correspond one-to-one with each variable. The embedded features of each variable within the same time segment are input into the Transformer encoder. The embedded features are used as the objects of self-attention calculation. Attention associations between each variable and the other variables are calculated in the variable dimension. The embedded features of each variable are weighted and aggregated according to the obtained attention associations. During the encoding process, layer normalization, self-attention processing, feedforward feature transformation and GELU activation processing are performed in sequence to obtain variable encoding features containing information about the associations between variables. Based on the correspondence of the feature fields of each variable in the time series samples before variable inversion, the variable coding features are reorganized to form time-series variable association features corresponding to the three time intervals of 1:00 to 8:00, 9:00 to 16:00, and 17:00 to 0:00 the next day, respectively. The time-series variable association features are then passed to the time-series prediction module.

7. The electricity market price forecasting system based on time-of-use modeling and iTransformer as described in claim 2, characterized in that, The time-segmented prediction module: Based on three time intervals—1:00 to 8:00, 9:00 to 16:00, and 17:00 to 0:00 the next day—iTransformer prediction models with independent parameters are established. The time-series samples and time-series variable correlation features corresponding to each time interval are used as the training input of the corresponding model, and the normalized target electricity price corresponding to the prediction time range in each time-series sample is used as the supervision data. The variable association features of each time period are input into the prediction projection layer of the corresponding iTransformer prediction model. According to the prediction time step set by the time series samples of each time period, the variable association features are linearly projected to convert each variable association feature into a prediction representation covering each prediction time step. Then, the prediction representation is converted from the arrangement of variable dimension and prediction time dimension to the arrangement of prediction time dimension and variable dimension. Based on the position of the target electricity price in the feature field of the electricity price prediction feature matrix, the predicted target electricity price value for each prediction time step is extracted from the transformed prediction representation, and the average absolute error loss is calculated with the normalized target electricity price corresponding to the same time interval. ; in, This indicates the number of target electricity price samples participating in the current iteration. Indicates the first A normalized target electricity price, This represents the corresponding target electricity price forecast; Backpropagation is performed using an adaptive moment estimator based on the mean absolute error loss, updating the network parameters of the three iTransformer prediction models respectively, and saving the corresponding model weights after completing the iteration of the training samples in each time interval. In the electricity price forecasting stage, the corresponding model weights are loaded according to the time interval to which the time series sample to be predicted belongs. The time-segment variable association features generated by the variable inversion encoding module are input into the matching iTransformer prediction model. Prediction projection, dimension transformation and target electricity price field extraction are performed in sequence to generate the first normalized electricity price prediction sequence, the second normalized electricity price prediction sequence and the third normalized electricity price prediction sequence, respectively.

8. The electricity market price forecasting system based on time-of-use modeling and iTransformer as described in claim 2, characterized in that, The result fusion module includes: Receive the electricity price forecast sequence for each time period, and read the start day intra-day step sequence, end day intra-day step sequence, and forecast step number for each time period in the target business day. Establish the correspondence between the electricity price forecast sequence for each time period and the intra-day position of the target business day according to the start day intra-day step sequence, so that the first forecast value in the electricity price forecast sequence for each time period corresponds to the start day intra-day step sequence of the corresponding time period, and the subsequent forecast values ​​correspond to the adjacent day intra-day step sequence in turn, until the corresponding end day intra-day step sequence is reached. A complete prediction position sequence is established based on the intraday step sequence corresponding to the target business day in the unified business day sequence. For each time period, starting from the intraday step sequence of the beginning of the time period, the predicted electricity price value is read item by item according to the order of the predicted values ​​inside the time period's electricity price prediction sequence. The read electricity price predicted values ​​are written sequentially into the positions with the same intraday step sequence in the complete prediction position sequence, so that the prediction results of each time period are restored to the original time position in the target business day. According to the time sequence of each forecast period in the target business day, the position of the electricity price forecast value of each period is written in sequence, so that the step sequence of the end day of the previous forecast period directly inherits the step sequence of the start day of the next forecast period, and the order of the forecast values ​​within each forecast period remains unchanged. In this way, the independently generated electricity price forecast sequence of each period is converted into a continuous forecast result on the same target business day time axis. After the positions for all forecast periods are written, the electricity price forecast values ​​in the complete forecast position sequence are read from front to back according to the intraday step sequence of the target business day. Based on the business day identifier and intraday step sequence, the target day time position corresponding to each electricity price forecast value is restored. The time position and the electricity price forecast value are associated item by item to form a complete electricity spot price forecast sequence covering all forecast time points of the target business day and output it.