Energy supermarket transaction optimization method based on decentralized P2P negotiation mechanism and learning scheme

By adopting a decentralized P2P negotiation mechanism and learning scheme in power market transactions, constructing a P2P energy trading model and using the decentralized ADMM method, the problem of existing technology being unable to calculate the power of each transaction and failing to consider unsuccessful transactions has been solved. It provides efficient and accurate transaction optimization and improves the reliability and reference of transactions.

CN113869790BActive Publication Date: 2024-09-27YANGZHOU POWER SUPPLY BRANCH OF STATE GRID JIANGSU ELECTRIC POWER CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111218418.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-20
Publication Date
2024-09-27
Estimated Expiration
2041-10-20

AI Technical Summary

Technical Problem

The existing electricity market transaction optimization model cannot calculate the power of each transaction, and the optimal energy price and transaction volume only depend on consumers who have successfully traded, and do not take into account the situation of prosumers who have not successfully traded, resulting in biased results and low reliability. and energy waste.

Method used

Adopt a decentralized P2P negotiation mechanism and learning plan, and build a P2P energy trading model by analyzing the energy supermarket transaction subject frame information, and use the decentralized ADMM method and Lagrange multiplier method combined with KKT conditions to solve the details and adjustments of each transaction Prosumer pricing and electricity purchase and sale solutions ensure the reliability of transaction optimization.

Benefits of technology

It realizes the optimal transaction that calculates the power of each transaction, improves the reliability and reference of transactions, saves resources, and reduces transaction economic losses and energy waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113869790B
    Figure CN113869790B
Patent Text Reader

Abstract

The present invention discloses an energy supermarket transaction optimization method based on a decentralized P2P negotiation mechanism and a learning scheme, the method comprising the following steps: (1) analyzing the energy supermarket transaction subject framework information; (2) constructing a P2P energy transaction model according to the transaction framework information; (3) using a decentralized alternating direction multiplier method (ADMM) to deform the P2P energy transaction model; (4) using the Lagrange multiplier method and the KKT condition to solve the iterative formula of the decision variables in the transaction model; (5) establishing a decentralized learning scheme to adjust the producer-consumer objective function parameters in the transaction model; (6) solving the producer-consumer pricing and electricity purchase and sales scheme through cyclic iteration. Starting from the traditional P2P transaction model, the present invention introduces a new P2P transaction model based on a decentralized ADMM, and at the same time establishes a decentralized learning scheme to adjust the iterative objective function parameters, thereby obtaining the optimal transaction and improving reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of power market transactions and economic optimization, and in particular to an energy supermarket transaction optimization method based on a decentralized P2P negotiation mechanism and a learning scheme. Background Art

[0002] In recent years, a new concept "energy supermarket" has emerged in the design of power markets to promote flexibility, diversity, locality and low emissions in energy supply and consumption. At the same time, more and more market participants are participating in power market transactions in a more flexible and diverse way, transforming from traditional single energy buyers or sellers to energy producers and consumers with independent decision-making capabilities. In this environment, how to build a reasonable and effective "energy supermarket", i.e. a new power market trading platform, fully protect the rights and privacy of market trading entities, and reasonably arrange energy trading configuration, is the focus of current research.

[0003] In the current research on power market transactions, transaction optimization models are an extremely important topic. Although there are some studies on transaction optimization models, they are all insufficient in two main aspects: first, the traditional optimization method only provides the total transaction power of a producer-consumer transaction, but cannot calculate the power of each transaction; second, the optimal energy price and transaction volume in existing research only depend on consumers who have successfully traded. In actual transactions, producers and consumers who have not successfully traded will change their requirements according to the transaction situation in order to achieve the goal of successful transactions. If this situation is not taken into account, the results will deviate from the actual situation, reducing reliability, resulting in no reference results and causing economic losses and energy waste in transactions. Summary of the invention

[0004] In view of the above problems, the present invention provides an energy supermarket transaction optimization method based on a decentralized P2P negotiation mechanism and a learning scheme, which can calculate the power of each transaction and realize the optimized transaction in combination with the actual transaction situation and has high reliability.

[0005] The technical solution of the present invention is: comprising the following steps:

[0006] (1) Analyze the framework information of energy supermarket transaction entities;

[0007] (2) Construct a P2P energy trading model;

[0008] (3) Deform the P2P energy trading model using the decentralized ADMM method;

[0009] (4) Solve the iterative formula for decision variables;

[0010] (5) Establish a distributed learning scheme to adjust the objective function parameters;

