Electric power spot transaction optimization system

By optimizing the power spot trading system and combining a variety of advanced algorithms and modules, the data processing, supply and demand forecasting and power grid scheduling in power spot trading are solved, the stability and efficiency of the market are improved, market risks are reduced, and the healthy development of the power market is promoted.

CN120494184APending Publication Date: 2025-08-15HONG KONG CHINA (SHENZHEN) GREEN POWER CO LTD
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202510598429.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-09
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

The existing power spot trading system has problems of inefficiency and insufficient accuracy in data processing and pricing, supply and demand forecasting, power grid scheduling, market risk control and transaction abnormality detection, which affects market stability and efficiency.

Method used

The data acquisition module, dynamic pricing module, supply and demand prediction module, transaction optimization model construction module and real-time scheduling module are adopted, and the power spot trading process is optimized by combining deep reinforcement learning, federated learning, improved distributed alternating direction multiplication method, Bayesian network, isolated forest algorithm and genetic algorithm.

Benefits of technology

It has achieved the decision-making of market participants based on precise price signals, improve transaction efficiency, reduce resource waste, ensure grid stability, reduce market risks, and promote the healthy development of the power market.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120494184A_ABST
    Figure CN120494184A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of electric power spot transaction, and discloses an electric power spot transaction optimization system. The system comprises a data acquisition module, a dynamic pricing module, a supply and demand prediction module, a transaction optimization model construction module, a real-time scheduling module and the like. The data acquisition module acquires market data; the dynamic pricing module generates a dynamic electricity price strategy based on a deep reinforcement learning algorithm and a mixed integer programming model; the supply and demand prediction module predicts supply and demand through a federated learning framework aggregation model; the transaction optimization model construction module constructs an objective function and constraint conditions by combining the results; and the real-time scheduling module uses an improved algorithm to solve and generate an optimal scheduling scheme. In addition, the system also has the functions of risk control, abnormal transaction detection, intelligent contract management, performance evaluation and the like. The system can optimize electric power spot transaction, improve transaction efficiency, guarantee power grid stability, prevent and control market risks, and promote healthy development of the electric power market.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electric power spot trading, and in particular to an electric power spot trading optimization system. Background Art

[0002] With the continuous advancement of power market reform, electricity spot trading has gained widespread application and development worldwide. As a core component of the power market system, the rationality and operational efficiency of the electricity spot market's trading mechanisms directly impact the optimal allocation of power resources and the sustainable development of the power industry. However, current electricity spot trading faces numerous challenges in its actual operation.

[0003] In terms of transaction data processing and pricing, traditional electricity spot trading pricing methods often rely on simple cost-plus or empirical pricing models, which fail to accurately reflect the real-time supply and demand relationship in the electricity market and the operating status of the power grid. Electricity market transaction data is massive, complex, and dynamically changing. Traditional methods are unable to quickly process this data and generate reasonable electricity prices. This leads to large fluctuations in electricity prices, making it difficult for market participants to make trading decisions based on accurate price signals, which in turn affects market stability and efficiency. For example, during peak electricity demand periods, the inability to adjust electricity prices in real time based on load changes and generation costs can lead to power shortages or over-purchasing, resulting in wasted resources and economic losses.

[0004] When it comes to supply and demand forecasting, existing load forecasting models are mostly trained and predicted based on data from a single regional power grid, failing to fully leverage information from multiple regional power grids. Load fluctuations across different regional power grids exhibit certain correlations and complementarities, making it difficult to accurately grasp the supply and demand trends of the entire electricity market through isolated forecasts. Furthermore, power load is influenced by numerous factors, such as weather changes, economic activity, and residents' lifestyles. The complexity and uncertainty of these factors complicate forecasting. Existing forecasting models have limitations in handling these complex factors, resulting in significant deviations from actual conditions and a failure to provide a reliable basis for decision-making in electricity spot trading. For example, under extreme weather conditions, existing forecasting models may fail to accurately predict drastic load fluctuations, thus impacting the proper allocation and trading of electricity.

[0005] The real-time and efficient scheduling of power grids is also a major issue. The power system is a vast and complex network with a complex topology and strong coupling between regional power grids. Traditional scheduling methods suffer from low computational efficiency when dealing with large-scale, complex power systems, making it difficult to meet the requirements of real-time scheduling. Furthermore, traditional methods often fail to fully consider the stability and security constraints of the power grid, potentially increasing operational risks when conducting trading and scheduling. For example, when power transmission lines in certain regions are overloaded, traditional scheduling methods may be unable to adjust trading plans in a timely manner, threatening the safe and stable operation of the power grid.

[0006] Furthermore, the electricity spot trading market faces market risks and trading anomalies. Factors such as price fluctuations, unit failures, and force majeure pose risks to market participants, but existing risk identification and control methods are limited, failing to comprehensively and promptly detect and address potential risks. Furthermore, market manipulation occurs frequently, and traditional abnormal trading detection methods struggle to accurately identify these complex manipulations, impacting market fairness and justice. Regarding contract management, traditional trading contracts often have fixed terms and conditions that cannot be dynamically adjusted to market changes and participant needs. This results in inefficient contract execution and easily leads to disputes. Summary of the Invention

