A method for medium and long term day rolling time-of-use price prediction based on meteorological similar days

CN122779908APending Publication Date: 2026-09-18TURING INTELLIGENT ELECTRONICS (JIANGSU) TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610971364.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-01
Publication Date
2026-09-18

AI Technical Summary

Technical Problem

[0008]本发明的目的在于提供一种基于气象相似日动态匹配的中长期日滚动分时段电价预测方法,以至少解决如下技术问题:第一,传统中长期电价预测方法主要依赖历史电价数据,难以充分融合温度、湿度、风速、光照强度等气象因素对不同时段电价的影响;第二,日级气象数据、小时级时序气象数据与分时段电价数据之间存在时间尺度不匹配,直接建模容易产生特征错配;第三,已有预测方法缺乏基于最新气象预报数据的日滚动更新机制,难以及时适应突发气象变化

Benefits of technology

[0016] Compared with existing technologies, this invention provides a medium- to long-term rolling time-of-use electricity price forecasting method based on meteorological similarity days, which has the following beneficial effects:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122779908A_ABST
    Figure CN122779908A_ABST
Patent Text Reader

Abstract

The application discloses a kind of medium and long term day rolling time-of-use price prediction method based on meteorological similar day dynamic matching, belong to electric power market price prediction technical field.The method accesses electric power market data and meteorological data, pre-processes and extracts daily meteorological features and time series meteorological features;According to peak, flat, valley etc. Time-of-use determines meteorological influence weight, fuses daily meteorological similar distance and time series meteorological similar distance to screen meteorological similar day and calculates similar day weight;Similar day meteorological features, time-of-use price and similar day weight are aligned as coupling sample, input long short-term memory neural network model to predict next day time-of-use price;Daily according to the latest weather forecast, similar day and model input or parameter are updated rolling, improve the matching degree of meteorological data and time-of-use price and the prediction adaptability under sudden weather change.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of electricity market price forecasting technology, specifically relating to a medium- to long-term daily rolling time-of-use electricity price forecasting method, system, electronic equipment, and storage medium based on dynamic matching of meteorological similar days. More specifically, this invention relates to a technical solution for forecasting the next day's time-of-use electricity price by spatiotemporally coupling meteorological factors such as temperature, humidity, wind speed, and light intensity with time-of-use electricity price data for peak, normal, and off-peak periods under the background of medium- to long-term daily rolling transactions, and utilizing dynamic matching of meteorological similar days and long short-term memory neural networks. Background Technology

[0002] In electricity market transactions, medium- and long-term electricity price forecasts are a crucial foundation for power generation companies, electricity retailers, electricity users, and market support decision-making systems to arrange transactions, formulate power purchase and sales strategies, and conduct risk assessments. Medium- and long-term transactions typically focus on trading periods of more than one day; however, in actual transaction organization, segmented bidding or settlement is often required according to different time periods within the day. Therefore, forecasting methods capable of generating time-of-use price forecasts for peak, normal, and off-peak periods are of clear engineering demand.

[0003] Existing methods for forecasting medium- and long-term electricity prices typically rely on historical electricity price series, inferring future prices through historical price trends or statistical regularities. While these methods can reflect a certain degree of price inertia, meteorological factors directly impact the state of electricity supply and demand. For example, high or low temperatures can alter load levels for air conditioning and heating; changes in humidity can alter perceived temperature and affect load response; and wind speed and solar radiation intensity can affect the output of renewable energy sources such as wind and solar power. The impact of these meteorological factors varies during peak, normal, and off-peak periods. Using a uniform set of meteorological weights or uniformly selecting similar days makes it difficult to fully reflect the price formation mechanisms at different times.

[0004] On the other hand, meteorological data and electricity price data have significant differences in time scale. Meteorological data may include daily variables such as daily maximum temperature and daily average humidity, or time-series variables such as hourly temperature, hourly light intensity, or their rate of change; electricity price data may be hourly electricity prices, or it may be aggregated peak-hour prices, normal-hour prices, or off-peak-hour prices. If these two types of data are not spatiotemporally aligned and directly input into the prediction model, it will cause a mismatch between meteorological conditions and price periods, thereby reducing the interpretability and accuracy of the prediction results.

[0005] Furthermore, medium- and long-term forecasts rely heavily on meteorological forecast data, which changes daily. Sudden weather events such as extreme heat, temperature drops, strong winds, or continuous rain may render previously selected meteorologically similar days unsuitable for the current target date. If the forecasting model cannot recalculate meteorologically similar days based on the latest forecast data and dynamically adjust its inputs or parameters, it will struggle to adapt to sudden weather changes in a timely manner.

[0006] Therefore, there is an urgent need for a method that can calculate the meteorological influence weight for different time periods in the context of medium- and long-term daily rolling time-of-use electricity price forecasting, integrate daily meteorological state similarity and hourly meteorological trend similarity, construct time-of-use electricity price-meteorological coupled samples, and perform daily rolling updates based on the latest meteorological forecast data. Summary of the Invention

[0007] Technical problems to be solved

[0008] The purpose of this invention is to provide a medium- to long-term rolling time-of-use electricity price forecasting method based on dynamic matching of meteorological similarities, in order to solve at least the following technical problems: First, traditional medium- to long-term electricity price forecasting methods mainly rely on historical electricity price data, making it difficult to fully integrate the impact of meteorological factors such as temperature, humidity, wind speed, and light intensity on electricity prices at different times; Second, there is a time scale mismatch between daily meteorological data, hourly time-series meteorological data, and time-of-use electricity price data, making direct modeling prone to feature mismatch; Third, existing forecasting methods lack a daily rolling update mechanism based on the latest meteorological forecast data, making it difficult to adapt to sudden meteorological changes in a timely manner.

[0009] Technical solution

[0010] To achieve the above objectives, the technical solution provided by this invention is based on a framework of "data access - meteorological feature extraction - time-segmented similar day assessment - electricity price-meteorological coupling - LSTM prediction - daily rolling update". First, the system accesses electricity market data and meteorological data, performs missing value imputation, outlier correction, and quality verification on the meteorological data, and extracts daily and time-series meteorological features to form a meteorological feature database.