[0011] (6) Solve the pricing and electricity purchase and sales plans for producers and consumers.

[0012] Step (1) comprises the following steps:

[0013] (101) Analyze the energy supermarket transaction information, establish the prosumer communication graph, define G(t) as the communication graph between prosumers, and G(t) as a bipartite graph;

[0014] (102) calculating the incidence matrix, adjacency matrix, degree matrix and Laplacian matrix of G(t) according to the producer-consumer communication graph;

[0015] Define the adjacent node set of producer / consumer i as N i (t),N i (t) is the set of prosumers participating in energy trading communication except prosumer i at time t;

[0016] E(t) represents the incidence matrix;

[0017] A(t) represents the adjacency matrix, a ij is the element representing the connection relationship in the adjacency matrix. When it is equal to 1 and 0, it means that prosumer i and prosumer j are connected or disconnected at time t respectively;

[0018] D(t) represents the degree matrix, Where diag represents D(t) is d i (t) is an n×n dimensional diagonal matrix, where n is the total number of producers and consumers. To define symbols, Represents the sum of the connection relationship elements between prosumer i and all adjacent prosumers j;

[0019] The Laplace matrix is ​​L(t)=D(t)-A(t).

[0020] Step (2) comprises the following steps:

[0021] (201) Construct the cost function of producer and consumer i:

[0022]

[0023]

[0024] C i,3 (P i (t)) = βP i,tr (t) (3)

[0025] Where: C i,1 (P i (t))、C i,2 (P i (t))、C i,3(P i (t)) are the behavior change cost, transaction cost and implementation cost of producer-consumer i respectively;

[0026] a i (t) It is a parameter that reflects the complex behavior of producers and consumers that changes over time; ij (t) is the transaction volume between prosumer i and prosumer j; P i (t) is the vector reflecting the transaction volume between prosumer i and its adjacent prosumers; P i,tr (t) is the total transaction volume of producer-consumer i; d ij is the trade weight of both parties; β is a fixed ratio;

[0027] Adding formulas (1), (2), and (3) together, where the same terms in formulas (1) and (3) are combined, the total cost of producer-consumer i is as follows:

[0028]

[0029] Among them, C i (P i (t)) is the total cost of prosumer i, b i (t) is the coefficient of the term combined by adding formulas (1) and (3);

[0030] (202) Establish the constraints for producer and consumer i:

[0031]

[0032]

[0033] in are the lower and upper limits of the transaction of producer and consumer i, respectively; T is the total transaction period, t represents the transaction period; P ji (t) is the transaction volume between prosumer j and prosumer i, and P ij The opposite of (t);

[0034] (203) Constructing a P2P energy trading model:

[0035]

[0036] When prosumer i is a power buyer, P ij (t)≤0, when prosumer i is a seller of energy, P ij (t)≥0.

[0037] It is characterized in that step (3) comprises the following steps:

[0038] (301) The constraints in formula (7) are expressed in a set form, and the parameters are defined as follows:

[0039]

[0040]

[0041]

[0042]

[0043] P stands for transaction vector; is the transaction vector P i The collection of P i is a vector reflecting the transaction volume between prosumer i and its adjacent prosumers; n i represents the number of prosumers adjacent to prosumer i; Represents n i The transpose of a vector whose Ω-dimensional elements are all 1; eq ,Ω ineq ,I eq (P) and I ineq (P) is the set and value defined by the above formula;

[0044] (302) Deformed P2P energy trading model using decentralized ADMM method;

[0045]

[0046] Among them, C i (P i ) is the transaction vector, is a newly set variable, which refers to the transaction vector together with variable P. After defining the set, the optimization problem is rewritten so that the equality constraints and inequality constraints are divided into different sets, corresponding to variables P and X. Formula (12) is the standard form of ADMM.

[0047] Step (4) comprises the following steps:

[0048] (401) Define the augmented Lagrangian function:

[0049]

[0050] Where ρ is the standard penalty parameter, and ρ>0; u is the Lagrange multiplier;

[0051] (402) Combine the KKT conditions to solve the iterative value of the decision variable:

[0052]

[0053] The superscripts k and k+1 represent the values ​​of the kth and k+1th iterations; For a positive definite matrix that satisfies the KKT condition, let Ψ = ψI, Where I is the identity matrix, ψ and φ are arbitrary values ​​that satisfy the KKT condition; κ is an arbitrary iteration parameter that satisfies the KKT condition;

[0054] The specific decision variable optimization model is as follows:

[0055] X variable update:

[0056]

[0057] Among them, X i is the transaction vector of producer and seller i;

[0058] P variable update:

[0059]

[0060] Let λ ij >0 represents the Lagrange multiplier associated with the above constraints, and the following formula is obtained from formula (16):

[0061]

[0062] in represents the transaction vector between prosumer i and prosumer j for the inequality constraint in the kth iteration; represents the number of Lagrange multipliers between prosumer i and prosumer j in the kth iteration; represents the transaction vector between prosumer i and prosumer j for the equality constraint in the kth iteration; is the transaction price between prosumers i and j in the k+1th iteration;

[0063] The iterative formula for the energy transaction price and electricity consumption of each producer and consumer is as follows:

[0064]

[0065]

[0066] in Calculated by the following formula:

[0067]

[0068]

[0069]

[0070] L is the Laplacian operator matrix; vec() represents the superposition vector algorithm, where the superposition of i-dimensional vectors is a large matrix.

[0071] In step (5),

[0072] The following is an analytical formula based on the optimal transaction to change the transaction parameters of the producer and consumer:

[0073]

[0074] In the formula, is the transaction volume of producer and seller i; a i 、b i 、a j 、b j is the parameter of the cost function of prosumer i and prosumer j in formula (4).

[0075] Step (6) combines steps (3)(4)(5) to iterate and solve the optimal transaction.

[0076] Compared with the prior art, the present invention has the following advantages:

[0077] 1) The present invention adopts a decentralized ADMM negotiation mechanism and uses the Lagrange multiplier method and KKT conditions to solve the details of each transaction, which makes up for the defect that the traditional algorithm can only provide the total benefits of a single producer and consumer;

[0078] 2). The present invention proposes a decentralized learning scheme for producers and consumers to adjust their self-generated cost functions after a transaction fails, which is more in line with the actual transaction psychology of producers and consumers, and the optimal transaction sought is more referenceable.

[0079] The present invention can be combined with reality in application, is efficient and accurate, and saves resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0080] Figure 1 is a schematic flow chart of the method of the present invention,

[0081] Figure 2 It is the communication diagram of the transaction subject.

[0082] Figure 3 Flowchart of trading optimization for a certain period of time. DETAILED DESCRIPTION

[0083] This section will illustrate the specific implementation method of the invention in conjunction with the drawings in the specification.

[0084] As attached Figure 1-3 As shown, the present invention proposes an energy supermarket transaction optimization method based on a decentralized P2P negotiation mechanism and a learning scheme, comprising the following steps:

[0085] (1) Analyze the framework information of energy supermarket transaction entities;

[0086] (2) Construct a P2P energy trading model based on the transaction framework information;

[0087] (3) Decentralized alternating direction multiplier method (ADMM) is used to transform the P2P energy trading model;

[0088] (4) Use the Lagrange multiplier method and KKT conditions to solve the iterative formula of decision variables in the trading model;

[0089] (5) Establish a decentralized learning scheme to adjust the parameters of the prosumer objective function in the transaction model;

[0090] (6) Solve the pricing and electricity purchase and sales plans of producers and consumers through iterative cycles.

[0091] The implementation method of the present invention is described below:

[0092] Step 1: Analyze the framework information of the energy supermarket transaction subject. The main steps of this part are as follows:

[0093] (1) Analyze energy supermarket transaction information and draw a communication diagram between producers and consumers.

[0094] Define G(t) as the communication graph between prosumers. Since the transactions between prosumers are bilateral, G(t) is undirected. In addition, G(t) is a bipartite graph whose node set consists of two disjoint subsets associated with buyers and sellers, rather than a fully connected graph. Each node only communicates with other nodes in the other subset, and not with nodes in the same subset. Figure 2 A schematic diagram of G(t) is given.

[0095] (2) Calculate the parameters of G(t) such as the association matrix, adjacency matrix, degree matrix and Laplace matrix based on the producer-consumer communication graph.

[0096] Define the adjacent node set of producer / consumer i as N i (t), that is, the set of prosumers participating in energy trading communication except prosumer i at time t; E(t) represents the association matrix; A(t) represents the adjacency matrix, a ij is the element representing the connection relationship in the adjacency matrix. When it is equal to 1 or 0, it means that prosumer i and prosumer j are connected or disconnected at time t respectively;

[0097] D(t) represents the degree matrix, Where diag represents D(t) is d i (t) is an n×n dimensional diagonal matrix, where n is the total number of producers and consumers. To define symbols, Represents the sum of the connection relationship elements between prosumer i and all adjacent prosumers j; the Laplace matrix is ​​L(t)=D(t)-A(t).

