A Multivariate Load Trading Optimization Method for Energy Internet Based on LSTM and Gaming Theory

: Energy Internet is a complex nonlinear system. There are many stakeholders in the load trading market, which is usually regarded as a multi-player gaming. Although gaming theory has been introduced to solve Multivariate Load trading problems, different conditions should be considered to accurately optimize the multivariate load trading problem. For example, the selling side needs to reduce the reserve capacity and improve proﬁts, but the consumer side needs to reduce costs and minimize the impact on its own electricity consumption. These contradictory conditions require multiple Nash equilibrium to achieve obviously. To address this issue, a uniﬁed architecture of the power system cloud trading is constructed in this paper, which is combined with the multiple load classiﬁcation of the power system. In addition, according to the power market operation mechanism, a price-guided multivariate load trading game strategy is designed. More importantly, a multivariate load trading optimization method based on LSTM (Long Short-Term Memory) and gaming theory is proposed in this work. LSTM is introduced for real time prediction, which can be combined with the game theory for strategy searching. The global stability and optimal solution theory prove the feasibility of the proposed neural network, and ﬁnally the effectiveness of the proposed method is veriﬁed by using numerical simulation.


Introduction
With the rapid development of new energy, adjustable load, energy storage, V2G (Vehicle-to-grid) charging station and other heterogeneous flexible resources in power system [1], the deviation between new energy output and load forecasting, the uncertainty of intermittent energy and load operation bring challenges to power system market operation and system regulation and control, and increase the complexity of power system regulation and control, which also provides a new regulation means for the power system. At present, the focus of power market mechanism is the competition and optimization of generation side resources, which is difficult to adapt to the rising proportion of new energy generation and the prominent contradiction of peak load. Compared with traditional generation resources, the regional dispersion of multi demand-side resources, the uncertainty of participation and the difference of mediation characteristics increase the complexity of power system regulation and control. In order to give full play to the regulation ability of interactive resources, power system operators need to improve the operation mechanism of power market, and use price signals to guide and encourage the orderly operation of interactive resources. However, the power system is a complex non-linear system, with many market players and various combinations, and the demand-side and the generation side have different interests. How to make the complex participants formulate the optimal bidding strategy in the market operation and give full play to the flexibility of interactive 2 of 15 resources on the premise of obtaining reasonable market returns has become a key problem in the market operation.
Demand-side resources have the natural attributes of large quantity and wide distribution. How to incorporate it into the existing scheduling framework is the key to the successful implementation of dynamic demand response. The research of demand response strategy includes two aspects: one is to form a specific regulating strategy for the load of different control characteristics for system tasks [2], the other is to seek effective control strategies for the load of different control characteristics for different system tasks [3]. At present, most grid companies use demand-side resources as a day-ahead resource for scheduling [4]. The implementation process is mainly for the dispatching department or aggregators to formulate control strategies for demand-side resources through optimized dispatching [5] to achieve reduced operating costs, new energy consumption and other goals. For dynamic response, the grid company's goal is to maximize the response speed and reduce the reserve capacity on the power generation side, and the buyer's demand is to minimize the impact on itself. There is a contradictory relationship between the two demands, and trade-offs need to be made when designing the control strategy.
Heterogeneous and diverse demand-side resources have the characteristics of spatial dispersion and diversification of operating subjects, so how to achieve rapid response is a major problem. At present, the rapid response of demand-side resources mostly adopts centralized control [6], and also few studies adopt decentralized control. Centralized control has the advantages of high reliability, but there are problems including high investment costs and communication delays. Decentralized control has a fast response speed, but the response is more random. Distributed control based on the principle of decentralized cooperative control can solve the problem. Distributed control [7] is a global optimization management system that issues local target values to each autonomous region. The autonomous region responds to external disturbances in real time according to a specific autonomous control strategy to achieve coordinated control of internal resources in the region. When implementing distributed control decisions, the uncertainty and randomness of demand-side resources should also be considered. In addition to the consideration in the aforementioned modeling, it can also be processed in the control process by robust stochastic optimization [8] or model prediction [9].
In the multi-party game electricity trading market, the uncertainty and randomness of demand-side resources have always been a problem that needs to be considered in the existing distributed control research. Therefore, in order to avoid these uncertainties and randomness to a certain extent, it is necessary to model the uncertainty of demand-side resources based on price or incentive demand response [10], and consider the demand response in the model. In addition to modeling, robust stochastic optimization or model prediction is also a good method to deal with the uncertainty and randomness of demand response resources in the control process.
From the literature review, it can be seen that the integration of demand-side resources into existing resource scheduling frameworks, especially distributed control scheduling frameworks has not been fully studied. It is still a huge challenge to balance the conflicting interests of the generation and the demand-sides. In this work, according to the power market operation mechanism, a price-guided multivariate load trading game strategy is designed. In this strategy, a multivariate load trading optimization method based on LSTM and gaming theory is proposed in this work. On the premise of ensuring the interests of the participants in the power market, this work provides a reasonable bidding strategy for the demand-side resources of the power system, and improves the flexibility of orderly power consumption of the demand-side resources. The contributions of this paper are: (1) Based on the development of energy Internet technology, combined with the multiple load classification of the power system, a unified architecture of the power system trading is constructed; (2) According to the power market operation mechanism, a price-guided Multivariate Load trading game strategy is designed; (3) A multivariate load trading optimization method based on LSTM and gaming theory is proposed. LSTM is introduced for real time prediction, which can be combined with the game theory for strategy searching.