[0007] The purpose of the present invention is to provide an electricity spot transaction optimization system to solve the problems raised in the above background technology.

[0008] To achieve the above objectives, the present invention provides the following technical solution: a power spot trading optimization system, the system comprising:

[0009] A data acquisition module is used to obtain transaction node data, grid load data, and generator output data from the electricity spot market in real time, and mark the data as a transaction data set to be optimized;

[0010] A dynamic pricing module, configured to perform multi-objective optimization analysis on the transaction data set to be optimized based on a deep reinforcement learning algorithm and a mixed integer programming model, and generate a dynamic electricity price strategy;

[0011] The supply and demand forecasting module is used to aggregate the load forecasting models of multiple regional power grids through a federated learning framework to generate joint supply and demand forecast results;

[0012] A transaction optimization model construction module is used to combine the dynamic electricity price strategy with the joint supply and demand forecast results to construct the electricity spot transaction optimization objective function and constraint conditions;

[0013] A real-time scheduling module, configured to solve the objective function in parallel based on an improved distributed alternating direction multiplier method to generate an optimal transaction scheduling plan;

[0014] The specific improvement method of the improved distributed alternating direction multiplier method is:

[0015] Divide regional sub-problems according to the grid topology and introduce slack variable balance inter-regional coupling constraints;

[0016] Global variables are updated through an asynchronous communication mechanism, and an adaptive step size strategy is used to accelerate convergence.

[0017] Preferably, the specific method of the federated learning framework is:

[0018] Obtain historical load data of each regional power grid from the local database, extract time series features and encrypt and transmit them to the central server;

[0019] Aggregate the model gradients of each region in the central server, use differential privacy technology to add noise to the gradients, and then update the global model parameters;

[0020] The updated global model parameters are distributed to each region, and training is iterated until the model converges.

[0021] Preferably, the supply and demand forecasting module further includes:

[0022] The transfer learning submodule is used to extract feature mapping relationships from similar power market scenarios and initialize regional prediction model parameters;

[0023] The time series analysis submodule is used to capture the periodicity and trend characteristics of load data through long short-term memory networks;

[0024] The feature fusion submodule is used to perform weighted splicing of transfer learning features and time series features to generate the final supply and demand forecast results.

[0025] Preferably, the specific method of constructing the transaction optimization model module is:

[0026] Define transaction cost minimization, grid stability maximization, and carbon emission constraints as a multi-objective optimization problem;

[0027] The multi-objective problem is converted into a single-objective problem, and the Pareto front is generated using an ε-constraint method;

[0028] The robustness of the Pareto solution set is evaluated based on Monte Carlo simulation, and the optimal solution is selected as the objective function parameter.

[0029] Preferably, the real-time scheduling module further includes:

[0030] The game theory submodule is used to build a non-cooperative game model between power generators and power buyers and calculate the Nash equilibrium solution;

[0031] The graph theory submodule is used to convert the power grid transmission capacity constraints into directed graph edge weight constraints and verify the feasibility of the scheduling scheme based on the maximum flow algorithm;

[0032] The iterative correction submodule is used to dynamically adjust the objective function weight according to the equilibrium solution and graph theory verification results.

[0033] Preferably, the system further comprises:

[0034] Risk control module, used to identify potential risk factors in the trading market based on Bayesian networks;

[0035] The specific construction method of the Bayesian network is:

[0036] Extract price volatility, unit failure rate and weather factors from historical transaction data as network nodes;

[0037] The node conditional probability table is calculated by maximum likelihood estimation, and the Markov chain Monte Carlo method is used for parameter learning;

[0038] Update network evidence nodes based on real-time data and output risk probability distribution.

[0039] Preferably, the risk control module further includes:

[0040] The data encryption submodule is used to homomorphically encrypt sensitive transaction data using lattice cryptography;

[0041] The specific method of the homomorphic encryption is:

[0042] Construct an encryption key pair based on the ring learning error problem and generate ciphertext data on the polynomial ring;

[0043] Execute transaction amount comparison and summation operations in an encrypted state and output encrypted risk assessment results.

[0044] Preferably, the system further comprises:

[0045] Abnormal transaction detection module, used to identify market manipulation based on the improved isolation forest algorithm;

[0046] The specific method of the improved isolation forest algorithm is:

[0047] Extract trading volume, quote deviation and time density as anomaly detection features;

[0048] An isolated tree forest is constructed through an adaptive partitioning strategy, and a dynamic depth threshold is introduced to optimize the anomaly score calculation;

[0049] If the anomaly score exceeds the historical percentile threshold, a transaction freeze instruction is triggered.

[0050] Preferably, the system further comprises:

[0051] Smart contract management module, used to dynamically optimize transaction contract terms based on genetic algorithms;

[0052] The specific optimization method of the genetic algorithm is:

[0053] Encode the contract terms into a binary gene sequence and define market fairness and execution efficiency as the fitness function;

[0054] The parent genes are screened through the tournament selection strategy, and the offspring population is generated using multi-point crossover and mutation operations;

[0055] Iterate and evolve until the fitness function converges, and output the optimal contract template.

[0056] Preferably, the system further comprises:

[0057] Performance evaluation module, used to quantify system optimization effects based on dynamic programming algorithms;

[0058] The specific implementation steps of the dynamic programming algorithm are:

[0059] The transaction cycle is divided into a multi-stage decision-making process, and the state variables of each stage are defined as the combination of grid load and electricity price;

[0060] The optimal value function is calculated recursively through the Bellman equation, and the optimal strategy path is solved backtrackingly;

[0061] Evaluate system optimization performance based on path deviation rate and generate iterative optimization suggestions.

[0062] Compared with the prior art, the present invention has the following beneficial effects:

[0063] In terms of data processing and pricing, the data acquisition module acquires multi-source data from the electricity spot market in real time, providing a foundation for precise analysis. The dynamic pricing module combines deep reinforcement learning algorithms with mixed integer programming models to deeply explore the value of this data. Taking into account factors such as power generation costs, grid transmission limitations, and market supply and demand, the resulting dynamic electricity pricing strategy accurately reflects real-time market changes. This enables market participants to make decisions based on accurate price signals, improving market transaction efficiency. For example, during peak hours, the system can increase electricity prices based on real-time load and power generation conditions, incentivizing the investment of more power generation resources, balancing supply and demand, avoiding significant price fluctuations, and ensuring stable market operation.

[0064] The supply and demand forecasting module utilizes a federated learning framework to aggregate load forecasting models across multiple regions, breaking down data silos and improving forecast accuracy. The transfer learning submodule draws on experience from similar markets to initialize the model. The time series analysis submodule utilizes a long-short-term memory network to capture load data characteristics. The feature fusion submodule integrates multiple features to generate accurate forecasts. This allows power companies to plan power generation and transmission schedules in advance, reducing power resource waste and shortages. For example, in the summer, accurate predictions of air conditioning load growth allow for optimal power generation scheduling, avoiding over- or under-generation of equipment, saving fuel costs, and ensuring a stable power supply.

[0065] The real-time scheduling module, based on an improved distributed alternating direction multiplier method, divides regional subproblems according to the grid topology, introduces slack variable balance regional coupling constraints, and solves the objective function in parallel through asynchronous communication and an adaptive step-size strategy to rapidly generate an optimal trading scheduling solution. Furthermore, game theory, graph theory, and iterative correction submodules work collaboratively to ensure that the scheduling solution balances the interests of market participants and grid operation safety. For example, when a section of the grid in a certain region undergoes maintenance, the system can rapidly adjust trading schedules to ensure reliable power transmission and reduce grid operation risks.

[0066] The risk control module utilizes Bayesian networks to identify potential risk factors, while the data encryption submodule employs lattice cryptography to encrypt sensitive transaction data, ensuring data security and privacy. The abnormal transaction detection module utilizes an improved isolation forest algorithm to accurately identify market manipulation and maintain market fairness. The smart contract management module optimizes contract terms using a genetic algorithm, improving market fairness and execution efficiency while reducing transaction disputes. The performance evaluation module utilizes a dynamic programming algorithm to quantify system optimization results, providing a basis for continuous improvement.

[0067] This system optimizes electricity spot transactions from multiple dimensions, improves resource allocation efficiency, ensures stable operation of the power grid, reduces market risks, promotes the healthy and sustainable development of the electricity market, and brings significant economic and social benefits to the power industry. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] Figure 1 This is a working principle diagram of the power spot trading optimization system according to the present invention;

[0069] Figure 2 Schematic diagram of the process of building a model for trading optimization;

[0070] Figure 3 This is the schematic diagram of data encryption and calculation for the risk control module;

[0071] Figure 4 This is the working principle diagram of the abnormal transaction detection module. DETAILED DESCRIPTION

[0072] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0073] See also Figures 1-4 The present invention provides an electricity spot trading optimization system, which aims to improve the efficiency and benefits of electricity spot trading and ensure the stable operation of the power grid. Its overall implementation scheme is as follows:

[0074] Data Collection Module: Leveraging advanced sensors and data transmission technology, this module collects real-time data from trading nodes in the electricity spot market, grid load data, and generator output data. This data comes from a wide range of sources, including power consumption information at each trading node, real-time load conditions on regional power grids, and real-time generator output. This collected data is marked as a trading dataset for optimization, providing a foundation for subsequent analysis and processing.

[0075] Dynamic Pricing Module: This module utilizes deep reinforcement learning algorithms and mixed integer programming models to perform multi-objective optimization analysis on a labeled dataset of transactions to be optimized. Deep reinforcement learning algorithms can learn optimal pricing strategies from large amounts of data, while mixed integer programming models consider various constraints, such as unit power generation capacity and grid transmission limitations. By combining these two technologies, a dynamic electricity pricing strategy is generated, enabling real-time adjustments to electricity prices based on market supply and demand and grid operation.