[0098] Step 2: Construct a P2P energy trading model according to the trading framework information. The main steps of this part are as follows:

[0099] According to the communication parameters obtained in step 1, the following P2P energy trading model is constructed.

[0100] (1) Construct the cost function of producer and consumer i:

[0101]

[0102]

[0103] C i,3 (P i (t)) = βP i,tr (t) (3)

[0104] Where: C i,1 (P i (t))、C i,2 (P i (t))、C i,3 (P i (t)) are the behavior change cost, transaction cost and implementation cost of producer and consumer i respectively; a i (t) It is a parameter that reflects the complex behavior of producers and consumers that changes over time; ij (t) is the transaction volume between prosumer i and prosumer j; P i (t) is the vector reflecting the transaction volume between prosumer i and its adjacent prosumers; P i,tr (t) is the total transaction volume of producer-consumer i; d ij is the trade weight between the two parties, also known as the trade coefficient; β is a fixed ratio that reflects the implementation cost of executing transactions through the power network.

[0105] Adding formulas (1), (2), and (3) together, where the same terms in formulas (1) and (3) are combined, the total cost of producer-consumer i is as follows: b i (t) is the coefficient of the combined term of formulas (1) and (3):

[0106]

[0107] (2) Establish constraints for producer and consumer i:

[0108]

[0109]

[0110] in are the lower and upper limits of the transaction of producer and consumer i, respectively; T is the total transaction period, t represents the transaction period; P ji (t) is the transaction volume between producer and consumer j and producer and consumer i, which should be P ij The opposite of (t).

[0111] (3) Constructing an overall optimization model of energy supermarket (P2P energy trading):

[0112]

[0113] When prosumer i is a power buyer, P ij (t)≤0, when prosumer i is a seller of energy, P ij (t)≥0.

[0114] Step 3: Use the decentralized alternating direction multiplier method (ADMM) to transform the P2P energy trading model. The main steps of this part are as follows:

[0115] The traditional method of solving the P2P transaction model can only provide the optimal total power P of the producer and consumer. i,tr , but cannot provide a single transaction power P for each transaction ij The decentralized ADMM method allows each prosumer to solve its own local optimization problem and negotiate with other prosumers to ultimately achieve global optimization. In order to derive the amount of electricity and energy price for each successful transaction, the decentralized ADMM is used to improve the P2P energy supermarket transaction model in step 2.

[0116] (1) For the convenience of expression, the constraints in formula (7) are expressed in a set form, and the expression method that satisfies the constraints is defined. The parameters are defined as follows:

[0117]

[0118]

[0119]

[0120]

[0121] P stands for transaction vector; is the transaction vector P i The collection of P i is a vector reflecting the transaction volume between prosumer i and its adjacent prosumers; n i represents the number of prosumers adjacent to prosumer i; Represents n i The transpose of a vector whose Ω-dimensional elements are all 1; eq ,Ω ineq ,I eq (P) and I ineq(P) is the set and value defined by the above formula.

[0122] (2) The P2P energy trading model is rewritten using the decentralized ADMM method.

[0123]

[0124] Among them, C i (P i ) is the transaction vector, is a new variable, which refers to the transaction vector together with variable P. After defining the set, the optimization problem is rewritten so that the equality constraints and inequality constraints are divided into different sets, corresponding to variables P and X; Formula (12) is the standard form of ADMM.

[0125] Step 4: Use the Lagrange multiplier method and KKT conditions to solve the iterative formula of decision variables in the trading model. The main steps of this part are as follows:

[0126] The improved energy supermarket trading model is solved using the Lagrange multiplier method and KKT conditions.

[0127] (1) To solve the improved trading model, the augmented Lagrangian function is defined as:

[0128]

[0129] Where ρ is the standard penalty parameter, and ρ>0; u is the Lagrange multiplier. Next, the k+1th iteration values ​​of the three variables can be obtained by solving the following optimization problem.

[0130] (2) Combine KKT conditions to solve the iterative value of decision variables:

[0131]

[0132] The superscripts k and k+1 represent the values ​​of the kth and k+1th iterations; For a positive definite matrix that satisfies the KKT condition, let Ψ = ψI, Where I is the unit matrix, ψ and φ are arbitrary values ​​that satisfy the KKT condition, and κ is an arbitrary iteration parameter that satisfies the KKT condition.

