Market operation simulation transaction system for electricity transaction

By adopting reverse reinforcement learning and causal inference technology in the power market simulation system, the behavior model of market entities is constructed, and the problem of insufficient prediction and optimization of the existing system in a complex market environment is solved, and more accurate market behavior prediction and more effective response to abnormal events are achieved.

CN119693020AActive Publication Date: 2025-03-25GUANGZHOU ELECTRIC POWER TRADING CENT CO LTD

Patent Information

Application Number
CN202411326796.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2025-03-25
Estimated Expiration
2044-09-23

AI Technical Summary

Technical Problem

When facing complex market environments and changing market conditions, existing power market simulation systems are difficult to provide accurate prediction and optimization suggestions, and there are shortcomings in the detection and response of abnormal events.

Method used

Design a market operation simulation trading system, adopt reverse reinforcement learning model and causal inference technology, and build a behavioral strategy and preference model of market entities through data collection, feature extraction and fusion, and apply it in subsystems such as market behavior prediction and simulation, abnormal detection and emergency response.

Benefits of technology

It significantly improves the accuracy of market behavior prediction and the ability to respond to abnormal events, optimizes market operations, reduces risks, and improves the confidence of market participants and the overall market stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119693020A_ABST
    Figure CN119693020A_ABST
Patent Text Reader

Abstract

The invention provides a market operation simulation transaction system for electricity transaction. The system comprises a data acquisition subsystem, a data acquisition subsystem, a market behavior prediction and simulation subsystem, an anomaly detection subsystem, an emergency response subsystem and a system optimization subsystem. The invention provides a brand new electricity market simulation system, which can significantly improve the accuracy of market behavior prediction and the capability of coping with abnormal events. Therefore, optimization of market operation is facilitated, risks are reduced, and confidence of market participants and stability of the whole market can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of power trading, and in particular relates to a market operation simulation trading system for power trading. Background Art

[0002] In modern power markets, with the diversification of energy structures and the increasing complexity of power trading mechanisms, the trading behaviors between market players (such as power generation companies, retailers, and consumers) have become increasingly unpredictable. Traditional power market operation simulation systems mainly rely on rule-based models and static data. Although these systems can simulate market behaviors within a certain range, they often find it difficult to provide accurate predictions and optimization suggestions when faced with complex market environments and changing market conditions. Such rule-based models usually assume that the behaviors of market players are static and linear, and do not consider the dynamic interactions and strategy changes between participants. However, in actual power markets, there are complex game relationships between various players, and decision-making behaviors are affected by a variety of factors (such as price fluctuations, changes in supply and demand, policy changes, etc.), which make market behaviors highly dynamic and nonlinear. In addition, abnormal events that often occur in the market (such as price manipulation, sudden imbalances in supply and demand, equipment failures, etc.) are also difficult to be quickly and accurately detected and responded to by traditional static simulation systems.

[0003] Existing technologies have significant deficiencies in dealing with the complexity of market behavior and anomaly detection. On the one hand, the prediction accuracy of traditional power market simulation systems is limited, making it difficult to dynamically adapt to market changes and update the strategies and preferences of market players in real time, resulting in large errors in market forecast results and a lack of accurate insight into future market evolution trends. On the other hand, existing anomaly detection methods are mainly based on rules or simple statistical models, which can often only detect surface anomalies but cannot identify the deep causes behind these anomalies, resulting in weak pertinence and effectiveness of emergency response measures. These technical defects not only affect the stability and efficiency of the power market, but also increase the risks and uncertainties of market participants. With the rapid development of artificial intelligence technology, especially the application of advanced algorithms such as reinforcement learning and causal inference, it is possible to fundamentally overcome the shortcomings of these existing technologies and improve the intelligence level of power market simulation systems. Summary of the invention

[0004] The purpose of this invention is to design a market operation simulation trading system for power trading, which provides a new power market simulation system that can significantly improve the accuracy of market behavior prediction and the ability to respond to abnormal events. This not only helps to optimize market operations and reduce risks, but also improves the confidence of market participants and the stability of the overall market.

[0005] In order to achieve the above object, the present invention provides a market operation simulation trading system for power trading, the system comprising the following subsystems:

[0006] The data acquisition subsystem is used to pre-process the data, and then extract and fuse the features of the pre-processed data to obtain a feature data set; the data acquisition subsystem performs the following steps:

[0007] Collect raw data from various data sources in the power market and pre-process the raw data to obtain multi-source data;

[0008] A data fusion method based on attention mechanism is used to extract and fuse features from multi-source data to obtain a fused feature matrix.

[0009] The time series segmentation method is used to partition the fusion feature matrix into training set and test set;

[0010] The market preference prediction subsystem is used to construct an inverse reinforcement learning model to infer the behavior strategies and preferences of market entities based on the fusion feature matrix; the market preference prediction subsystem performs the following steps:

[0011] Define the state space and action space of market entities based on the fused feature matrix;

[0012] Assume that the strategy of each market player is determined by an unknown reward function R(s t ,a t ) driven, and then adopts the strategy estimation method based on soft Q learning to model the behavior of market entities, and infers the reward function R(s) through historical data. t ,a t ), and also utilize the actual behavior sequence in historical data (s t ,a t ) to perform reverse optimization to minimize the difference between the actual observed behavior and the model predicted behavior; where s t Indicates the market status, a t Indicates market behavior;

[0013] According to the inferred reward function R(s t ,a t ) Recalculate the market player’s strategy π * , and generate the subject behavior model π * (s t ), the behavior model predicts the decision-making behavior of market entities under different conditions based on the optimal strategy, and then uses a cross-validation method to test the generated behavior model using a training set and a test set to evaluate the performance of the generated behavior model on unseen data;

[0014] Market behavior prediction and simulation subsystem is used to predict the market behavior according to the subject behavior model π * (s t ) simulates the interactive behaviors of market entities in different states and predicts the overall evolution trend of the market; the market behavior prediction and simulation subsystem performs the following steps:

[0015] According to the subject behavior model π * (s t ) Use the fusion feature matrix to introduce the market initial conditions to set the initial state space of the market players, and predict the optimal decision-making behavior of the market players based on the current market status;