Multivariate Load Market Operation Mode
China's power market currently consists of a medium and long-term market and spot market. The medium and long-term market adopts transaction mode combining bilateral negotiated transactions and centralized competitive transactions, commonly used curve contracts and custom curve contracts. Through multiple organized annual, monthly, and weekly transactions, the signing and adjustment of price difference contracts can be flexibly realized. The spot market [11] includes day ahead market and real-time market, which adopts the way of full power declaration and centralized optimization clearing, through centralized optimization calculation, the unit start-up combination, time-sharing generation output curve and time-sharing spot market price are obtained.
Power market operators are divided into three categories: trading centers, demandside buyer loads, and power generation companies such as thermal power plants, hydropower plants, and centralized new energy sources. The buyer's load acts as the buyer to purchase electricity in the market; the generator acts as the seller to sell electricity in the market. The buyer and seller submit the electricity purchase quotation strategy and the electricity sales quotation strategy to the trading center. Under the organization of the trading center, the two parties reached an agreement on the purchase and sale of electricity.
With the continuous increase of demand-side interactive resources such as distributed energy, electric vehicle charging station, flexible buyer loads, and energy storage power stations, demand-side interactive resources have played a special role in the market [12,13]. Interactive resources can purchase more electricity from the market when the electricity market price is low, and if the electricity market price is high, buy less electricity from the market, or sell electricity to the market. It plays a virtual role in the market and makes the main body of power market operations more complicated. At the same time, in market transactions, the spot market has time-series price and position signals, and price analysis and forecasting are still indispensable and important links in spot transactions. Without the judgment of prices, trading strategies cannot be formulated. There is a strong correlation between the day ahead settlement price and the spot bidding space forecast value published by the market. With the participation of complex entities such as virtual power plant and active load, each entity in the power market needs to obtain more market price influence factors, train data more suitable for the characteristics of complex entities to reduce the forecast deviation, and provide more lean trading auxiliary decision-making suggestions for market entities.

Trading Cloud Architecture
The simplified model of cloud transaction in the future energy Internet constructed in this paper is shown in Figure 1, which includes multiple electricity sellers and buyers, which together form an energy local area network. Among them, all buyers and sellers have realized the interconnection of power flow and information flow. The buyer can actively send a distributed power purchase strategy to the cloud trading center, and the seller can formulate electricity sales quotation policy for different buyers based on received situation of total power purchase and submit the strategy to the trading center. After receiving the electricity purchase and sales strategies of both parties, it forms various transaction agreements through dynamic trading neural network algorithm.
The overall goal of simplified model is to achieve the overall benefit balance of the participants in the electricity market, so that the buyer can use the lowest price of electricity in a reasonable time, and the seller can sell the most electricity as possible to achieve the highest income. At the same time, the power grid is balanced, the new energy can generate more electricity, and the adjustable load can make more profit within the potential range. These contradictory conditions require multiple Nash equilibrium to achieve obviously. Therefore, this paper proposes a multi load trading optimization method based on LSTM and game theory. LSTM is introduced for real-time prediction, and game theory is used for strategy search. The specific construction and solution process, as well as the final experimental results will be described in detail below.  The overall goal of simplified model is to achieve the overall benefit balance of the participants in the electricity market, so that the buyer can use the lowest price of electricity in a reasonable time, and the seller can sell the most electricity as possible to achieve the highest income. At the same time, the power grid is balanced, the new energy can generate more electricity, and the adjustable load can make more profit within the potential range. These contradictory conditions require multiple Nash equilibrium to achieve obviously. Therefore, this paper proposes a multi load trading optimization method based on LSTM and game theory. LSTM is introduced for real-time prediction, and game theory is used for strategy search. The specific construction and solution process, as well as the final experimental results will be described in detail below.