[0011] Secondly, for at least one of the peak, normal, and valley periods, the correlation between meteorological characteristics and the corresponding historical electricity prices is calculated, and the influence weight of different meteorological characteristics under that period is determined accordingly. By determining the weights for each period separately, the problem of masking the differences in influence caused by sharing the same meteorological weight across all periods can be avoided.

[0012] Next, based on the time-segmented influence weights, the daily meteorological similarity distance between the target day and historical days is calculated, and the temporal meteorological similarity distance between the target day and historical days is calculated using a dynamic time warping algorithm. These two methods are then fused to obtain the time-segmented meteorological similarity distance. This fused similarity distance reflects the similarity between the target day and historical days at both the overall meteorological state and intraday meteorological change trends.

[0013] Subsequently, the system filters the set of meteorologically similar days based on the time-segmented meteorological similarity distance and calculates the weights of these days. These weights characterize the contribution of different similar days to the time-segmented electricity price prediction for the target day. The system further aligns the daily meteorological characteristics, time-segmented temporal meteorological characteristics, meteorological similarity day weights, and corresponding time-segmented electricity prices in a spatiotemporal manner to construct a time-segmented electricity price-meteorological coupled sample.

[0014] Then, the system uses a long short-term memory neural network to establish a time-of-use electricity price prediction model. This model learns the temporal correlation between meteorological characteristics, similar day weights, and historical electricity prices for each time period, and outputs at least one predicted electricity price for the peak, normal, and off-peak periods of the target day. Finally, the system receives the latest weather forecast data daily, re-extracts the meteorological characteristics of the target day, recalculates the set of similar days and their weights, and continuously adjusts the model input samples or model parameters based on changes in the weather forecast.

[0015] Beneficial effects

[0016] Compared with existing technologies, this invention provides a medium- to long-term rolling time-of-use electricity price forecasting method based on meteorological similarity days, which has the following beneficial effects:

[0017] First, this invention decomposes the matching process of meteorological similar days into specific electricity price periods such as peak periods, normal periods, and valley periods, and determines the influence weight of meteorological characteristics for different periods, which can more accurately describe the differentiated impact of meteorological factors on time-of-use electricity prices.

[0018] Second, this invention utilizes both daily meteorological conditions and hourly meteorological trends. It uses a weighted Euclidean distance to reflect the similarity between the overall meteorological conditions of the target day and historical days, and a dynamic time warping algorithm to reflect the similarity of intraday meteorological trends. This fusion avoids the inaccurate matching of similar days caused by relying solely on a single daily indicator.

[0019] Third, this invention constructs a unified electricity price-meteorological coupled sample by combining daily meteorological features, time-series meteorological features, similar day weights, and corresponding time-series historical electricity prices, which can solve the problem of time scale mismatch between meteorological data and time-series electricity price data.

[0020] Fourth, the daily rolling update mechanism of this invention does not simply re-output the results every day, but recalculates the set of similar days and the weights of similar days when the latest weather forecast data changes, and decides whether to update only the model input or perform incremental correction of the model parameters based on the magnitude of the change. Therefore, it can improve the predictive adaptability under sudden weather changes.

[0021] Fifth, this invention closely integrates the above-mentioned algorithm unit with the time-of-use electricity price prediction scenario in the electricity market. The model input, output, and training labels are all derived from specific electricity market data and meteorological data. It can be executed by computing devices and generate time-of-use electricity price prediction results that can be used for transaction auxiliary analysis, thus having clear practicality. Attached Figure Description

[0022] Figure 1 This is an overall flowchart of a medium-to-long-term rolling time-of-use electricity price forecasting method based on dynamic matching of meteorological similar days according to the present invention.

[0023] Figure 2 This is a flowchart illustrating the time-segmented meteorological similarity day assessment system in this invention.

[0024] Figure 3 This is a schematic diagram illustrating the input-output relationship of the time-of-use electricity price-meteorological coupled sample construction and the long short-term memory neural network model in this invention.

[0025] Figure 4 This is a schematic diagram of the process of rolling updates, exception handling and model correction in this invention. Detailed Implementation

[0026] Example 1: Main System and Overall Processing Flow

[0027] Reference Appendix Figure 1 This embodiment provides a medium- to long-term rolling time-of-use electricity price forecasting system based on dynamic matching of meteorological similar days. The system includes a data access module, a preprocessing and feature extraction module, a time-of-use meteorological similarity day evaluation module, an electricity price-meteorological coupled sample construction module, a time-of-use electricity price forecasting module, a daily rolling update module, and a result output module. These modules can be deployed on the same server or as microservices within a power trading auxiliary decision-making platform.

[0028] The data access module takes electricity market data and meteorological data as input. Electricity market data may include historical hourly electricity prices, historical peak-hour prices, historical average-hour prices, historical off-peak-hour prices, and time-segmentation information specified by the target market. Meteorological data may include historical measured meteorological data and target-day weather forecast data; fields may include at least one of temperature, humidity, wind speed, and light intensity. The data access module outputs a raw data set organized by date and time.

[0029] The preprocessing and feature extraction module receives the raw dataset, performs missing value imputation, outlier correction, and quality verification on the meteorological data, and extracts daily and time-series meteorological features based on this. This module outputs a meteorological feature library, where each record contains at least the date, time period, daily meteorological feature, time-series meteorological feature, and data quality identifier.

[0030] The time-segmented meteorological similarity day assessment module takes the meteorological characteristics of the target day and historical days as input. This module determines the influence weight of meteorological characteristics for different time periods, calculates the daily meteorological similarity distance and the time-series meteorological similarity distance, merges them to obtain the time-segmented meteorological similarity distance, and outputs the set of meteorological similar days and the weight of similar days for each time period.

[0031] The electricity price-meteorological coupled sample construction module aligns meteorological features in the meteorological similar day set with corresponding time-of-use electricity price data in time and space. The input of this module is the meteorological similar day set, similar day weights, meteorological feature library, and historical time-of-use electricity price data. The output is a time-of-use electricity price-meteorological coupled sample sequence that can be directly input into a long short-term memory neural network.

[0032] The time-of-use (TOU) electricity price forecasting module trains a long short-term memory neural network based on TOU-meteorological coupled samples and outputs the predicted electricity price for the corresponding TOU on the target day during the forecasting phase. The daily rolling update module receives the latest meteorological forecast data daily, determines whether the meteorological characteristics of the target day have changed significantly, and then decides whether to update only the model input or simultaneously perform incremental model parameter correction. The final output module outputs at least one of the following day's peak-hour electricity price forecast, normal-hour electricity price forecast, and off-peak-hour electricity price forecast.