[0016] In response to emergencies and unforeseen market behaviors in the power market, a feedback adjustment mechanism is introduced in the state transfer to reflect sudden changes in the market and dynamically adjust the market state;

[0017] Adopting the collaborative mechanism based on generalized linear model to build the subject behavior model π * (s t ) multi-agent simulation, while recording the current state of the market and the optimal decision-making behavior of market players at each time step, and updating the state of each agent to reflect the changes in interdependence and the market as a whole;

[0018] The anomaly detection subsystem is used to detect abnormal events in the power market using a causal inference method based on the market state at the next moment and the optimal decision-making behavior of the market players; the anomaly detection subsystem performs the following steps:

[0019] Extract characteristic variables required for causal analysis from the market status at the next moment and the optimal decision-making behavior of market players, and construct a causal graph;

[0020] By combining the causal graph structure, the market state at the next moment, and the optimal decision-making behavior of market players, intervention analysis is performed to detect anomalies in the market and obtain the anomaly source node;

[0021] Perform counterfactual analysis based on the abnormal source node to confirm the causal chain of the abnormal event;

[0022] Integrate the results of intervention analysis and counterfactual analysis to generate anomaly detection results and reports;

[0023] The emergency response subsystem is used to formulate an emergency response strategy for the power market according to the abnormality detection results; the emergency response subsystem performs the following steps:

[0024] Defining emergency response strategy variables based on anomaly detection results, where each strategy variable corresponds to a response measure to a specific abnormal event;

[0025] Construct an optimization problem, introduce the Lagrangian function to adjust the emergency strategy variables to minimize the optimization problem, and obtain the optimal emergency strategy variables and Lagrangian multipliers;

[0026] Construct a multi-objective emergency strategy control method based on the optimal emergency strategy variables, and dynamically adjust the optimal emergency strategy variables to respond to real-time market changes;

[0027] Apply the optimal emergency strategy variables to the actual power market and monitor and evaluate the execution effect in real time;

[0028] The system optimization subsystem is used to learn and optimize based on the execution feedback of the optimal emergency strategy variables.

[0029] Furthermore, the strategy estimation method based on soft Q learning is used to model the behavior of market entities, which is expressed as follows:

[0030]

[0031] Among them, s t represents the state vector of the current time step t, representing the characteristic variables of the electricity market; a t represents the action vector at the current time step t, indicating the decision-making behavior that the market entity may take; R(s t ,a t ) represents the reward function, which means that the market subject is in state s t Take action a t The immediate reward obtained; γ represents the discount factor, which indicates the degree of decay of future rewards, and its value range is between 0 and 1; Indicates the next state s t+1 The expected value of , provided that the current state is s t , perform action a t ;P(·|s t ,a t ) represents the state transition probability, which means that in state s t Next, perform action a t Then transfer to the next state s t+1 The probability of V π (s t+1 ) represents the state value function, which means that under the strategy π, the state s t+1 The cumulative expected reward at the beginning; γ is the discount factor, which indicates the degree of decay of future rewards, P(·|s t ,a t ) is the state transition probability, indicating that in state s t Next, perform action a t Then transfer to the next state s t+1 The probability of V π (s t+1) is the state value function, expressed as follows:

[0032]

[0033] Among them, V π (s t+1 ) indicates state s t+1 The value function of represents the action space, which represents the set of all possible actions; Q π (s t+1 ,a') indicates that under strategy π, state s t+1 The value function of action a'; exp represents the natural exponential function, which is used to calculate the soft maximum.

[0034] Furthermore, the actual behavior sequence (s t ,a t ) to perform reverse optimization and minimize the difference between the actual observed behavior and the model predicted behavior, which is expressed as follows:

[0035] Assuming that the behavior in the historical data is the optimal behavior sequence, the inverse optimization goal is to minimize the difference between the actual observed behavior and the model predicted behavior, which is expressed as follows:

[0036]

[0037] Among them, R(s t ,a t ) represents the reward function, which means that the market subject is in state s t Take action a t The instant reward obtained; Q π (s t ,a t ) means that under the strategy π, the state s t With action a t The value function of π (s t ,a t )-R(s t ,a t )) 2 represents the square of the error, which represents the difference between the value function and the reward function.

[0038] Solved by gradient descent method, where the reward function R(s t ,a t ) is calculated by the following formula, expressed as follows:

[0039]

[0040] in, represents the gradient of the value function to the reward function; 1 represents a constant term, which is used to calculate the gradient; γ represents the discount factor; ∑s t+1 For all possible next states s t+1 Sum; P(s t+1 |s t ,a t ) represents the state transition probability, which means that from state s t Execute action a t Transfer to state s t+1 probability; Represents the gradient of the state value function with respect to the value function.

[0041] Furthermore, the market initial condition is to add a volatility weight term to the market state vector to reflect the unpredictability of the initial market;

[0042] The feedback adjustment mechanism introduced in the state transfer reflects the sudden changes in the market, which is expressed as follows:

[0043]

[0044] Where, Δs t+1 represents the sudden state change, α represents the sensitivity parameter of the sudden event, represents the average behavior of the entities in the market, A vector representing the abnormal market behavior output by the anomaly detection model.

[0045] Furthermore, the collaborative mechanism based on the generalized linear model is used to construct a subject behavior model π * (s t ) is expressed as follows:

[0046]

[0047] Among them, w i represents the weight vector of the interaction between the ith subject and other subjects, b i represents the bias term, ∈ i represents a random noise term, which is used to simulate the uncertainty in the subject's decision-making. GLIM represents a collaborative mechanism based on a generalized linear model. represents the set of optimal decision-making behaviors;

[0048] At the same time, a weighted market volatility risk index is introduced and the probability of system failure To quantitatively assess the market's stability and potential risks, as follows:

[0049]

[0050]

[0051] Among them, σ(p t ) represents the standard deviation of market price fluctuations, max(d t -s t ) represents the maximum difference between demand and supply, represents the expected value of market operation cost, λ1, λ2 represent risk weight coefficients, γ represents exponential decay parameter, and N represents total duration.

[0052] Furthermore, the causal graph structure is: node set represents the market state characteristics and behavioral decision variables, and the edge set ε represents the causal relationship between the variables; each node Represents a feature variable or behavior variable, and the directed edge v between nodes i ,v j )∈ε represents the causal relationship, that is, v i Yes j The initial causal structure is inferred based on the statistical correlation of historical data and modified by expert knowledge.