Multi-Agent Electricity Market Model
Regional alliance is constructed, in which the set of all microgrids is M and the set of all power users is N. Each user ∈ can send a power request to one or more available microgrids ⊆ to realize the matching of supply and demand. According to the above, through the communication and high interaction with the microgrid group , user can understand the dynamic electricity price vector formulated and implemented by the microgrid group , and adjust and update its distributed power request vector in the microgrid group accordingly. The definitions of and are shown in definition 1 and 2.
Definition 1: Distributed energy request vector is the combination of the number of requests made by users to the | | available microgrids in the regional alliance.
According to Definition 1, the total amount of power requests sent by users to the available microgrid group is: Definition 2: The dynamic electricity price vector is a combination of the dynamic

Multi-Agent Electricity Market Model
Regional alliance is constructed, in which the set of all microgrids is M and the set of all power users is N. Each user i ∈ N can send a power request to one or more available microgrids M i ⊆ M to realize the matching of supply and demand. According to the above, through the communication and high interaction with the microgrid group M i , user i can understand the dynamic electricity price vector p i formulated and implemented by the microgrid group M i , and adjust and update its distributed power request vector r i in the microgrid group accordingly. The definitions of r i and p i are shown in Definitions 1 and 2. Definition 1. Distributed energy request vector r i is the combination of the number of requests made by users to the |M i | available microgrids in the regional alliance. The component r According to Definition 1, the total amount of power requests X i sent by users to the available microgrid group M i is: Definition 2. The dynamic electricity price vector p i is a combination of the dynamic electricity prices set by |M i | microgrid for user i. The component represents the dynamic electricity price set by the microgrid m, and the pricing method of the electricity price of each microgrid depends on the total power demand of all users connected to it. The mathematical expression of is: is a dynamic electricity sale price formulated and executed by the microgrid m. The electricity price is the same for all users N (m) who request to be paired with it in the same time period namely: The mathematical expression of the profit function pr (m) of the microgrid m is: where G (m) is the collection of power generation of microgrid m, and c (m) is the collection of unit power generation cost of microgrid m. The total amount of electrical energy requests r (m) received by the microgrid m is the sum of the number of electrical energy requests issued by the user group N (m) matched with its request.
Since the power generation of each microgrid m is fixed and limited, the total amount r (m) of electrical energy requested by the user group N (m) for microgrid m must meet the following constraints: with the user groups N (m) ⊆ N that have transactions with microgrid m, as the demand r (m) for electric energy products in the regional market changes, microgrid m calculates the sales price p (m) based on the dynamic pricing method [14] as follows: where ε (m) is the unit marginal profit of the microgrid m, specific definition is shown in Definition 3. In addition, according to reference [14], the dynamic electricity price is a quadratic function of demand, and C (m) are constants related to the power generation properties of the microgrid m. Definition 3. The unit marginal profit ε (m) of the microgrid m is estimated by solving the difference between the marginal revenue obtained by supplying additional unit power generation and the marginal cost of producing increased power generation. The mathematical expression is: Assuming that the sales electricity price p (m) for each microgrid m must be higher than the unit power generation cost c (m) , its marginal profit coefficient ε (m) will always be greater than 0. Therefore, under the condition that the amount of electrical energy requested by each user i satisfies the constraints given in Equations (2) and (7), p (m) will mainly depend on the power demand r (m) . The mathematical expression is as follows: Through the extensive interconnected information architecture of the Energy Internet, after the user group knows the optimal electricity price vector p * i of the microgrid group M i , user i selects the optimal power request vector r * i from the perspective of minimizing its own unit power cost. Among them, In addition, the microgrid group's strategy for setting electricity prices also depends on r (m) , and each microgrid in the microgrid group only needs to consider how to set the sales price after receiving the total amount of power requests from users. Therefore, this chapter proposes the main problems can be described as follows: 1.
The strategy is initialized, and then the user group and microgrid group will fully interact; 2.
Design a method to help user i determine its own distributed energy request vector r * i based on the electricity price vector p * i set by the available microgrid group M i .