[0076] The supply and demand forecasting module leverages a federated learning framework to aggregate load forecasting models from multiple regional power grids. Each regional power grid compiles local historical load data, extracts time series features, and then transmits encrypted data to a central server. The central server aggregates the regional model gradients and uses differential privacy techniques to add noise to the gradients, protecting data privacy while updating the global model parameters. The updated parameters are then distributed to each region. After multiple iterations of training until the model converges, a joint supply and demand forecast is generated, providing accurate market supply and demand information for trading decisions.

[0077] The trading optimization model construction module combines dynamic electricity pricing strategies with joint supply and demand forecasts to construct the optimization objective function and constraints for electricity spot trading. This module considers factors such as transaction costs, grid stability, and carbon emissions, transforming the problem into a multi-objective optimization problem. This problem is then processed using specific methods, providing a foundation for subsequent solutions.

[0078] The real-time scheduling module uses an improved distributed alternating direction multiplier method to solve the constructed objective function in parallel. It divides the problem into regional subproblems based on the grid topology, introduces slack variables to balance inter-regional coupling constraints, utilizes asynchronous communication mechanisms to update global variables, and employs an adaptive step-size strategy to accelerate convergence. Ultimately, it generates an optimal transaction scheduling solution, achieving the rational allocation and scheduling of power resources.

[0079] The implementation of the present invention will be further described below with reference to Examples 1 to 6.

[0080] Example 1:

[0081] This example describes in detail the specific implementation of the federated learning framework in the supply and demand forecasting module, as well as the working principles of each submodule within the module.

[0082] During the implementation of the federated learning framework, each regional power grid first extracts historical load data from its local database. This data records the changes in the power grid's electricity load over a period of time and exhibits distinct time series characteristics, such as daily peaks and troughs, and weekly patterns in electricity consumption. To extract these time series features, methods such as Fourier transforms and wavelet transforms can be used to convert load data from the time domain to the frequency domain, obtaining characteristic information for different frequency components. For example, the Fourier transform can decompose load data into a superposition of sine and cosine waves of different frequencies, revealing periodic patterns in the data. The extracted features are then encrypted using encryption techniques, such as the Advanced Encryption Standard (AES) algorithm, and then transmitted to a central server.

[0083] After receiving the encrypted feature data of each region, the central server aggregates the model gradients. In machine learning, the gradient represents the rate of change of a function at a certain point. By aggregating the gradients of the models in each region, the update direction of the global model can be obtained. In order to protect data privacy, differential privacy technology is used to add noise to the gradient. Differential privacy technology adds appropriate noise to the gradient, making it difficult for an attacker to infer the information of the original data even if they obtain the noisy gradient. Specifically, assuming the gradient is g and the added noise is ∈, then the noisy gradient g ′ =g+∈, where ∈ typically follows a Laplace or Gaussian distribution, with parameters adjusted based on the privacy budget. After noise addition, the global model parameters are updated and distributed to each regional power grid. Each regional power grid continues training using the received parameters, iterating until the model converges and accurately reflects the load fluctuation patterns of each regional power grid.

[0084] The transfer learning submodule plays a key role in the supply and demand forecasting module. It extracts feature mapping relationships from similar electricity market scenarios. For example, it selects electricity market data from other regions with similar grid structures and electricity usage habits to the local area. Through comparative analysis, it identifies the mapping relationship between load characteristics and market factors. It is assumed that in similar markets, there is a linear relationship between temperature and electricity load, L = aT + b, where L represents electricity load, T represents temperature, and a and b are coefficients obtained through data analysis. This relationship is transferred to the local area and the regional forecast model parameters are initialized, allowing the model to converge to accurate forecast results more quickly.

[0085] The time series analysis submodule utilizes a long short-term memory (LSTM) network to capture the cyclical and trend characteristics of load data. LSTM is a special type of recurrent neural network (RNN) that effectively handles long-term dependencies in time series data. In LSTM, the forget gate, input gate, and output gate control determine which information to retain and which to update. For load data, LSTM can learn daily, weekly, and even monthly cyclical changes, as well as long-term trends in electricity consumption growth or decline.

[0086] The feature fusion submodule performs a weighted concatenation of transfer learning features and time series features. Assuming the transfer learning feature is F1 and the time series feature is F2, by setting weights w1 and w2 (w1 + w2 = 1), the final supply and demand forecast result F = w1F1 + w2F2 is generated. The weight setting can be adjusted based on the characteristics of the actual data and the forecast effect. For example, in situations with abundant historical data and a relatively stable market environment, the weight of the time series feature can be appropriately increased. In situations with significant market fluctuations and the influence of multiple external factors, the weight of the transfer learning feature can be increased to improve forecast accuracy.

[0087] Example 2:

[0088] When constructing the transaction optimization model, we first define transaction cost minimization, grid stability maximization, and carbon emission constraints as a multi-objective optimization problem. Transaction costs mainly include electricity purchase costs, transmission costs, etc. Assume that the electricity purchase cost is proportional to the amount of electricity purchased P buy and electricity price C price Related, can be expressed as Cost buy =P buy ×C price ; Transmission cost and transmission distance d, transmission loss rate λ and transmission power P trans It is related to the cost trans =P trans ×d×λ. Grid stability is usually measured by indicators such as grid voltage deviation and power fluctuation. Taking voltage deviation as an example, assuming that the actual voltage of node i is V i, rated voltage is V i0 , voltage deviation ΔV i =|V i -V i0 |, the grid stability index can be expressed as the sum of all node voltage deviations The smaller the value, the more stable the grid. The carbon emission constraint is calculated based on the type and power of the generator set. Different types of generator sets have different carbon emission coefficients. Assuming that the power of a generator set is P gen , the carbon emission coefficient is α, then the carbon emission of the unit E=P gen ×α, the total carbon emissions must meet certain constraints E total ≤E limit .

[0089] The above multi-objective problem is converted into a single-objective problem, and the ε-constraint method is used to generate the Pareto frontier. The basic idea of the ε-constraint method is to take one of the objectives as the optimization goal and transform the other objectives into constraints. For example, taking transaction cost minimization as the optimization goal, the grid stability and carbon emission constraints are set as and E total ≤E limit (where ∈1 is the set grid stability threshold.) By continuously adjusting the values of the constraints, the single-objective optimization problem is solved and a series of optimal solutions are obtained, which constitute the Pareto frontier.

[0090] The robustness of the Pareto solution set is evaluated based on Monte Carlo simulation. Monte Carlo simulation is a method for evaluating model performance through random sampling. For each solution in the Pareto solution set, input parameters are randomly sampled under a certain probability distribution, such as random perturbations of parameters such as electricity prices and load demand. Assuming N sampling cycles, the objective function value is calculated after each sampling cycle, resulting in a sample set of N objective function values. The robustness of the solution is evaluated by analyzing statistics such as the variance and standard deviation of these samples. The smaller the variance, the less sensitive the solution is to changes in the input parameters and the more robust it is. The most robust solution is selected as the objective function parameter to ensure the stability and reliability of the trading optimization model in actual operation.

[0091] Example 3:

[0092] The game theory submodule constructs a non-cooperative game model between power generators and power buyers and calculates the Nash equilibrium solution. In the electricity spot market, power generators want to sell electricity at a higher price to maximize profits, while power buyers want to buy electricity at a lower price to reduce costs. Assume that the power generation cost of power generator i is C i , the power generation is P i , the electricity price is p, then the profit function of the generator is π i =pP i-C i The electricity demand of electricity supplier j is D j , the price of electricity purchased is p, then the cost function of the electricity purchaser is Cost j =pD j In a non-cooperative game, both the generator and the buyer make decisions based on their own interests, without considering the impact of other participants' decisions on them. By solving the game model, we can find a Nash equilibrium solution, which means that no single player can improve their own profits by changing their strategy.

[0093] The graph theory submodule converts the transmission capacity constraints of the power grid into directed graph edge weight constraints and verifies the feasibility of the scheduling scheme based on the maximum flow algorithm. The nodes in the power grid (such as power plants, substations, load centers, etc.) are regarded as vertices of the directed graph, and the transmission lines are regarded as edges of the directed graph. The weight of each edge represents the transmission capacity constraint of the transmission line. For example, the transmission capacity of transmission line 1 is C l , then the weight of edge (i, j) (representing the transmission line from node i to node j) is C ij =C l The maximum flow algorithm calculates the maximum feasible current flow from the generator's node to the electricity purchaser's node. If the calculated maximum flow is greater than or equal to the electricity purchaser's demand, the current scheduling plan is feasible within the grid's transmission capacity; otherwise, the scheduling plan needs to be adjusted.

[0094] The iterative correction submodule dynamically adjusts the objective function weights based on the equilibrium solution and graph theory verification results. If the Nash equilibrium solution results in insufficient grid transmission capacity, or if graph theory verification finds the dispatch plan infeasible, then the current objective function weights are improperly set. For example, if it is found that power generators in a certain region are overgenerating, causing congestion in that region's transmission lines, while other regions are undergenerating, the objective function weighting of the profit of power generators in that region can be appropriately reduced, or the objective function weighting of grid stability can be increased. By continuously adjusting the weights and resolving the objective function, an optimal trading dispatch solution is obtained that satisfies both the interests of market participants and the operational constraints of the grid.

[0095] Embodiment 4:

[0096] This embodiment describes in detail the working principle and implementation of the risk control module and the data encryption submodule it contains.