[0053] Furthermore, the intervention analysis is performed by combining the causal graph structure, the market state at the next moment and the optimal decision-making behavior of the market players, specifically including:

[0054] Defining the intervention model Represents the node v i Apply intervention to make its value c, for each potential abnormal node v i , calculate the dependent variable v under the intervention condition j The expected change is expressed as follows:

[0055]

[0056] in, represents the dependent variable v after intervention j The expected value of represents the expected value before intervention; if If it exceeds the set threshold τ, then mark v i A potential abnormal source node;

[0057] After identifying potential anomaly source nodes, perform counterfactual analysis to confirm the causal chain of the anomaly event:

[0058] Counterfactual analysis verifies the impact of abnormal source nodes on market status by simulating hypothetical scenarios, quantifies the intensity of this impact, and defines counterfactual scenarios. Calculate the change in market state under the counterfactual state, expressed as follows:

[0059]

[0060] in, represents the hypothetical market state, represents the expected value of the market state under the counterfactual scenario; the calculation result Used to evaluate the abnormal source node v i Actual impact on market status and confirmation of abnormal causal chainv i →v j .

[0061] Furthermore, in the emergency response subsystem, the objective function is set Used to measure the effectiveness of emergency strategies, the objective function includes market stability, response cost and risk control, which is expressed as follows:

[0062]

[0063] in, represents the change in market status under the kth abnormal event, u k represents the emergency response strategy variable, w k represents the weight parameter, reflecting the priority of the kth event, c k represents the response cost coefficient and represents the implementation strategy u k The cost of; K represents the total number of events;

[0064] Objective Function The minimization of ensures that the emergency response strategy can effectively control market anomalies while reducing execution costs.

[0065] Furthermore, the objective function The solution is obtained by Lagrange multiplier method and constraint conditions, where the constraints include physical constraints and market constraints, which are expressed as follows:

[0066]

[0067] Where A represents the constraint matrix and b represents the constraint vector, ensuring that the emergency strategy variable u satisfies all physical and market constraints.

[0068] To solve the objective function Introducing Lagrangian function

[0069]

[0070] Through Finding the Gradient And perform iterative calculation to obtain the optimal emergency strategy variable u * and the Lagrange multiplier λ * ;

[0071] The multi-objective emergency strategy control method is constructed according to the optimal emergency strategy variable, and the optimal emergency strategy variable u obtained by optimization is * , introduce the strategy control matrix M and feedback correction vector f, and make dynamic adjustments to cope with real-time market changes.

[0072] Furthermore, in the system optimization subsystem, the evaluation function ε(u t+1 ), which is expressed as follows:

[0073]

[0074] Among them, ε(u t+1 ) represents the evaluation function of the strategy execution effect; w i Indicates the weight of each market status indicator, reflecting the importance of the indicator; r t+1,i and Represent the actual and predicted market status respectively;

[0075] By conducting quantitative evaluation on the effectiveness of strategy execution, we adjust strategies to cope with market changes and ensure the effectiveness of emergency response and market stability.

[0076] The beneficial technical effects of the present invention are at least as follows:

[0077] This invention uses reverse reinforcement learning technology to infer the decision-making strategies and preferences of market players (such as power companies, retailers, and consumers) from historical transaction data. Unlike traditional rule-based models, this method can dynamically adapt to changes in the market environment and update the behavior model of market players in real time. This innovation directly solves the problem that traditional systems cannot accurately simulate the dynamic behavior of market players, making market forecasts more accurate and the simulation system more insightful.

[0078] This invention uses reverse reinforcement learning technology to infer the decision-making strategies and preferences of market players (such as power companies, retailers, and consumers) from historical transaction data. Unlike traditional rule-based models, this method can dynamically adapt to changes in the market environment and update the behavior model of market players in real time. This innovation directly solves the problem that traditional systems cannot accurately simulate the dynamic behavior of market players, making market forecasts more accurate and the simulation system more insightful.

[0079] The present invention introduces causal inference technology and establishes an anomaly detection model based on a structural causal model, which can identify the causal relationship of abnormal events in the market. Through counterfactual analysis of causal inference, the system can simulate the potential effects of different emergency measures and automatically generate the best emergency response strategy. This innovation overcomes the defect that traditional anomaly detection methods can only identify surface abnormal phenomena and cannot reveal the underlying causes, and improves the accuracy and effectiveness of emergency response. BRIEF DESCRIPTION OF THE DRAWINGS

[0080] The present invention is further described using the accompanying drawings, but the embodiments in the accompanying drawings do not constitute any limitation to the present invention. A person skilled in the art can obtain other drawings based on the following drawings without creative work.

[0081] Figure 1 This is a framework diagram of a market operation simulation trading system for power trading according to an embodiment of the present invention. DETAILED DESCRIPTION

[0082] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.

[0083] In one or more embodiments, Figure 1 As shown, the present invention discloses a market operation simulation trading system for power trading, and the system includes the following subsystems:

[0084] The data acquisition subsystem 101 is used to pre-process the data, and then extract and fuse the features of the pre-processed data to obtain a feature data set; the data acquisition subsystem performs the following steps:

[0085] Raw data is collected from various data sources in the electricity market. These data include:

[0086] Historical transaction data (e.g. hourly electricity prices, electricity volumes, identities of buyers and sellers, etc.).

[0087] Real-time market data (e.g., current market demand and supply of electricity).

[0088] Weather data (e.g., temperature, humidity, wind speed, etc., external factors that affect electricity demand).

[0089] Economic indicator data (e.g. GDP growth rate, industrial production index, etc., macroeconomic factors affecting overall electricity consumption).

[0090] During the data collection process, it is necessary to ensure the synchronization of each data source. The timestamp alignment method is used to match all data sources with the most recent timestamp to ensure data consistency. The generated raw data matrix D = [d ij ], where i represents the time step and j represents the data type (such as electricity price, demand, temperature, etc.).

[0091] Furthermore, the following steps are performed on the collected data matrix D:

[0092] Denoising and outlier processing: Using a custom multi-dimensional denoising algorithm, the present invention constructs an optimization objective function to minimize the noise impact of the data. Suppose the original data is x ij , the noise model is ∈ ij , the optimization objective function is defined as:

[0093]

[0094] Among them, f(·) is a regularization function based on the distribution of historical data, which ensures that the denoised data still follows the historical pattern, and λ is a regularization parameter used to balance the denoising effect and data fidelity.

[0095] Furthermore, time series feature extraction extracts time series features that reflect the characteristics of the power market from the multidimensional data at each time step, such as periodic features (daily / weekly / seasonal fluctuations), trend features (long-term trend changes), and emergency event features (abnormal spikes or drops). Using a sliding window method W k Operate the data at each time step and define the feature extraction formula as:

[0096]

[0097] in is the extracted features of data type j at time t, μ j is the mean value of the data type, |W k | is the window width.

[0098] Furthermore, for the features extracted from multi-source data, a data fusion method based on attention mechanism is adopted. Suppose the feature matrix extracted from each data source is F j (For example, the historical transaction feature matrix F H 、Weather feature matrix F W , etc.), introduce an adaptive fusion weight vector α j (Weights are assigned according to the importance of each feature):

[0099]

[0100] Here, function g(·) is a feature selection model, which determines the importance of each feature by analyzing its influence on the target. Finally, the output fusion feature matrix F fused A complete structured dataset is formed, which is suitable for the next step of model training.

[0101] Furthermore, the fused feature matrix F fused The data is partitioned into training set and test set, and the time series segmentation method is used to ensure the time sequence of the data. In addition, each feature is normalized so that each feature has zero mean and unit variance, which can avoid the impact of feature dimensional differences on model training. The normalization formula is:

[0102]

[0103] Among them, μ(F (j) ) and σ(F (j) ) are the mean and standard deviation of feature j, respectively.

[0104] Through the current subsystem, data is systematically collected, cleaned, feature extracted, fused, partitioned, and normalized from multiple sources to generate a high-quality, structured feature dataset F fused This dataset not only retains the key characteristics of power market data, but also eliminates the interference of noise and outliers, and can provide accurate and reliable input for the next step of inverse reinforcement learning model. This data preprocessing solution is specially designed for the complexity and diversity of power market data, ensuring data quality and laying the foundation for the accurate prediction and anomaly detection of subsequent models.

[0105] The market preference prediction subsystem 102 is used to construct an inverse reinforcement learning model to infer the behavior strategies and preferences of market entities based on the fusion feature matrix; the market preference prediction subsystem performs the following steps:

[0106] Using the fusion feature matrix F obtained from the data acquisition subsystem fused First, we define the state space S and action space A of the market players. The state space S is a multidimensional vector representation composed of different characteristic variables of the power market (such as electricity price, demand, supply, weather, etc.), denoted as s t =[s t,1 ,s t,2 ,…,s t,n ], where t is the time step and n is the number of feature variables.

[0107] The action space A represents the decision-making behaviors that market entities may take under different conditions, such as buying, selling, adjusting power generation, etc. Assuming there are m different possible behaviors, the action vector is represented by a t =[a t,1,a t,2 ,…,a t,m ].

[0108] Furthermore, under the framework of inverse reinforcement learning, the present invention assumes that the strategy of each market player is determined by an unknown reward function R(s t ,a t ). The goal of this invention is to infer this reward function through historical data.

[0109] The present invention adopts a strategy estimation method based on soft Q learning to model the behavior of market players. Assume that the strategy π of the market player is to soft-maximize a value function Q π (s t ,a t ), the present invention defines the value function as follows:

[0110]

[0111] Among them, s t represents the state vector of the current time step t, and represents the characteristic variable of the electricity market. t represents the action vector at the current time step t, indicating the possible decision-making behavior of the market subject. R(s t ,a t ) represents the reward function, which means that the market subject is in state s t Take action a t The immediate reward obtained. γ represents the discount factor, which indicates the degree of decay of future rewards, and its value range is between 0 and 1. Indicates the next state s t+1 The expected value of , provided that the current state is s t , perform action a t . P(·|s t ,a t ) represents the state transition probability, which means that in state s t Next, perform action a t Then transfer to the next state s t+1 The probability of V π (s t+1 ) represents the state value function, which means that under the strategy π, the state s t+1 Cumulative expected reward at the start.

[0112] Among them, γ is the discount factor, which indicates the degree of decay of future rewards, P(·|s t ,a t ) is the state transition probability, indicating that in state s t Next, perform action a t Then transfer to the next state s t+1 The probability of V π(s t+1 ) is the state value function, defined as:

[0113]