3.
Each microgrid m determines the updated power selling price p (m) based on the total number of power requests made by all matching users.

Electricity Trading Model
Construct a dynamic evolutionary game model of power purchase strategy for each buyer and multiple available sellers in the energy local area network. Each buyer selects a more efficient strategy through repeated evolution to achieve evolution. In this chapter, the elements of dynamic trading neural network optimization method are proposed as follows: Group: A set of distributed power purchase strategies of buyer i. Assuming that each buyer i has a certain power demand X i , that is, the group size corresponding to each buyer i ∈ N is fixed, buyer 1's distributed power purchase vector r 1 constitutes group 1 and buyer 2's distributed power purchase vector r 2 constitutes group 2 and so on.

Group proportion η (m)
i : The proportion of the m-th pure strategy component in the total power purchase demand proposed by buyer i to the total group size X i , that is the proportion of electricity sold by the seller m ∈ M i to the buyer in the total electricity purchased by the buyer i: The income corresponding to the group proportion i , that is the horizontal m component of power consumption satisfaction level of each buyer i selected to match the supply and demand with the seller. The construction of the buyer satisfaction function is related to the quantity of electricity purchased by the buyer in the seller and the expenditure cost. The mathematical expression is as follows: Among all the buyers N (m) matched with the seller m, each buyer i tries to consume more power from the seller m to meet its overall power demand due to the constraints of the seller m's power generation. Therefore, it can be assumed that f r strictly increasing non-negative concave function, which is related to the seller's power generation and the buyer's demand. The mathematical expression is as follows: Seller's electricity price function p (m) : Seller m's electricity price function. Based on Formulas (8) and (9), each seller m can determine the optimal electricity price vector p (m) . The relationship between microgrid revenue and the elasticity of demand price should also be considered. Because the buyer's strategy adjustment will be based on the initial value of p (m) , and if the value of p (m) is set too high, it will restrain the power purchase demand of power and if the value of p (m) is set too low, it will reduce seller m's electricity sales income. Therefore, the electricity price function p (m) of seller m is a linear positive correlation with the sum of its dynamic price and the number of received energy requests. The mathematical expression is as follows: while p (m) and r (m) have been respectively defined in the above Formulas (6) and (8). Based on the above analysis, define the group proportional income U i (m) that buyer i chooses to match the electricity request with seller m as follows: Buyer's income function: The income function U i of each buyer i is determined by its net income, and the specific definition is the satisfaction level of electricity service obtained by consuming the total amount of electricity required X i .
Defining U i as a concave function, the mathematical expression is as follows: Substituting Equation (16), we can get: The seller's revenue function: the seller's revenue ψ (m) is defined as the profit obtained by each seller m after providing the requested quantity r (m) of electric energy to all the buyers connected with it, which is divided into two parts including the electricity selling fee charged to the buyer and the generation cost to be deducted. According to the electricity price function (15), the Equation (5) is updated as:

Solving Nash Equilibrium of Non-Cooperative Game Model
Game theory in economics is often used to solve the problem of competition between multiple subjects. In the theory of game theory, cooperative game theory focuses on predicting the group alliances that may be formed among the participants, the joint actions that the group alliances will take, and the resulting benefits, while non-cooperative game is a game in which competition is among the participants and the participants cannot form an alliance and must compete independently. In the electricity distribution market, buyers on the demand-side and sellers such as generators compete with each other on the premise of knowing the other's electricity quotation strategy and power purchase quotation. The buyer expects a lower electricity price in a reasonable time, while the seller expects a higher income on the premise of maintaining the balance of the power grid. The two compete independently, so it is more reasonable to establish a non-cooperative game model. Nash equilibrium is also called non-cooperative game equilibrium. When any participant in the game determines the strategy of other participants, the strategy chosen by itself is optimal, and the game reaches the Nash equilibrium. According to the idea of non-cooperative game, both the seller and the buyer, as participants in the electricity market, trade in the electricity market with the goal of maximizing their own profits. As participants in the game, their balancing strategies are all to achieve the maximum expected return. Therefore, Nash equilibrium is a more reasonable solution in this scenario.
The Nash equilibrium solution to the above non-cooperative game model is a multiobjective optimization problem. With the help of the particle swarm optimization algorithm in the field of intelligent algorithm, the continuous iteration and operation can gradually approach the equilibrium solution, which can better deal with this kind of problem than the traditional analytical method. In particle swarm optimization (PSO) algorithm, each potential solution is a particle in the search space. Firstly, a group of random particles (random solution) are initialized. The particles only have two attributes: speed and position. Speed represents the speed of movement, and position represents the direction of movement. Each particle searches for the optimal solution separately in the search space, and records it as the current individual extreme value pbest, and shares the individual extreme value with other particles in the whole particle swarm. And then the optimal individual extreme value is found as the current global optimal solution gbest of the whole particle swarm. All particles in the particle swarm adjust their speed and position according to the current individual extremum they find and the current global optimal solution shared by the whole particle swarm, the speed and position updating rules are as follows: v Among them, in Formula (20) v i is the memory item, which represents the shadow of the magnitude and direction of the velocity last time. c 1 × rand() × (pbest − x i ) is a vector from the current point to the best point of the particle itself. Representing the action of a particle is based on my experience and the rest part is a vector from the current point to the best point of particle swarm, which reflects the cooperation and knowledge sharing among particles. The particle decides the next movement through its own experience and the best experience of its peers. Equations (20) and (21) form the standard particle swarm optimization algorithm. On the basis of Equation (21), the inertia factor w is introduced into the memory term, that is: The dynamic ω can obtain better optimization results than the fixed value. The dynamic ω may change linearly during the PSO search process, or dynamically according to a measure function of PSO performance. At present, the strategy of linear decreasing weight is widely used. ω decreases linearly from the maximum inertia weight ω max to ω min with iteration, where k max is the maximum number of iterations set by the algorithm, that is: with the introduction of ω, the performance of the PSO algorithm has been greatly improved. For different search problems, the global and local search capabilities can be adjusted, and the PSO algorithm has been successfully applied to many practical problems. Therefore, for non-cooperative game models in the electricity market, The Nash equilibrium solution can be got according to the algorithm flow of particle swarm optimization. Suppose X = U 1 , U 2 . . . U i , ψ (1) , ψ (2) . . . ψ (m) is the strategy combination of buyer and seller established by non-cooperative game model, where U i and ψ (m) are corresponding to the buyer's and seller's income as described above. The solution steps are as follows: 1.
Initialize the particle swarm size N p , the maximum number of iterations k max , w and the accuracy requirement ε, randomly initialize the particle swarm and position and speed of particles.

2.
Calculate the fitness value of the example according to the fitness function, and find the individual extreme value and the overall extreme value of the particle according to the fitness value of the particle.

4.
According to Formulas (23) and (24), update the solution of each particle, and then update the strategy combination and proceed to the next iteration.

5.
When the number of iterations reaches k max or the obtained group extreme value can make the fitness function meet the accuracy requirements, the equilibrium solution X of the game model is obtained at this time, that is the optimal strategy combination of the buyer and the seller to achieve their respective income expectations.

LSTM Model
In market transactions, the spot market has time series price and position signals. Price analysis and forecasting are indispensable and important links in spot transactions. The accurate estimation of prices can help formulate more scientific and reasonable trading strategies. With the complexity and diversity of participants in the electricity market, traditional methods based on probability statistics cannot accurately predict the data with complex subject characteristics. However, some deep learning methods, such as recurrent neural network (RNN) [13], not only consider the input of the previous time, but also give the network a memory function of the previous content, so it is an effective method to solve the sequence problem prediction. It can be applied to the time series price prediction in the spot market to provide more lean trading assistant decision-making suggestions for the market participants.

