Method, device, medium and product for power spot market price and load joint prediction
Patent Information
- Application Number
- CN202610558171.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-24
- Publication Date
- 2026-08-28
AI Technical Summary
[0005]本申请的一个目的是提供一种电力现货市场电价与负荷联合预测方法、设备、介质及产品,至少用以解决市场内部运行规律与外部扰动因素之间的耦合影响表达能力有限,导致电价与负荷联合预测稳定性和准确性受限的技术问题
[0012]By extracting multi-scale time features from historical operational data sequences and quantifying dynamic disturbance features of influencing factor sequences based on event triggering conditions, subsequent analysis can simultaneously capture both the market's own regular fluctuations and the impact of external sudden factors, thus solving the technical problem that traditional methods struggle to comprehensively characterize complex coupling relationships. Furthermore, by constructing a mutual information matrix between multi-scale time features and dynamic disturbance features and adaptively generating cross-modal correlation weights based on this matrix, dynamic quantification of the nonlinear correlation strength between the two types of data can be achieved, avoiding fusion bias caused by fixed weights or prior assumptions, and allowing weight allocation to be adjusted in real time according to changes in market conditions. Moreover, by weighting and fusing the original aligned data matrix according to the generated cross-modal correlation weights, the fusion result enhances the contribution of key features while preserving the complete information of the original data, thereby improving the quality and interpretability of the correlation feature representation. Finally, by inputting the correlation feature representation rich in dynamic correlation information into the time-series mapping model for joint prediction of electricity prices and loads, the targeted enhancement of the input features effectively reduces prediction errors and improves the model's robustness and accuracy in complex scenarios.
Smart Images