[0114] Among them, V π (s t+1 ) indicates state s t+1 The value function of . represents the action space, which represents the set of all possible actions. π (s t+1 ,a') indicates that under strategy π, state s t+1 The value function of action a'. exp represents the natural exponential function, which is used to calculate the soft maximum.

[0115] This strategy estimation method takes into account the randomness of the strategy by introducing a soft value function, making the model more consistent with actual market conditions.

[0116] Furthermore, in order to infer the real reward function R(s t ,a t ), the present invention utilizes the actual behavior sequence (s t ,a t ) to perform reverse optimization. Assuming that the behavior in the historical data is the optimal behavior sequence, the reverse optimization goal is to minimize the difference between the actual observed behavior and the model predicted behavior:

[0117]

[0118] Among them, R(s t ,a t ) represents the reward function, which means that the market subject is in state s t Take action a t The instant reward received. π (s t ,a t ) means that under the strategy π, the state s t With action a t The value function of . represents the sum of all time steps t, which is used to accumulate errors. (Q π (s t ,a t )-R(s t ,a t )) 2 represents the square of the error, which represents the difference between the value function and the reward function.

[0119] This optimization problem can be solved by gradient descent method, where the reward function R(s t ,a t) is calculated by the following formula:

[0120]

[0121] in, Represents the gradient of the value function with respect to the reward function. 1 represents a constant term used to calculate the gradient. γ represents the discount factor. For all possible next states s t+1 Sum. P(s t+1 |s t ,a t ) represents the state transition probability, which means that from state s t Execute action a t Transfer to state s t+1 probability. Represents the gradient of the state value function with respect to the value function.

[0122] Through the back propagation algorithm, R(s t ,a t ) to make it closer to the decision preferences of actual market players.

[0123] Furthermore, using the optimized reward function R(s t ,a t ), recalculate the market player’s strategy π * , and generate a behavioral model. The model predicts the decision-making behavior of market players under different states based on the optimal strategy.

[0124] Furthermore, in order to verify the accuracy of the behavior model, the present invention adopts a cross-validation method to convert the data set F fused The model is divided into training set and test set to evaluate the performance of the model on unseen data. The output of the model is the predicted behavior sequence of market entities in the future time step. Right now:

[0125]

[0126] in, Represents the optimal behavior predicted by the model. Represents the action space, which represents the set of all possible actions. represents the optimal strategy π * Next, state s t With action a t The value function of . argmax represents the index of the maximum value, which is used to find the action that maximizes the value function.

[0127] in, The optimal behavior predicted by the model. By comparing the predicted behavior with the actual observed behavior, the accuracy and robustness of the model can be evaluated.

[0128] Through the market preference prediction subsystem, the inverse reinforcement learning model can structure the feature dataset F fused , effectively infer the decision-making strategies and preferences of different entities in the power market, and build a dynamic behavior model. This model provides a solid foundation for market behavior prediction and anomaly detection in subsequent steps, and ensures the dynamic adaptability and accuracy of the model.

[0129] The market behavior prediction and simulation subsystem 103 is used to predict the market behavior of the subject according to the subject behavior model π * (s t ) simulates the interactive behaviors of market entities in different states and predicts the overall evolution trend of the market; the market behavior prediction and simulation subsystem performs the following steps:

[0130] The market subject behavior model π output from the market behavior prediction and simulation subsystem * (s t ) to start, use F fused Defined features, initialize the market state space Initial state vector s0 = [s 0,1 ,s 0,2 ,…,s 0,n ] contains the key characteristics of the electricity market at the initial time point (such as electricity price, supply and demand balance, climate conditions, etc.), and the simulation environment is set as a time series Where N is the total number of time steps in the simulation.

[0131] In particular, in view of the high volatility characteristics of the power market, the present invention introduces a market initial condition setting with a penalty mechanism. The state vector s0 adds a volatility weight term β to reflect the unpredictability of the initial market:

[0132]

[0133] in, is the basic market state, Vol(p0) is the volatility of the initial market price, and β is the volatility weight, which reflects the fluctuation range of the market at the initial moment.

[0134] Furthermore, the behavior model driven state transition is performed using the behavior model π output from the second step. * (s t ), based on the current market status t , predicting the optimal decision-making behavior of market players

[0135]

[0136] Then, based on the predicted behavior The mutual influence relationship between the market players and the market status s of the next time step is updated t+1 The state transition formula is improved as follows, considering the supply-side response and demand-side elasticity in the electricity market:

[0137]

[0138] in, is the state transfer matrix, It is a function that describes the response of the demand side, indicating the response of market players to changes in electricity prices. η is an adjustment parameter that controls the impact of the demand side response.

[0139] Furthermore, in response to emergencies and unforeseen market behaviors in the power market, the present invention introduces an innovative feedback adjustment mechanism in state transfer. A nonlinear feedback term is introduced to reflect sudden changes in the market (such as equipment failures, large-scale power outages, etc.):

[0140]

[0141] Here, α is the sensitivity parameter of the sudden event, is the average behavior of the entities in the market. It is the market abnormal behavior vector output by the anomaly detection model.

[0142] The innovation of this formula is that it can dynamically adjust the market status through a feedback mechanism, making the simulation process more robust and realistic, and especially better reflecting the sudden characteristics of the electricity market.

[0143] Furthermore, based on the multi-agent simulation of the behavioral model, the market state s is recorded at each time step. t and the behavior of market players At the same time, the state of each subject is updated to reflect the changes in interdependence and the market as a whole. The present invention adopts a collaborative mechanism based on a generalized linear model (Generalized Linear Interaction Model, GLIM) to model the interaction between subjects:

[0144]

[0145] Among them, w i represents the weight vector of the interaction between the ith subject and other subjects, b i is the bias term, ∈ i is a random noise term used to model the uncertainty in the subject's decision.

[0146] Furthermore, the risk assessment of the power market is carried out by simulating the market status and behavior sequence. The present invention introduces a weighted market volatility risk index and the probability of system failure To quantitatively assess the market's stability and potential risks:

[0147]

[0148]

[0149] Among them, σ(p t ) is the standard deviation of market price fluctuations, max(d t -s t ) represents the maximum difference between demand and supply, is the expected value of market operation cost, λ1, λ2 are risk weight coefficients, and γ is the exponential decay parameter.

[0150] The anomaly detection subsystem 104 is used to detect abnormal events in the power market using a causal inference method based on the market state at the next moment and the optimal decision-making behavior of the market players; the anomaly detection subsystem performs the following steps:

[0151] According to the market status data output from the market behavior prediction and simulation subsystem t+1 and behavioral prediction Extract the characteristic variables required for causal analysis. Set the causal graph structure The node set V represents the market state characteristics (such as electricity price, demand, supply, weather conditions, etc.) and behavioral decision variables, and the edge set ε represents the causal relationship between variables.

[0152] Each node Represents a feature variable or behavior variable, and the directed edges between nodes (v i ,v j )∈ε represents the causal relationship, that is, v i Yes j The initial causal structure can be inferred based on the statistical correlation of historical data and modified by expert knowledge. The modeling of causal relationships needs to consider the typical causal chain in the electricity market, such as weather affecting demand, demand affecting price, and price in turn affecting supply.

[0153] Furthermore, using the causal graph structure and the market state s obtained from the third step t+1 and behavioral prediction Interventional Analysis is performed to detect anomalies in the market. The goal of interventional analysis is to detect anomalies by introducing dummy intervention variables to evaluate the response of the dependent variable.

[0154] Defining the intervention model Represents the node vi Intervention is applied to make its value c. For each potential abnormal node v i , calculate the dependent variable v under the intervention condition j Expected changes:

[0155]

[0156] in, is the dependent variable v after intervention j The expected value of is the expected value before intervention. If it exceeds the set threshold τ, then mark v i A potential abnormal source node.

[0157] Furthermore, after identifying the potential abnormal source nodes, counterfactual analysis is further performed to confirm the causal chain of abnormal events. Counterfactual analysis verifies the impact of abnormal source nodes on market status and quantifies the intensity of such impact by simulating hypothetical scenarios. Defining counterfactual scenarios Calculate the change in market state under the counterfactual state:

[0158]

[0159] in, represents the hypothetical market state, is the expected value of the market state in the counterfactual scenario. Calculation results Used to evaluate the abnormal source node v i Actual impact on market status and confirmation of abnormal causal chainv i →v j .

[0160] Furthermore, the results of intervention analysis and counterfactual analysis are integrated to generate anomaly detection reports, including the source node, causal chain, impact intensity, and predicted potential consequences of each abnormal event. According to the detection report, the emergency response strategy is optimized and adjusted. The anomaly detection results will be used to update the market behavior prediction model, modify the causal graph structure, and improve the accuracy and adaptability of market simulation.

[0161] Finally, the anomaly detection subsystem outputs a list of abnormal events Each element Describe the cause, result and intensity of an abnormal event and provide data support for market decision-making.

[0162] The emergency response subsystem 105 is used to formulate an emergency response strategy for the power market according to the abnormality detection results; the emergency response subsystem performs the following steps:

[0163] Using the anomaly detection results of the anomaly detection subsystem, define the emergency response strategy variable u, where each strategy variable u k Corresponding to the response measures to specific abnormal events (such as load reduction, backup power activation, price adjustment, etc.). Set the objective function Used to measure the effectiveness of emergency response strategies, the objective function comprehensively considers market stability, response costs, and risk control:

[0164]

[0165] in, is the market status change under the kth abnormal event, u k is the emergency response strategy variable, w k is the weight parameter, reflecting the priority of the kth event, c k is the response cost coefficient, indicating the implementation strategy u k The cost of. Objective function The minimization of ensures that the emergency response strategy can effectively control market anomalies while reducing execution costs as much as possible.

[0166] Furthermore, in order to generate the optimal emergency response strategy, an optimization problem is constructed to minimize the objective function by adjusting the emergency strategy variable u. The optimization problem can be solved by Lagrange multiplier method and constraints, including physical constraints (such as load reduction cannot exceed the system allowable range) and market constraints (such as price adjustment range limit).

[0167] The optimization problem has the following form:

[0168]

[0169] Among them, A is the constraint matrix and b is the constraint vector, which ensures that the emergency strategy variable u satisfies all physical and market constraints.

[0170] To solve this optimization problem, the Lagrangian function is introduced

[0171]

[0172] Through Finding the Gradient And perform iterative calculation to obtain the optimal emergency strategy variable u * and the Lagrange multiplier λ * .

[0173] Furthermore, in order to cope with the diverse anomalies and uncertainties in the power market, a multi-objective emergency strategy control method is proposed. *, and dynamically adjust to cope with real-time market changes. Introduce the strategy control matrix M and feedback correction vector f to update the emergency strategy:

[0174] u t+1 =u t +M·f

[0175] Among them, u t+1 is the updated policy variable, u t is the current strategy variable, M is the strategy control matrix, which determines the direction and amplitude of strategy adjustment, and f is the feedback correction vector, which reflects the real-time market status and abnormal feedback.

[0176] The calculation of the feedback correction vector f can be achieved by the following formula:

[0177]

[0178] Among them, γ is the adjustment parameter of market state deviation, s t+1 is the actual market status, is the predicted market state, β is the adjustment parameter of the strategy deviation, and u0 is the initial emergency strategy. This feedback mechanism enables the emergency response strategy to be adaptively adjusted in the real-time market, improving the effectiveness and robustness of the emergency response.

[0179] Furthermore, the generated optimal emergency strategy u * It is applied in the actual power market and monitors and evaluates the execution effect in real time. t+1 Continuously track the results of anomaly detection, evaluate the effectiveness of emergency response strategies, calculate actual effect indicators (such as response time, cost-effectiveness ratio, changes in market stability, etc.), and optimize the next round of emergency strategies based on feedback information.

[0180] The evaluation formula for emergency response effectiveness can be defined as follows:

[0181]

[0182] Among them, ε(u) is the emergency response effect evaluation function, ω k is the weight of the kth market status indicator, φ k is the weight of the kth emergency strategy variable, and are the actual and predicted k-th market status indicators, respectively.

[0183] The system optimization subsystem 106 is used to learn and optimize according to the execution feedback of the optimal emergency strategy variables.

[0184] Optimal emergency response strategy generated using the emergency response subsystem Implement corresponding control measures in the power market (such as adjusting power generation, starting backup power supplies, adjusting electricity prices, etc.). After the strategy is executed, the system monitors the market status in real time. t+1 changes and collect feedback data t+1 , these data reflect the actual market situation, such as electricity demand, electricity price changes, power generation costs, etc.

[0185] Define feedback collection function Indicates the execution strategy u * The feedback data obtained later:

[0186]

[0187] Among them, r t+1 =[r t+1,1 ,r t+1,2 ,…,r t+1,n ] is the feedback vector, which contains all market status and effect data after strategy execution.

[0188] Furthermore, the feedback error is calculated to evaluate the execution effect of the strategy. The error vector e t+1 Based on actual feedback t+1 Expected market status The difference is defined as follows:

[0189]

[0190] Among them, e t+1 Indicates the deviation between the actual market state and the predicted state.

[0191] According to the feedback error e t+1 , adjust the emergency strategy. A simple and effective strategy update formula is adopted, introducing the learning rate η and the feedback weight matrix W:

[0192] u t+1 =u t -η·W·e t+1

[0193] Among them, u t+1 It is an updated emergency strategy. t is the current strategy. η is the learning rate, which controls the step size of the strategy adjustment. W is the feedback weight matrix, which is used to adjust the influence of different feedback variables on the strategy. This formula implements the strategy update based on error feedback, ensuring that the strategy can quickly adapt to the actual changes in the market.

[0194] Furthermore, after executing the strategy, the effectiveness of the strategy is evaluated and necessary adjustments are made, using feedback errors and actual market changes to dynamically optimize the emergency strategy. Define the evaluation function ε(u t+1 ):

[0195]

[0196] Among them, ε(u t+1 ) is the evaluation function of the strategy execution effect. i is the weight of each market status indicator, reflecting the importance of the indicator. t+1,i and The actual and predicted market status respectively.

[0197] By conducting quantitative evaluation on the effectiveness of strategy execution, we can further adjust the strategy to cope with market changes and ensure the effectiveness of emergency response and market stability.

[0198] These are just some preferred embodiments of the present invention, which certainly cannot be used to limit the scope of rights of the present invention. Ordinary technicians in this field can understand that all or part of the processes of implementing the above embodiments and making equivalent changes according to the claims of the present invention still fall within the scope of the invention.

Claims

1. A market operation simulation trading system for power trading, characterized in that: The system includes the following subsystems: The data acquisition subsystem is used to pre-process the data, and then extract and fuse the features of the pre-processed data to obtain a feature data set; the data acquisition subsystem performs the following steps: Collect raw data from various data sources in the power market and pre-process the raw data to obtain multi-source data; A data fusion method based on attention mechanism is used to extract and fuse features from multi-source data to obtain a fused feature matrix. The time series segmentation method is used to partition the fusion feature matrix into training set and test set; The market preference prediction subsystem is used to construct an inverse reinforcement learning model to infer the behavior strategies and preferences of market entities based on the fusion feature matrix; the market preference prediction subsystem performs the following steps: Define the state space and action space of market entities based on the fused feature matrix; Assume that the strategy of each market player is determined by an unknown reward function R(s t ,a t ) driven, and then adopts the strategy estimation method based on soft Q learning to model the behavior of market entities, and infers the reward function R(s) through historical data. t ,a t ), and also utilize the actual behavior sequence in historical data (s t ,a t ) to perform reverse optimization to minimize the difference between the actual observed behavior and the model predicted behavior; where s t Indicates the market status, a t Indicates market behavior; According to the inferred reward function R(s t ,a t ) Recalculate the market player’s strategy π * , and generate the subject behavior model π * (s t ), the behavior model predicts the decision-making behavior of market entities under different conditions based on the optimal strategy, and then uses a cross-validation method to test the generated behavior model using a training set and a test set to evaluate the performance of the generated behavior model on unseen data; Market behavior prediction and simulation subsystem is used to predict the market behavior according to the subject behavior model π * (s t ) simulates the interactive behaviors of market entities in different states and predicts the overall evolution trend of the market; the market behavior prediction and simulation subsystem performs the following steps: According to the subject behavior model π * (s t ) Use the fusion feature matrix to introduce the market initial conditions to initialize the state space of the market players, and predict the optimal decision-making behavior of the market players based on the current market status; In response to emergencies and unforeseen market behaviors in the power market, a feedback adjustment mechanism is introduced in the state transfer to reflect sudden changes in the market and dynamically adjust the market state; Adopting the collaborative mechanism based on generalized linear model to build the subject behavior model π * (s t ) multi-agent simulation, while recording the current state of the market and the optimal decision-making behavior of market players at each time step, and updating the state of each agent to reflect the changes in interdependence and the market as a whole; The anomaly detection subsystem is used to detect abnormal events in the power market using a causal inference method based on the market state at the next moment and the optimal decision-making behavior of the market players; the anomaly detection subsystem performs the following steps: Extract characteristic variables required for causal analysis from the market status at the next moment and the optimal decision-making behavior of market players, and construct a causal graph; By combining the causal graph structure, the market state at the next moment, and the optimal decision-making behavior of market players, intervention analysis is performed to detect anomalies in the market and obtain the anomaly source node; Perform counterfactual analysis based on the abnormal source node to confirm the causal chain of the abnormal event; Integrate the results of intervention analysis and counterfactual analysis to generate anomaly detection results and reports; The emergency response subsystem is used to formulate an emergency response strategy for the power market according to the abnormality detection results; the emergency response subsystem performs the following steps: Defining emergency response strategy variables based on anomaly detection results, where each strategy variable corresponds to a response measure to a specific abnormal event; Construct an optimization problem, introduce the Lagrangian function to adjust the emergency strategy variables to minimize the optimization problem, and obtain the optimal emergency strategy variables and Lagrangian multipliers; Construct a multi-objective emergency strategy control method based on the optimal emergency strategy variables, and dynamically adjust the optimal emergency strategy variables to respond to real-time market changes; Apply the optimal emergency strategy variables to the actual power market and monitor and evaluate the execution effect in real time; The system optimization subsystem is used to learn and optimize based on the execution feedback of the optimal emergency strategy variables.