Model Discussion
RNN is a network containing cycles, which can transfer information from the previous step to the next step, allow information persistence and retain memory of the current state. But RNN information can only be transferred to adjacent successors, when the output information is close to its related input information, ordinary RNN is competent. However, when analyzing and estimating the time series price data in electricity market transactions, it is necessary to memorize the historical data for a longer period of time. Ordinary RNN cannot guarantee the long-term memory, which will lead to some deviation in the estimation results. Therefore, it is necessary to use a variant of RNN-long-term memory neural network (LSTM) [14] to solve the problem of long-term memory in application scenarios. The difference on structural units between RNN and LSTM is shown in the Figure 2 below.
For the RNN unit, ht = tan h(Wh · (ht − 1, xt) + bh), the hidden layer information of the RNN at this moment only comes from the current input and the hidden layer information of the previous moment, and there is no memory function. In order to solve the problem of long-term dependence and vanishing gradient of RNN, LSTM was proposed. From the unit structure of the two, it can be seen that LSTM is much more complicated. From a microscopic point of view, LSTM introduces the cell state, and uses input gate, forget gate, and output gate to maintain and control information. Specifically, the calculation formula of a certain timestep of LSTM is as follows: The forget gate ( f t ) decides which information to discard. The calculation method is: RNN is a network containing cycles, which can transfer information from the previous step to the next step, allow information persistence and retain memory of the current state. But RNN information can only be transferred to adjacent successors, when the output information is close to its related input information, ordinary RNN is competent. However, when analyzing and estimating the time series price data in electricity market transactions, it is necessary to memorize the historical data for a longer period of time. Ordinary RNN cannot guarantee the long-term memory, which will lead to some deviation in the estimation results. Therefore, it is necessary to use a variant of RNN-longterm memory neural network (LSTM) [14] to solve the problem of long-term memory in application scenarios. The difference on structural units between RNN and LSTM is shown in the Figure 2 below.  The input gate (i t ) represents the information to be saved or the information to be updated, which is the result of the connection vector of h t−1 and the current input vector X t after the sigmoid layer calculation.
Then the state of the LSTM unit needs to be updated. The calculation result of the input gate is multiplied by the calculation result of the connection vector of h t−1 and X t after the tanh layer calculation, and then added to the information retained after calculation of the previous neuron cell. The result is the final output C t .
The output gate (O t ) determines the hidden vector h t output by the current neuron cell, which is the result of the dot multiplication operation of the calculation result of the output gate and the calculation result of C t after tanh calculation: There are many paths for gradient propagation in LSTM. The most important one is the process of LSTM unit state update. In this process, there are only element-wise multiplication and addition operations. The gradient flow is the most stable, so there is almost no gradient disappearance or gradient explosion. From a macro perspective, there is a straight line between the cell states of each timestep of LSTM. The line combines the information of the input gate and the forget gate. That is to say, as long as the input gate and the forget gate are set reasonably, LSTM can be controlled to memory the value of a certain timestep cell state for a long term to solve the problem of long-term information dependence.
After determining to use LSTM as the method of time series price forecasting in the electricity market, it is also necessary to determine the specific network structure. Comprehensively considering the complexity and predicting result of the network, a multilayer LSTM network is designed for training. The structure of the multi-layer LSTM neural network is shown in the Figure 3.

Algorithm Simulation
Use simulation software MATLAB to evaluate the performance of the method proposed in this chapter. Use the method proposed in this paper to calculate the respective income of the game participants when the power transaction between the buyer and the seller reaches the evolutionary equilibrium in the Energy Internet, and compare the result with similar algorithms.

Simulation Settings
Assuming that there are 10 electric energy sellers and 200-1000 electric energy buyers in an Energy LAN (local area network), the buyers are all clean energy power generation, the installed capacity ranges from 200-500 MWh, and the energy generation cost is about The overall framework is proposed as Figure 4. After gathering the input data of all stakeholders, a marketing gaming model is built. Based on the gaming model, a Nash equilibrium can be achieved. Meanwhile the LSTM prediction module is predicting the new values for the stakeholders. Based on the new data, new Nash equilibrium can be reach. And then there are new iterations of then LSTM and the Nash equilibrium. After verifying those equilibrium results, an optimization solution could be achieved.

Algorithm Simulation
Use simulation software MATLAB to evaluate the performance of the method proposed in this chapter. Use the method proposed in this paper to calculate the respective income of the game participants when the power transaction between the buyer and the seller reaches the evolutionary equilibrium in the Energy Internet, and compare the result with similar algorithms.

Simulation Settings
Assuming that there are 10 electric energy sellers and 200-1000 electric energy buyers in an Energy LAN (local area network), the buyers are all clean energy power generation, the installed capacity ranges from 200-500 MWh, and the energy generation cost is about

Algorithm Simulation
Use simulation software MATLAB to evaluate the performance of the method proposed in this chapter. Use the method proposed in this paper to calculate the respective income of the game participants when the power transaction between the buyer and the seller reaches the evolutionary equilibrium in the Energy Internet, and compare the result with similar algorithms.

Simulation Settings
Assuming that there are 10 electric energy sellers and 200-1000 electric energy buyers in an Energy LAN (local area network), the buyers are all clean energy power generation, the installed capacity ranges from 200-500 MWh, and the energy generation cost is about 50 yuan/MWh. The buyer's load demand is between 20-90 MWh. The load usage of the electric energy sellers and the energy generation situation of the electric energy seller group are randomly initialized. In order to meet its own energy demand and maintain regional grid balance, each buyer selects a group of available electric energy seller groups from the large electric energy seller groups, and sends distributed power purchase strategy to each seller simultaneously through the transaction cloud robot. From the trading cloud robot, each seller receives part of the electric energy demand from the buyer who chooses to match its supply and demand, and formulates its own electricity price strategy based on the sum of electric energy purchase strategies of buyer group.