Figure CN122659909A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power system automation technology, and in particular to a method, equipment, medium and product for joint forecasting of electricity spot market prices and loads. Background Technology
[0002] Electricity price and load forecasting in the electricity spot market are crucial technical foundations for market operators' trading decisions, grid dispatching, and risk management. As core indicators reflecting market supply and demand and system operating status, electricity prices and loads exhibit significant time-dependent and structural characteristics. Achieving joint forecasting of electricity prices and loads helps improve market efficiency, optimize resource allocation, and ensure the safe and stable operation of the power system. Therefore, improving the accuracy and stability of electricity price and load forecasting has become an important research direction in the field of electricity market operation.
[0003] In existing technologies, electricity price forecasting and load forecasting are typically modeled separately or jointly within the same model framework. To improve forecasting performance, related methods generally introduce historical electricity price data, historical load data, and external influencing variables such as meteorological information and holiday factors as input features, and establish a mapping relationship between input variables and forecasting targets through machine learning or deep learning models.
[0004] However, the inventors have discovered at least the following technical problems in the relevant technologies: the operation of the electricity spot market has significant multi-dimensional characteristics; data from different sources differ in terms of time granularity, frequency of change, and mode of influence; and the impact of external environmental factors on market operation has phased and sudden characteristics. In existing methods, the models have limited ability to express the coupled influence between the internal operating rules of the market and external disturbance factors, affecting the stability and accuracy of joint forecasting of electricity prices and load. Summary of the Invention
[0005] One objective of this application is to provide a method, device, medium, and product for joint forecasting of electricity prices and loads in the electricity spot market, at least to address the technical problem that the limited ability to express the coupling influence between internal market operating rules and external disturbance factors leads to limited stability and accuracy of joint forecasting of electricity prices and loads.
[0006] To achieve the above objectives, some embodiments of this application provide the following aspects:
[0007] In a first aspect, some embodiments of this application provide a method for joint forecasting of electricity spot market prices and loads. The method includes: performing time synchronization and alignment based on multi-source heterogeneous time-series data to generate an aligned data matrix with a consistent time index; the multi-source heterogeneous time-series data includes at least historical operating data sequences and external influencing factor sequences; extracting multi-scale time features from the historical operating data sequences, and filtering and quantifying dynamic disturbance features from the external influencing factor sequences based on preset event triggering conditions; the multi-scale time features include at least the time change gradient calculated based on a sliding time window, the trend slope, and the period obtained based on frequency domain transformation. The system comprises the following components: dynamic disturbance features, including the disturbance amplitude and duration calculated within the event trigger time interval; a mutual information matrix is constructed between the multi-scale time features and the dynamic disturbance features, and cross-modal correlation weights are adaptively generated between historical operating data sequences and external influencing factor sequences based on the mutual information matrix; the mutual information matrix is a time-varying mutual information matrix calculated based on a sliding time window; the aligned data matrix is weighted and fused according to the cross-modal correlation weights to obtain a correlation feature representation; the correlation feature representation is input into a time-series mapping model to output the joint forecast results of electricity price and load in the electricity spot market.
[0008] Secondly, some embodiments of this application also provide an electronic device, the electronic device comprising: one or more processors; and a memory storing computer program instructions, which, when executed, cause the processor to perform the steps of the method described above.
[0009] Thirdly, some embodiments of this application also provide a computer-readable medium having computer program instructions stored thereon, which can be executed by a processor to implement the method described above.
[0010] Fourthly, some embodiments of this application also provide a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the method described above.
[0011] Compared with related technologies, the solution provided in this application achieves accurate joint forecasting of electricity spot market prices and loads by constructing a complete technical chain from multi-source data alignment to dynamic weighted fusion and then to time-series forecasting, which has the following beneficial effects:
[0012] By extracting multi-scale time features from historical operational data sequences and quantifying dynamic disturbance features of influencing factor sequences based on event triggering conditions, subsequent analysis can simultaneously capture both the market's own regular fluctuations and the impact of external sudden factors, thus solving the technical problem that traditional methods struggle to comprehensively characterize complex coupling relationships. Furthermore, by constructing a mutual information matrix between multi-scale time features and dynamic disturbance features and adaptively generating cross-modal correlation weights based on this matrix, dynamic quantification of the nonlinear correlation strength between the two types of data can be achieved, avoiding fusion bias caused by fixed weights or prior assumptions, and allowing weight allocation to be adjusted in real time according to changes in market conditions. Moreover, by weighting and fusing the original aligned data matrix according to the generated cross-modal correlation weights, the fusion result enhances the contribution of key features while preserving the complete information of the original data, thereby improving the quality and interpretability of the correlation feature representation. Finally, by inputting the correlation feature representation rich in dynamic correlation information into the time-series mapping model for joint prediction of electricity prices and loads, the targeted enhancement of the input features effectively reduces prediction errors and improves the model's robustness and accuracy in complex scenarios. Attached Figure Description
[0013] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.
[0014] Figure 1 An exemplary flowchart of a method for jointly forecasting electricity spot market prices and loads, provided for some embodiments;
[0015] Figure 2 An exemplary structural diagram of an electronic device is provided for some embodiments. Detailed Implementation
[0016] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0017] In this embodiment of the disclosure, the collection, storage, use, processing, transmission, provision, and disclosure of user personal information comply with relevant laws and regulations and do not violate public order and good morals.
[0018] The following terms are used in this article:
[0019] Multi-source heterogeneous time-series data refers to a collection of data that comes from different sources, has different data structures, and may have different sampling frequencies, but is arranged in chronological order.
[0020] Time synchronization alignment refers to establishing a unified time benchmark so that data from different sources can be correlated at the same point in time.
[0021] Multi-scale time features refer to a set of features that characterize the changing trends and cyclical structures of historical operational data at different time scales.
[0022] Dynamic disturbance characteristics refer to the features used to characterize the disturbance effect of sudden changes in external influencing factors on electricity prices or loads.
[0023] The mutual information matrix is a quantitative tool used to measure the degree of statistical dependence between two feature sets.
[0024] Cross-modal association weights are weight parameters generated based on mutual information results to characterize the association strength between features from different sources.
[0025] The association feature representation is a unified feature expression form formed by integrating the features of historical operating data and the features of external influencing factors.
[0026] A time series mapping model is a model structure used to model time series data and output prediction results.
[0027] First Embodiment
[0028] The first embodiment relates to a method for jointly forecasting electricity spot market prices and load. For example... Figure 1 As shown, the method may include the following steps:
[0029] Step S101: Perform time synchronization and alignment based on multi-source heterogeneous time series data to generate an aligned data matrix with a consistent time index; the multi-source heterogeneous time series data includes at least historical running data sequences and external influencing factor sequences;
[0030] Step S102: Extract multi-scale time features from the historical operation data sequence, and filter and quantify dynamic disturbance features from the external influencing factor sequence based on preset event triggering conditions; the multi-scale time features include at least the time change gradient and trend slope calculated based on a sliding time window, and the periodic component features obtained based on frequency domain transformation; the dynamic disturbance features include the disturbance amplitude and disturbance duration calculated within the event triggering time interval.
[0031] Step S103: Construct the mutual information matrix between the multi-scale time features and the dynamic interference features, and adaptively generate cross-modal correlation weights between the historical running data sequence and the external influencing factor sequence based on the mutual information matrix; the mutual information matrix is a time-varying mutual information matrix calculated based on a sliding time window.
[0032] Step S104: The aligned data matrix is weighted and fused according to the cross-modal association weights to obtain the association feature representation;
[0033] Step S105: Input the associated feature representation into the time series mapping model and output the joint forecast results of electricity price and load in the electricity spot market.
[0034] The following sections will provide a detailed explanation of each of the above steps.
[0035] Specifically, regarding step S101, the historical operating data sequence refers to the continuous time data sequence formed during the historical operation of the power system, such as historical electricity price data sequences and historical load data sequences. The external influencing factor sequence refers to the time series formed by external variables that affect the electricity spot market price or load, such as meteorological parameter sequences, holiday marking sequences, and fuel price sequences.
[0036] It is understandable that, due to the diverse sampling frequencies and recording start times of multi-source data in the electricity spot market, direct joint analysis is not feasible. Therefore, this step unifies all data sequences to the same time granularity benchmark through interpolation or resampling methods, establishing a continuous and uniform time index. The processed data sequences are then matched and aligned time-stamp by time according to this time index, generating a two-dimensional aligned data matrix. The rows of the aligned data matrix correspond to consecutive timestamps, and the columns correspond to different data source characteristics. Each element in the aligned data matrix represents a value from a specific data source at a specific timestamp.
[0037] For step S102, for example, the multi-scale time features may include short-term trends and periodic fluctuation features. Short-term trends reflect local growth or decline trends in the data; periodic fluctuation features reflect the periodic patterns of the data in the frequency domain. The dynamic interference features are used to reflect the impact of sudden events.
[0038] Based on the aligned data matrix, targeted feature extraction can be performed on historical operational data sequences and external influencing factor sequences respectively. For historical operational data sequences, multi-scale analysis methods can be used to uncover the inherent patterns in the data, forming multi-scale time features. For external influencing factor sequences, external sudden factors can be screened and quantified based on preset event triggering conditions to construct dynamic interference feature vectors, thereby transforming discrete event markers into quantifiable numerical features.
[0039] Optionally, in some embodiments, multi-scale time features can be obtained through sliding statistical operations with different time windows, including short-period features based on short time windows, medium-period features based on medium time windows, and long-period features based on long time windows. For example, the mean, standard deviation, or rate of change can be calculated based on a 5-minute or 15-minute sliding window to form short-period features; the moving average or trend slope can be calculated based on a 1-hour or 4-hour sliding window to form medium-period features; and periodic statistical features can be calculated based on a 24-hour or 7-day time window to form long-period features.
[0040] In some embodiments, the multi-scale time features include time-varying gradients, trend slopes, and periodic components extracted based on frequency domain transformations calculated using a sliding window; the dynamic disturbance features include disturbance amplitudes and durations determined based on event triggering conditions; and the time-varying mutual information between the multi-scale time features and the dynamic disturbance features is calculated using a sliding time window to generate cross-modal association weights.
[0041] For step S103, for example, mutual information in information theory can be used as a measurement tool to calculate the conditional mutual information value between each component of the multi-scale time feature and each component of the dynamic disturbance feature within a continuously sliding time window, forming a time-varying mutual information matrix.
[0042] Furthermore, the time-varying mutual information matrix can be normalized, converting the values in the matrix into weight coefficients between 0 and 1, thereby adaptively generating cross-modal correlation weights between the historical operating data sequence and the external influencing factor sequence. Thus, when the mutual information value between a certain external disturbance feature and the historical operating pattern feature is high, the corresponding weight coefficient will also increase accordingly, indicating that the external factor has a significant impact on the system operation in the current period.
[0043] For step S104, for example, in this step, each feature column in the aligned data matrix can be weighted element-wise according to the cross-modal association weights. For example, for the electricity price feature column, the data in the electricity price feature column is multiplied by a corresponding coefficient according to the association weight between external interference and the electricity price feature at the current time; for the load feature column, a similar process is performed according to the association weight between load and external interference. After feature-wise weighting, the weighted features can be concatenated or linearly combined according to the time dimension to form a complete fused feature vector sequence. The fused feature vector sequence serves as the association feature representation, which retains all the information of the original data and enhances the feature components that are highly relevant to the current prediction task through dynamic weights, while suppressing irrelevant or interfering information.
[0044] For step S105, for example, in this step, the associated feature representation can be used as input and fed into a pre-built time-series mapping model for joint prediction of electricity price and load. The time-series mapping model can adopt a recurrent neural network structure or a gated recurrent unit structure that can capture long-range dependencies in time series. Through parallel computation of multi-task output layers, it can simultaneously generate a sequence of predicted electricity prices and a sequence of predicted loads for future periods, thereby outputting the joint prediction result of electricity spot market prices and loads.
[0045] Taking a real-world electricity spot market as an example, we obtain multi-source data from the past 30 days, including electricity price data A sampled every 5 minutes, load data B sampled every 15 minutes, wind speed data C updated hourly from weather stations, and event logs D recording grid faults. Because the sampling intervals for these data types are inconsistent, we use linear interpolation to convert wind speed data C into a value every 15 minutes, and resample (average) to unify electricity price data A to an average value every 15 minutes. This generates an aligned data matrix E with row indices representing consecutive 15-minute timestamps and column indices representing electricity price, load, wind speed, and fault markers.
[0046] In this example, a sliding window with a length of 6 time points (i.e., 90 minutes) is set for historical operating data. The local change slope is extracted from the electricity price data A to form a local trend feature F. At the same time, a fast Fourier transform is performed on the load data B of the past 7 days to extract the fluctuation component with a period of 24 hours, forming a periodic feature G. F and G are combined into a multi-scale time feature H. For external influencing factors, a typhoon event is triggered when the wind speed data C exceeds 25 meters per second, and a power grid accident is triggered when the code "F01" appears in the fault log D. At the trigger time and the two subsequent time points, the difference between the peak wind speed and the baseline value is calculated as the disturbance amplitude I, and the duration J of the trigger is recorded to form a dynamic disturbance feature K.
[0047] Within a sliding 24-hour window, the mutual information value between the trend component in feature H and the disturbance amplitude I in feature K is calculated, as well as the mutual information value between the periodic component in feature H and feature K. These values are arranged and normalized to obtain a set of time-varying cross-modal correlation weights L. For example, at 3 PM on the 10th day, when the typhoon passes, the mutual information value between the disturbance amplitude I and the electricity price trend feature F is very high, and the weight of the external factor in the corresponding weight L increases significantly. The original aligned data matrix E is weighted according to the weights L: during the typhoon's impact period, the electricity price column in matrix E is multiplied by a large coefficient (e.g., 1.5), the load column is multiplied by a medium coefficient (e.g., 1.2), while the coefficient remains 1.0 or lower for other periods. After element-wise weighting, the processed electricity price, load, wind speed, and other data are concatenated in chronological order to form the correlation feature representation M.
[0048] Furthermore, the associated feature representation M can be input into a time-series mapping model based on a gated recurrent unit and an attention mechanism in chronological order. The model learns the mapping relationship between the data features of historical typhoon periods and electricity prices and load changes, and outputs the electricity price forecast sequence and load forecast sequence every 15 minutes for the next 4 hours, thus achieving accurate joint forecasting under the influence of extreme weather events.
[0049] It is not difficult to see that, compared with related technologies, the solution provided in this application, by constructing a complete technical link from multi-source data alignment to dynamic weighted fusion and then to time series prediction, achieves accurate joint prediction of electricity spot market prices and load, and has the following beneficial effects:
[0050] By extracting multi-scale time features from historical operational data sequences and quantifying dynamic disturbance features of influencing factor sequences based on event triggering conditions, subsequent analysis can simultaneously capture both the market's own regular fluctuations and the impact of external sudden factors, thus solving the technical problem that traditional methods struggle to comprehensively characterize complex coupling relationships. Furthermore, by constructing a mutual information matrix between multi-scale time features and dynamic disturbance features and adaptively generating cross-modal correlation weights based on this matrix, dynamic quantification of the nonlinear correlation strength between the two types of data can be achieved, avoiding fusion bias caused by fixed weights or prior assumptions, and allowing weight allocation to be adjusted in real time according to changes in market conditions. Moreover, by weighting and fusing the original aligned data matrix according to the generated cross-modal correlation weights, the fusion result enhances the contribution of key features while preserving the complete information of the original data, thereby improving the quality and interpretability of the correlation feature representation. Finally, by inputting the correlation feature representation rich in dynamic correlation information into the time-series mapping model for joint prediction of electricity prices and loads, the targeted enhancement of the input features effectively reduces prediction errors and improves the model's robustness and accuracy in complex scenarios.
[0051] Second Embodiment
[0052] The second embodiment relates to a method for jointly forecasting electricity spot market prices and loads. The second embodiment is an improvement upon the first embodiment, specifically in that it provides a concrete implementation method for generating an aligned data matrix with a consistent time index by performing time synchronization and alignment based on multi-source heterogeneous time-series data.
[0053] Specifically, step S101, which involves performing time synchronization and alignment based on multi-source heterogeneous time-series data to generate an aligned data matrix with a consistent time index, may include:
[0054] Step S1011: The historical running data sequence and the external influencing factor sequence are resampled according to a unified time granularity to obtain a resampled sequence;
[0055] Step S1012: Based on the unified time granularity, establish a continuous time index;
[0056] Step S1013: Perform time-stamp matching processing on the resampled sequence according to the continuous time index;
[0057] Step S1014: Based on the matching results, construct the alignment data matrix so that each row in the alignment data matrix corresponds to a set of multi-source data features under the same timestamp.
[0058] For step S1011, for example, resampling refers to unifying data with different sampling frequencies to the same time scale through interpolation (such as linear interpolation, spline interpolation) or downsampling. As mentioned above, historical operational data sequences and external influence factor sequences may have different original sampling frequencies. For example, historical operational data sequences may record nodal electricity prices at 5-minute intervals, while external influence factor sequences may record meteorological observation data at hourly intervals. To achieve time synchronization and alignment of multi-source data, all data sequences can be unified to the same time granularity benchmark. For sequences with original sampling frequencies higher than the target time granularity, resampling methods can be used to reduce their time resolution, for example, converting 5-minute electricity price data into 15-minute data by taking the average or maximum value; for sequences with original sampling frequencies lower than the target time granularity, interpolation methods can be used to increase data points, for example, converting hourly meteorological data into 15-minute data through linear interpolation or spline interpolation. After resampling, the data sequences that originally had inconsistent time granularities are converted into resampled sequences with the same time interval.
[0059] For step S1012, for example, a continuous time index can be established to provide a standard time reference for subsequent data matching, ensuring that all resampled data can be located and arranged according to the continuous time index, avoiding misalignment or missing problems caused by inconsistent time points of the original records.
[0060] In some examples, continuous time indexes are used to represent a sequence of timestamps that increase in steps from start time to end time with a uniform time granularity. For example, if the study period is from 0:00 on February 1, 2026 to 0:00 on March 1, 2026, with a uniform time granularity of 15 minutes, then the continuous time index includes all hourly times within that period (0:00, 0:15, 0:30, ..., 23:45).
[0061] For step S1013, for example, for each data point in the resampled sequence, it can be assigned to the closest timestamp in the continuous time index according to the corresponding time label; if a timestamp does not have a corresponding data point in the resampled sequence, it can be filled according to the values before and after it, such as by using forward filling, backward filling, or interpolation filling methods. Through the timestamp-by-time matching process, it can be ensured that there are data values from various data sources under each timestamp, thereby forming a preliminary aligned multi-source data set.
[0062] For step S1014, for example, the rows of the aligned data matrix are arranged in the order of continuous time indices, with each row representing a specific timestamp; the columns of the matrix correspond to different data source characteristics, such as electricity price characteristics and load characteristics in historical operational data sequences, and temperature characteristics, wind speed characteristics, and event marker characteristics in external influencing factor sequences. Each cell in the matrix stores the specific value of the corresponding feature at the corresponding timestamp after alignment processing. The aligned data matrix constructed in this way has a consistent time index, and each row aggregates multi-source information at the same moment.
[0063] Taking a regional electricity market as an example, the historical operational data sequence collected by this market includes electricity price data A recorded every 5 minutes and load data B recorded every 15 minutes. The external influencing factor sequence includes meteorological and temperature data C recorded every hour and fault event logs D recorded at non-fixed times. First, the electricity price data A, load data B, temperature data C, and fault event logs D can be uniformly resampled according to a 15-minute time granularity: for electricity price data A, the average value within each 15-minute interval is taken as the electricity price at that time point; for load data B, since it is already at a 15-minute interval, it can be directly retained; for temperature data C, a linear interpolation method is used to interpolate the hourly data to every 15 minutes; for fault event logs D, the event is assigned to the most recent 15-minute time point based on its occurrence time, and if there is no event at that time point, it is marked as 0. Then, a continuous time index is established from 0:00 on March 1, 2026 to 0:00 on March 2, 2026, with a time step of 15 minutes, totaling 96 time points. Next, based on this time index, the resampled electricity price sequence, load sequence, temperature sequence, and event marker sequence are matched time-stamp by time to ensure that each time point has a corresponding electricity value, load value, temperature value, and event marker value. Then, an aligned data matrix E can be constructed based on the matching results. The rows of the matrix correspond to 96 consecutive timestamps, and the columns include four features: electricity price, load, temperature, and event marker. Each row stores a set of multi-source data features at the same timestamp, forming a standardized aligned data matrix E.
[0064] It is easy to see that in this embodiment, by resampling the historical operational data sequence and the external influencing factor sequence according to a unified time granularity, electricity price data, load data, meteorological data, etc., which originally had inconsistent sampling frequencies, can be jointly analyzed at the same time resolution, thereby solving the technical problem that multi-source data cannot be directly fused due to differences in time granularity. By establishing a continuous time index based on a unified time granularity and performing time-stamp matching processing on the resampled sequence according to the index, it can be ensured that there are complete feature values from each data source at each time point, avoiding information loss or analysis bias caused by data missing or time misalignment. By constructing an aligned data matrix based on the matching results and making each row correspond to the multi-source data feature set under the same time stamp, a unified and time-aligned data foundation can be provided for subsequent multi-scale feature extraction, dynamic interference quantification, and cross-modal weight calculation, which is conducive to ensuring the data quality and reliability of the entire prediction method.
[0065] Third Embodiment
[0066] The third embodiment relates to a method for jointly forecasting electricity spot market prices and loads. The third embodiment is an improvement on the first embodiment, specifically in that: in this embodiment, a specific implementation method is provided to extract multi-scale time features from the historical operating data sequence (step S102A), and to screen and quantify dynamic disturbance features from the external influencing factor sequence based on preset event triggering conditions (step S102B).
[0067] Optionally, in some embodiments, the step of extracting multi-scale temporal features from the historical operational data sequence, i.e., step S102A, may include:
[0068] Step S102A1: Within a preset sliding time window, calculate the time change gradient and trend slope of the historical running data sequence to form a local change trend feature vector;
[0069] Step S102A2: Perform frequency domain transformation on the historical running data sequence to extract the main frequency component and spectral energy distribution information, and form a periodic fluctuation feature vector;
[0070] Step S102A3: Combine the local change trend feature vector and the periodic fluctuation feature vector to generate the multi-scale time feature.
[0071] Specifically, a fixed-length sliding time window can be set to capture the dynamic changes of historical data sequences in the short term. This sliding time window slides sequentially along the time axis, covering the entire data sequence. At each current moment, historical data points within a specific time period prior to that current moment can be selected to form a subset of the window data. For this subset of data within the window, the time gradient, i.e., the first-order difference between data values at adjacent time points, is calculated to reflect the instantaneous rate of change of the data. Simultaneously, linear regression fitting can be performed on the data within the window, and the slope of the fitted line can be calculated to reflect the overall trend direction and intensity of the data within the window. Combining the calculated gradient sequence and trend slope forms a local trend feature vector describing the short-term operational inertia and abrupt changes in the market.
[0072] Furthermore, it should be understood that historical operational data sequences contain periodic patterns formed by electricity consumption behavior or market transaction rules, such as daily cycles and weekly cycles. In this embodiment, frequency domain transformation processing can be performed on historical data sequences over a longer period to uncover these patterns. For example, a Fast Fourier Transform (FFT) can be used to convert the data from the time domain to the frequency domain. In the frequency domain, the amplitude or power spectral density corresponding to each frequency component is calculated, and one or more frequency components with the largest amplitude are identified as the dominant frequency components. The periods corresponding to these dominant frequency components are the main fluctuation periods of the data. At the same time, the proportion of energy of each frequency component to the total energy can also be calculated to form spectral energy distribution information, which is used to describe the contribution of different periodic components to the overall fluctuation. Combining the frequency value, amplitude, and spectral energy distribution information of the dominant frequency components can form a periodic fluctuation feature vector that reflects the long-term periodicity of the data.
[0073] Furthermore, corresponding to step S102A3, since the local change trend feature vector reflects the dynamic change characteristics of the historical operating data sequence on a short-term time scale, while the periodic fluctuation feature vector reflects the regular fluctuation characteristics of the data on a long-term time scale, both describe the inherent pattern of the data from different time scales. The two types of feature vectors can be fused to obtain a more comprehensive representation of the historical operating data sequence.
[0074] The fusion method can be vector concatenation, which connects two feature vectors in a certain order to form a new feature vector with higher dimensions; or weighted combination, which assigns weights to the two types of features and then adds them together. The feature vector generated after combination contains both short-term change information and long-term periodic information, forming multi-scale time features.
[0075] For example, the load data sequence of a certain electricity spot market is a load value recorded every 15 minutes. Corresponding to step S102A1, the sliding time window length can be set to 6 time points, i.e., tracing back 90 minutes. At each current time t, 6 load data points are selected: t-5, t-4, t-3, t-2, t-1, and t. The differences between adjacent points are calculated, yielding 5 gradient values; simultaneously, a linear regression is performed on these 6 data points, calculating the slope of the regression line. The 5 gradient values and 1 slope value are combined to form a 6-dimensional local trend feature vector F, which describes the instantaneous rate of change and overall trend of the load within the previous 90 minutes. Corresponding to step S102A2, a Fast Fourier Transform is performed on the load data sequence of the past 7 days. In the frequency domain, the frequency component with the highest energy corresponds to a period of 24 hours, and the amplitude of this 24-hour period component is extracted as the dominant frequency amplitude A1. Simultaneously, the energy distribution of all frequency components is calculated to obtain the energy proportions P1, P2, and P3 of the first three main period components (24 hours, 12 hours, and 8 hours). The dominant frequency period value 24, the dominant frequency amplitude A1, and the energy proportions P1, P2, and P3 are combined to form a periodic fluctuation feature vector G. Corresponding to step S102A3, the local change trend feature vector F and the periodic fluctuation feature vector G can be concatenated to generate a multi-scale time feature vector H with dimensions 6+5=11. This vector simultaneously contains the short-term change details and long-term periodic patterns of the load data.
[0076] Optionally, in some embodiments, the step of screening and quantifying dynamic interference features from the external influence factor sequence based on preset event triggering conditions, i.e., step S102B, may include:
[0077] Step S102B1: Detect the instantaneous fluctuation amplitude of the external influencing factor sequence;
[0078] Step S102B2: When the instantaneous fluctuation amplitude exceeds a preset threshold, an event trigger flag is generated;
[0079] Step S102B3: Within the time interval corresponding to the event trigger marker, calculate the disturbance amplitude and the disturbance duration;
[0080] Step S102B4: Construct a dynamic interference feature vector based on the disturbance amplitude and disturbance duration.
[0081] Regarding step S102B1, in some examples, the degree of change of the value at each time point in the external influencing factor sequence relative to its normal fluctuation range can be monitored in real time. The external influencing factor sequence can include continuously monitored values, such as wind speed monitoring data and temperature monitoring data, or discrete event markers, such as power grid fault alarm markers and new energy output mutation markers. For continuously monitored values, the instantaneous fluctuation amplitude can be determined by calculating the difference between the current value and the previous value, or the difference between the current value and the historical average for the same period. For discrete event markers, the instantaneous fluctuation amplitude can be defined as the event marker value itself or the intensity level of the event. By continuously monitoring the instantaneous fluctuation amplitude, abnormal changes in the external factor sequence can be captured in a timely manner, providing basic data support for subsequent event trigger judgment.
[0082] Regarding step S102B2, in some examples, one or more thresholds can be preset based on historical data statistical distribution or electricity market operation experience. When the detected instantaneous fluctuation amplitude exceeds the preset threshold, an event trigger flag can be generated to identify an external interference event that requires special attention at the current moment.
[0083] The preset thresholds can be set according to the characteristics of different external influencing factors. For example, for wind speed monitoring sequences, the typhoon trigger threshold can be set to 25 meters per second; for temperature monitoring sequences, the cold wave trigger threshold can be set to -10 degrees Celsius; and for accident alarm flags, the trigger condition can be set to a flag value equal to 1. In practical applications, event trigger flags can be represented by Boolean values to indicate whether a trigger has occurred, or they can be recorded using event type coding to record the category of the triggering event. This embodiment does not impose specific limitations on this. It can be understood that the purpose of generating event trigger flags is to convert continuous numerical monitoring results into discrete event indications, thereby focusing on analyzing external anomalies that may have a significant impact on the electricity spot market.
[0084] Regarding step S102B3, in some examples, within the time interval corresponding to the event trigger marker, the disturbance amplitude can be defined as the maximum or average deviation between the external influencing factor sequence value and the normal baseline value, such as the difference between the peak wind speed during a typhoon and the average wind speed before the typhoon; the disturbance duration can be defined as the length of time the trigger marker remains valid, i.e., the number of time points experienced from the event's occurrence to its end. By calculating the disturbance amplitude and disturbance duration, the qualitative event marker can be transformed into a quantitative feature description, providing a foundation for subsequently constructing a dynamic disturbance feature vector.
[0085] Regarding step S102B4, in some examples, the disturbance amplitude value and disturbance duration value can be used as core elements to construct a multi-dimensional vector that can comprehensively describe the characteristics of the external disturbance event through vector concatenation or linear combination.
[0086] In some examples, dynamic disturbance feature vectors may include disturbance amplitude and duration values, and may further include information about the time and location of the disturbance, such as the time offset of the trigger time relative to the current prediction time, as well as other derived features such as the rate of change during the disturbance process. For multiple different types of event trigger markers that may exist within the same time interval, corresponding disturbance feature vectors can be constructed separately, and multiple vectors can be combined into a higher-dimensional dynamic disturbance feature representation. The constructed dynamic disturbance feature vectors can serve as input data for the subsequent construction of the mutual information matrix between multi-scale time features and dynamic disturbance features, used to quantify the impact intensity of external sudden factors on the electricity spot market.
[0087] Taking a coastal power market as an example, the external influencing factor sequence includes wind speed monitoring data W recorded every 15 minutes and temperature monitoring data T recorded every 15 minutes, as well as grid fault alarm flags A recorded at non-fixed times. Step S102B1 detects the instantaneous fluctuation amplitude of the wind speed sequence and calculates the difference between the wind speed value at each moment and the average wind speed of the previous period to obtain the fluctuation amplitude. ; Detect the instantaneous fluctuation amplitude of the temperature sequence and calculate the rate of temperature change. For fault alarm flag A, directly read the flag value. Step S102B2 sets the typhoon trigger threshold to 25 meters per second for wind speed. A typhoon event trigger marker is generated when the speed exceeds 25 meters per second. =1; The cold wave trigger threshold is set to -10 degrees Celsius. When the temperature value T is below -10 degrees Celsius and... A negative value generates a cold wave event trigger flag. =1; For fault alarm flag A, set the trigger condition to A=1, and generate a fault event trigger flag when a fault alarm occurs. =1. During a typhoon, at 15:00, the wind speed suddenly increased from 20 meters per second to 48 meters per second. =28 meters per second exceeds the threshold, generating a typhoon event trigger marker. =1. Step S102B3: Within the time interval from 15:00 to 3:00 the following day corresponding to the typhoon event trigger mark, calculate the disturbance amplitude as the difference of 32 m / s between the peak wind speed of 50 m / s and the average wind speed before the typhoon of 18 m / s. The disturbance duration is counted as 12 hours, i.e., 48 15-minute time points. Step S102B4: Based on the disturbance amplitude of 32 and the disturbance duration of 48, construct the dynamic disturbance feature vector of the typhoon event. =[32,48]; Simultaneously, if a fault alarm flag A=1 exists during this time period, then the dynamic interference feature vector of the fault event is constructed. =[1, fault duration], forming a comprehensive dynamic interference feature vector set.
[0088] It should be noted that this embodiment can also be an improvement based on the second embodiment.
[0089] It is not difficult to see that, in this embodiment of the application, by performing targeted feature extraction and quantification on historical operating data sequences and external influencing factor sequences respectively, a comprehensive characterization of the inherent laws and external disturbances of the power market is achieved, which has the following beneficial effects:
[0090] By calculating the time gradient and trend slope of historical operating data sequences within a preset sliding time window, it is possible to capture the short-term rate of change and local trend of market operations, forming a local trend feature vector that reflects the market's inertia and abrupt changes. By performing frequency domain transformation on historical operating data sequences and extracting the dominant frequency component and spectral energy distribution information, it is possible to uncover the daily and weekly regular fluctuation patterns hidden in load or electricity price data, forming a periodic fluctuation feature vector. Combining local trend features with periodic fluctuation features generates multi-scale time features, enabling subsequent analysis to simultaneously consider both short-term dynamics and long-term patterns of the market, thus solving the technical problem that single-scale features cannot fully describe the complex behavior of the market.
[0091] Furthermore, by detecting the instantaneous fluctuation amplitude of the external influencing factor sequence and generating event trigger markers when they exceed a preset threshold, the occurrence of sudden external events such as typhoons, cold waves, and power grid failures can be identified in a timely manner. Within the time interval corresponding to the event trigger marker, the disturbance amplitude and duration are calculated, transforming the qualitative event markers into quantitative disturbance amplitude and duration values, and constructing a dynamic disturbance feature vector. This transforms the originally discrete and unstructured external event information into calculable and fusionable numerical features, providing a foundation for subsequent quantification of the impact intensity of external factors on the power market.
[0092] Fourth embodiment
[0093] The fourth embodiment relates to a method for jointly forecasting electricity spot market prices and load. This fourth embodiment is an improvement upon the first embodiment, specifically in that it provides a concrete implementation for constructing the mutual information matrix between the multi-scale time features and the dynamic disturbance features, aiming to accurately extract the correlation strength of cross-modal features through quantification.
[0094] Specifically, constructing the mutual information matrix between the multi-scale temporal features and the dynamic disturbance features may include the following steps:
[0095] Step S103A1: Within the sliding time window, calculate the conditional mutual information values between the multi-scale time features and the dynamic disturbance features, respectively.
[0096] Step S103A2: Arrange the conditional mutual information values within different time windows to form a time-varying mutual information matrix;
[0097] Step S103A3: Normalize the time-varying mutual information matrix to obtain the cross-modal correlation weight matrix;
[0098] Step S103A4: Determine the weight allocation ratio of each feature in the fusion process based on the cross-modal association weight matrix.
[0099] Regarding step S103A1, in some examples, to quantify the evolution of the nonlinear correlation strength between multi-scale temporal features and dynamic disturbance features over time, an analysis window that slides along the time axis can be set. Within each sliding window, a subset of multi-scale temporal feature data and a subset of dynamic disturbance feature data corresponding to the time range covered by that window can be selected. Conditional mutual information is an information-theoretic measure that measures the degree of interdependence between two variables given a third variable.
[0100] When calculating the conditional mutual information value between multi-scale time features and dynamic disturbance features, historical electricity price or load data can be used as conditional variables to calculate the residual correlation information between multi-scale time features and dynamic disturbance features under known historical operating conditions; alternatively, the mutual information value between the two can be calculated directly. By repeating this calculation process within each sliding window, a series of correlation metrics that change over time can be obtained. These values reflect the dynamic changes in the interdependence between multi-scale time features and dynamic disturbance features in different historical periods.
[0101] Specifically, assuming X represents a component in the multi-scale time feature, E represents a component in the dynamic disturbance feature, and Y represents a baseline distribution of historical electricity prices or loads; then the formula for calculating the conditional mutual information value between the multi-scale time feature component X and the dynamic disturbance feature component E under a given baseline distribution Y can be as follows:
[0102] ;
[0103] in, The probability density function representing the baseline distribution Y; Indicates that in a given Under the given conditions, the joint conditional probability density function of X and E; and Each represents its respective marginal conditional probability density function.
[0104] In this step, by introducing the baseline distribution Y as a condition variable, the influence of the inherent periodic fluctuations of the electricity market on the correlation calculation can be eliminated, making the calculation results more accurately characterize the net impact of dynamic disturbance characteristics on electricity prices or loads.
[0105] In practice, the probability distribution can be estimated using sample frequency statistics or kernel density estimation methods to obtain the probability density function of each feature variable.
[0106] Regarding step S103A2, a conditional mutual information value can be calculated within each sliding time window, and the conditional mutual information value corresponds to the association strength at the center time of the window. When the sliding window covers the entire time series, a sequence of conditional mutual information values corresponding to the time index can be obtained.
[0107] Furthermore, multi-scale time features may contain multiple feature components, such as multiple gradient and slope components in a local trend feature vector, and dominant frequency and energy distribution components in a periodic fluctuation feature vector; dynamic disturbance features may also contain multiple components such as disturbance amplitude and disturbance duration. Therefore, the conditional mutual information value between each component of the multi-scale time feature and each component of the dynamic disturbance feature can be calculated within each time window. All calculated mutual information values between components are arranged according to the time dimension and the feature dimension to form a two-dimensional matrix structure. The rows of the matrix correspond to different center times of the sliding time window, the columns correspond to different combinations of feature components, and each element in the matrix represents the conditional mutual information value between a specific pair of feature components at a specific time. This time-varying matrix is the time-varying mutual information matrix.
[0108] Regarding step S103A3, in some examples, the time-varying mutual information matrix can be normalized to map each element value to a uniform range, such as between 0 and 1. Normalization methods can include max-min normalization, where for each time step or feature component combination, the mutual information value is subtracted from the minimum value and then divided by the difference between the maximum and minimum values; or softmax normalization, where the mutual information values of all feature component combinations at each time step are exponentially transformed and summed to ensure that the sum of all weights at that time step is 1. The matrix obtained after normalization is the cross-modal association weight matrix. Each element in the matrix represents the relative importance between specific feature component pairs at a specific time step, and can be directly used to guide the weight allocation of each feature component during feature fusion.
[0109] Specifically, normalization can be achieved using the Softmax mapping function, as shown in the following formula:
[0110] ;
[0111] in, Represents the first element in the cross-modal correlation weight matrix. The timestamp of the first The association weights of features corresponding to each feature. Represents the first in the time-varying mutual information matrix The timestamp of the first The mutual information value corresponding to each feature This represents the total number of features participating in the fusion.
[0112] It can be seen that the above formula reflects the situation in the first... At the timestamp, the first Cross-modal association weights of each feature The result is calculated using the Softmax mapping function. The numerator is the exponential mapping of the corresponding feature mutual information value; the denominator is the sum of the exponential mappings of all feature mutual information values at the same timestamp.
[0113] Specifically, regarding step S103A4, the cross-modal correlation weight matrix provides fine-grained weight information at the feature component level, namely, the correlation weight between each component of the multi-scale time feature and each component of the dynamic disturbance feature. In the actual feature fusion process, each multi-scale time feature component originates from a certain original feature variable, such as electricity price or load. Therefore, the corresponding weights can be aggregated and mapped to the original feature space through the feature source relationship, thereby determining the weight allocation ratio that should be assigned to each feature column in the original aligned data matrix in the subsequent weighted fusion process.
[0114] Optionally, the mapping method can be corresponding aggregation. For example, the local change trend feature component in the multi-scale time features is calculated from electricity price data. All weight values related to this feature component can be averaged or summed as the final fusion weight of the original electricity price feature. The dynamic disturbance feature component is calculated from wind speed data. All weight values related to this feature component can be aggregated as the final fusion weight of the original wind speed feature. After weight aggregation, the weight allocation ratio that each feature column in the original aligned data matrix should be assigned in the subsequent weighted fusion process can be determined. This ratio reflects the degree of dynamic correlation between each original feature and the prediction task at the current time.
[0115] Taking a certain electricity market as an example, assume that the local trend slope component extracted from the load data... 24-hour periodic amplitude components extracted from load data Dynamic disturbance characteristics include disturbance amplitude components extracted from wind speed data. and the duration component of the disturbance extracted from the temperature data The sliding time window length is set to 24 hours, which is 96 15-minute time points. The conditional mutual information representation of a single feature pair is as follows: In the formula: =1,2; =1,2; For conditional variables (such as historical electricity prices / load data).
[0116] Within the first window from 00:00 to 24:00 on March 1st, calculate respectively and Conditional mutual information value =0.45, conditional mutual information value between F1 and K2 =0.12、 and Conditional mutual information value =0.30、 and Conditional mutual information value =0.08. The calculation was obtained by sliding the window to the period from 00:00 on March 2nd to 24:00 on March 2nd. =0.22、 =0.35、 =0.18、 =0.40.
[0117] Step S103A2 is executed, arranging the calculation results of the two windows in chronological order and feature component pairs to form a 2-row, 4-column time-varying mutual information matrix M. The first row corresponds to [0.45, 0.12, 0.30, 0.08] for the March 1 window, and the second row corresponds to [0.22, 0.35, 0.18, 0.40] for the March 2 window. Step S103A3 performs softmax normalization on matrix M. In the first row, the exponent sum e^0.45 + e^0.12 + e^0.30 + e^0.08 is calculated, resulting in normalized weight values of [0.38, 0.27, 0.22, 0.13] for each element; the normalized weight values of the second row are [0.23, 0.32, 0.21, 0.24], forming the cross-modal correlation weight matrix W.
[0118] In this example, .
[0119] In step S103A4, the original feature weight allocation ratio is determined based on the cross-modal correlation weight matrix. Since... Derived from load data, Derived from load data, Sourced from wind speed data, Derived from temperature data, the first row related to load... and The corresponding weights of 0.38 and 0.22 are added together to obtain a load characteristic weight of 0.60, which is related to wind speed. The corresponding weight of 0.27 yields a wind speed feature weight of 0.27, which is related to temperature. The corresponding weight is 0.13, resulting in a temperature feature weight of 0.13. In the second row, the load feature weight is 0.23 + 0.21 = 0.44, the wind speed feature weight is 0.32, and the temperature feature weight is 0.24. Therefore, at the corresponding time in the March 1st window, the load column in the aligned data matrix is multiplied by a weight of 0.60, the wind speed column by a weight of 0.27, and the temperature column by a weight of 0.13 for fusion; at the corresponding time in the March 2nd window, the load column is multiplied by a weight of 0.44, the wind speed column by a weight of 0.32, and the temperature column by a weight of 0.24 for fusion.
[0120] It should be noted that this embodiment may also be an improvement based on the second embodiment and / or the third embodiment.
[0121] It is not difficult to see that, in the embodiments of this application, by constructing a mutual information matrix between multi-scale time features and dynamic disturbance features and generating cross-modal correlation weights accordingly, dynamic quantification and adaptive weight allocation of the nonlinear correlation strength between historical operating data and external influencing factors are realized, which has the following beneficial effects:
[0122] By calculating the conditional mutual information values between multi-scale time features and dynamic disturbance features separately within a sliding time window, the nonlinear dependence between the two types of features over time can be effectively captured, avoiding the limitation that linear correlation coefficients cannot measure complex couplings. This more realistically reflects the intrinsic relationship between external factors and market operations. By arranging the conditional mutual information values within different time windows to form a time-varying mutual information matrix, the temporal evolution of the correlation strength can be fully presented, solving the technical problem that static correlation analysis cannot adapt to changes in market conditions. Moreover, normalizing the time-varying mutual information matrix to obtain a cross-modal correlation weight matrix and converting the original mutual information values into unified weight coefficients can eliminate dimensional differences and ensure that the weights are comparable and interpretable. Furthermore, determining the weight allocation ratio of each feature in the fusion process based on the cross-modal correlation weight matrix allows the weights to be adjusted in real time according to the market conditions. During periods of significant external disturbances, the contribution of relevant features is automatically enhanced, while during stable operating periods, the dominant position of regular features is maintained, thus providing a scientific and dynamic weight basis for subsequent feature fusion.
[0123] Fifth Embodiment
[0124] The fifth embodiment relates to a method for jointly forecasting electricity spot market prices and load. The fifth embodiment is an improvement upon the first embodiment, specifically in that it provides a method for weighted fusion of the aligned data matrix based on the cross-modal correlation weights to obtain a correlation feature representation.
[0125] Specifically, step S104 may include: weighting and fusing the aligned data matrix according to the cross-modal association weights to obtain the association feature representation.
[0126] Step S1041: According to the cross-modal association weights, perform element-wise weighted operations on each feature in the aligned data matrix to obtain a weighted feature matrix;
[0127] Step S1042: Perform vector concatenation or linear combination operations on the weighted feature matrix according to the time dimension to form a fused feature vector;
[0128] Step S1043: Use the fused feature vector as the representation of the associated features.
[0129] Specifically, for step S1041, a new value can be obtained by multiplying the value in the i-th row and j-th column of the aligned data matrix with the weight coefficient of the corresponding feature j at the corresponding timestamp i. By iterating through all rows and columns of the aligned data matrix and performing the above multiplication operation sequentially, a weighted feature matrix can be generated. Each element in this matrix is the product of the original data and the dynamic weights, and its dimensions are exactly the same as the aligned data matrix. The matrix obtained after element-wise weighting is the weighted feature matrix. This matrix preserves the temporal structure of the original data and enhances the feature components that are strongly correlated with the prediction target at the current time through the weight coefficients, while suppressing the feature components that are weakly correlated.
[0130] Specifically, the mathematical expression for the weighting operation can be as follows:
[0131] ;
[0132] in, Indicates the first The associated feature representation vector generated at each time step; Indicates the first Time of the first The correlation weights of the characteristics of each external influencing factor; Indicates the first element in the aligned data matrix The corresponding time Characteristic values of external influencing factors; Indicates the first Feature vector of historical running data at any given time; This represents the vector concatenation operator; This indicates the number of characteristics of external influencing factors.
[0133] It is understandable that vectors This represents the feature set after weighting and scaling all external influencing factor features; operators This involves concatenating the feature vector of historical operational data with the weighted feature vector of external influencing factors to form a complete correlation feature representation vector. Through this calculation method, cross-modal correlation weights can be used to... The features of external influencing factors are dynamically scaled to adaptively adjust the contribution of external interference features at different time stamps, and then fused with the feature vectors of historical running data to construct a related feature representation for subsequent time-series mapping model input.
[0134] Specifically, in step S1042, the vector concatenation operation refers to, for each timestamp, concatenating one row of data in the weighted feature matrix corresponding to that timestamp—that is, all the weighted feature values at that time—in a fixed feature order to form a one-dimensional vector. The linear combination operation refers to performing a weighted sum or weighted average on the feature values at the same timestamp to obtain a scalar value as the fused representation of that time. In practical applications, a suitable processing method can be selected based on the input requirements of the subsequent time-series mapping model; this embodiment does not impose specific limitations on this.
[0135] After time-dimensional vector concatenation or linear combination, the original time-feature two-dimensional matrix is transformed into a sequence of one-dimensional vectors arranged in chronological order. Each vector corresponds to a timestamp, and the elements in the vectors incorporate all feature information at that moment and have undergone dynamic weight adjustment, thus forming a fused feature vector. It is evident that the fused feature vector sequence is the result of a series of processes performed on the original multi-source data, including time alignment, multi-scale feature extraction, dynamic interference quantification, mutual information weight calculation, and weighted fusion. This result vividly reflects the inherent correlation and dynamic coupling between the multi-source data.
[0136] For step S1043, for example, the fused feature vector sequence can be used as the associated feature representation, so that the associated feature representation includes both short-term trend information and long-term cycle information in historical operating data, as well as sudden disturbance information in external influencing factors, and the adaptive fusion of different modal information is achieved through the weights determined by mutual information.
[0137] Taking a certain electricity market as an example, the aligned data matrix E contains 96 timestamps and four feature columns: electricity price, load, temperature, and wind speed. The cross-modal association weight matrix W is a 96-row, 4-column matrix, with each row corresponding to the weight coefficients of the four features (electricity price, load, temperature, and wind speed) at a given timestamp.
[0138] In step S1041, for the row corresponding to the first timestamp, the data matrix E is aligned to show the following values for that row: electricity price 300 yuan / MWh, load 800 MW, temperature 25 degrees Celsius, and wind speed 5 m / s. The weighting coefficients for the corresponding row in the weighting matrix W are: electricity price 0.6, load 0.6, temperature 0.13, and wind speed 0.27. After element-wise weighting, the new values for that row in the weighted feature matrix F are: electricity price 180 yuan / MWh, load 480 MW, temperature 3.25 degrees Celsius, and wind speed 1.35 m / s. The same operation is performed on all 96 timestamps to obtain the complete 96-row, 4-column weighted feature matrix F.
[0139] In step S1042, the weighted feature matrix F is concatenated along the time dimension. At the first timestamp, the four weighted values of electricity price (180), load (480), temperature (3.25), and wind speed (1.35) are concatenated end-to-end to form a one-dimensional vector [180, 480, 3.25, 1.35]. At the second timestamp, the four weighted values are similarly concatenated into a vector [182, 485, 3.30, 1.40]. This process is repeated for all 96 timestamps to obtain a fused feature vector sequence G consisting of 96 four-dimensional vectors arranged in chronological order. Then, in step S1043, the fused feature vector sequence G is used as the associated feature representation H, which serves as the input to the subsequent time-series mapping model to generate the joint prediction results for electricity price and load.
[0140] It should be noted that this embodiment can also be an improvement based on the second embodiment.
[0141] It is not difficult to see that in this embodiment, by weighting and fusing the original aligned data matrix according to the cross-modal association weights, a deep integration of dynamic weight information and actual data values is achieved. Specifically, since each feature in the aligned data matrix is weighted element-wise according to the cross-modal association weights, each original feature value at each time point can be enhanced or suppressed according to the association importance at the current time. For example, the numerical contribution of wind speed features is automatically amplified during typhoon impact periods, while the original weight of load patterns is maintained during stable operation periods, thereby achieving dynamic focusing on key information. By performing vector concatenation or linear combination operations on the weighted feature matrix according to the time dimension, the multi-source features that have undergone weighting processing at the same time point can be integrated into a unified fused feature vector. This not only preserves the original structural relationship between features but also eliminates the dimensional differences between features, providing a standardized input format for subsequent time series modeling. Using the fused feature vector as the association feature representation means that this representation not only contains all the information of the original data but also incorporates the dynamic association weights calculated through the mutual information matrix, thereby significantly improving the quality and relevance of the feature representation and laying a solid data foundation for high-precision prediction of subsequent time series mapping models.
[0142] Sixth Embodiment
[0143] The sixth embodiment relates to a method for jointly forecasting electricity prices and load in the electricity spot market. The sixth embodiment is an improvement upon the first embodiment, specifically in that it provides a concrete implementation method for inputting the associated feature representation into a time-series mapping model and outputting the joint forecast results of electricity prices and load in the electricity spot market.
[0144] Specifically, step S105, which involves inputting the associated feature representation into a time-series mapping model and outputting a joint forecast of electricity prices and loads in the electricity spot market, may include:
[0145] Step S1051: Input the associated feature representation into a recurrent neural network structure or a gated recurrent unit structure in chronological order to generate a hidden state sequence;
[0146] Step S1052: Apply attention weight update operation to the hidden state sequence to obtain a weighted hidden state representation;
[0147] Step S1053: Calculate the electricity price forecast and load forecast based on the weighted hidden state representation to form a joint forecast result.
[0148] Specifically, in step S1051, the associated feature representation is a data structure organized in time series form, where each time point corresponds to a high-dimensional feature vector that integrates multi-source information and undergoes dynamic weighting. To capture the temporal dependencies of these feature vectors, the associated feature representation can be sequentially input into a recurrent neural network structure or a gated recurrent unit structure. The recurrent neural network structure passes the output information from the previous time point to the calculation process at the current time point through internal loop connections, thereby achieving the function of remembering historical information.
[0149] The gated recurrent unit (GRU) structure introduces update and reset gate mechanisms on top of recurrent neural networks (RNNs), which can more effectively control the inflow and outflow of information and alleviate long-term dependency problems. When the feature vectors representing the associated features at each time point are input sequentially, the RNN structure or GRU structure outputs a hidden state vector at each time point. This vector encodes all historical information from the starting time point to the current time point. Collecting the hidden state vectors of all time points in chronological order forms a hidden state sequence, which fully records the model's point-by-point abstract representation of the temporal dimensions of the input data.
[0150] For step S1052, for example, an attention weight update operation can be applied to the hidden state sequence. In the attention weight update operation, the similarity score between the hidden state vector at each time point in the hidden state sequence and the current prediction task context vector can be calculated first. This similarity score reflects the importance of the state at that time point. Then, the similarity score is converted into normalized attention weights using a softmax function, ensuring that the sum of all weights is 1. Afterward, each hidden state vector in the hidden state sequence is multiplied by its corresponding attention weight, and all weighted vectors are summed to obtain a vector that integrates all historical information and focuses on key time points. This integrated vector is the weighted hidden state representation.
[0151] In some examples, it is assumed Indicates the current time The hidden state; Representing historical moments The hidden state; This represents the similarity evaluation function; Indicates the current time Historical moments Attention weights; This represents the weighted hidden state representation (context vector).
[0152] We can first calculate the similarity score between the current hidden state and the historical hidden states:
[0153] ;
[0154] Then, the scores are normalized using the Softmax function to obtain the attention weights:
[0155] ;
[0156] in, This represents the number of historical time steps involved in the attention calculation.
[0157] Furthermore, the historical hidden states are weighted and summed according to the attention weights to obtain the weighted hidden state representation:
[0158] ;
[0159] in: .
[0160] Through the above attention calculation process, the hidden state at the current prediction time can be determined. The hidden state of history A relevance assessment is performed, and greater attention weights are assigned to historical features with higher contributions, resulting in a weighted hidden state representation used for prediction computation. .
[0161] For step S1053, for example, the weighted hidden state representation can be input into a multi-task output layer. The multi-task output layer typically consists of two parallel fully connected mapping structures. One fully connected mapping structure takes the weighted hidden state representation as input and maps it to a predicted electricity price through a linear transformation and a nonlinear activation function. The other fully connected mapping structure takes the same weighted hidden state representation as input and maps it to a predicted load value through another set of parameters. These two mapping structures can share the underlying weighted hidden state representation but have their own independent weight parameters, allowing the model to adjust the output calculation method according to the needs of different prediction tasks during the learning process. After the above calculation, the model can simultaneously output a sequence of predicted electricity prices and a sequence of predicted load values for one or more future time points. These two sequences together constitute a joint prediction result, achieving coordinated prediction of electricity spot market prices and loads.
[0162] Taking a certain electricity market as an example, the associated feature representation H is a sequence of fused feature vectors consisting of 96 time points (corresponding to the past 24 hours, one point every 15 minutes). The dimension of each feature vector is equal to the number of feature variables involved in the fusion. For example, when there are 32 feature variables, the corresponding feature vector dimension is 32.
[0163] In step S1051, H can be sequentially input into the gated recursive unit structure in chronological order. The gated recursive unit structure outputs a hidden state vector at each time point t. The dimension is 64. After sequential input at 96 time points, a hidden state sequence is generated. , There are a total of 96 64-dimensional vectors. Through step S1052, the hidden state sequence can be processed. Attention weights are applied to update the operation, such as first calculating the similarity score between each hidden state vector and the historical hidden state vectors, and then applying the softmax function to... Convert to attention weights , where t = 1 to 96; then all hidden state vectors With corresponding weights Multiplying and summing yields the weighted hidden state representation c, where the dimension of c is equal to the sum of the product and the weighted hidden state representation c. Both are 64-dimensional.
[0164] In step S1053, the weighted hidden state representation c is input into two parallel fully connected layers, which output the electricity price and load forecasts for a preset time range, such as forecasts for the next 1 hour, 3 hours, or 24 hours. For example, the first fully connected layer outputs a 4-dimensional vector corresponding to the electricity price forecast sequence [320, 318, 315, 317] yuan / MWh for the next 1 hour (4 15-minute intervals); the second fully connected layer outputs a 4-dimensional vector corresponding to the load forecast sequence [820, 825, 830, 828] MW for the next 1 hour. The electricity price forecast sequence and the load forecast sequence are combined to form a joint forecast result.
[0165] It should be noted that this embodiment may also be an improvement based on any one or more of the second to fifth embodiments.
[0166] It is not difficult to see that in the embodiments of this application, by inputting the associated feature representations into the recurrent neural network structure or the gated recurrent unit structure in chronological order, the recurrent connection mechanism can be fully utilized to capture the long-term dependency relationship of feature vectors in the time dimension. Information scattered at various historical moments is gradually transmitted and aggregated into the hidden state at the current moment, forming a hidden state sequence that encodes complete temporal information, thereby solving the technical problem that traditional methods are difficult to effectively model long-term temporal dependencies. By applying attention weight update operations to the hidden state sequence, weights can be dynamically allocated according to the degree of correlation between the state at each historical moment and the current prediction task, so that the model automatically focuses on the key historical information points that have the greatest impact on the prediction results. This avoids the feature dilution problem caused by uniformly treating all historical information and significantly improves the utilization efficiency of key information. Moreover, by calculating the electricity price prediction value and the load prediction value based on the weighted hidden state representation, and realizing multi-task collaborative learning through two parallel output structures, the model can perform targeted mapping according to the characteristics of each task while sharing the underlying temporal features, thereby simultaneously outputting high-quality electricity price prediction sequences and load prediction sequences, forming accurate and reliable joint prediction results.
[0167] The steps of the various methods described above are only for clarity. In practice, they can be combined into one step or some steps can be split into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this application. Adding insignificant modifications or introducing insignificant designs to the algorithm or process, but without changing the core design of the algorithm and process, are also within the scope of protection of this application.
[0168] Furthermore, some embodiments of this application also provide an electronic device. The electronic device can be various forms of digital computer, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, mainframe computers, cellular phones, smartphones, wearable devices, and other similar computing devices.
[0169] The electronic device includes: one or more processors; and a memory storing computer program instructions, which, when executed, cause the processor to perform the steps of the methods provided in any one or more of the above embodiments.
[0170] Figure 2An exemplary structural diagram of the electronic device is disclosed. The electronic device includes one or more processors 1101, a memory 1102, an input device 1103, and an output device 1104. The various components are interconnected via a bus or other means (the diagram shows an example of bus connection). The processor 1101 can be used to execute instructions stored in the memory 1102 to control the overall operation of the electronic device. The memory 1102 may include a program storage area and a data storage area, wherein the program storage area stores the operating system and applications required for at least one function; the data storage area stores data created according to the use of the electronic device, etc. The memory 1102 may include high-speed random access memory and may also include non-transitory memory, such as disk storage devices, flash memory devices, or other non-transitory solid-state storage devices. In some embodiments, the memory 1102 may also include storage resources located remotely to the processor and accessible via a network.
[0171] Input device 1103 can be used to receive input numerical or character information or user operation signals, such as a touch screen, keypad, mouse, trackpad, touchpad, indicator, one or more mouse buttons, trackball, joystick, etc. Output device 1104 may include display devices (such as liquid crystal displays, light-emitting diode displays, plasma displays, and optional touch screens), auxiliary lighting devices (such as LEDs), and haptic feedback devices (such as vibration motors), etc.
[0172] To facilitate user interaction, the electronic device may be configured to include a display device (such as an LCD or CRT monitor) and input devices such as a keyboard and pointing devices (e.g., a mouse or touchpad). Feedback can be any form of sensory feedback (e.g., visual feedback, auditory feedback); input may also be received via voice, touch, or other means.
[0173] This application also relates to a computer-readable medium having a computer program / instructions stored thereon, which, when executed by a processor, implement the steps of the methods provided in any one or more of the above embodiments. This computer-readable medium may be a memory included in an electronic device, or it may be a standalone storage medium not assembled into the device.
[0174] It should be noted that the computer-readable medium described in this application may be a computer-readable signal medium, a computer-readable storage medium, or a combination of both. Examples include, but are not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. Specific examples of storage media may include, but are not limited to, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory, optical fibers, portable CD-ROMs, optical storage devices, magnetic storage devices, etc., or any suitable combination thereof.
[0175] Computer-readable media may store one or more programs that can be used by or in conjunction with an instruction execution system. The media may be permanent or non-permanent, removable or non-removable, and may store information by any method or technology, including computer-readable instructions, data structures, program modules, or other data.
[0176] The computer program code used to implement the operations of this application can be written in any combination of one or more programming languages, including object-oriented programming languages (such as Java, Smalltalk, and C++) and conventional procedural programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer, partially on a remote computer, or entirely on a remote computer or server. The remote computer can be connected to the user's computer via any network (including a local area network or a wide area network) or can be connected to an external computer.
[0177] In the above embodiments, the functions can be implemented in whole or in part by software, hardware, firmware, or any combination thereof, for example, by using application-specific integrated circuits, general-purpose computers, or other similar hardware devices. In some embodiments, the software program of this application can be executed by a processor to implement the steps or functions; it can also be implemented by hardware, for example, as a circuit that works in conjunction with the processor to execute the steps or functions.
[0178] This application also provides a computer program product, including one or more computer programs / instructions, which, when executed by a processor, generate all or part of the processes or functions described in this application. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium or transmitted from one storage medium to another via wired (e.g., DSL) or wireless (e.g., wireless, microwave) means. The computer-readable storage medium may be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive).
[0179] The flowcharts or block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of devices, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-specific system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0180] The scope of this application is defined by the appended claims rather than the foregoing description, and is therefore intended to encompass all variations falling within the meaning and scope of equivalents of the claims. No reference numerals in the claims should be construed as limiting the scope of the claims. Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in a device claim may also be implemented by a single unit or device in software or hardware. Terms such as "first," "second," etc., are used only for distinguishing descriptions and do not indicate any particular order, nor should they be construed as indicating or implying relative importance.
[0181] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily made by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims, and the above embodiments should be regarded as exemplary and non-limiting.
Claims
1. A method for jointly forecasting electricity spot market prices and load, characterized in that, The method includes: Time synchronization and alignment are performed based on multi-source heterogeneous time series data to generate an aligned data matrix with a consistent time index; the multi-source heterogeneous time series data includes at least historical running data sequences and external influencing factor sequences; Multi-scale time features are extracted from the historical operational data sequence, and dynamic disturbance features are screened and quantified from the external influencing factor sequence based on preset event triggering conditions; the multi-scale time features include at least the time change gradient and trend slope calculated based on a sliding time window, and the periodic component features obtained based on frequency domain transformation; the dynamic disturbance features include the disturbance amplitude and disturbance duration calculated within the event triggering time interval; A mutual information matrix is constructed between the multi-scale time features and the dynamic disturbance features, and cross-modal correlation weights between historical running data sequences and external influencing factor sequences are adaptively generated based on the mutual information matrix; the mutual information matrix is a time-varying mutual information matrix calculated based on a sliding time window. The aligned data matrix is weighted and fused according to the cross-modal association weights to obtain the association feature representation; The associated feature representation is input into the time series mapping model, and the output is the joint forecast result of electricity price and load in the electricity spot market.
2. The method according to claim 1, characterized in that, The step of performing time synchronization and alignment based on multi-source heterogeneous time-series data to generate an aligned data matrix with a consistent time index includes: The historical operational data sequence and the external influencing factor sequence are resampled according to a uniform time granularity to obtain a resampled sequence. Based on the unified time granularity, a continuous time index is established; The resampled sequence is subjected to timestamp matching processing according to the continuous time index; Based on the matching results, the alignment data matrix is constructed such that each row in the alignment data matrix corresponds to a set of multi-source data features under the same timestamp.
3. The method according to claim 1, characterized in that, The extraction of multi-scale time features from the historical operational data sequence includes: Within a preset sliding time window, the time change gradient and trend slope of the historical running data sequence are calculated to form a local change trend feature vector; The historical operational data sequence is subjected to frequency domain transformation to extract the dominant frequency component and spectral energy distribution information, forming a periodic fluctuation feature vector; The multi-scale time features are generated by combining the local change trend feature vector and the periodic fluctuation feature vector.
4. The method according to claim 1, characterized in that, The step of filtering and quantifying dynamic interference features from the external influence factor sequence based on preset event triggering conditions includes: Detect the instantaneous fluctuation amplitude of the external influencing factor sequence; When the instantaneous fluctuation amplitude exceeds a preset threshold, an event trigger flag is generated; Within the time interval corresponding to the event trigger marker, calculate the disturbance amplitude and disturbance duration; Based on the disturbance amplitude and disturbance duration, a dynamic disturbance feature vector is constructed.
5. The method according to claim 1, characterized in that, The construction of the mutual information matrix between the multi-scale temporal features and the dynamic disturbance features includes: Within the sliding time window, the conditional mutual information values between the multi-scale temporal features and the dynamic disturbance features are calculated respectively; Arrange the conditional mutual information values within different time windows to form a time-varying mutual information matrix; The time-varying mutual information matrix is normalized to obtain the cross-modal correlation weight matrix; Based on the cross-modal association weight matrix, the weight allocation ratio of each feature in the fusion process is determined.
6. The method according to claim 1, characterized in that, The step of weighting and fusing the aligned data matrix according to the cross-modal association weights to obtain the association feature representation includes: According to the cross-modal association weights, each feature in the aligned data matrix is weighted element-wise to obtain a weighted feature matrix. The weighted feature matrix is subjected to vector concatenation or linear combination operations along the time dimension to form a fused feature vector. The fused feature vector is used as the representation of the associated feature.
7. The method according to any one of claims 1 to 6, characterized in that, The step of inputting the associated feature representation into the time series mapping model and outputting the joint forecast results of electricity price and load in the electricity spot market includes: The associated feature representations are input into a recurrent neural network structure or a gated recurrent unit structure in chronological order to generate a hidden state sequence. An attention weight update operation is applied to the hidden state sequence to obtain a weighted hidden state representation; Based on the weighted hidden state representation, the electricity price forecast and load forecast are calculated respectively to form a joint forecast result.
8. An electronic device, characterized in that, The electronic device includes: One or more processors; and A memory storing computer program instructions, which, when executed, cause the processor to perform the steps of the method as described in any one of claims 1 to 7.
9. A computer-readable medium having a computer program / instructions stored thereon, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method according to any one of claims 1 to 7.
10. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method according to any one of claims 1 to 7.