[0097] In the risk control module, the potential risk factors of the trading market are identified based on the Bayesian network. First, the price volatility, unit failure rate and weather factors in the historical trading data are extracted as network nodes. The price volatility reflects the degree of price fluctuation in the electricity market. Assuming that the average price of electricity in a certain period of time is The standard deviation is σ, then the price volatility The unit failure rate represents the probability of a generator failure and can be determined through historical maintenance records and equipment operation data. Weather factors, such as temperature and humidity, can significantly impact power load, thus influencing power market supply and demand and prices.

[0098] Node conditional probability tables are calculated using maximum likelihood estimation. Maximum likelihood estimation is a statistical method used to estimate the optimal values of model parameters given observed data. For each node in a Bayesian network, the probability of that node taking on a given value, conditional on the values of other related nodes, is calculated based on historical data. For example, for the price volatility node, the probability distribution of price volatility is calculated under different unit failure rates and weather conditions. Parameter learning is performed using the Markov Chain Monte Carlo (MCMC) method, which gradually approximates the posterior distribution of the parameters by randomly sampling from the parameter space, thereby obtaining more accurate parameter estimates.

[0099] Based on real-time data, network evidence nodes are updated and a risk probability distribution is output. When new real-time data, such as real-time electricity prices, unit operating status, and weather information, is available, it is fed into the Bayesian network as evidence, updating the probability distribution of each node in the network to obtain the risk probability distribution under the current market conditions. For example, if real-time data indicates a unit failure, the unit failure rate node is updated, and the probability distributions of other nodes, such as price volatility, are recalculated to assess the risk of price fluctuations in the electricity market.

[0100] The data encryption submodule uses lattice cryptography to homomorphically encrypt sensitive transaction data. Based on the ring learning error (RLWE) problem, an encryption key pair is constructed to generate ciphertext data on a polynomial ring. The RLWE problem is a difficult problem in lattice cryptography. The encryption scheme constructed based on this problem has high security. Assume that in the polynomial ring On the , select a random vector s∈R m , error vector e∈R m , public key pk = As + e, private key sk = s, where A∈R m×n Is a random matrix. For plaintext m∈R, ciphertext c=m·pk+e ′ , where e ′ is another error vector.

[0101] Transaction amount comparison and summation operations are performed in an encrypted state, outputting an encrypted risk assessment result. Homomorphic encryption allows specific operations to be performed on ciphertext without decryption. For example, given two encrypted transaction amounts c1 and c2, c1 + c2 can be calculated in an encrypted state to obtain the encrypted total transaction amount. By performing operations on encrypted data, the privacy of transaction data is protected while completing the calculations required for risk assessment. The encrypted risk assessment result is ultimately output, which can only be decrypted by authorized users with the private key to obtain the true risk assessment information.

[0102] Example 5:

[0103] The abnormal transaction detection module extracts transaction volume, quote deviation, and time density as anomaly detection features. Transaction volume refers to the number of electricity transactions within a certain period of time. If the transaction volume within a certain period of time is significantly higher or lower than the normal level, there may be abnormal trading behavior. Quotation deviation is used to measure the degree of difference between the quotes of market participants and the market average quote. Assuming the market average quote is A participant's bid is q i , then the quote deviation Time density refers to the degree to which transactions are concentrated in time. For example, if a large number of transactions occur in a short period of time, there may be market manipulation.

[0104] Construct an isolation tree forest through an adaptive partitioning strategy. The isolation forest algorithm identifies outliers by constructing multiple isolation trees. During the construction process, the adaptive partitioning strategy dynamically adjusts the partitioning method according to the distribution of the data. For high-dimensional data space, a density-based partitioning method is used to perform more detailed partitioning in areas with dense data points and coarse-grained partitioning in sparse areas. For example, for a two-dimensional data space composed of trading volume and quote deviation, the space is divided into smaller sub-areas in areas where data points are concentrated to better capture the local characteristics of the data. A dynamic depth threshold is introduced to optimize the calculation of anomaly scores. The anomaly score is used to measure the possibility of a data point becoming an outlier. Assume that the path length of the data point x in the isolation tree T is h T (x), the average path length is c(n) (n is the number of training data), then the anomaly score The dynamic depth threshold is adjusted according to the distribution of historical data. If there are many abnormal points in the historical data, the depth threshold is appropriately lowered to improve the sensitivity of detection; otherwise, the depth threshold is increased to reduce false alarms.

[0105] If the anomaly score exceeds the historical quantile threshold, a transaction freeze is triggered. This threshold is determined based on the distribution of anomaly scores in historical transaction data, for example, the 95th percentile. If a transaction's anomaly score exceeds this threshold, the system deems the transaction abnormal and immediately triggers a transaction freeze, suspending the transaction pending further investigation and resolution to prevent market manipulation from negatively impacting the electricity market.

[0106] Example 6:

[0107] In the smart contract management module, transaction contract terms are dynamically optimized using a genetic algorithm. First, the contract terms are encoded, converting key clauses such as transaction price adjustment rules, delivery time, and liability for breach of contract into binary genetic sequences. This encoding process lays the foundation for subsequent genetic algorithm operations, ensuring that the contract terms are presented in a form that can be processed by the algorithm.

