Electricity price deviation degree determination method and system

By constructing a price deviation prediction model based on a long short-term memory network, the problems of scattered and dynamic electricity market data were solved, enabling accurate prediction and real-time control of price deviation, and improving the stability and operational efficiency of the electricity market.

CN121526718APending Publication Date: 2026-02-13ZHEJIANG ELECTRIC POWER TRADING CENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511645331.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-11
Publication Date
2026-02-13

AI Technical Summary

Technical Problem

In existing technologies, electricity market data is scattered, mechanisms are complex, and dynamics are highly variable, resulting in large deviations in the predicted value of electricity price deviation. There is a lack of real-time control tools, making it difficult to achieve market optimization.

Method used

An initial electricity price deviation prediction model was constructed using a long short-term memory network. The model was trained by data cleaning, outlier handling and standardization, combined with a loss function and Adam optimizer. Post-processing was performed using exponential smoothing and weighted averaging to generate a report on regulatory measures.

Benefits of technology

This improves the accuracy and practicality of spot electricity price deviation analysis, provides a scientific basis for optimizing and regulating the electricity market, and enables accurate understanding and real-time regulation of market mechanisms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121526718A_ABST
    Figure CN121526718A_ABST
Patent Text Reader

Abstract

The invention provides an electricity price deviation degree determination method and system. The method comprises the steps of obtaining an electricity price data set; based on the electricity price data set, constructing an initial electricity price deviation degree prediction model by using a long short-term memory network; training the initial electricity price deviation degree prediction model to obtain a target electricity price deviation degree prediction model; determining electricity price deviation degree prediction data based on the target electricity price deviation degree prediction model; and performing post-processing operation on the electricity price deviation degree prediction data to obtain target electricity price deviation degree prediction data, so as to solve the problem of large deviation of the prediction value of the electricity price deviation degree caused by scattered electricity market data, complex mechanism and strong dynamic nature at present.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data monitoring technology, and in particular to a method and system for determining electricity price deviation. Background Technology

[0002] With the gradual opening and deepening reform of the electricity market, the spot electricity price, as a core indicator of electricity market transactions, has become increasingly complex in its formation mechanism and significantly more volatile. The spot electricity price is not only directly affected by market supply and demand, but also closely related to multiple factors such as policy regulation, weather changes, and the connection between medium- and long-term transactions. In the operation of the electricity market, accurately analyzing the deviation of the spot electricity price (i.e., the degree of deviation between the actual electricity price and the reasonable benchmark price) is a key requirement for ensuring the fair and stable operation of the market, and also an important basis for electricity trading entities to make decisions and for regulatory agencies to implement regulation.

[0003] Currently, electricity price deviation is determined at three levels: data integration, market mechanism modeling, and forecasting and regulation. The data integration level involves building data warehouses or integration platforms to integrate medium- and long-term transaction prices, spot market data, and external factors such as climate and load demand; however, the diverse data sources and inconsistent formats limit the efficiency of automated integration and sharing. The market mechanism modeling level uses a single supply-demand model or simple regression analysis to attempt to analyze the transmission relationship between medium- and long-term transactions and spot electricity prices, but it ignores the dynamic connection mechanism between the two, resulting in poor model adaptability. The forecasting and regulation level uses statistical or machine learning models built from historical data for electricity price forecasting, but it fails to fully consider non-linear factors such as policy adjustments and unforeseen events, leading to insufficient forecast accuracy. Furthermore, the lack of real-time regulation tools based on the analysis results hinders market optimization. Summary of the Invention

[0004] This application provides a method and system for determining electricity price deviation, in order to solve the technical problem that the predicted value of electricity price deviation is greatly deviated due to the current scattered data, complex mechanism and strong dynamics of the electricity market.

[0005] The first aspect of this application provides a method for determining electricity price deviation, including:

[0006] Obtain the electricity price dataset;

[0007] Based on the electricity price dataset, an initial electricity price deviation prediction model is constructed using a long short-term memory network.

[0008] The initial electricity price deviation prediction model is trained to obtain the target electricity price deviation prediction model;

[0009] Based on the target electricity price deviation prediction model, determine the electricity price deviation prediction data;

[0010] Post-processing is performed on the electricity price deviation prediction data to obtain the target electricity price deviation prediction data.

[0011] In some embodiments, the electricity price dataset includes:

[0012] The data includes electricity price data, market transaction structure data, electricity demand and load data, grid dispatch data, actual electricity price deviation data, actual market demand data, and actual environmental data. The market transaction structure data includes various trading mechanisms in the electricity market and policy regulation information. The actual electricity price deviation data is determined by the planned electricity price and the actual spot electricity price.

[0013] In some embodiments, the method further includes:

[0014] Perform data cleaning operations on the electricity price dataset; the data cleaning operations include:

[0015] The duplicate data in the electricity price dataset is deduplicated.

[0016] Determine the range of centralized data points for the electricity price dataset;

[0017] Delete the data in the electricity price dataset that is outside the set range of the data points;

[0018] The Z-Score method is used to detect outliers in the electricity price dataset, and the data corresponding to the outliers are deleted and marked as missing values.

[0019] Based on the missing values, the corrected data is obtained using the lookup and fill method and then populated into the electricity price dataset;

[0020] The data in the electricity price dataset is standardized using the Z-Score method.

[0021] In some embodiments, the method further includes:

[0022] The electricity price dataset is divided into a training set and a test set according to a preset ratio;

[0023] The initial electricity price deviation prediction model is trained using the training set to obtain the prediction result;

[0024] The prediction results are compared with the test set to obtain a prediction evaluation index; the prediction evaluation index is used to determine the degree of deviation between the prediction results and the test set.

[0025] If the predicted evaluation index is greater than the preset deviation level, then the amount of data in the electricity price dataset is increased;

[0026] If the predicted evaluation index is less than or equal to the preset deviation level, then the step of training the initial electricity price deviation prediction model is executed.

[0027] In some embodiments, the step of training the initial electricity price deviation prediction model to obtain a target electricity price deviation prediction model includes:

[0028] The initial electricity price deviation prediction model is trained using a loss function;

[0029] The Adam optimizer is used to adjust the weights and biases of the initial electricity price deviation prediction model;

[0030] Based on the trained initial electricity price deviation prediction model, the target electricity price deviation prediction model is obtained.

[0031] In some embodiments, the step of obtaining a target electricity price deviation prediction model based on the trained initial electricity price deviation prediction model includes:

[0032] The prediction error of the initial electricity price deviation prediction model is determined using the root mean square error.

[0033] The goodness of fit of the initial electricity price deviation prediction model is determined using the coefficient of determination.

[0034] Determine whether the prediction error is less than a preset error value and whether the goodness of fit is within a preset range;

[0035] If not, then the steps of training the initial electricity price deviation prediction model using the loss function and adjusting the weights and biases of the initial electricity price deviation prediction model using the Adam optimizer are repeated until the prediction error is greater than or equal to the preset error value and the goodness of fit is within the preset range, thus obtaining the target electricity price deviation prediction model.

[0036] In some embodiments, the post-processing operation on the electricity price deviation prediction data to obtain target electricity price deviation prediction data includes:

[0037] The electricity price deviation prediction data are smoothed using exponential smoothing and weighted average methods.

[0038] Obtain actual electricity price deviation data;

[0039] Based on the actual electricity price deviation data and the predicted electricity price deviation data, the difference between the actual deviation value and the predicted deviation value, as well as the prediction error rate of the target electricity price deviation prediction model, are determined.

[0040] Based on the difference and the prediction error rate, the predicted electricity price deviation data is corrected to obtain the predicted target electricity price deviation data.

[0041] In some embodiments, the method further includes:

[0042] Determine whether the predicted target electricity price deviation is greater than the upper limit of the electricity price deviation or less than the lower limit of the electricity price deviation;

[0043] If so, a regulatory measures report is generated based on the target electricity price deviation prediction data; the regulatory measures report is used to adjust the electricity price policy.

[0044] In some embodiments, the method further includes:

[0045] Obtain the actual electricity price deviation data corresponding to the predicted electricity price deviation data;

[0046] The actual data of the electricity price deviation is input into the target electricity price deviation prediction model, and the target electricity price deviation prediction model is trained using a loss function to adjust the model parameters.

[0047] A second aspect of this application provides a system for determining electricity price deviation, comprising:

[0048] The data acquisition module is configured to acquire electricity price datasets;

[0049] The model building module is configured to build an initial electricity price deviation prediction model based on the electricity price dataset using a long short-term memory network.