2. A market operation simulation trading system for power trading according to claim 1, characterized in that: The soft Q-learning-based strategy estimation method is used to model the behavior of market entities, which is expressed as follows: Among them, s t represents the state vector of the current time step t, representing the characteristic variables of the electricity market; a t represents the action vector at the current time step t, indicating the decision-making behavior that the market entity may take; R(s t ,a t ) represents the reward function, which means that the market subject is in state s t Take action a t The immediate reward obtained; γ represents the discount factor, which indicates the degree of decay of future rewards, and its value range is between 0 and 1; Indicates the next state s t+1 The expected value of , provided that the current state is s t , perform action a t ;P(·|s t ,a t ) represents the state transition probability, which means that in state s t Next, perform action a t Then transfer to the next state s t+1 The probability of V π (s t+1 ) represents the state value function, which means that under the strategy π, the state s t+1 The cumulative expected reward at the beginning; γ is the discount factor, which indicates the degree of decay of future rewards, P(·|s t ,a t ) is the state transition probability, indicating that in state s t Next, perform action a t Then transfer to the next state s t+1 The probability of V π (s t+1 ) is the state value function, expressed as follows: Among them, V π (s t+1 ) indicates state s t+1 The value function of represents the action space, which represents the set of all possible actions; Q π (s t+1 ,a') indicates that under strategy π, state s t+1 and the value function of action a'; exp) represents the natural exponential function, which is used to calculate the soft maximum.