[0033] Example 2: Data Preprocessing and Meteorological Feature Extraction Module

[0034] This embodiment illustrates the input, processing logic, output, abnormal scenarios, and technical functions of the preprocessing and feature extraction module. The module's input consists of historical meteorological data recorded with timestamps and target day weather forecast data. The meteorological data can originate from meteorological station measurements, meteorological service system data, or numerical weather prediction data. To ensure subsequent alignment with electricity price data, each meteorological record should include a date and hour identifier.

[0035] For missing data, if a meteorological variable is missing for one or more consecutive hours, but the missing length does not exceed a preset missing length threshold, interpolation between adjacent time points will be used to fill the gap. If the missing data occurs in daily statistical features, the average of similar historical days or historical statistical values ​​of the meteorological variable will be used to fill the gap. Similar historical days can be determined based on month, weekday type, or previously selected candidate meteorologically similar days. If the missing length exceeds a preset threshold, an anomaly flag will be set for that day, and its priority will be reduced or it will be removed during subsequent similar day screenings.

[0036] For outliers, the system can set reasonable ranges for different meteorological variables. For example, temperature, humidity, wind speed, and light intensity all have physically interpretable boundaries or engineering-acceptable ranges. When a value exceeds the reasonable range, the system identifies it as an outlier and corrects it based on data from adjacent times or statistical values ​​of similar historical days. This process avoids amplifying the impact of individual anomalous meteorological points in distance calculations, thus preventing interference with similar day matching results.

[0037] After data cleaning, the system extracts daily meteorological features and time-series meteorological features. Daily meteorological features are used to characterize the overall meteorological conditions of a natural day, such as daily maximum temperature, daily average humidity, daily average wind speed, and daily cumulative sunshine intensity. Time-series meteorological features are used to characterize the intraday meteorological change trend, such as hourly temperature change rate, hourly humidity change rate, hourly wind speed change rate, and hourly sunshine intensity change rate.

[0038] In the electricity market, high-temperature or low-temperature loads are often not determined by a single hourly temperature value, but rather by the combined effects of the daily temperature rise rate, duration, and peak value. Therefore, using only the daily maximum temperature may be insufficient to describe electricity price fluctuations. To address this issue, this embodiment introduces hourly temperature change rate as a time-series meteorological feature. The technical scenario is: under the same daily maximum temperature, if the daytime temperature rises rapidly on the target day, the peak-hour load and electricity price changes may be stronger than on historical days with a slow temperature rise. Therefore, a change rate is needed to express the intraday trend.

[0039]

[0040] Equation (1) Hourly temperature change rate

[0041] Explanation of symbols in equation (1):

[0042] Temperature change rate at hour t Hour sequence number Temperature value at hour t Temperature value at hour t-1

[0043] The rate of change obtained through this formula can be used as input for subsequent dynamic time warping algorithms, enabling the system to compare not only the meteorological conditions of the target day with those of historical days, but also their intraday trends. The hourly rates of change for humidity, wind speed, and light intensity can be calculated in the same way.

[0044] Because temperature, humidity, wind speed, and light intensity have different dimensions, variables with larger numerical ranges may dominate the similarity results if directly used for distance calculations. To avoid this problem, the system performs standardization and normalization on meteorological features. Technically, normalization ensures that all meteorological variables are on a comparable scale in similarity calculations and allows subsequent weights to truly reflect the degree of influence of variables on electricity prices, rather than reflecting differences in dimensions.

[0045]

[0046] Equation (2) Meteorological characteristics normalization

[0047] Explanation of symbols in equation (2):

[0048] Normalized value of the j-th meteorological feature on day d Date serial number Meteorological characteristic serial number The raw value of the j-th meteorological feature on day d The mean of the j-th meteorological feature in the historical sample The standard deviation of the j-th meteorological feature in the historical sample

[0049] When the standard deviation is zero, the system sets the normalized value of the meteorological feature in all historical samples to zero, or replaces the standard deviation with a preset positive number to avoid division by zero errors. After this processing, the preprocessing and feature extraction module outputs a meteorological feature library.

[0050] The output of data quality verification is a quality identifier. To make the quality identifier usable for subsequent anomaly handling, the system can calculate the proportion of valid meteorological records for each historical day. If the valid proportion is lower than a preset threshold, it indicates that the meteorological data for that historical day is insufficient to support matching with similar days, and that historical day can be removed or its weight reduced in the future.

[0051]

[0052] Equation (3) Effective proportion of meteorological data

[0053] Explanation of symbols in equation (3):

[0054] Validity of meteorological data on day d Number of valid meteorological records on day d Number of meteorological records required for day d

[0055] By introducing an effective proportion of meteorological data, the system can perform reliability control when there are missing or abnormal source data, thus preventing poor-quality historical days from being mistakenly selected as meteorologically similar days.

[0056] Example 3: Determining the weight of meteorological impacts by time period

[0057] This embodiment illustrates the calculation of time-period meteorological influence weights. The module takes a meteorological feature database and historical time-period electricity price data as input, and outputs the influence weights of each meteorological feature for each time period. The technical problem this module addresses is that the same meteorological variable has different degrees of influence in different electricity price periods. If a single set of meteorological weights is used for all time periods, the similarity day screening results may be accurate for some periods but distorted for others.

[0058] Reference Appendix Figure 2 The system divides the target day into at least one of peak, normal, and valley periods. The specific hour sets for peak, normal, and valley periods may differ depending on the region or trading rules; this invention does not limit the specific hour division but uses it as input configuration. For any given time period, the system calculates the correlation between each meteorological characteristic and the historical electricity price for that time period. Since the correlation reflects the statistical relationship between changes in meteorological variables and changes in electricity prices, it can be used as the basis for determining the meteorological weights for each time period.

[0059] In this embodiment, the correlation can be represented by the Pearson correlation coefficient. The technical scenario is as follows: if historical data of a certain region shows that peak-hour electricity prices are highly correlated with daily maximum temperatures, then temperature features should have a higher weight in the screening of similar days during peak hours; if electricity prices during normal times in a certain region are more correlated with light intensity, then light intensity features should have a higher weight during normal times.