[0050] The model training module is configured to train the initial electricity price deviation prediction model to obtain the target electricity price deviation prediction model.

[0051] The data output module is configured to determine the electricity price deviation prediction data based on the target electricity price deviation prediction model;

[0052] The data optimization module is configured to perform post-processing operations on the electricity price deviation prediction data to obtain target electricity price deviation prediction data.

[0053] This application provides a method and system for determining electricity price deviation. The method includes: acquiring an electricity price dataset; constructing an initial electricity price deviation prediction model based on the electricity price dataset using a long short-term memory network; training the initial electricity price deviation prediction model to obtain a target electricity price deviation prediction model; determining electricity price deviation prediction data based on the target electricity price deviation prediction model; and performing post-processing operations on the electricity price deviation prediction data to obtain target electricity price deviation prediction data. This method aims to accurately grasp the relationships between market mechanisms, comprehensively consider multiple data factors, thereby improving the accuracy and practicality of spot electricity price deviation analysis and providing a scientific basis for the optimized regulation of the electricity market. Attached Figure Description

[0054] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0055] Figure 1 This is a flowchart of the method for determining the electricity price deviation in this application. Detailed Implementation

[0056] To enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in 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, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this application.

[0057] In some technologies, the dispersed nature of electricity market data, the complexity of mechanisms, and the high dynamism of the market lead to significant deviations in the predicted values ​​of electricity price deviation. To address this technical problem, this application provides a method and system for determining electricity price deviation, which are described below:

[0058] like Figure 1 The diagram shown is a flowchart of the method for determining the electricity price deviation in this application.

[0059] The first aspect of this application provides a method for determining electricity price deviation, including the following steps:

[0060] S100: Obtain the electricity price dataset; the electricity price dataset includes: electricity price data, market transaction structure data, electricity demand and load data, grid dispatch data, actual electricity price deviation data, actual market demand data, and actual environmental data; the market transaction structure data includes: various trading mechanisms in the electricity market and policy regulation information; the actual electricity price deviation data is determined by the planned electricity price and the actual spot electricity price. The electricity price dataset is used to support a predictive model for spot electricity price deviation, estimating the fluctuations and deviations of spot electricity prices in the future market. By analyzing the electricity price dataset, potential electricity price fluctuation trends can be identified in advance, thereby providing policymakers with effective market regulation suggestions.

[0061] The electricity price data includes historical electricity price data and medium- and long-term transaction electricity price data; the historical electricity price data is: H price =[p t-n , ..., p t-1 ];

[0062] Among them, H price Characterizing historical electricity price data series; P t The spot electricity price at time t represents the current price; n represents the length of the historical time window.

[0063] The medium- and long-term electricity price data are as follows:

[0064] Among them, H long Characterizing medium- and long-term electricity price data sequences; The medium- to long-term electricity price at time t.

[0065] The electricity price dataset also includes: external environmental factor data: E env =[T t ,R t W t ] T ;

[0066] E env External environment data; where T t For the temperature (°C) at this moment, R t For the precipitation (mm) at this moment, W t The wind speed at this moment (m / s).

[0067] The market transaction structure data is: M structure ={m1, m2, ..., m k};

[0068] Among them, M structure This is a market transaction structure dataset, containing various trading mechanisms and policy regulation information in the electricity market, m kKey parameters indicating specific market mechanisms or policies include: auction period length, market clearing frequency, auction price ceiling, price fluctuation ratio of medium- and long-term contracts, and term of medium- and long-term contracts.

[0069] The electricity demand and load data are: L demand =[l t ];

[0070] Among them, L demand For electricity demand data series, l t Let t be the electricity load demand at time t.

[0071] The power grid dispatch data is: D dispatch =[d t ];

[0072] Among them, D dispatch For power grid dispatch data sequences, d t This indicates the power grid dispatch load status at time t.

[0073] The electricity price dataset includes data related to the feedback mechanism; this data includes actual electricity price deviation data, actual market demand data, and actual environmental data; the feedback mechanism data is used to support the closed-loop correction of the spot electricity price deviation analysis, ensuring the real-time performance and accuracy of the prediction model and market regulation model.

[0074] The actual electricity price deviation data is: Δ price =[Δp t ]Δp t =|p plan -p actual |;

[0075] Δp t p represents the deviation of the actual electricity price. plan For planned electricity pricing, p actual This is the actual spot electricity price.

