Community-User Double-Layer P2P Multi-Energy Trading Method Based on Community-Level Agent Model
Through the community-user double-layer P2P multi-energy trading method based on the community-level agent model, the problem of individual bidding behaviors in the community is solved, the accuracy and consistency of community-level bidding information is achieved, the satisfaction with energy consumption is improved, and private information is protected.
Patent Information
- Application Number
- CN202310140873.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-21
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2043-02-21
AI Technical Summary
The existing technology is difficult to effectively solve the dispersed bidding behavior of individuals in the community in non-cooperation situations, which makes it difficult to directly obtain bid information from the entire community, which in turn affects the accuracy and consistency of community-level bid information in the community-level P2P market.
The community-user double-layer P2P multi-energy trading method is adopted based on the community-level agent model. By obtaining the user's energy load and market price data, an optimization model and subjective power generation and use model are established, and a community utility model is constructed using deep learning methods to solve the clearance results of the multi-energy P2P trading market.
It realizes modeling of user utility in the community and deriving of community-level market utility functions, ensures the accuracy and consistency of community-level bidding information, improves energy consumption satisfaction of energy consumers, and protects the privacy information of individuals in the microgrid.
Smart Images

Figure CN116342271B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of double-layer P2P trading, and particularly relates to a community-user double-layer P2P multi-energy trading method based on a community-level agent model. Background Art
[0002] In recent years, with the increasing popularity of distributed generation resources and the continuous progress of information and communication technologies, a P2P (Peer-to-Peer) based distribution network trading form has gradually become popular. This energy trading form allows energy prosumers to directly conduct electricity transactions, thereby improving the consumption rate of renewable energy at the user end. In addition to energy sharing at the user level, energy sharing can also be carried out between microgrids at the community level, thereby providing a certain amount of energy support for each individual within the community. However, the entire community is an independent participant in the upper-level market, and its bidding behavior should be consistent with the bidding behavior of individuals within the community. The bidding behaviors of individuals within each community are relatively scattered under non-cooperative circumstances, and it is difficult to directly obtain the bidding information of the entire community. Therefore, it has strong practical significance and economic value to deduce the community-level bidding information of the P2P (peer-to-peer) market based on the community-level agent model. Since most users in the P2P market are household users and use a comprehensive energy system composed of natural gas, heat, and electricity, P2P energy sharing has certain application value in the scenario of multi-energy trading. Summary of the Invention
[0003] Aiming at the deficiencies of the prior art, the present invention provides a community-user double-layer P2P multi-energy trading method based on a community-level agent model, which solves the above problems.
[0004] To achieve the above objectives, the present invention is realized through the following technical solutions: A community-user double-layer P2P multi-energy trading method based on a community-level agent model, including the following steps:
[0005] S1. Obtain data including user electrical, natural gas, and heat loads, real-time electricity prices, natural gas and heat prices, and the upper limits of grid gas network and heat network transmission capacities;
[0006] S2. Analyze the energy production and consumption costs of energy prosumers within each community. When an energy hub is installed on each prosumer, establish the objective function of the optimization model;
[0007] S3. Analyze the subjective power generation and consumption behaviors of each energy prosumer, and establish a subjective power generation and consumption optimization model and corresponding constraint conditions;
[0008] S4. After obtaining the individual utility of each user based on prospect theory, the community-level microgrid manager can determine the external utility of the community according to the utility of each user, construct a community effect function and a training model, and use the training model to train the community effect function to obtain a community effect model;
[0009] S5. Take the trained community effect model in S4 as the utility function, and use the physical constraints of the power, natural gas, and heat networks as constraints to solve the clearing result of this multi-energy P2P trading market.
[0010] Based on the above technical solutions, the present invention also provides the following alternative technical solutions:
[0011] Further technical solution: The objective function includes the energy conversion cost of the energy hub, the user's own power generation cost, and the cost of purchasing energy from other communities. The objective function is as follows:
[0012]
[0013] s.t.,
[0014]
[0015]
[0016]
[0017]
[0018]
[0019]
[0020]
[0021]
[0022]
[0023]
[0024] In the formula: p is the decision variable of the user's energy sharing, is the conversion cost when the user converts the jth type of energy, is the price of the user purchasing energy from the mth community, is the amount of energy the user purchases from the mth community, is the purchase energy price when the user is a buyer, is the amount of energy purchased when the user is a buyer, The selling energy price when the user is a seller The energy selling volume of the user Indicates the electricity, gas, and heat load values of the user The conversion efficiency of the corresponding energy The energy purchase ratio of the user The power generation of the user's local distributed power source The j-th type of energy after the user's conversion, j ∈ J i Represents the energy conversion set of user i The conversion upper limit of the j-th type of energy, α j , β j and γ j Are the corresponding coefficients of the quadratic, linear, and constant terms of the cost function respectively and Represent the upper limits of the trading electricity volumes of the user to other communities and other users respectively
[0025] Users equipped with energy hubs can adjust their energy purchase plans in a timely manner within the conversion limit. Therefore, the feasible region of the energy conversion of each user is as follows:
[0026]
[0027] In the formula: p out Is the output energy flow after being converted by the user's hub, p load Is the multi-energy load of the user. When the energy flow output by the user's energy hub is consistent with the energy flow required by the user, the transaction is feasible
[0028] Based on the defined energy conversion model, the feasible region of the user's energy purchase is as follows:
[0029]
[0030] In the formula: p is the decision variable of the user's cost minimization model. When there is an optimal solution, the original problem is solvable, and the input energy flow of the energy hub at this time is within the feasible region of the energy hub
[0031] Further technical solution: The S3 subjective power generation and consumption model specifically includes:
[0032] The modified model of the objective function in S2. Prosumers within each community have the right to negotiate, receive, and reject transactions. The transaction results within the microgrid are greatly affected by subjective factors of users. Therefore, it is necessary to consider the uncertain variables in the transaction process. The modified model of the objective function in S2 is:
[0033]
[0034] s.t.,
[0035]
[0036]
[0037]
[0038] where: Uncertain variables represents the uncertainty of renewable energy generation and trading limit of the entire user model, E P represents taking the expectation of the solution to the uncertain variable, P r represents the probability that the constraint holds, are the probabilities that the constraints do not hold respectively, generally taken as 0.05;
[0039] Generally speaking, the historical power generation data and trading data of users are known. Therefore, in this invention, the user uncertainty set in the community-level microgrid is modeled based on historical data as:
[0040]
[0041] where: Ω ξ is the feasible region of the uncertain parameter, μ is the mean of the uncertain variable, σ 2 is the variance of the uncertain variable, μ min , μ max represent the lower and upper limits of the mean of the uncertain variable respectively,
[0042] (σ 2 ) min , (σ 2 ) max represent the lower and upper limits of the variance of the uncertain variable respectively;
[0043] Considering the psychology of users, each integrated energy user will try to balance the expenditures of electricity, natural gas and heat as much as possible when participating in transactions. Therefore, when trading, the user also needs to solve the following model:
[0044]
[0045] s.t.,
[0046] F i e + F i g + F i h = F i m
[0047]
[0048] where: Fi m is the total psychological budget for user i, F i e , F i g , F i h are the electricity, natural gas, and heat expenditures of user i respectively, F i c is the original budget, which is consistent with the objective function value in the S2 model, are the budget amounts for decline and rebound respectively. The remaining constraint conditions and variable descriptions of this model have been given in S2;
[0049] After obtaining the psychological budget of each user, the present invention can correct the original model based on prospect theory as follows:
[0050]
[0051] In the formula: represents the psychological magnification effect after the user's actual cost exceeds the psychological budget, represents the phenomenon of diminishing marginal utility within the user's psychological budget.
[0052] Further technical solution: The utility model of the community is as follows:
[0053]
[0054] In the formula: is the utility function of community m in the community-community energy sharing market, indicates that the trading energy of the community to the outside is not zero, that is, it needs to exchange energy with other communities;
[0055] Considering that there may be non-cooperative situations among individuals within the community, the community-level utility function presented to the outside may be too complex to be directly applied in community-community transactions. The utility function corresponding to the community is learned by using the deep learning method:
[0056]
[0057]
[0058]
[0059]
[0060] In the formula: V IN is the data input into the deep learning algorithm, mainly including the parameters affecting the community utility function The variable meanings in these subsets are consistent with the corresponding variables in S2, is the sampling point of the trading energy flow, are the upper and lower limits of the community trading energy respectively, r j is the set of good points for trading, N in represents the scale of the sampling point set, are the sampling points of load and renewable energy generation respectively, μ and σ represent the average value and maximum deviation of the corresponding sampling quantity respectively, and κ is the constant for expanding the corresponding sampling set;
[0061] Construct the training model based on the deep hidden layer network as follows:
[0062]
[0063] s.t.,
[0064] ψ(V IN,train ):=M L (S(M L-1 (…S(M 1 (V IN,train )))))
[0065]
[0066] M i (x)=w i (r i x)+b i ,r i ~B(1-p)
[0067] In the formula: ψ(V IN,train ) is the output training result, represents the deviation between the output training result and the actual operating point, w, b are the weights and biases of the neurons in the neural network, is the L2 norm for avoiding overfitting, L is the number of layers of the neural network, S(x) is the activation function, and B(1-p) represents the Bernoulli distribution;
[0068] After obtaining the trained neural network ψ(·), the surrogate model of the community can be reconstructed as:
[0069]
[0070] M i (x)=pw i x+b i ,i=1,2,…,L
[0071] In the formula: ψ(V IN,train ) is the output training result, It represents the deviation between the output training result and the actual operating point. w and b are the weights and biases of the neurons in the neural network. is the L2 norm used to avoid overfitting. L is the number of layers of the neural network. S(x) is the activation function. B(1 - p) represents the Bernoulli distribution.
[0072] Further technical solution: The electrical, natural gas, and heating load data of the users include the annual load data of the users in each community-level microgrid, and the minimum data acquisition interval is 15 minutes.
[0073] Further technical solution: The real-time electricity price, natural gas price, and heating price adopt the national unified peak-valley flat time-sharing price.
[0074] Further technical solution: The grid data includes the connection relationship between each microgrid and the superior distribution grid, the resistance and reactance values of each branch, and the upper limits of the transmission powers of each natural gas branch, electrical branch, and heating network.
[0075] Beneficial effects
[0076] The present invention provides a community-user two-layer P2P multi-energy trading method based on a community-level agent model, which has the following beneficial effects compared with the prior art:
[0077] 1. The present invention can use the method of deep learning to model the user utility in the community. While deriving the community-level market utility function, it ensures that the bidding information of the entire community can reflect the bidding information of each user in the community, improving the energy consumption satisfaction of energy prosumers in the community. The used agent model protects the privacy information of individuals in each microgrid and has high application value. Brief description of the drawings
[0078] Figure 1 is the schematic diagram of the total trading structure in the present invention;
[0079] Figure 2 is the schematic diagram of two-layer P2P multi-energy trading in the present invention;
[0080] Figure 3 is the schematic diagram of the influence of prospect theory on the trading model in the present invention. Detailed implementation manners
[0081] In order to make the purpose, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0082] The following describes the specific implementation of the present invention in detail with reference to specific embodiments.
[0083] Please refer to Figures 1 to 3 , a community-user double-layer P2P multi-energy trading method based on a community-level agent model provided by an embodiment of the present invention, comprising the following steps:
[0084] S1. Obtain data including users' electrical, natural gas, and heating loads, real-time electricity prices, natural gas and heat prices, and the upper limits of the transmission capacities of the power grid, gas network, and heating network;
[0085] Specifically, the electrical, natural gas, and heating load data of the users include the annual load data of the users in each community-level microgrid, and the minimum data acquisition interval is 15 minutes;
[0086] Specifically, the real-time electricity price, natural gas price, and heating price adopt the national unified peak-valley average time-sharing price;
[0087] Specifically, the power grid data includes the connection relationship between each microgrid and the superior distribution grid, the resistance and reactance values of each branch, and the upper limits of the transmission powers of each natural gas branch, electrical branch, and heating network;
[0088] S2. Analyze the energy production and consumption costs of the energy prosumers within each community. When an energy hub is installed at each prosumer, establish the objective function of the optimization model;
[0089] As Figure 2 shown, because in multi-energy sharing, each energy prosumer needs to optimize its own energy purchase plan through the energy hub, the objective function includes the energy conversion cost of the energy hub, the user's own power generation cost, and the cost of purchasing energy from other communities. The objective function is as follows:
[0090]
[0091] s.t.,
[0092]
[0093]
[0094]
[0095]
[0096]
[0097]
[0098]
[0099]
[0100]
[0101]
[0102] where: p is the decision variable of the user's energy sharing, is the conversion cost when the user converts to the j-th type of energy, is the price for the user to purchase energy from the m-th community, is the amount of energy the user purchases from the m-th community, is the purchase energy price when the user is a buyer, is the amount of energy purchased when the user is a buyer, is the selling energy price when the user is a seller, is the user's energy selling volume, represents the user's electricity, gas, and heat load values, is the conversion efficiency of the corresponding energy, is the user's energy purchase ratio, is the power generation of the user's local distributed power source, is the j-th type of energy after the user's conversion, j ∈ J i represents the energy conversion set of user i, is the conversion upper limit of the j-th type of energy, α j , β j and γ j are the corresponding coefficients of the quadratic, linear, and constant terms of the cost function respectively, and represent the upper limits of the transaction electricity volumes from the user to other communities and other users respectively;
[0103] Users equipped with energy hubs can timely adjust their energy purchase plans within the conversion limits. Therefore, the feasible region of the energy conversion of each user in the present invention is as follows:
[0104]
[0105] where: p out is the output energy flow after being converted by the user's hub, p load is the multi-energy load of the user. When the energy flow output by the user's energy hub is consistent with the energy flow required by the user, the transaction is feasible;
[0106] Based on the defined energy conversion model, the feasible region for the user to purchase energy is as follows:
[0107]
[0108] where: p is the decision variable of the user's cost minimization model. When there is an optimal solution, the original problem is solvable, and the input energy flow of the energy hub at this time is within the feasible region of the energy hub;
[0109] S3. Analyze the subjective power generation and consumption behaviors of each energy prosumer, and establish the subjective power generation and consumption optimization model and corresponding constraint conditions as follows:
[0110] As Figure 3 shown, since the prosumers within each community have the right to negotiate, receive, and reject transactions, the transaction results within the microgrid will be greatly affected by the subjective factors of users. Therefore, it is necessary to consider the uncertain variables in the transaction process and modify the model in S2 as follows:
[0111]
[0112] s.t.,
[0113]
[0114]
[0115]
[0116] where: the uncertain variable represents the uncertainty of the renewable energy generation and transaction upper limit of the entire user model, and E P represents the solution of the expected value for the uncertain variable, P r represents the probability that this constraint holds, are the probabilities that this constraint does not hold, generally taking 0.05;
[0117] Generally speaking, the historical power generation data and transaction data of users are known. Therefore, in the present invention, the user uncertainty set within the community-level microgrid is modeled based on historical data as:
[0118]
[0119] where: Ω ξ is the feasible region of the uncertain parameter, μ is the mean of the uncertain variable, and σ 2 is the variance of the uncertain variable, μ min , μ max respectively represent the lower limit and upper limit of the mean of the uncertain variable,
[0120] (σ 2 ) min , (σ 2 ) max respectively represent the lower limit and upper limit of the variance of the uncertain variable;
[0121] Considering the psychology of users, each integrated energy user will try to balance the expenditures on electricity, natural gas, and heat as much as possible when participating in transactions. Therefore, when conducting transactions, users also need to solve the following model:
[0122]
[0123] s.t.,
[0124] F i e +F i g +F i h =F i m
[0125]
[0126] In the formula: F i m is the total psychological budget of user i, F i e ,F i g ,F i h are the electricity, natural gas, and heat expenditures of user i respectively, F i c is the original budget, which is consistent with the objective function value in the S2 model, are the budget amounts for decline and rebound respectively. The remaining constraint conditions and variable descriptions of this model have been given in S2;
[0127] After obtaining the psychological budget of each user, the present invention can, based on prospect theory, modify the original model as follows:
[0128]
[0129] In the formula: represents the psychological magnification effect when the actual cost of the user exceeds the psychological budget, represents the phenomenon of diminishing marginal utility within the psychological budget of the user;
[0130] S4. After obtaining the individual utility of each user based on prospect theory, the community-level microgrid manager can determine the external utility of the community according to the utility of each user, construct a community effect function and a training model, and use the training model to train the community effect function to obtain a community effect model
[0131] Considering that each community manager will not install a power generation source by itself to participate in the electricity market, the utility of the community-level energy transactions it participates in is mainly composed of the utilities of the users who need to conduct transactions within it. Therefore, the utility model of the community is as follows:
[0132]
[0133] In the formula: is the utility function of community m in the community-community energy sharing market, indicates that the trading energy of the community to the outside is not zero, that is, it needs to exchange energy with other communities;
[0134] Considering that there may be non-cooperative situations among individuals within the community, the community-level utility function presented to the outside may be too complex to be directly applied in community-community transactions. The present invention uses a deep learning method to learn the utility function corresponding to the community:
[0135]
[0136]
[0137]
[0138]
[0139] In the formula: V IN is the data input into the deep learning algorithm, mainly including the parameters affecting the community utility function The variable meanings in these subsets are the same as the corresponding variables in S2, is the sampling point of the trading energy flow, are the upper and lower limits of the community trading energy respectively, r j is the set of good trading points, N in represents the scale of the sampling point set, are the sampling points of load and renewable energy generation respectively, μ and σ represent the average value and maximum deviation of the corresponding sampling amounts respectively, and κ is the constant for expanding the corresponding sampling set;
[0140] The present invention constructs a training model based on a deep hidden layer network as follows:
[0141]
[0142] s.t.,
[0143] ψ(V IN,train ):=M L (S(M L-1 (…S(M 1 (V IN,train )))))
[0144]
[0145] M i (x)=w i (ri x) + b i , r i ~B(1 - p)
[0146] Where: ψ(V IN,train ) is the output training result, which represents the deviation between the output training result and the actual operating point, w and b are the weights and biases of the neurons in the neural network, is the L2 norm used to avoid overfitting, L is the number of layers of the neural network, S(x) is the activation function, and B(1 - p) represents the Bernoulli distribution;
[0147] After obtaining the trained neural network ψ(·), the surrogate model of the community can be reconstructed as:
[0148]
[0149] M i (x) = pw i x + b i , i = 1, 2, …, L
[0150] Where: ψ(V IN,train ) is the output training result, which represents the deviation between the output training result and the actual operating point, w and b are the weights and biases of the neurons in the neural network, is the L2 norm used to avoid overfitting, L is the number of layers of the neural network, S(x) is the activation function, and B(1 - p) represents the Bernoulli distribution;
[0151] S5. Taking the trained model as the utility function and the physical constraints of the power, natural gas and heat networks as the constraints, the clearing result of the multi - energy P2P trading market can be solved.
[0152] The present invention is applicable to the two - layer P2P trading at the community - user level. From the perspective of individual users, the surrogate model is used to replace the community - level bidding behavior that is difficult to directly model, improving the community - level trading speed. From the perspective of the users within the community, the electricity consumption privacy of each community - level micro - grid is protected, providing a new idea for P2P multi - energy trading and effectively improving the in - situ consumption rate of new energy.
[0153] It should be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprising", "including" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device.
[0154] Although the embodiments of the present invention have been shown and described, those of ordinary skill in the art can understand that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of the present invention, and the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. Community - user double - layer P2P multi - energy trading method based on community - level agent model, Characterized in that, It includes the following steps: S1. Obtain data including users' electrical, natural gas, and heating loads, real - time electricity prices, natural gas and heat prices, and the upper limits of the transmission capacities of the power grid, gas network, and heating network; S2. Analyze the energy production and consumption costs of energy prosumers within each community. When an energy hub is installed for each prosumer, establish the objective function of the optimization model; S3. Analyze the subjective power generation and consumption behaviors of each energy prosumer, and establish the subjective power generation and consumption optimization model and corresponding constraint conditions; S4. After obtaining the individual utility of each user based on prospect theory, the community - level micro - grid manager can determine the external utility of the community according to the utility of each user, construct the community effect function and the training model, and use the training model to train the community effect function to obtain the community effect model; S5. Take the trained community effect model in S4 as the utility function, and use the physical constraints of the power, natural gas, and heating networks as constraint conditions to solve the clearing result of this multi - energy P2P trading market; The objective function includes the energy conversion cost of the energy hub, the user's own power generation cost, and the cost of purchasing energy from other communities. The objective function is as follows: where: p is the decision variable for users' energy sharing, is the conversion cost when the user converts to the j-th type of energy, is the price for the user to purchase energy from the m-th community, is the amount of energy the user purchases from the m-th community, is the purchase price of energy when the user is a buyer, is the amount of energy purchased when the user is a buyer, is the selling price of energy when the user is a seller, is the amount of energy sold by the user, represents the electricity, gas, and heat load values of the user, is the conversion efficiency of the corresponding energy, is the energy purchase ratio of the user, is the power generation of the user's local distributed power source, is the j-th type of energy after the user's conversion, j ∈ J i represents the energy conversion set of user i, is the conversion upper limit of the j-th type of energy, α j , β j and γ j are the corresponding coefficients of the quadratic, linear, and constant terms of the cost function respectively, and represent the upper limits of the transaction electricity amounts for the user to other communities and other users respectively; Users equipped with energy hubs can adjust their energy purchase plans in a timely manner within the conversion limit. Therefore, the feasible region of energy conversion for each user is as follows: Where: p out is the output energy flow after conversion by the user hub, and p load is the multi-energy load of the user. When the energy flow output by the user's energy hub is consistent with the energy flow required by the user, the transaction is feasible; Based on the defined energy conversion model, the feasible region for users to purchase energy is as follows: In the formula: p is the decision variable of the user's cost - minimization model. When there is an optimal solution, the original problem is solvable, and the input energy flow of the energy hub at this time is within the feasible region of this energy hub.
2. The community - user double - layer P2P multi - energy trading method based on community - level agent model according to claim 1, Characterized in that, The subjective power generation and consumption model in S3 specifically includes: The correction model of the objective function in S2. Prosumers within each community have the right to negotiate, receive, and reject transactions. The trading results within the micro - grid are greatly affected by users' subjective factors. Therefore, uncertain variables in the trading process need to be considered. The correction model of the objective function in S2 is: s.t., Where: the uncertain variable represents the uncertainty of the renewable energy power generation and trading limit of the entire user model, E P represents the expectation of solving the uncertain variable, P r represents the probability that the constraint holds, are respectively the probabilities that the constraint does not hold, generally taken as 0.05; Generally speaking, the historical power generation data and trading data of users are known. Therefore, based on historical data, the uncertain set of users within the community - level micro - grid is modeled as: where: Ω ξ is the feasible region of the uncertain parameters, μ is the mean of the uncertain variables, and σ 2 is the variance of the uncertain variables. μ min , μ max represent the lower and upper bounds of the mean of the uncertain variables respectively. (σ 2 ) min , (σ 2 ) max represent the lower and upper bounds of the variance of the uncertain variables respectively; Considering users' psychology, each integrated energy user will try to balance the expenditures of electricity, natural gas, and heating as much as possible when participating in transactions. Therefore, when trading, users also need to solve the following model: s.t., F i e +F i g +F i h =F i m where: F i m is the total psychological budget of user i, F i e , F i g , F i h are the electricity, natural gas and heat expenditures of user i respectively, F i c is the original budget, which is consistent with the objective function value in the S2 model, are the budget amounts for decline and rebound respectively. The remaining constraint conditions and variable descriptions of this model have been given in S2; After obtaining the psychological budget of each user, based on prospect theory, the original model can be corrected as follows: In the formula: represents the psychological magnification effect after the user's actual cost exceeds the psychological budget, represents the phenomenon of diminishing marginal utility within the user's psychological budget.
3. The community - user double - layer P2P multi - energy trading method based on community - level agent model according to claim 1, Characterized in that, The utility model of the community is as follows: where: is the utility function of community m in the community-community energy sharing market, indicates that the transaction energy of the community with the outside is non-zero, that is, it needs to exchange energy with other communities; Considering that there may be non - cooperative situations among individuals within the community, the community - level utility function presented externally may be too complex to be directly applied to community - to - community transactions. The utility function corresponding to the community is learned by using the method of deep learning: Where: V IN is the data input into the deep learning algorithm, mainly including the parameters affecting the community utility function The variable meanings in these subsets are the same as the corresponding variables in S2, is the sampling point of the transaction energy flow, are the upper and lower limits of the community transaction energy respectively, r j is the set of good points for transactions, N in represents the scale of the sampling point set, are the sampling points of the load and renewable energy generation respectively, μ and σ represent the average value and the maximum deviation of the corresponding sampling quantity respectively, and κ is the constant for expanding the corresponding sampling set; The training model is constructed based on a deep hidden layer network as follows: s.t., ψ(V IN,train ):= M L (S(M L-1 (...S(M 1 (V IN,train ))))) M i f(x) = w i (r i x) + b i , r i ~B(1 - p) Where: ψ(V IN,train ) is the output training result, which represents the deviation between the output training result and the actual operating point. w and b are the weights and biases of the neurons in the neural network, is the L2 norm used to avoid overfitting. L is the number of layers of the neural network, S(x) is the activation function, and B(1 - p) represents the Bernoulli distribution; After obtaining the trained neural network ψ(·), the surrogate model of the community can be reconstructed as: M i (x) = pw i x + b i , i = 1, 2,..., L where: ψ(V IN,train ) is the output training result, represents the deviation between the output training result and the actual operating point, w and b are the weights and biases of the neurons in the neural network, is the L2 norm used to avoid overfitting, L is the number of layers of the neural network, S(x) is the activation function, and B(1 - p) represents the Bernoulli distribution.
4. The community-user two-layer P2P multi-energy trading method based on the community-level surrogate model according to claim 1, characterized in that the electrical, natural gas, and heating load data of the users include the annual load data of the users in each community-level microgrid, and the minimum data acquisition interval is 15 minutes.
5. The community-user two-layer P2P multi-energy trading method based on the community-level surrogate model according to claim 1, characterized in that the real-time electricity price, natural gas price, and heating price adopt the national unified peak-valley average time-sharing price.
6. The community-user two-layer P2P multi-energy trading method based on the community-level surrogate model according to claim 1, wherein the grid data includes the connection relationship between each microgrid and the superior distribution grid, the resistance and reactance values of each branch, and the upper limit of the transmission power of each natural gas branch, electrical branch, and heating network.