[0060]

[0061] Equation (4) Correlation coefficient between meteorological characteristics and time-of-use electricity prices

[0062] Explanation of symbols in equation (4):

[0063] The correlation coefficient between the j-th meteorological feature and historical electricity prices in the q-th time period Time period sequence number Meteorological characteristic serial number Number of historical days involved in correlation calculation Normalized value of the j-th meteorological feature on day d The average value of the j-th meteorological feature in historical days Historical electricity price for the qth time period on day d The average historical electricity price for the q-th time period

[0064] The larger the absolute value of the correlation coefficient, the stronger the statistical correlation between the corresponding meteorological characteristics and the electricity price in that time period.

[0065] After obtaining the correlation coefficient, the system needs to convert it into weights that can be used for distance calculation. Directly using the correlation coefficient may result in negative values; however, the weights in distance calculation should represent the strength of influence. Therefore, this embodiment uses the absolute value of the correlation coefficient and normalizes it. To prevent a feature from completely losing its participation opportunity due to a zero correlation coefficient, a preset positive number is added.

[0066]

[0067] Equation (5) Weights of meteorological characteristics by time period

[0068] Explanation of symbols in equation (5):

[0069] Weight of the j-th meteorological feature in the q-th time period Used to avoid positive numbers with zero weight. Meteorological characteristics summation sequence number Number of meteorological features involved in weighting calculation

[0070] The technical advantage of this formula is that the same set of meteorological characteristics can form different weights in different time periods, thereby matching the subsequent screening of similar days with specific electricity price periods.

[0071] When the amount of historical data is insufficient to stably calculate the correlation coefficient, the system can use the default weights or the weights from the most recent available period. If a time-of-use electricity price undergoes structural changes due to adjustments in market rules, the system can calculate the weights using only the historical data after the rule adjustments to avoid data from the old rules interfering with current forecasts. This exception handling ensures that weight calculation remains feasible even when data is insufficient or market rules change.

[0072] Example 4: Time-based meteorological similarity calculation and similar day selection

[0073] This embodiment illustrates how to calculate time-segmented meteorological similarity based on the meteorological characteristics of the target day and historical days. The input to this module is the meteorological characteristics of the target day, the meteorological characteristics of historical days, the weights of the time-segmented meteorological characteristics, and the time-series meteorological characteristic sequence. The output is the time-segmented meteorological similarity distance of each historical day relative to the target day.

[0074] In electricity price forecasting, simply comparing the overall conditions such as daily maximum temperature and average humidity of the target day and historical days may fail to identify intraday trend differences. For example, two dates may have the same daily maximum temperature, but if one date experiences a rapid temperature rise in the morning while the other reaches its peak in the evening, their impact on peak-hour electricity prices may differ. Conversely, comparing only hourly series may overlook the overall daily conditions. Therefore, this embodiment employs a fusion of daily meteorological similarity distance and time-series meteorological similarity distance.

[0075] First, a weighted Euclidean distance is used to calculate the daily meteorological similarity distance between the target day and historical days. Since the weights have been determined according to time periods, this distance is actually for the daily meteorological similarity of specific time periods, rather than a similarity calculated uniformly for all time periods of the day.

[0076]

[0077] Equation (6) Daily meteorological similarity distance

[0078] Explanation of symbols in equation (6):

[0079] The daily meteorological similarity distance between the target day and the i-th historical day in the q-th time period. Time period sequence number Historical date sequence Normalized value of the j-th daily meteorological feature of the target day Normalized value of the meteorological feature of the i-th historical day and the j-th day level.

[0080] This distance is used to address the question of whether the overall weather conditions are similar.

[0081] Secondly, to address the issue of whether intraday weather trends are similar, the system employs a dynamic time warping algorithm to calculate the temporal meteorological similarity distance between the target day and historical days. The dynamic time warping algorithm allows for local scaling of two time series on the time axis; therefore, even when the meteorological trends of the target day and historical days are similar but the timing of occurrence is slightly off, they can still be identified as having a high degree of similarity. This feature is suitable for handling electricity market scenarios where meteorological changes exhibit time lags and advances.

[0082]

[0083] Equation (7) Dynamic Time Warping Cumulative Distance Recursion

[0084] Explanation of symbols in equation (7):

[0085] The cumulative distance in the u-th row and v-th column of the cumulative distance matrix Position number in the time-series meteorological feature sequence of the target day Position number in historical daily time-series meteorological characteristic sequence The u-th feature value in the time-series meteorological feature sequence of the target day The v-th feature value in the historical daily time series meteorological feature sequence Local distance between two time-series meteorological characteristic values The temporal meteorological similarity distance between the target day and the i-th historical day in the q-th time period

[0086] The minimum normalized path distance at the endpoint of the cumulative distance matrix is ​​used as the time-series meteorological similarity distance; to facilitate integration with the daily meteorological similarity distance, the system can normalize the time-series meteorological similarity distance.

[0087] Finally, the system fuses the daily meteorological similarity distance and the time-series meteorological similarity distance. This fusion is not a simple superposition of two known algorithms, but is designed to address the dual matching problem between meteorological data and time-of-use electricity price data: the daily distance solves the matching of meteorological conditions, the time-series distance solves the matching of changing trends, and the fused distance is used to finally filter meteorologically similar days.

[0088]

[0089] Equation (8) Time-segmented meteorological similarity distance fusion

[0090] Explanation of symbols in equation (8):

[0091] The time-segment meteorological similarity distance between the target day and the i-th historical day in the q-th time segment. The temporal meteorological similarity distance between the target day and the i-th historical day in the q-th time period The fusion coefficient between daily meteorological similarity distance and time-series meteorological similarity distance ranges from 0 to 1.

[0092] When the fusion coefficient is at its upper limit, the system only considers the daily meteorological conditions; when the fusion coefficient is at its lower limit, the system only considers the time-series meteorological trends; when the fusion coefficient is in the middle range, the system considers both the overall conditions and the intraday trends.

[0093] After obtaining the meteorological similarity distances for different time periods, the system selects a preset number of historical days as the meteorological similarity day set for the corresponding time period, in ascending order of distance. If a similarity distance threshold is set, candidate historical days with distances not greater than the threshold can be selected first, and then the preset number of historical days with the smallest distances can be selected from the candidate historical days. The output of the similarity day set includes not only the date, but also the distance value, quality label, and similarity day weights calculated subsequently for the corresponding time period.