[0076] The actual market demand data is as follows:

[0077] L actual This represents actual market demand data, l tactual Let be the actual electricity demand at time t.

[0078] The actual environmental data is: E actual =[T actual R actual W actual ] T ;

[0079] E actualThis is actual environmental data, where T actual R represents the actual temperature (°C). actual W represents the actual precipitation (mm). actual The wind speed at this moment (m / s).

[0080] The method further includes the following steps:

[0081] To ensure the efficiency and accuracy of the subsequent model (target electricity price deviation prediction model), the collected electricity price dataset needs to be preprocessed. Data preprocessing includes steps such as data cleaning, outlier handling, missing value imputation, and standardization. The aim is to improve data quality and ensure that the input data can correctly support model training and prediction.

[0082] S110: Perform data cleaning on the electricity price dataset; data cleaning is the first step in data preprocessing, and its main purpose is to remove noise and inconsistencies from the data to ensure the validity and integrity of the data; the data cleaning operation includes:

[0083] S120: Perform a deduplication operation on the duplicate data in the electricity price dataset; by deduplicating the unique identifier of each sample and retaining unique data entries, it can be represented as:

[0084] D clean =RemoveDuplicates(D);

[0085] Where D is the original dataset (electricity price dataset), D clean This is the deduplicated dataset.

[0086] S130: Determine the set range of data points in the electricity price dataset; S140: Delete data points in the electricity price dataset that are outside the set range; Based on business rules or the reasonable range of data fields, filter out invalid or illogical data points. Assume that the electricity price data in the dataset must meet a certain reasonable range condition; data points less than 0 or greater than 1000 should be deleted. For example:

[0087] D valid ={d∈D|0≤d≤1000};

[0088] Where D is the original dataset (electricity price dataset), D valid This is the filtered, valid dataset.

[0089] S150: Use the Z-Score method to detect outliers in the electricity price dataset, and delete the data corresponding to the outliers and mark them as missing values; use the Z-Score method to detect outliers. The Z-Score is a standardization of the deviation of a data point from the mean, and the formula is as follows:

[0090]

[0091] Where X represents the data point, μ is the mean of the data, and σ is the standard deviation of the data. A Z-score exceeding the set threshold of 3 is considered an outlier. Outliers with a Z-score greater than 3 are deleted and marked as missing values.

[0092] S160: Based on the missing values, the corrected data is obtained using the lookup and imputation method and filled into the electricity price dataset; for sequences marked with missing values, the imputation method is used for filling, with the following formula:

[0093]

[0094] Among them, X new For the corrected data, X i For other data points, n is the number of data points.

[0095] S170: The data in the electricity price dataset is standardized using the Z-Score method. To ensure that features at different scales have equal influence and to prevent certain features from dominating the model training process due to different dimensions, data standardization is necessary. The Z-Score method is used for standardization.

[0096] The method further includes the following steps:

[0097] S180: Divide the electricity price dataset into a training set and a test set according to a preset ratio; divide the processed dataset using an 80:20 ratio:

[0098] D train D test =split(D,train_ratio=0.8);

[0099] Where D is the processed electricity price dataset, and train_ratio is the proportion of the training set. train For the training set, D test This is the test set.

[0100] S181: Train the initial electricity price deviation prediction model using the training set to obtain prediction results; S182: Compare the prediction results with the test set to obtain prediction evaluation indicators; the prediction evaluation indicators are used to determine the degree of deviation between the prediction results and the test set; the prediction evaluation indicators are used to measure the degree of deviation between the predicted data (prediction results) and the actual data (test set data), including MAE, MAPE, etc.

[0101] S183: If the prediction evaluation index is greater than the preset deviation level, then increase the amount of data in the electricity price dataset. It is worth noting that when the prediction evaluation index is greater than the preset deviation level, it means that the initial electricity price deviation prediction model cannot complete the prediction of electricity price deviation, which may be due to the small amount of training data. Therefore, it is necessary to increase the amount of data in the electricity price dataset.

[0102] S184: If the prediction evaluation index is less than or equal to the preset deviation level, then the step of training the initial electricity price deviation prediction model is executed. When the prediction evaluation index is less than or equal to the preset deviation level, it means that the initial electricity price deviation prediction model can complete the subsequent electricity price deviation prediction work, and the following steps can be executed.

[0103] The method further includes:

[0104] K-fold cross-validation was used to divide the electricity price dataset into K subsets for multiple rounds of training and validation to improve the stability and reliability of the initial electricity price deviation prediction model. The final cross-validation score is the average of the K round scores, CVk (i.e., the prediction evaluation metric), calculated as follows:

[0105]

[0106] in, This represents the model's evaluation score on the training and test sets in round i.

[0107] S200: Based on the electricity price dataset, an initial electricity price deviation prediction model is constructed using a long short-term memory network; using the processed electricity price dataset, an initial electricity price deviation prediction model is constructed using a long short-term memory network (LSTM), aiming to accurately predict the deviation of spot electricity prices through the analysis of market mechanisms and multi-dimensional data, and to provide a scientific basis for electricity market regulation and optimization.

[0108] LSTM is a special type of recurrent neural network (RNN). Its core lies in controlling the flow of information through a gating mechanism, thus avoiding the gradient vanishing problem in traditional RNNs with long-term dependent data. The basic unit of LSTM consists of an input gate, a forget gate, and an output gate, and it can effectively handle long-term dependencies in electricity price fluctuations. The basic structure formula of LSTM is as follows:

[0109]

[0110] Among them, i t It's the input gate, controlling the degree to which the current input information is received. t This is a forgetting gate, controlling the degree to which the current state forgets the state from the previous moment. t This is the output gate, which determines the output information at the current moment. (C)t This is a unit state, used to store long-term memory. t This is the hidden state, which is then used as the output of the LSTM network. t The input data is for the current time step. W and b are the weight matrix and bias term, respectively.

[0111] S300: Train the initial electricity price deviation prediction model to obtain the target electricity price deviation prediction model.

[0112] Specifically, the step of training the initial electricity price deviation prediction model to obtain the target electricity price deviation prediction model includes the following sub-steps:

[0113] S310: Train the initial electricity price deviation prediction model using a loss function; wherein, the mean squared error (MSE) is used as the loss function.

[0114]

[0115] Where L is the loss function, N is the number of samples, and y i This is the actual spot electricity price. These are the model's predicted values. By minimizing the loss function, the initial electricity price deviation prediction model can learn patterns from historical data.

[0116] S320: The Adam optimizer is used to adjust the weights and biases of the initial electricity price deviation prediction model. The Adam optimizer is used to adjust the weights and biases of the LSTM network. The Adam optimizer combines the advantages of momentum and adaptive learning rate, which can accelerate the training process and avoid local optima. The update formula for the Adam optimizer is:

[0117]

[0118] Where, m t v t These are exponentially weighted averages of the squares of momentum and gradient, respectively. Let α be the biased estimates of the momentum and the squared gradient, respectively, β1 and β2 be the decay rates of the momentum and the squared gradient, and ∈ be a small constant to prevent division by zero errors. This represents the gradient of the loss function L with respect to the parameter θ, where θ is W and b.

[0119] S330: Based on the trained initial electricity price deviation prediction model, the target electricity price deviation prediction model is obtained.

[0120] Specifically, the step of obtaining the target electricity price deviation prediction model based on the trained initial electricity price deviation prediction model includes the following sub-steps:

[0121] S331: Determine the prediction error of the initial electricity price deviation prediction model using the root mean square error (RMSE); use the root mean square error (RMSE) and the coefficient of determination (R²). 2 As an evaluation indicator:

[0122]

[0123] RMSE measures the error of the model's predictions. y is the model's predicted value. i This is the actual value. R is the mean of the actual values. 2 It reflects the goodness of fit of the model; the closer the goodness of fit value is to 1, the better the model is.

[0124] S332: Determine the goodness of fit of the initial electricity price deviation prediction model using the coefficient of determination; S333: Determine whether the prediction error is less than a preset error value and whether the goodness of fit is within a preset range; if the goodness of fit value is closer to 1, the model is better, and the preset range can be [0.9, 1.1].

[0125] S334: If not, then re-execute the steps of training the initial electricity price deviation prediction model using the loss function and adjusting the weights and biases of the initial electricity price deviation prediction model using the Adam optimizer until the prediction error is greater than or equal to the preset error value and the goodness of fit is within the preset range, to obtain the target electricity price deviation prediction model.

[0126] S400: Based on the target electricity price deviation prediction model, determine the electricity price deviation prediction data; using the trained LSTM model (target electricity price deviation prediction model), predict the spot electricity price deviation at future times. The prediction process is achieved through the model's forward propagation:

[0127]

[0128] in, X is the predicted value for the next time step. t This represents the input features at the current moment.

[0129] S500: Post-process the predicted electricity price deviation data to obtain the predicted target electricity price deviation data. To further improve the effectiveness of the prediction and provide a basis for decision-making in electricity market regulation, post-processing of the prediction results is necessary. The main objective of post-processing is to smooth and correct the prediction results to achieve stable and sustainable optimization of electricity prices. The specific implementation process of this step is as follows:

[0130] Specifically, the post-processing operation on the electricity price deviation prediction data to obtain the target electricity price deviation prediction data includes the following sub-steps:

[0131] S510: The electricity price deviation forecast data is smoothed using exponential smoothing and weighted average methods; the spot electricity price deviation forecast results usually exhibit a certain degree of volatility. In order to reduce the impact of market fluctuations, the forecast results need to be smoothed so that the electricity price forecast is more in line with the actual market operation.

[0132] For example, exponential smoothing is a commonly used smoothing technique that can eliminate random fluctuations in time series data and help identify trends. Its basic formula is as follows:

[0133]

[0134] in, The smoothed predicted value, y t This is the predicted value at the current moment. The value is the smoothed prediction value of the previous time step, and α is the smoothing coefficient, which ranges from [0,1].

[0135] For example, short-term electricity price forecasts may rely too heavily on recent observations while ignoring long-term market trends. The weighted average method can avoid this by giving greater weight to historical data; its basic formula is:

[0136]

[0137] in, w is the smoothed predicted value. i y is the weighting coefficient. t-i Historical data. Weighting coefficient w i satisfy And the most recent observation data is usually given a larger weight.

[0138] S520: Obtain actual electricity price deviation data.

[0139] S530: Based on the actual electricity price deviation data and the predicted electricity price deviation data, determine the difference between the actual deviation value and the predicted deviation value, as well as the prediction error rate of the target electricity price deviation prediction model; correct the prediction result by comparing the difference between the actual deviation and the predicted deviation. The specific calculation formula is as follows:

[0140]

[0141] in, The corrected prediction results For preliminary prediction results, Δ Pactual represents the deviation from the actual electricity price, Δ. Ppredicted λ is a correction factor used to predict the deviation of electricity prices.

[0142] S540: Based on the difference and the prediction error rate, the predicted electricity price deviation data is corrected to obtain the predicted target electricity price deviation data. The model output is adjusted based on historical prediction errors, using the following formula:

[0143]

[0144] in, The prediction result is after adaptive correction. The original predicted value, ∈ t-1 γ represents the prediction error at the previous moment, and γ is the correction coefficient.

[0145] The method further includes the following steps:

[0146] S600: Determine whether the predicted deviation data of the target electricity price is greater than the upper limit of the electricity price deviation or less than the lower limit of the electricity price deviation; by setting the upper and lower limits of the deviation, when the deviation of the spot electricity price exceeds the preset threshold, the market will initiate regulatory measures. The formula is as follows:

[0147]

[0148] Where, Δ Pt。adjusted The deviation of the regulated electricity price is represented by Max_limit and Min_limit, which are the upper and lower limits of the deviation, respectively. Δ Pt This represents the predicted deviation of the spot electricity price.

[0149] S700: If so, a regulatory measures report is generated based on the target electricity price deviation forecast data; this report is used to adjust the electricity price policy. When the spot electricity price deviation exceeds the control range (i.e., greater than the upper limit of the electricity price deviation or less than the lower limit of the electricity price deviation), it may trigger intervention measures by the government or market regulatory agencies. Regulatory measures include adjusting the electricity price ceiling, increasing market supply, and guiding demand response. At this time, the goal of regulation is to adjust the electricity price policy in real time based on market feedback to restore market balance.

[0150] The method further includes the following steps:

[0151] S800: Obtain the actual electricity price deviation data corresponding to the predicted electricity price deviation data; S900: Input the actual electricity price deviation data into the target electricity price deviation prediction model, train the target electricity price deviation prediction model using a loss function, and adjust the model parameters of the target electricity price deviation prediction model.

[0152] Specifically, after the implementation of regulations, a continuous feedback mechanism will be used to continuously optimize the prediction and regulation model for spot electricity price deviation, ensuring its adaptability and stability in the future market. The continuous feedback mechanism is as follows:

[0153]

[0154] Where, θ new For the updated model parameters, θ old These are the old model parameters, where η is the learning rate. This is the gradient of the loss function with respect to the model parameters.

[0155] This application provides a method for analyzing spot electricity price deviations that considers trading mechanisms and multi-dimensional data. The method includes the following key steps: First, multi-source data collection is performed, gathering data from various relevant factors such as medium- and long-term electricity prices, spot market transaction data, weather data, and load demand. This data provides the foundation for subsequent spot electricity price deviation analysis. Next, the collected data is preprocessed, including outlier removal, missing data filling, and standardization, to ensure data accuracy and completeness, thus providing a high-quality data foundation for subsequent modeling. Then, a model for analyzing the connection between trading mechanisms and electricity prices is constructed. Combining the data characteristics of medium- and long-term transaction prices and spot electricity prices, appropriate algorithms, such as deep learning models and time series forecasting models, are used to analyze the connection between medium- and long-term electricity prices and spot electricity prices, providing support for deviation analysis. Based on this analysis, a spot electricity price deviation prediction model is constructed using multi-dimensional data to accurately predict the changing trend of spot electricity price deviations, and the prediction results are fed back into the system. Finally, a feedback mechanism is established to compare the actual deviation of spot electricity prices with the prediction model, adjust and optimize model parameters, and continuously improve the prediction accuracy and analytical performance of the system.

[0156] The beneficial effects of the above technical solution are as follows: This application provides comprehensive and high-quality data support for spot electricity price deviation analysis through multi-source data acquisition and preprocessing, effectively solving the problems of scattered, inaccurate, and difficult-to-integrate data in traditional methods. By establishing a trading mechanism and electricity price linkage analysis model, the relationship between spot electricity prices and medium- and long-term electricity prices can be accurately grasped, providing a scientific basis for subsequent deviation prediction and greatly improving the accuracy of the analysis results. Combined with multi-dimensional data-driven and model optimization, market changes can be captured in real time, accurately predicting changes in spot electricity price deviation and providing more reliable market regulation suggestions. The implementation of the feedback mechanism realizes a closed-loop self-learning process of prediction-analysis-adjustment, continuously improving the system's accuracy and optimization performance, and significantly enhancing the scientificity and practicality of spot electricity price deviation analysis. In summary, the method of this application provides strong support for the optimization of the electricity market and the regulation of spot electricity prices, with significant innovation and practicality, and can effectively improve the stability and operational efficiency of the electricity market.

[0157] A second aspect of this application provides a system for determining electricity price deviation, comprising:

[0158] The data acquisition module is configured to acquire electricity price datasets;

[0159] The model building module is configured to build an initial electricity price deviation prediction model based on the electricity price dataset using a long short-term memory network.

[0160] The model training module is configured to train the initial electricity price deviation prediction model to obtain the target electricity price deviation prediction model.

[0161] The data output module is configured to determine the electricity price deviation prediction data based on the target electricity price deviation prediction model;

[0162] The data optimization module is configured to perform post-processing operations on the electricity price deviation prediction data to obtain target electricity price deviation prediction data.

[0163] It is worth noting that the effects of the above system embodiments can be found in the effects of the above method embodiments, and will not be repeated here.

[0164] The above detailed embodiments further illustrate the purpose, technical solution, and beneficial effects of the embodiments of this application. It should be understood that the above are merely specific embodiments of the embodiments of this application and are not intended to limit the protection scope of the embodiments of this application. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solutions of the embodiments of this application should be included within the protection scope of the embodiments of this application.

Claims

1. A method for determining electricity price deviation, characterized in that, include: Obtain the electricity price dataset; Based on the electricity price dataset, an initial electricity price deviation prediction model is constructed using a long short-term memory network. The initial electricity price deviation prediction model is trained to obtain the target electricity price deviation prediction model; Based on the target electricity price deviation prediction model, determine the electricity price deviation prediction data; Post-processing is performed on the electricity price deviation prediction data to obtain the target electricity price deviation prediction data.

2. The method for determining electricity price deviation according to claim 1, characterized in that, The electricity price dataset includes: The data includes electricity price data, market transaction structure data, electricity demand and load data, grid dispatch data, actual electricity price deviation data, actual market demand data, and actual environmental data. The market transaction structure data includes various trading mechanisms in the electricity market and policy regulation information. The actual electricity price deviation data is determined by the planned electricity price and the actual spot electricity price.