[0108] Next, we define the fitness function, using market fairness and execution efficiency as the measurement criteria. Market fairness aims to ensure a balance of interests among different market participants. When calculating the market fairness index, we need to consider the benefits of generators and buyers. Assume that the set of generators is I, the set of buyers is J, and the benefit of generator i is R i , the revenue of e-commerce merchant j is G j First calculate the average revenue of the power generator Average revenue of e-commerce shopping Market Fairness Index The smaller the F value, the closer the benefits of each participant are to the average level and the higher the market fairness.

[0109] Execution efficiency is mainly measured from two aspects: the time required for contract execution and the transaction cost. Assuming that the contract execution time is t and the transaction cost is C, the execution efficiency index is A larger E value indicates that, given the same volume of business, the time and cost required to complete the contract are reduced, resulting in higher execution efficiency. Taking these two factors into consideration, we construct a fitness function: fitness = w1F + w2E, where w1 and w2 are weight coefficients, and w1 + w2 = 1. The weights can be adjusted based on actual needs and market priorities.

[0110] In genetic algorithm operations, parent genes are selected using a tournament selection strategy. K individuals are randomly selected from the population to form a tournament group. Within the group, the fitness of the individuals is compared, and the individual with the highest fitness is selected as the parent to participate in the next generation of reproduction. For example, if k = 5, five individuals are randomly selected each time, and the one with the best fitness is chosen. This selection method ensures that individuals with higher fitness have a greater chance of passing their genes to the next generation.

[0111] The offspring population is generated using multi-point crossover and mutation operations. Multi-point crossover randomly determines multiple crossover points on the selected parent gene sequence and then exchanges gene segments between the parents to produce new gene combinations. Mutation randomly changes certain bits in the gene sequence with a certain probability, introducing new genetic features, increasing population diversity, and preventing the algorithm from prematurely falling into a local optimum. Through multiple rounds of iterative evolution, individuals in the population are continuously optimized until the fitness function converges. At this point, the gene sequence corresponding to the individual output becomes the optimal contract template, effectively improving contract execution efficiency while ensuring market fairness.

[0112] The performance evaluation module quantifies the system's optimization effectiveness using a dynamic programming algorithm. First, the transaction cycle is divided into a multi-stage decision-making process. The state variables for each stage are defined as a combination of grid load and electricity price. Let L be the grid load and P be the electricity price. The state of each stage can be expressed as (L, P). This method breaks down the complex problem of the entire transaction cycle into a series of relatively simple sub-problems.

[0113] The optimal value function is calculated recursively using the Bellman equation. The general form of the Bellman equation is Where V(s t ) means in state s t The optimal value function under a t is in state s t Action taken under t ,a t ) is to take action t After the state s t The immediate reward obtained by transferring to the next state, γ is a discount factor used to measure the importance of future rewards, and its value range is usually between [0,1]. t+1 is to take action t The next state after. In this system, the immediate reward r(s t ,a t ) can be associated with factors such as trading revenue and grid stability. Through continuous recursive calculation, starting from the last stage of the trading cycle and working backwards, the optimal value function in the initial state is finally obtained.

[0114] Backtracking to find the optimal strategy path. Based on the calculated optimal value function, starting from the initial state, and following the principle of selecting the optimal action each time, we gradually backtrack to determine the optimal decision at each stage, thus obtaining the complete optimal strategy path. For example, in the initial state (L1, P1), the optimal value function determines action a1, leading to the next state (L2, P2). From there, we then determine the optimal action a2, and so on, until the end of the trading cycle.

[0115] The system optimization performance is evaluated based on the path deviation rate. The path deviation rate is used to measure the difference between the actual execution strategy path and the optimal strategy path. Assuming that the optimal strategy path is S optimal =(s1,s2,…,s n ), the actual execution path is S actual =(s′1,s′2,…,s′ n ), path deviation rate Where ‖·‖ represents a distance metric, such as Euclidean distance. A smaller D value indicates that the system's actual operation is closer to the optimal strategy and the optimization performance is better. Based on the calculated path deviation rate, we analyze system issues and generate targeted iterative optimization recommendations to continuously improve overall system performance.

[0116] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus.

[0117] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.

Claims

1. An electricity spot trading optimization system, characterized in that: include: A data acquisition module is used to obtain transaction node data, grid load data, and generator output data from the electricity spot market in real time, and mark the data as a transaction data set to be optimized; A dynamic pricing module, configured to perform multi-objective optimization analysis on the transaction data set to be optimized based on a deep reinforcement learning algorithm and a mixed integer programming model, and generate a dynamic electricity price strategy; The supply and demand forecasting module is used to aggregate the load forecasting models of multiple regional power grids through a federated learning framework to generate joint supply and demand forecast results; A transaction optimization model construction module is used to combine the dynamic electricity price strategy with the joint supply and demand forecast results to construct the electricity spot transaction optimization objective function and constraint conditions; A real-time scheduling module, configured to solve the objective function in parallel based on an improved distributed alternating direction multiplier method to generate an optimal transaction scheduling plan; The specific improvement method of the improved distributed alternating direction multiplier method is: Divide regional sub-problems according to the grid topology and introduce slack variable balance inter-regional coupling constraints; Global variables are updated through an asynchronous communication mechanism, and an adaptive step size strategy is used to accelerate convergence.