[0094] To enable the model to distinguish the importance of different similar days, this embodiment further converts the similarity distance into similar day weights. The technical motivation for this design is that in the set of meteorological similar days, the historical days ranked higher are usually closer to the target day than the historical days ranked lower. If all similar days are input into the model with equal weight, the contribution of the most similar historical day will be reduced.

[0095]

[0096] Equation (9) Weight of Meteorologically Similar Days

[0097] Explanation of symbols in equation (9):

[0098] Weight of similar days for the i-th meteorological similar day in the q-th time period Exponential function Historical day numbers in the set of similar weather days The set of meteorological similar days corresponding to the qth time period The time-segment meteorological similarity distance between the target day and the i-th historical day in the q-th time segment.

[0099] The smaller the distance, the greater the weight of the corresponding similar day, indicating that the historical day has a stronger reference effect on the time-of-use electricity price forecast for the target day.

[0100] In abnormal scenarios, if the number of similar days meeting the quality and threshold conditions is less than a preset number, the system can expand the candidate window or increase the similarity distance threshold. To avoid infinite expansion causing similarity distortion, the system sets a maximum number of similar days and a maximum number of expansions.

[0101]

[0102] Equation (10) Similar Day Count Expansion

[0103] Explanation of symbols in equation (10):

[0104] Extended number of similar days Maximum number of similar days allowed Number of expansions per time

[0105] This anomaly handling ensures that the system can still output prediction results when meteorological conditions are abnormal or historical samples are insufficient, while avoiding the introduction of too many low-similarity samples by limiting the maximum number.

[0106] Example 5: Construction of Time-of-Use Electricity Price-Meteorological Coupled Sample

[0107] This embodiment illustrates the construction process of a time-of-use electricity price-meteorological coupled sample. The module's input includes a set of similar meteorological days, similar day weights, a meteorological feature library, time-of-use definitions, and historical electricity price data. The output is a time-of-use sample sequence that can be input into a long short-term memory neural network. The core problem this module aims to solve is the time scale mismatch between meteorological and electricity price data.

[0108] For daily meteorological characteristics, such as daily maximum temperature and daily average humidity, they do not correspond to a specific hour. If the prediction object is peak-hour electricity price, normal-hour electricity price, or off-peak electricity price, then the daily meteorological characteristics can be mapped to each time period of that date, serving as a common influencing factor of the overall meteorological conditions on the electricity prices of each time period.

[0109] For hourly time-series meteorological features, such as hourly temperature change rate or hourly light intensity change rate, they are aggregated into corresponding time periods based on the hour to which they belong. Taking the time-period average temperature as an example, within a certain time period, the system aggregates the temperature values ​​belonging to the hour set of that time period to obtain the representative meteorological features of that time period.

[0110]

[0111] Equation (11) Time-segmented average temperature characteristics

[0112] Explanation of symbols in equation (11):

[0113] The average temperature of the qth time period on day d The hour set corresponding to the qth time segment The number of hours contained in the qth time segment Temperature value at hour t on day d

[0114] Similarly, humidity, wind speed, and light intensity can be aggregated by hourly set to convert hourly meteorological data into meteorological features aligned with time-of-use electricity prices.

[0115] If historical electricity price data is in hourly increments, the system needs to aggregate hourly electricity prices belonging to the same time period into time-of-use prices. This process ensures that the granularity of electricity prices is consistent with the granularity of meteorological features, avoiding inconsistencies where the model input is time-of-use meteorological features but the output is hourly electricity prices.

[0116]

[0117] Equation (12) aggregates hourly electricity prices into time-of-use prices.

[0118] Explanation of symbols in equation (12):

[0119] Electricity price for the qth time period on day d Electricity price for hour t on day d The hour set corresponding to the qth time segment The number of hours contained in the qth time segment

[0120] If the electricity price data has already been provided by the market system as peak-hour electricity price, normal-hour electricity price, or valley-hour electricity price, the system will directly read the corresponding time-of-use electricity price and will no longer perform hourly aggregation.

[0121] After completing the spatiotemporal alignment of meteorological features and electricity price data, the system combines daily meteorological features, time-series meteorological features, time-series historical electricity prices, similar day weights, and quality labels into a price-meteorological coupled input sample. The reason for adding quality labels is that in historical days with low data quality, even if the similarity distance is small, the predictive reference value may be affected.

[0122]

[0123] Equation (13) Time-of-use electricity price-meteorological coupled input sample

[0124] Explanation of symbols in equation (13):

[0125] Electricity price-meteorological coupled input sample for the i-th meteorologically similar day in the q-th time period Daily meteorological characteristics of the i-th similar weather day The time-series meteorological characteristics of the i-th meteorological similar day belonging to the q-th time period The historical electricity price for the q-th time period corresponding to the i-th weather-similar day Weight of similar days for the i-th meteorological similar day in the q-th time period The data quality identifier or quality weight for the i-th weather-similar day

[0126] This sample structure concretizes the "time-of-use electricity price-meteorological coupling model" into a data format that can be input into the model.

[0127] The technical effect of this module is that it unifies the data of three time scales—daily, hourly, and time-segmented—into time-segmented samples, enabling subsequent models to obtain both meteorological status and trend information as well as corresponding time-segmented electricity price information, thereby improving the intrinsic correlation between model input and output.

[0128] Example 6: Training and Prediction of Long Short-Term Memory Neural Network Model

[0129] This embodiment illustrates the structure, input, training, and output of the time-of-use electricity price prediction model. The module's input is a coupled sample of time-of-use electricity prices and meteorological data, and its output is the predicted electricity price for the corresponding time period on the target day. Considering that both electricity prices and meteorological features have time-series attributes, this embodiment uses a long short-term memory neural network as the prediction model.

[0130] For any given time period, the system constructs an input sequence from a preset number of electricity price-meteorological coupling samples from meteorologically similar days corresponding to that time period. The input sequence can be sorted either by similarity distance in ascending order or by the actual date order of the meteorologically similar days. If sorted by similarity distance, the model emphasizes the degree of similarity; if sorted by date order, the model emphasizes temporal evolution. In practice, the sorting method can be selected based on the validation set error.