3. The method for determining electricity price deviation according to claim 1, characterized in that, The method further includes: Perform data cleaning operations on the electricity price dataset; the data cleaning operations include: The duplicate data in the electricity price dataset is deduplicated. Determine the range of centralized data points for the electricity price dataset; Delete the data in the electricity price dataset that is outside the set range of the data points; The Z-Score method is used to detect outliers in the electricity price dataset, and the data corresponding to the outliers are deleted and marked as missing values. Based on the missing values, the corrected data is obtained using the lookup and fill method and then populated into the electricity price dataset; The data in the electricity price dataset is standardized using the Z-Score method.

4. The method for determining electricity price deviation according to claim 1, characterized in that, The method further includes: The electricity price dataset is divided into a training set and a test set according to a preset ratio; The initial electricity price deviation prediction model is trained using the training set to obtain the prediction result; The prediction results are compared with the test set to obtain a prediction evaluation index; the prediction evaluation index is used to determine the degree of deviation between the prediction results and the test set. If the predicted evaluation index is greater than the preset deviation level, then the amount of data in the electricity price dataset is increased; If the predicted evaluation index is less than or equal to the preset deviation level, then the step of training the initial electricity price deviation prediction model is executed.

5. The method for determining electricity price deviation according to claim 1, characterized in that, The step of training the initial electricity price deviation prediction model to obtain the target electricity price deviation prediction model includes: The initial electricity price deviation prediction model is trained using a loss function; The Adam optimizer is used to adjust the weights and biases of the initial electricity price deviation prediction model; Based on the trained initial electricity price deviation prediction model, the target electricity price deviation prediction model is obtained.

6. The method for determining electricity price deviation according to claim 5, characterized in that, The step of obtaining the target electricity price deviation prediction model based on the trained initial electricity price deviation prediction model includes: The prediction error of the initial electricity price deviation prediction model is determined using the root mean square error. The goodness of fit of the initial electricity price deviation prediction model is determined using the coefficient of determination. Determine whether the prediction error is less than a preset error value and whether the goodness of fit is within a preset range; If not, then the steps of training the initial electricity price deviation prediction model using the loss function and adjusting the weights and biases of the initial electricity price deviation prediction model using the Adam optimizer are repeated until the prediction error is greater than or equal to the preset error value and the goodness of fit is within the preset range, thus obtaining the target electricity price deviation prediction model.

7. The method for determining electricity price deviation according to claim 1, characterized in that, The post-processing operation on the electricity price deviation prediction data to obtain the target electricity price deviation prediction data includes: The electricity price deviation prediction data are smoothed using exponential smoothing and weighted average methods. Obtain actual electricity price deviation data; Based on the actual electricity price deviation data and the predicted electricity price deviation data, the difference between the actual deviation value and the predicted deviation value, as well as the prediction error rate of the target electricity price deviation prediction model, are determined. Based on the difference and the prediction error rate, the predicted electricity price deviation data is corrected to obtain the predicted target electricity price deviation data.

8. The method for determining electricity price deviation according to claim 1, characterized in that, The method further includes: Determine whether the predicted target electricity price deviation is greater than the upper limit of the electricity price deviation or less than the lower limit of the electricity price deviation; If so, a regulatory measures report is generated based on the target electricity price deviation prediction data; the regulatory measures report is used to adjust the electricity price policy.

9. The method for determining electricity price deviation according to claim 1, characterized in that, The method further includes: Obtain the actual electricity price deviation data corresponding to the predicted electricity price deviation data; The actual data of the electricity price deviation is input into the target electricity price deviation prediction model, and the target electricity price deviation prediction model is trained using a loss function to adjust the model parameters.

10. A system for determining electricity price deviation, characterized in that, include: The data acquisition module is configured to acquire electricity price datasets; The model building module is configured to build an initial electricity price deviation prediction model based on the electricity price dataset using a long short-term memory network. The model training module is configured to train the initial electricity price deviation prediction model to obtain the target electricity price deviation prediction model. The data output module is configured to determine the electricity price deviation prediction data based on the target electricity price deviation prediction model; The data optimization module is configured to perform post-processing operations on the electricity price deviation prediction data to obtain target electricity price deviation prediction data.