3. A market operation simulation trading system for power trading according to claim 2, characterized in that: The actual behavior sequence (s) in the historical data is used t ,a t ) to perform reverse optimization and minimize the difference between the actual observed behavior and the model predicted behavior, which is expressed as follows: Assuming that the behavior in the historical data is the optimal behavior sequence, the inverse optimization goal is to minimize the difference between the actual observed behavior and the model predicted behavior, which is expressed as follows: Among them, R(s t ,a t ) represents the reward function, which means that the market subject is in state s t Take action a t The instant reward obtained; Q π (s t ,a t 0 means that under strategy π, state s t With action a t The value function of π (s t ,a t )-R(s t ,a t )) 2 represents the square of the error, which represents the difference between the value function and the reward function. Solved by gradient descent method, where the reward function R(s t ,a t ) is calculated by the following formula, expressed as follows: in, represents the gradient of the value function to the reward function; 1 represents a constant term, which is used to calculate the gradient; γ represents the discount factor; ∑s t+1 For all possible next states s t+1 Sum; P(s t+1 |s t ,a t ) represents the state transition probability, which means that from state s t Execute action a t Transfer to state s t+1 probability; Represents the gradient of the state value function with respect to the value function.

4. A market operation simulation trading system for power trading according to claim 1, characterized in that: The market initial condition is to add a volatility weight term to the market state vector to reflect the unpredictability of the initial market; The feedback adjustment mechanism introduced in the state transfer reflects the sudden changes in the market, which is expressed as follows: Among them, Δs t+1 represents the sudden state change, α represents the sensitivity parameter of the sudden event, represents the average behavior of the entities in the market, A vector representing the abnormal market behavior output by the anomaly detection model.