[0133] In formula (14), Ψ is an arbitrary positive definite matrix that satisfies the KKT condition, so it is represented by a constant ψ multiplied by a unit matrix I. In this way, matrix operations can be simplified to constant operations. In formula (15), ψ is used instead of Ψ for calculation. Same reason.

[0134] The specific decision variable optimization model is as follows.

[0135] X variable update:

[0136]

[0137] Where X i is the transaction vector of prosumer i, and its positive or negative value depends on whether prosumer i will be a buyer or a seller in the next time period. In any case, the above optimization model is a quadratic convex optimization problem and can be decomposed to each user, that is, it is completely decentralized, so it can be easily solved by any independent software embedded in each user.

[0138] P variable update:

[0139]

[0140] To obtain P k+1 To update , we need to solve the above mathematical programming model. Let λ ij >0 represents the Lagrange multiplier associated with the above constraints. Since formula (16) is a convex optimization problem with a quadratic cost function and linear equality, the strong duality holds and the KKT condition is applied, resulting in the following formula:

[0141]

[0142] in represents the transaction vector between prosumer i and prosumer j for the inequality constraint in the kth iteration; represents the number of Lagrange multipliers between prosumer i and prosumer j in the kth iteration; represents the transaction vector between prosumer i and prosumer j for the equality constraint in the kth iteration; is the transaction price between prosumers i and j in the k+1th iteration.

[0143] The iterative formula for the energy transaction price and electricity consumption of each producer and consumer is as follows:

[0144]

[0145]

[0146] in Calculated by the following formula:

[0147]

[0148]

[0149]

[0150] L is the Laplacian operator matrix; vec() represents the superposition vector algorithm, where the superposition of i-dimensional vectors is a large matrix.

[0151] Step 5: Establish a distributed learning scheme to adjust the parameters of the producer-consumer objective function in the transaction model. The main steps of this part are as follows:

[0152] There is still a shortcoming in the above model. The optimal energy trading price and trading volume depend on the prosumers who successfully trade, but in reality, they are only a subset of all participating prosumers. Therefore, a learning scheme is needed to adjust the cost function of the prosumers for use when the prosumers fail in their attempts.

[0153] Negotiation failures may be caused by unsatisfactory energy prices or by purchase and sales constraints. Therefore, the following analytical formula based on optimal transaction is used to change the transaction parameters of producers and consumers.

[0154]

[0155] a i 、b i 、a j 、b j is the parameter of the cost function of prosumer i and prosumer j in formula (4).

[0156] Therefore, the transaction loser keeps the cost function parameter a i If they are buyers (sellers), then reduce (increase) b i value, thus It will also increase (decrease) with the purchase (sale) of energy. This process is repeated until Meet the requirements of >0 when buying and <0 when selling. If the transaction volume does not meet the requirements, keep b i No change, decrease a i .

[0157] Step 6: Solve the pricing and power purchase and sales plan of producers and consumers through iterative loops. The main steps of this part are as follows: Combine steps 3, 4, and 5 to iteratively solve the optimal transaction.

[0158] The transaction optimization process within a certain period of time is shown in Figure 3 , after initialization, in the kth iteration update formula (17) Then update the values ​​of X, P and price in equations (15), (18) and (19), and repeat until equation (23) meets the requirements. When equation (23) = 0, that is, the total transaction is 0, change b according to step 5. i value, and then bring it back to initialization and re-iterate the calculation; when the transaction volume is not 0, determine whether it meets the transaction volume requirements. If not, update a according to step 5 i The value is then brought back to the initialization and iterated again. If it is satisfied, the calculation ends and the optimal transaction plan is obtained.

Claims