[0131]

[0132] Equation (14) Input sequence of Long Short-Term Memory Neural Network

[0133] Explanation of symbols in equation (14):

[0134] The input sequence corresponding to the qth time segment Electricity price-meteorological coupled input samples corresponding to a preset number of meteorologically similar days in the q-th time period.

[0135] After receiving the input sequence, the input layer feeds it into the long short-term memory neural network layer to learn the temporal correlation between similar days.

[0136]

[0137] Equation (15) Time-of-use forecast electricity price output

[0138] Explanation of symbols in equation (15):

[0139] Forecast electricity price for the qth time period on the target date The long short-term memory neural network prediction model corresponding to the qth time segment The input sequence corresponding to the qth time segment Model parameters corresponding to the qth time segment

[0140] By training models separately for peak, normal, and off-peak periods, the system can learn the electricity price formation patterns for different time periods.

[0141] During the training phase, the system uses historical target days as training objects. For each historical target day, the system constructs a set of meteorological similar days, similar day weights, and electricity price-meteorological coupled input samples according to the aforementioned steps, and uses the actual time-of-use electricity price of that historical target day as the training label. The training process uses the error between the predicted electricity price and the actual electricity price as the loss.

[0142]

[0143] Equation (16) Time-segmented model training loss

[0144] Explanation of symbols in equation (16):

[0145] The training loss corresponding to the qth time segment Number of training samples in the q-th time segment Training sample number The actual electricity price of the nth training sample in the qth time period The predicted electricity price for the nth training sample in the qth time period

[0146] Model training can use the backpropagation algorithm to update parameters, and the training termination condition is the convergence of training loss, the validation set error no longer decreasing, or the number of preset training rounds.

[0147] To improve model feasibility, a minimum sample size condition can be set for model training. When the number of available training samples for a certain time period is less than the preset minimum sample size, the system can temporarily not update the model parameters for that time period, but only update the input samples; or samples from adjacent time periods among peaks, flat periods, and valleys can be used as auxiliary samples, but the auxiliary samples should retain their original time period identifiers to avoid the model confusing different time periods. This anomaly handling ensures that the system can still operate stably when historical samples are insufficient.

[0148] After the model outputs, the system can perform boundary checks on the prediction results. If the output electricity price significantly exceeds the historical reasonable range, the system does not directly recognize it as a valid result, but instead reviews it in conjunction with the quality of weather forecasts, the weight distribution of similar days, and market electricity price boundary rules. If it is determined to be a false alarm caused by data anomalies, the system uses the most recent valid model result or the weighted electricity price of similar days as the downgraded output and records the anomaly in the log.

[0149] Example 7: Daily Rolling Updates, False Alarms and Anomaly Handling

[0150] Reference Appendix Figure 4 This embodiment illustrates the daily rolling update mechanism. The module's inputs include the latest weather forecast data, the weather forecast data used in the previous day's forecast, a weather feature library, a trained time-of-use electricity price prediction model, and the most recently obtained actual time-of-use electricity price data. The outputs include the updated set of similar weather days, similar day weights, model input samples, updated model parameters if necessary, and the time-of-use electricity price prediction results for the next day.

[0151] The first step in the daily rolling update is to access the latest weather forecast data and perform the same preprocessing and feature extraction as the historical weather data. If the latest weather forecast data is missing or abnormal, the system first performs data quality verification; if the missing or abnormal data can be corrected by adjacent forecast times or the most recent valid forecast, the corrected data is used to continue calculation; when the quality anomaly exceeds a preset threshold, the system enters a degraded mode, temporarily suspending model parameter updates and only updating the prediction results using the most recent qualified weather forecast data.

[0152] To avoid frequent model adjustments when weather forecasts change slightly, and to avoid using the old model when weather changes suddenly occur, this embodiment calculates the magnitude of change of the latest weather forecast data relative to the weather forecast data used in the previous day's forecast. This magnitude of change is used to trigger different levels of rolling corrections.

[0153]

[0154] Equation (17) Range of change in weather forecast

[0155] Explanation of symbols in equation (17):

[0156] Range of changes in weather forecast The normalized value of the j-th meteorological characteristic for the target day obtained based on the latest meteorological forecast data. The normalized value of the j-th meteorological feature used in the previous day's forecast for the target day

[0157] The greater the range of change in the weather forecast, the more significant the change in the latest weather forecast compared to the previous day's forecast.

[0158] When the change in weather forecast is less than or equal to a preset change threshold, the system determines that the change is insufficient to alter the model parameters. It then recalculates the set of similar weather days and their weights, and updates the model's input samples. This reduces unnecessary training overhead and prevents model instability caused by overly frequent fine-tuning.

[0159] When the change in the weather forecast exceeds a preset threshold, the system determines that the weather conditions for the target day have changed significantly. At this point, the system not only updates the set of similar weather days and the model input samples, but also incrementally corrects the model parameters using the most recently obtained actual weather data and actual time-of-use electricity price data. Incremental correction can either continue training for a preset number of rounds using the most recent date samples, or fine-tune the model parameters using a small learning rate.

[0160]

[0161] Equation (18) Model parameter incremental correction

[0162] Explanation of symbols in equation (18):

[0163] Updated parameters of the q-th time-segmented model Model parameters before update Learning rate The gradient of the loss function with respect to the model parameters based on the new samples

[0164] The technical advantage of this formula is that it allows the model to gradually absorb the latest samples after new weather conditions and new electricity price results appear, rather than being completely retrained, thus balancing adaptability and computational efficiency.

[0165] Regarding false alarm handling, when the weather forecast shows a large change but the meteorological data quality is low, the system does not directly trigger model parameter updates but first enters a pending confirmation state. If subsequent weather forecasts show the same trend twice in a row, or if actual meteorological observation data verifies the trend, the system then performs incremental correction of the model parameters. This process avoids erroneous updates caused by a single abnormal weather forecast.

[0166] Regarding anomaly handling, if the weights of meteorological similar days selected for a certain time period are highly concentrated on a single historical day, it indicates that the model prediction may be overly reliant on a single sample. The system can set a threshold for the concentration of similar day weights. When the weight of the largest similar day exceeds this threshold, the system expands the set of similar days or lowers the upper limit of the weight, making the model input more robust. If the output electricity price exceeds the preset market price boundary, the system records the anomaly and outputs the boundary-checked results, while retaining the original model output for manual review.