5. A market operation simulation trading system for power trading according to claim 4, characterized in that: The collaborative mechanism based on the generalized linear model is used to construct the subject behavior model π * (s t ) is expressed as follows: Among them, w i represents the weight vector of the interaction between the ith subject and other subjects, b i represents the bias term, ∈ i represents a random noise term, which is used to simulate the uncertainty in the subject's decision-making. GLIM represents a collaborative mechanism based on a generalized linear model. represents the set of optimal decision-making behaviors; At the same time, a weighted market volatility risk index is introduced and the probability of system failure To quantitatively assess the market's stability and potential risks, as follows: Among them, σ(p t ) represents the standard deviation of market price fluctuations, max(d t -s t ) represents the maximum difference between demand and supply, represents the expected value of market operation cost, λ1, λ2 represent risk weight coefficients, γ represents exponential decay parameter, and N represents total duration.

6. A market operation simulation trading system for power trading according to claim 1, characterized in that: The causal graph structure is: node set represents the market state characteristics and behavioral decision variables, and the edge set ε represents the causal relationship between the variables; each node Represents a feature variable or behavior variable, and the directed edges between nodes (v i ,v j )∈ε represents the causal relationship, that is, v i Yes j The initial causal structure is inferred based on the statistical correlation of historical data and modified by expert knowledge.

7. A market operation simulation trading system for power trading according to claim 6, characterized in that: The intervention analysis is performed by combining the causal graph structure, the market state at the next moment and the optimal decision-making behavior of the market players, specifically including: Defining the intervention model Represents the node v i Apply intervention to make its value c, for each potential abnormal node v i , calculate the dependent variable v under the intervention condition j The expected change is expressed as follows: in, represents the dependent variable v after intervention j The expected value of represents the expected value before intervention; if If it exceeds the set threshold τ, then mark v i A potential abnormal source node; After identifying potential anomaly source nodes, perform counterfactual analysis to confirm the causal chain of the anomaly event: Counterfactual analysis verifies the impact of abnormal source nodes on market status by simulating hypothetical scenarios, quantifies the intensity of such impact, and defines counterfactual scenarios. Calculate the change in market state under the counterfactual state, expressed as follows: in, represents the hypothetical market state, represents the expected value of the market state under the counterfactual scenario; the calculation result Used to evaluate the abnormal source node v i Actual impact on market status and confirmation of abnormal causal chainv i →v j .

8. A market operation simulation trading system for power trading according to claim 1, characterized in that: In the emergency response subsystem, the objective function is set Used to measure the effectiveness of emergency strategies, the objective function includes market stability, response cost and risk control, which is expressed as follows: in, represents the change in market status under the kth abnormal event, u k represents the emergency response strategy variable, w k represents the weight parameter, reflecting the priority of the kth event, c k represents the response cost coefficient and represents the implementation strategy u k The cost of; K represents the total number of events; Objective Function The minimization of ensures that the emergency response strategy can effectively control market anomalies while reducing execution costs.

9. A market operation simulation trading system for power trading according to claim 8, characterized in that: The objective function The solution is obtained by Lagrange multiplier method and constraint conditions, where the constraints include physical constraints and market constraints, which are expressed as follows: Where A represents the constraint matrix and b represents the constraint vector, which ensures that the emergency strategy variable u satisfies all physical and market constraints. To solve the objective function Introducing Lagrangian function Through Finding the Gradient And perform iterative calculation to obtain the optimal emergency strategy variable u * and the Lagrange multiplier λ * ; The multi-objective emergency strategy control method is constructed according to the optimal emergency strategy variable, and the optimal emergency strategy variable u is obtained by optimization. * , introduce the strategy control matrix M and feedback correction vector f, and make dynamic adjustments to cope with real-time market changes.

10. A market operation simulation trading system for power trading according to claim 1, characterized in that: In the system optimization subsystem, the evaluation function ε(u t+1 ), which is expressed as follows: Among them, ε(u t+1 ) represents the evaluation function of the strategy execution effect; w i Indicates the weight of each market status indicator, reflecting the importance of the indicator; r t+1,i and Represent the actual and predicted market status respectively; By conducting quantitative evaluation on the effectiveness of strategy execution, we adjust strategies to cope with market changes and ensure the effectiveness of emergency response and market stability.

Citation Information

Patent Citations

  • Method and system for generating power generator agency quotation

    CN110555742A

  • Electric power guarantee optimization method based on hybrid simulation technology

    CN115760473A

  • Power transaction auxiliary decision-making system based on multi-data source fusion

    CN117853238A

  • Electricity market analogue simulation system, method and equipment and storage medium

    CN117875153A

  • System and method for participation in energy-related markets

    US20100332373A1

Cited By

  • Node electricity price joint probability prediction method

    CN120746622A

  • A joint probability prediction method for nodal electricity prices

    CN120746622B

  • Method and apparatus for determining power trading decisions

    CN122659917A