1. The energy supermarket transaction optimization method based on the decentralized P2P negotiation mechanism and learning scheme includes the following steps: (1) Analyze the framework information of energy supermarket transaction entities; (2) Construct a P2P energy trading model; (3) Deform the P2P energy trading model using the decentralized ADMM method; (4) Solve the iterative formula for decision variables; (5) Establish a distributed learning scheme to adjust the objective function parameters; (6) Solve the pricing and electricity purchase and sales schemes for producers and consumers; Step (1) comprises the following steps: (101) Analyze the energy supermarket transaction information, establish the prosumer communication graph, define G(t) as the communication graph between prosumers, and G(t) as a bipartite graph; (102) calculating the incidence matrix, adjacency matrix, degree matrix and Laplacian matrix of G(t) according to the producer-consumer communication graph; Define the set of adjacent nodes of producer / consumer i as N i (t),N i (t) is the set of prosumers participating in energy trading communication except prosumer i at time t; E(t) represents the incidence matrix; A(t) represents the adjacency matrix, a ij is the element representing the connection relationship in the adjacency matrix. When it is equal to 1 and 0, it means that prosumer i and prosumer j are connected or disconnected at time t respectively; D(t) represents the degree matrix, Where diag represents D(t) is d i (t) is an n×n dimensional diagonal matrix, where n is the total number of producers and consumers. To define symbols, Represents the sum of the connection relationship elements between prosumer i and all adjacent prosumers j; The Laplace matrix is ​​L(t) = D(t) - A(t); Step (2) comprises the following steps: (201) Construct the cost function of producer and consumer i: C i,3 (P i (t))=βP i,tr (t) (3) Where: C i,1 (P i (t))、C i,2 (P i (t))、C i,3 (P i (t)) are the behavior change cost, transaction cost and implementation cost of producer-consumer i respectively; a i (t) It is a parameter that reflects the complex behavior of producers and consumers that changes over time; ij (t) is the transaction volume between prosumer i and prosumer j; P i (t) is the vector reflecting the transaction volume between prosumer i and its adjacent prosumers; P i,tr (t) is the total transaction volume of producer-consumer i; d ij is the trade weight between the two sides; β is a fixed ratio; Adding formulas (1), (2), and (3) together, where the same terms in formulas (1) and (3) are combined, the total cost of producer-consumer i is as follows: Among them, C i (P i (t)) is the total cost of prosumer i, b i (t) is the coefficient of the term combined by adding formulas (1) and (3); (202) Establish the constraints for producer and consumer i: in are the lower and upper limits of the transaction of producer and consumer i, respectively; T is the total transaction period, t represents the transaction period; P ji (t) is the transaction volume between prosumer j and prosumer i, and P ij The opposite of (t); (203) Constructing a P2P energy trading model: When prosumer i is a power buyer, P ij (t)≤0, when prosumer i is a seller of energy, P ij (t)≥0; Step (3) comprises the following steps: (301) The constraints in formula (7) are expressed in a set form, and the parameters are defined as follows: P refers to the transaction vector; is the transaction vector P i The collection of P i is a vector reflecting the transaction volume between prosumer i and its adjacent prosumers; n i represents the number of prosumers adjacent to prosumer i; Represents n i The transpose of a vector whose Ω-dimensional elements are all 1; eq ,Ω ineq ,I eq (P) and I ineq (P) is the set and value defined by the above formula; (302) Deformed P2P energy trading model using decentralized ADMM method; Among them, C i (P i ) is the transaction vector, is a newly set variable, which refers to the transaction vector together with variable P. After defining the set, the optimization problem is rewritten so that the equality constraints and inequality constraints are divided into different sets, corresponding to variables P and X. Formula (12) is the standard form of ADMM. Step (4) comprises the following steps: (401) Define the augmented Lagrangian function: Where ρ is the standard penalty parameter, and ρ>0; u is the Lagrange multiplier; (402) Combine the KKT conditions to solve the iterative value of the decision variable: The superscripts k and k+1 represent the values ​​of the kth and k+1th iterations; For a positive definite matrix that satisfies the KKT condition, let Ψ = ψI, Where I is the identity matrix, ψ and φ are arbitrary values ​​that satisfy the KKT condition; κ is an arbitrary iteration parameter that satisfies the KKT condition; The specific decision variable optimization model is as follows: X variable update: Among them, X i is the transaction vector of producer and seller i; P variable update: Let λ ij >0 represents the Lagrange multiplier associated with the above constraints, and the following formula is obtained from formula (16): in represents the transaction vector between prosumer i and prosumer j for the inequality constraint in the kth iteration; represents the number of Lagrange multipliers between prosumer i and prosumer j in the kth iteration; represents the transaction vector between prosumer i and prosumer j for the equality constraint in the kth iteration; is the transaction price between prosumers i and j in the k+1th iteration; The iterative formula for the energy transaction price and electricity consumption of each producer and consumer is as follows: in Calculated by the following formula: L is the Laplacian operator matrix; vec() represents the superposition vector algorithm, where the superposition of i-dimensional vectors is a large matrix; In step (5), The following is an analytical formula based on the optimal transaction to change the transaction parameters of the producer and consumer: In the formula, is the transaction volume of producer and seller i; a i 、b i 、a j 、b j is the parameter of the cost function of prosumer i and prosumer j in formula (4); Step (6) combines steps (3)(4)(5) to iterate and solve the optimal transaction.