[0167] Through the above-mentioned daily rolling update, false alarm handling, and anomaly handling mechanisms, this invention can not only update the forecast results daily, but also select an appropriate correction intensity according to the magnitude of changes in weather forecasts, and perform degradation processing when the data quality is insufficient or the forecast results are abnormal, thereby improving the reliability of the system in the actual power market environment.

[0168] Example 8: Data Security, System Deployment, and Equipment Implementation

[0169] This embodiment illustrates the implementation of the present invention at the device and data security levels. The system can be deployed in a power market transaction auxiliary decision-making platform, an internal transaction analysis platform of a power sales company, a power generation enterprise quotation auxiliary system, or a cloud computing environment. The system may include a processor, a memory, a database, a communication interface, and a display terminal. The processor is used to execute the above method steps; the memory is used to store programs, meteorological feature libraries, model parameters, and prediction results; the communication interface is used to receive power market data and meteorological data; and the display terminal is used to display time-of-use electricity price prediction results and anomaly alerts.

[0170] To ensure data security, the system employs hierarchical storage and access control for electricity market and meteorological data. Raw data, cleaned data, meteorological feature databases, model training samples, model parameters, and prediction results can be stored separately, with data sources, update times, and processing logs recorded. For data involving enterprise trading strategies or pricing information, the system can save only the necessary prediction input fields and exclude sensitive fields unrelated to prediction.

[0171] During model training and daily rolling updates, the system records the similarity day selection results, similarity day weights, weather forecast changes, whether parameter updates are triggered, output electricity prices, and anomaly handling results. Log recording allows for tracing specific inputs and processing paths when disputes arise regarding prediction results, improving system auditability.

[0172] This invention can also be implemented as a computer program product or a computer-readable storage medium. The computer-readable storage medium stores a program that, when executed by a processor, implements the steps of data access, preprocessing and feature extraction, time-segmented meteorological similarity day assessment, coupled sample construction, model training, daily rolling update, and prediction output in the method of this invention. This device implementation supports the system subject matter of the claims and enables those skilled in the art to implement this invention according to the description.

[0173] Example 9: Exemplary Operation Process

[0174] The following is an exemplary operating procedure to further illustrate the feasibility of the present invention. Assume that a certain electricity market divides a day into peak hours, normal hours, and valley hours. The system needs to predict the peak hour electricity price, normal hour electricity price, and valley hour electricity price for the day following the target date. The system first accesses historical time-of-use electricity price data from the past several months or years, and then accesses temperature, humidity, wind speed, and solar irradiance data within the same date range.

[0175] The system cleans historical meteorological data, filling in missing values ​​and correcting outliers. It then extracts features such as daily maximum temperature, daily average humidity, daily average wind speed, daily cumulative solar irradiance, and hourly temperature change rate. Next, the system calculates the weights of meteorological features for peak, normal, and off-peak periods based on historical data. If historical data indicates that electricity prices are more sensitive to temperature during peak periods, temperature-related features have a higher weight during peak periods; conversely, if electricity prices are more sensitive to solar irradiance during normal periods, solar irradiance-related features have a higher weight during normal periods.

[0176] When forecasting the target day, the system acquires the latest weather forecast data and extracts the meteorological features of the target day. For peak periods, the system calculates the daily meteorological similarity distance between the target day and each historical day based on the peak period weight, and calculates the time-series meteorological similarity distance based on the hourly set corresponding to the peak period. These are then fused to obtain the peak period meteorological similarity distance and to select meteorologically similar days for the peak period. For normal and valley periods, the system repeats the above process, but uses its own meteorological feature weights and corresponding hourly sets. Therefore, the sets of meteorologically similar days for the three periods can be different.

[0177] Subsequently, the system constructs electricity price-meteorological coupled input samples for peak, normal, and off-peak periods. Each sample includes daily meteorological characteristics of similar days, time-series meteorological characteristics for each time period, historical time-series electricity prices, similar day weights, and quality labels. The system inputs each time-series sample into the corresponding long short-term memory neural network model to obtain the predicted electricity prices for the target day's peak, normal, and off-peak periods.

[0178] The next day, the system retrieves the latest weather forecast data again. If the latest forecast indicates a sudden heat wave on the target day, while the previous day's forecast did not indicate this, the change in weather forecast exceeds a threshold. The system then re-filters the set of similar weather days and updates the weights of these days, while simultaneously fine-tuning the model parameters based on the most recently obtained actual electricity price data. In this way, the forecast results can promptly reflect potential load and electricity price changes caused by sudden heat waves.

[0179] If there is a large area of ​​missing data in the latest weather forecast, the system will mark that day as having abnormal data quality and generate a downgraded forecast result using the most recent valid weather forecast data or by expanding the range of similar days. The downgraded forecast result will have an anomaly flag in the output, indicating to the user that the confidence level of the result is lower than that of the normal forecast result.

[0180] This invention can be applied to long-term time-of-use (TOU) electricity price forecasting scenarios in the electricity market. Through dynamic matching of meteorologically similar days, TOU-meteorological coupled modeling, and daily rolling updates, this invention can generate TOU forecasts for at least one of the following day's peak, normal, and valley periods. The method can be executed by a server, cloud platform, or local computing device. The input data source is clear, the processing flow is repeatable, and the output results can be used for transaction auxiliary analysis, risk assessment, and price trend judgment. It can be manufactured or used and produces positive effects, demonstrating industrial applicability.

Claims