Comparison Benchmark
Compare the system performance of the two methods proposed in this paper: the load transfer method [15,16] and the user-side energy storage method [17]. The load transfer method is to reduce the energy consumption of the electric energy buyer and transfer the peak load to off-peak hours, striving to maximize the overall income of the electric energy buyer group while reducing the power generation cost of the electric energy seller group. The user-side energy storage method is based on the multi-master and multi-slave Stackelberg game. A household energy management scheme considering the user-side energy storage configuration is designed, and the electric energy utilization (charging and discharging) curve of the buyer group is researched and analyzed. Research and analysis. Neither of these two methods consider the scenario where the buyer sends electric energy requests to multiple sellers at the same time. So first of all, relatively speaking, using distributed electric energy request methods can significantly improve reliability of electric energy supply and utilization of regional grid.

Evaluation Index
This section evaluates the system performance of the proposed method through the following two dimensions.
(1) Electric Energy Customer (1) Electric energy sales: for the convenience of comparison with the other two methods, this section uses the average value of the final consumption of the buyer to express the buyer's satisfaction with energy consumption. The average satisfaction coefficient is defined as the ratio between the average value of energy consumption of the buyer and the average value of electric energy request. In addition, the high-power consumption level of buyer also indicates that the seller's remaining power generation is less, and there will be no serious abandonment of wind and light.
(2) Electricity expenditure: each buyer hopes to consume more electric energy and pay less at the same time, but there is a certain balance between the quantity of energy consumption and electricity expenditure, and the buyer can only ensure the minimum cost of electricity expenditure per unit.
(2) Electric Energy Seller (1) Electric energy sales: the total amount of electric energy provided by each seller to all its paired buyers, which is also equal to the electric energy generation of the seller. Therefore, each seller tries to maximize the sales of electric energy, so as to ensure the maximum revenue return on its power generation capacity.
(2) Profit: the difference between the seller's revenue from the sale of the requested electric energy and the total generation cost. Each seller wants to maximize this parameter.

Simulation Results and Discussion
The area contains 200-1000 electric energy customers. For simulation needs, suppose that the electric energy buyer calculates the power request vector sent to the available electric energy seller group every 10 s until the stable state. Adjust the size of the electric energy buyer group and observe the average energy consumption level of all customers as shown in Figure 5.    Figure 6 show the average value of electric energy consumption and the corresponding average value of electricity expenditure of all buyers. From Figure 5, it can be observed that as the number of buyers increases, the amount of energy supplied by the seller group to each buyer will decrease, which is determined by the limited electric energy generation capacity of the seller. However, using the proposed electric energy request method, each buyer can consume 0.03%-0.32% and 7%-13.5% more power per unit than using other methods (load transfer method and user-side energy storage method). In other words, each consumer using the distributed electric energy request method can achieve a higher level of energy consumption satisfaction than using the load transfer method and the user-side energy storage method. In addition, it can also be calculated that each consumer using the distributed energy request method can reduce electricity expenditure by 5.7%-29.56% compared to the user-side energy storage method, as shown in Figure 6.   Figure 5, it can be observed that as the number of buyers increases, the amount of energy supplied by the seller group to each buyer will decrease, which is determined by the limited electric energy generation capacity of the seller. However, using the proposed electric energy request method, each buyer can consume 0.03-0.32% and 7-13.5% more power per unit than using other methods (load transfer method and user-side energy storage method). In other words, each consumer using the distributed electric energy request method can achieve a higher level of energy consumption satisfaction than using the load transfer method and the user-side energy storage method. In addition, it can also be calculated that each consumer using the distributed energy request method can reduce electricity expenditure by 5.7-29.56% compared to the user-side energy storage method, as shown in Figure 6.    Figure 6 show the average value of electric energy consumption and the corresponding average value of electricity expenditure of all buyers. From Figure 5, it can be observed that as the number of buyers increases, the amount of energy supplied by the seller group to each buyer will decrease, which is determined by the limited electric energy generation capacity of the seller. However, using the proposed electric energy request method, each buyer can consume 0.03%-0.32% and 7%-13.5% more power per unit than using other methods (load transfer method and user-side energy storage method). In other words, each consumer using the distributed electric energy request method can achieve a higher level of energy consumption satisfaction than using the load transfer method and the user-side energy storage method. In addition, it can also be calculated that each consumer using the distributed energy request method can reduce electricity expenditure by 5.7%-29.56% compared to the user-side energy storage method, as shown in Figure 6.  In order to analyze the income of the electric energy seller, the number of electric energy customers is adjusted within the range of 200-800, and the energy generation capacity of each electric energy seller under the three methods is compared as shown in Figure 7. It can be observed that using the distributed electric energy request method, the amount of energy sold by each seller is almost the same. Therefore, compared with the other two methods, distribution network line load can be more evenly distributed. From Figure 6, it can be seen that the electric energy utilization rate between the available power sellers using the distributed electric energy request method is about 17-36% higher than that of the user-side energy storage method and load transfer method. In Figure 8, it is observed that the electricity price set by each seller is close to the same. The electricity price using the distributed electric energy request method is about 21-32% lower than the other two methods, but the profit of each electricity seller has increased, which cannot be achieved by the user-side energy storage method and load transfer method. In order to analyze the income of the electric energy seller, the number of electric energy customers is adjusted within the range of 200-800, and the energy generation capacity of each electric energy seller under the three methods is compared as shown in Figure 7. It can be observed that using the distributed electric energy request method, the amount of energy sold by each seller is almost the same. Therefore, compared with the other two methods, distribution network line load can be more evenly distributed. From Figure 6, it can be seen that the electric energy utilization rate between the available power sellers using the distributed electric energy request method is about 17% -36% higher than that of the user-side energy storage method and load transfer method. In Figure 8, it is observed that the electricity price set by each seller is close to the same. The electricity price using the distributed electric energy request method is about 21%-32% lower than the other two methods, but the profit of each electricity seller has increased, which cannot be achieved by the user-side energy storage method and load transfer method.