2. The power spot transaction optimization system according to claim 1, characterized in that: The specific method of the federated learning framework is: Obtain historical load data of each regional power grid from the local database, extract time series features and encrypt and transmit them to the central server; Aggregate the model gradients of each region in the central server, use differential privacy technology to add noise to the gradients, and then update the global model parameters; The updated global model parameters are distributed to each region, and training is iterated until the model converges.

3. The power spot transaction optimization system according to claim 2, characterized in that: The supply and demand forecasting module also includes: The transfer learning submodule is used to extract feature mapping relationships from similar power market scenarios and initialize regional prediction model parameters; The time series analysis submodule is used to capture the periodicity and trend characteristics of load data through long short-term memory networks; The feature fusion submodule is used to perform weighted splicing of transfer learning features and time series features to generate the final supply and demand forecast results.

4. The power spot transaction optimization system according to claim 3, characterized in that: The specific method of constructing the transaction optimization model module is as follows: Define transaction cost minimization, grid stability maximization, and carbon emission constraints as a multi-objective optimization problem; The multi-objective problem is converted into a single-objective problem, and the Pareto front is generated using an ε-constraint method; The robustness of the Pareto solution set is evaluated based on Monte Carlo simulation, and the optimal solution is selected as the objective function parameter.

5. The power spot transaction optimization system according to claim 4, characterized in that: The real-time scheduling module also includes: The game theory submodule is used to build a non-cooperative game model between power generators and power buyers and calculate the Nash equilibrium solution; The graph theory submodule is used to convert the power grid transmission capacity constraints into directed graph edge weight constraints and verify the feasibility of the scheduling scheme based on the maximum flow algorithm; The iterative correction submodule is used to dynamically adjust the objective function weight according to the equilibrium solution and graph theory verification results.

6. The power spot transaction optimization system according to claim 1, characterized in that: Also includes: Risk control module, used to identify potential risk factors in the trading market based on Bayesian networks; The specific construction method of the Bayesian network is: Extract price volatility, unit failure rate and weather factors from historical transaction data as network nodes; The node conditional probability table is calculated by maximum likelihood estimation, and the Markov chain Monte Carlo method is used for parameter learning; Update network evidence nodes based on real-time data and output risk probability distribution.

7. The power spot transaction optimization system according to claim 6, characterized in that: The risk control module also includes: The data encryption submodule is used to homomorphically encrypt sensitive transaction data using lattice cryptography; The specific method of the homomorphic encryption is: Construct an encryption key pair based on the ring learning error problem and generate ciphertext data on the polynomial ring; Execute transaction amount comparison and summation operations in an encrypted state and output encrypted risk assessment results.

8. The power spot transaction optimization system according to claim 1, characterized in that: Also includes: Abnormal transaction detection module, used to identify market manipulation based on the improved isolation forest algorithm; The specific method of the improved isolation forest algorithm is: Extract trading volume, quote deviation and time density as anomaly detection features; An isolated tree forest is constructed through an adaptive partitioning strategy, and a dynamic depth threshold is introduced to optimize the anomaly score calculation; If the anomaly score exceeds the historical percentile threshold, a transaction freeze instruction is triggered.

9. The power spot transaction optimization system according to claim 1, characterized in that: Also includes: Smart contract management module, used to dynamically optimize transaction contract terms based on genetic algorithms; The specific optimization method of the genetic algorithm is: Encode the contract terms into a binary gene sequence and define market fairness and execution efficiency as the fitness function; The parent genes are screened through the tournament selection strategy, and the offspring population is generated using multi-point crossover and mutation operations; Iterate and evolve until the fitness function converges, and output the optimal contract template.

10. The power spot transaction optimization system according to claim 9, characterized in that: Also includes: Performance evaluation module, used to quantify system optimization effects based on dynamic programming algorithms; The specific implementation steps of the dynamic programming algorithm are: The transaction cycle is divided into a multi-stage decision-making process, and the state variables of each stage are defined as the combination of grid load and electricity price; The optimal value function is calculated recursively through the Bellman equation, and the optimal strategy path is solved backtrackingly; Evaluate system optimization performance based on path deviation rate and generate iterative optimization suggestions.

Citation Information

Cited By

  • Electric power transaction strategy generation method and system based on Monte Carlo simulation and deep learning

    CN120707198A

  • Medium and long term spot green certificate fused intelligent power transaction management platform

    CN120996936A

  • Power grid project selection method and system based on artificial intelligence

    CN121072968A

  • Financial risk control risk level generation method and system based on communication behavior data

    CN121580173A

  • Power distribution network operation optimization method and system based on partition electricity price

    CN122114558A