1. A method for medium- to long-term rolling time-of-use electricity price forecasting based on dynamic matching of meteorological similarity days, characterized in that, include: Access electricity market data and meteorological data, preprocess historical meteorological data, and extract daily meteorological features and time-series meteorological features from the preprocessed meteorological data to form a meteorological feature database; The target day to be predicted is divided into multiple time periods, and the influence weight of meteorological characteristics on the corresponding time period electricity price is determined for each time period. Based on the aforementioned influence weights, the daily meteorological similarity distance and the time-series meteorological similarity distance between the target day and historical days are calculated respectively, and the daily meteorological similarity distance and the time-series meteorological similarity distance are fused to obtain the time-segmented meteorological similarity distance; Based on the time-segmented meteorological similarity distance, a set of meteorological similar days that are closest to the meteorological conditions of the target day is selected from historical days, and the weight of the meteorological similar days is calculated. The daily meteorological features, time-series meteorological features, and weights of meteorological similar days in the meteorological similar day set are spatiotemporally aligned with the corresponding time-series electricity price data to form a time-series electricity price-meteorological coupled sample. Based on the time-of-use electricity price-meteorological coupled sample, a time-of-use electricity price prediction model is established using a long short-term memory neural network; The system acquires the latest weather forecast data daily, updates the weather feature database, recalculates the set of similar weather days and the weights of similar weather days corresponding to the target day, and performs rolling corrections on the time-of-use electricity price prediction model based on the recalculated set of similar weather days and the weights of similar weather days to generate the time-of-use electricity price prediction results for the next day.

2. The method for medium- and long-term rolling time-of-use electricity price forecasting based on dynamic matching of meteorological similar days according to claim 1, characterized in that, The meteorological data includes at least one of temperature, humidity, wind speed, and light intensity; the electricity market data includes historical electricity price data and at least one of peak-hour electricity price, normal-hour electricity price, and valley-hour electricity price; the preprocessing includes missing value imputation, outlier correction, and data quality verification, wherein the data quality verification is used to determine whether the historical meteorological data meets the integrity requirements for subsequent similar day calculation and model training.

3. The method for medium- and long-term rolling time-of-use electricity price forecasting based on dynamic matching of meteorological similar days according to claim 1, characterized in that, The daily meteorological features include at least one of daily maximum temperature, daily average humidity, daily average wind speed, and daily cumulative sunshine intensity; the temporal meteorological features include at least one of hourly temperature change rate, hourly humidity change rate, hourly wind speed change rate, and hourly sunshine intensity change rate; when the temporal meteorological features belong to the hour set corresponding to a certain time period, the temporal meteorological features are aggregated to that time period.

4. The method for medium- and long-term daily rolling time-of-use electricity price forecasting based on dynamic matching of meteorological similar days according to claim 1, characterized in that, For any given time period, the influence weights are determined based on the correlation between historical meteorological characteristics and historical electricity prices for that time period. The influence weights corresponding to each meteorological characteristic are then normalized so that the sum of the influence weights of each meteorological characteristic in the same time period is one.

5. The method for medium- and long-term rolling time-of-use electricity price forecasting based on dynamic matching of meteorological similar days according to claim 1, characterized in that, The daily meteorological similarity distance is calculated using weighted Euclidean distance; the temporal meteorological similarity distance is calculated using a dynamic time warping algorithm, which is used to perform time warping matching on the temporal meteorological feature sequence of the target day and the temporal meteorological feature sequence of historical days; the time-segmented meteorological similarity distance is obtained by fusing the daily meteorological similarity distance and the temporal meteorological similarity distance according to a fusion coefficient.

6. The method for medium- and long-term rolling time-of-use electricity price forecasting based on dynamic matching of meteorological similar days according to claim 1, characterized in that, The set of meteorological similar days is obtained by filtering historical days in ascending order of meteorological similarity distance across time periods, or by filtering candidate meteorological similar days from historical days according to a preset similarity distance threshold and then selecting a number of historical days with the smallest distance from the candidate meteorological similar days; the weight of the meteorological similar days increases as the meteorological similarity distance across time periods decreases.

7. The method for medium- and long-term rolling time-of-use electricity price forecasting based on dynamic matching of meteorological similar days according to claim 1, characterized in that, The process of forming the time-of-use electricity price-meteorological coupling sample includes: mapping daily meteorological features to each time period of the corresponding date, aggregating time-series meteorological features according to their respective hours to the corresponding time periods, aggregating hourly electricity prices into corresponding time-of-use electricity prices or directly reading the already formed time-of-use electricity prices, and combining daily meteorological features, time-of-use time-series meteorological features, time-of-use electricity prices, and the weights of meteorologically similar days into the model input sample for the corresponding time period.

8. The method for medium- and long-term rolling time-of-use electricity price forecasting based on dynamic matching of meteorological similar days according to claim 1, characterized in that, The time-of-use electricity price prediction model includes an input layer, a long short-term memory neural network layer, and an output layer. The input layer is used to receive a time-of-use electricity price-meteorological coupled sample sequence arranged in the order of meteorological similar days. The long short-term memory neural network layer is used to learn the temporal correlation between meteorological features, time-of-use historical electricity prices, and the weights of meteorological similar days. The output layer is used to output the predicted electricity price for the corresponding time period.

9. The method for medium- and long-term rolling time-of-use electricity price forecasting based on dynamic matching of meteorological similar days according to claim 1, characterized in that, The rolling correction includes: calculating the magnitude of the change in the latest weather forecast data relative to the weather forecast data used in the previous day's forecast; when the magnitude of the change in the weather forecast is not greater than a preset change threshold, updating the input samples of the time-of-use electricity price prediction model while keeping the model parameters unchanged; when the magnitude of the change in the weather forecast is greater than the preset change threshold, updating the input samples, and incrementally correcting the model parameters using the updated set of similar weather days, the weights of similar weather days, and the most recently obtained actual time-of-use electricity price data.

10. A medium- to long-term rolling time-of-use electricity price forecasting system based on dynamic matching of meteorological similarity days, characterized in that, include: The data access module is used to access electricity market data and meteorological data; The preprocessing and feature extraction module is used to preprocess historical meteorological data and extract daily meteorological features and time-series meteorological features; The time-segmented meteorological similarity day assessment module is used to determine the influence weight of time-segmented meteorological characteristics, calculate the time-segmented meteorological similarity distance, screen the set of meteorological similar days, and calculate the weight of meteorological similar days. The electricity price-meteorological coupled sample construction module is used to spatiotemporally align meteorological features and weights of meteorological similar days in the meteorological similar day set with the corresponding time-of-use electricity price data; the time-of-use electricity price prediction module is used to output the time-of-use electricity price prediction results for the next day using a long short-term memory neural network; The daily rolling update module is used to update the meteorological feature database daily based on the latest meteorological forecast data and to make rolling corrections to the input samples or model parameters. The system is configured to execute a medium- to long-term rolling time-of-use electricity price forecasting method based on dynamic matching of meteorological similar days, as described in any one of claims 1 to 9.