Conclusions
In this work, a Multivariate Load trading optimization method is proposed based on LSTM and gaming theory. LSTM is introduced for real time prediction, which can be combined with the game theory for strategy searching. Based on the idea of non-cooperative game, this paper integrates the generation side and the demand-side into the existing resource scheduling framework, and uses the recurrent neural network to drive the Nash equilibrium required by the system to seek the optimal solution of cooperative control. Therefore, this method can be used to find the balance point in the conflict of interests In order to analyze the income of the electric energy seller, the number of electric energy customers is adjusted within the range of 200-800, and the energy generation capacity of each electric energy seller under the three methods is compared as shown in Figure 7. It can be observed that using the distributed electric energy request method, the amount of energy sold by each seller is almost the same. Therefore, compared with the other two methods, distribution network line load can be more evenly distributed. From Figure 6, it can be seen that the electric energy utilization rate between the available power sellers using the distributed electric energy request method is about 17% -36% higher than that of the user-side energy storage method and load transfer method. In Figure 8, it is observed that the electricity price set by each seller is close to the same. The electricity price using the distributed electric energy request method is about 21%-32% lower than the other two methods, but the profit of each electricity seller has increased, which cannot be achieved by the user-side energy storage method and load transfer method.

Conclusions
In this work, a Multivariate Load trading optimization method is proposed based on LSTM and gaming theory. LSTM is introduced for real time prediction, which can be combined with the game theory for strategy searching. Based on the idea of non-cooperative game, this paper integrates the generation side and the demand-side into the existing resource scheduling framework, and uses the recurrent neural network to drive the Nash equilibrium required by the system to seek the optimal solution of cooperative control. Therefore, this method can be used to find the balance point in the conflict of interests

Conclusions
In this work, a Multivariate Load trading optimization method is proposed based on LSTM and gaming theory. LSTM is introduced for real time prediction, which can be combined with the game theory for strategy searching. Based on the idea of noncooperative game, this paper integrates the generation side and the demand-side into the existing resource scheduling framework, and uses the recurrent neural network to drive the Nash equilibrium required by the system to seek the optimal solution of cooperative control. Therefore, this method can be used to find the balance point in the conflict of interests between the generation side and the demand side, so as to ensure the benefits of the participants in the power market and improve the flexibility and speed of orderly power consumption of demand-side resources. The global stability and optimal solution theory prove the feasibility of the proposed neural network, and finally the effectiveness of the proposed method is verified by numerical simulation.