Power transaction method and system for joint vpp in energy blockchain environment

By optimizing energy planning and trading mechanisms in an energy blockchain environment, the problem of unmet producer and consumer preferences in existing technologies has been solved, improving transaction satisfaction and the energy sharing activity of VPPs.

CN117195555BActive Publication Date: 2026-07-24HEFEI UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HEFEI UNIV OF TECH
Filing Date
2023-09-07
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing energy sharing and trading methods for VPPs fail to meet the preferences and needs of producers and consumers, resulting in insufficient enthusiasm from producers and consumers in trading.

Method used

In an energy blockchain environment, producer and consumer categories and energy category preferences are collected through blockchain links to optimize energy consumption plans. Adjustments are made based on feedback from endorsed nodes to ultimately form an energy consumption plan that minimizes costs. Transactions are completed through smart contracts to determine supply and demand balance. If there is no balance, adjustments are made to the power deviation between VPPs.

Benefits of technology

It improved the satisfaction and enthusiasm of producers and consumers in transactions, enhanced the energy sharing activity of VPPs, and met the personalized preferences of producers and consumers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117195555B_ABST
    Figure CN117195555B_ABST
Patent Text Reader

Abstract

The application provides a power transaction method and system for a joint VPP in an energy blockchain environment, and relates to the technical field of virtual power plants. The application classifies producers and consumers and determines energy preferences when conducting a producer-consumer P2P transaction for a joint VPP, better meets the actual transaction demand, improves the satisfaction of the producers and consumers participating in the transaction, thereby improving the enthusiasm of the producers and consumers participating in the transaction and improving the activity of energy sharing for the VPP.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of virtual power plant technology, and more specifically to a power trading method and system for a joint VPP in an energy blockchain environment. Background Technology

[0002] With the large-scale integration of distributed power sources, the power grid is undergoing a fundamental transformation, with traditional passive consumers becoming "prosumers"—active producers who manage energy consumption, production, and storage. Peer-to-peer (P2P) electricity trading is a trading model that allows producers and consumers to trade directly without the intervention of intermediaries. Through P2P electricity trading, producers and consumers can not only actively participate in the local energy market by buying the electricity they need and selling surplus electricity, but also increase their revenue and bring more flexibility to the market. Meanwhile, virtual power plants (VPPs) can integrate and optimize the resources of producers and consumers through advanced control, metering, and communication technologies, better enabling P2P trading between producers and consumers, and making significant contributions to integrating distributed energy resources, achieving peak shaving and valley filling, and improving grid robustness.

[0003] Existing energy sharing and trading methods for VPPs mainly fall into two categories: one is an energy trading mechanism based on cooperative game theory, and the other is an energy trading mechanism based on non-cooperative game theory. Both different game relationships can play a valuable role in different scenarios. However, existing electricity trading strategies generally use homogeneous and uniform modeling for producers and consumers, rarely taking into account the heterogeneity of different producers and consumers due to factors such as trading preferences and resource characteristics. This fails to effectively improve the trading enthusiasm of producers and consumers in real-world trading scenarios.

[0004] In other words, existing energy sharing and trading methods for VPPs cannot meet the preferences and needs of producers and consumers. Summary of the Invention

[0005] (a) Technical problems to be solved

[0006] To address the shortcomings of existing technologies, this invention provides a method and system for electricity trading in a blockchain-based energy trading environment for joint Virtual Power Providers (VPPs), solving the technical problem that existing energy sharing and trading methods for VPPs cannot meet the preferences and needs of producers and consumers.

[0007] (II) Technical Solution

[0008] To achieve the above objectives, the present invention provides the following technical solution:

[0009] In a first aspect, the present invention provides a method for electricity trading in an energy blockchain environment for a federated Virtual Power Plan (VPP), comprising:

[0010] S1. The energy blockchain receives and stores the producer and consumer categories determined by the producers and consumers themselves, as well as the energy category preferences determined by the producer and consumer categories.

[0011] S2. The energy blockchain receives and publishes the initial energy consumption plans formulated by each producer and consumer based on their energy category preferences. It optimizes the effectiveness of the energy consumption plans with the aim of minimizing costs, and adjusts the energy consumption plans through feedback from endorsing nodes. After multiple iterations, the final energy consumption plan is formed.

[0012] S3, the smart contract of the energy blockchain records the final energy consumption plan of producers and consumers, completes the transaction through bidding and negotiation, and determines whether the supply and demand balance has been reached within the VPP. If not, it proceeds to the next step.

[0013] S4: The energy blockchain calculates real-time power deviations and informs other VPPs. Different VPPs conduct energy transactions with the goal of minimizing the total cost of eliminating power deviations among multiple VPPs participating in the market.

[0014] Preferably, the producer-consumer categories include green proportion energy consumers, profit-seekers, low-income families, and environmentalists;

[0015] And / or,

[0016] The energy categories include high-priced grey energy, low-priced grey energy, stable green energy, and fluctuating green energy.

[0017] Preferably, S2 includes:

[0018] S201. The energy blockchain receives and publishes the initial energy consumption plans formulated by each producer and consumer based on their energy category preferences. Each producer's initial energy consumption plan can be represented as follows:

[0019]

[0020] Where i represents producer i, This represents the electricity reduction by the producer / seller after considering discomfort and energy costs. and It is the charge and discharge capacity of the energy storage device of producer i. It is the electricity that producer i purchases from the power grid. It is the amount of electricity that producer i sells to the power grid. In the P2P electricity trading market, this refers to the electricity volume traded between producer i and other producers i and sellers i. The positive or negative sign of this variable represents the different identities of the producers and sellers. At this time, it is indicated that producer i is the electricity purchaser. This indicates an electricity sales user;

[0021] S202. Construct a cost function to measure the effectiveness of energy consumption planning. Its expression is as follows:

[0022]

[0023] The constraints of the cost function include:

[0024]

[0025] Constraint (2) is the generator capacity constraint;

[0026]

[0027] Constraint (3) is the ramping constraint for the generator;

[0028]

[0029] Constraint (4) is a degradation constraint for energy storage devices;

[0030]

[0031] Approximately (5) is a load reduction constraint;

[0032]

[0033] Constraint (6) means that the amount of electricity purchased and sold in the peer-to-peer electricity trading market is always equal in any time period, and all the electricity traded can be traced to its source and destination.

[0034]

[0035] Constraint (7) indicates that the purchased and sold electricity quantities traded with the power grid are greater than 0;

[0036]

[0037] Constraint (8) is a power balance constraint;

[0038] in, G represents the unit cost of the generator at time t. i,t This represents the amount of electricity generated by the generator of producer i at time t. This represents the cost of depreciating the energy storage battery at time t. and λ represents the power of battery charging and discharging. i,t This reflects the attitude of producers and consumers towards load reduction. The larger the value, the lower the willingness of producer / consumer i to reduce load at time t, and the higher the discomfort cost per unit of load reduction. This represents the amount of electricity that producer i can reduce its load at time t. This represents the utility coefficient of producer i for satisfying its demand for energy from type k. This represents the utility coefficient by which producers and consumers tend to supply type k energy. This represents the average distributed load power of producer i at time t. This represents the average renewable energy output power of producer i at time t; The generator power conversion factor of producer i at time t. This represents the total production capacity of producer i at time t. This represents the total production capacity of producer i at time t-1. The maximum value of the change in production capacity power of producer i at time t; This represents the upper limit of the charging power of the energy storage device of producer i at time t. This represents the upper limit of the discharge power of the energy storage device of producer i at time t; This represents the maximum load reduction that producers and consumers can achieve while ensuring their normal lives. This constraint ensures that load reduction will not affect their normal lives; k represents the k types of energy sources, and this formula indicates that all k types of energy sources have achieved power balance.

[0039] S203. Solve the cost function and perform feedback adjustment to obtain the final energy consumption plan.

[0040] Preferably, S203 includes:

[0041] The non-cooperative game problem between producers and sellers in the P2P electricity trading market is transformed into an optimization problem that minimizes costs:

[0042]

[0043] By introducing slack variables The problem involving N coupled variables in constraint (6) is transformed into a problem involving two coupled variables:

[0044]

[0045]

[0046] The augmented Lagrangian function used to solve the objective function (9) of the energy consumption plan is:

[0047]

[0048] Where, δ iIt is the dual variable of formula (11), σ>0 is the penalty parameter of formula (11), and the energy consumption planning process of producers and consumers in P2P electricity trading in the energy blockchain environment is determined by the alternating direction multiplier method algorithm; in the m-th iteration, each producer and consumer participating in P2P electricity trading in the energy blockchain environment updates x by solving its own minimum cost function. i :

[0049]

[0050] in, m-1 These are the corresponding variables δ represents the updated result of the endorsement nodes after the previous iteration; the updated energy consumption plan x is obtained by solving the cost function with the objective of minimization. k Producers and sellers will trade their electricity volume q in the P2P electricity trading market under the energy blockchain environment. trading The data is sent to the endorsing nodes; the endorsing nodes collect the peer-to-peer electricity transaction volumes submitted by all producers and sellers in the market, and after processing, obtain the overall market supply and demand situation; based on the overall market supply and demand situation, the endorsing nodes update the slack variable q. trading and dual variable δ; Update according to the following formula:

[0051]

[0052] Secondly, the updated results Substituting into formula (15), the endorsement node solves for the new dual variable δ:

[0053]

[0054] Endorsement nodes will include the latest slack variables. and dual variable δ m Feedback is provided to producers and consumers; producers and consumers obtain the actual supply and demand situation of the P2P electricity trading market in the energy blockchain environment at this stage from the slack variables, and further adjust their energy consumption plans based on their personal preferences, energy storage device status, etc.; producers and consumers will then trade the adjusted electricity volume q in the peer-to-peer electricity trading market. trading The data is then sent to the endorsing node again; this iterative process will continue until the pre-set stopping criteria are met, resulting in the final energy consumption plan.

[0055] Preferably, S3 includes:

[0056] S301. Conduct bidding among producers and sellers with the goal of maximizing utility to arrive at the final price.

[0057] S302. The energy blockchain randomly splits the electricity purchase and sale strategy set and sends it to different producers and consumers. Based on the optimal utility value, it selects the buyer or seller producer and consumer and conducts flexible bilateral negotiations. If the negotiation is successful, the transaction will proceed; if the negotiation fails, the transaction will not be completed. The electricity purchase and sale strategy set includes the final energy consumption plan and the final price.

[0058] S303. Determine whether VPP has reached supply and demand balance. If it has not reached balance, proceed to step S4.

[0059] Preferably, S301 includes:

[0060] The utility functions of producers and sellers engaging in market bidding are shown in (16) and (17):

[0061]

[0062]

[0063] in, and These represent the transaction utility values ​​of the producer / seller (buyer) and the producer / seller (seller) with potential trading partners at the time of the transaction, respectively.

[0064]

[0065] in, The endorsed node will pass the energy to the opposite producer and seller to obtain the final compromise in the traded energy. It is the settlement price recorded by the smart contract when producers, buyers, and sellers transact with each other during matching, and its expression is:

[0066]

[0067] If seller j is selected as a trading partner during the matching process, the final offer made by buyer i... The calculation is as follows:

[0068]

[0069]

[0070] in, This indicates the additional value that buyer i is willing to add for seller j the k-th type of energy; P i k Let represent the initial offer from buyer i; in formula (21), the first term represents spatial preference. The first term represents the importance coefficient, M represents the spatial distance coefficient; the second term represents reputation preference, R. j This represents the credit index of seller j, with a maximum value of 1 and a minimum value of 0. The first term represents the credit approval of buyer i, i.e., the price coefficient for which they are willing to pay an additional amount for the credit rating of seller j; the third term represents the willingness to trade green energy, G. j This indicates the proportion of renewable energy sold by seller j. The fourth item indicates buyer i's willingness to add value to its bid for renewable energy; the fifth item indicates risk aversion, meaning buyer i is willing to pay a higher price for stable energy; F j This represents the stability coefficient of the energy sold by seller j. This indicates the additional value that buyer i is willing to pay for a stable energy source;

[0071] The formula for calculating the final price quoted by seller j to buyer i for the sale of energy is as follows:

[0072]

[0073] In the formula, This indicates that seller j is willing to add additional value for buyer i for the k-th type of energy; This represents the initial quote from seller j; This represents the final offer made by seller j to buyer i for the sale of energy.

[0074] Preferably, S4 includes:

[0075] Each VPP uploads its own electricity supply and demand data for a specific time zone to a smart contract, which then divides it into two sets: M o,vpp For a collection of VPPs with power supply capability, M a,vpp For a collection of VPPs that need to purchase electricity;

[0076] When conducting energy trading between VPPs, the objective is to minimize the total cost of eliminating power deviations among multiple VPPs participating in the market operation.

[0077]

[0078]

[0079] In the formula, D p Let be the electricity sales cost function for the p-th VPP; To actually provide power to the p-th VPP, For the power required by the w-th VPP, e p This is the cost coefficient. This represents the power balance that needs to be satisfied in the VCG auction;

[0080]

[0081] Use y pt As the unit price of the p-th VPP in time period t, i.e. ypt Yuan / (kW·h); The bid is in the form of a sealed bid, encrypted using the MD2 hash function. The endorsing node transmits the bid to the corresponding VPP. The encryption process is as follows:

[0082] H=S(y,s) (54)

[0083] In the formula, y is the VPP's quote. pt ;s is a random string defined by the bidder; all bids are cleared according to VCG auction rules;

[0084] The smart contract calculates the winning bidder's profit and transmits it to the corresponding winning bidder through the endorsing node. The specific profit calculation method is as follows:

[0085] Z p =V′-V″ (55)

[0086] In the formula, Z p V' represents the profit of the p-th successful bidder, V″ represents the total profit of the remaining successful bidders in the clearing team, and V′ represents the total profit of the new clearing team formed according to the clearing rules when the p-th successful bidder does not participate in the bidding.

[0087]

[0088] In the formula, p t The final transaction price for the publisher. To determine the total revenue of each winning VPP in the team, This represents the total clearing power.

[0089] Thirdly, the present invention provides an electricity trading system for a consortium of Virtual Power Companies (VPPs) in an energy blockchain environment, comprising:

[0090] The preference determination module is used by the energy blockchain to receive and store the producer and consumer categories determined by producers and consumers and the energy category preferences determined by the producer and consumer categories.

[0091] The energy consumption plan acquisition module is used by the energy blockchain to receive and publish the initial energy consumption plans formulated by each producer and consumer based on their energy category preferences. The module optimizes the effectiveness of the energy consumption plans with the aim of minimizing costs, and adjusts the energy consumption plans through feedback from endorsing nodes. After multiple iterations, the final energy consumption plan is formed.

[0092] The bidding and negotiation module is used in the energy blockchain to record the final energy consumption plans of producers and consumers through smart contracts, complete transactions through bidding and negotiation, and determine whether supply and demand balance has been achieved within the VPP. If not, the content in the multilateral transaction module between VPPs is executed.

[0093] The VPP multilateral transaction module is used to statistically analyze real-time power deviations in the energy blockchain and inform other VPPs. The goal of different VPPs is to conduct energy transactions with the aim of minimizing the total cost of eliminating power deviations among multiple VPPs participating in the market operation.

[0094] Thirdly, the present invention provides a computer-readable storage medium storing a computer program for electricity trading in a federated VPP environment under an energy blockchain environment, wherein the computer program causes a computer to execute the electricity trading method for a federated VPP under an energy blockchain environment as described above.

[0095] Fourthly, the present invention provides an electronic device, comprising:

[0096] One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the programs including methods for performing electricity trading for a federated VPP in an energy blockchain environment as described above.

[0097] (III) Beneficial Effects

[0098] This invention provides a method and system for electricity trading in a blockchain-based energy trading environment for joint Virtual Power Plans (VPPs). Compared with existing technologies, it has the following advantages:

[0099] This invention utilizes an energy blockchain to receive and store producers' and consumers' (VPPs) producer / consumer categories and energy category preferences determined by these categories. The energy blockchain receives and publishes initial energy consumption plans developed by each producer / consumer based on their energy category preferences. These plans are optimized for cost minimization, and adjustments are made through feedback from endorsing nodes, iterating multiple times to form the final energy consumption plan. After the energy blockchain's smart contract records the final energy consumption plans, transactions are completed through bidding and negotiation. The blockchain then determines whether supply and demand balance has been achieved within the VPP; if not, the next step is executed. The energy blockchain tracks real-time power deviations and informs other VPPs. Energy transactions between different VPPs aim to minimize the total cost of eliminating power deviations among multiple participating VPPs. This invention categorizes producers and consumers and determines their energy preferences during P2P transactions with joint VPPs, better meeting real-world transaction needs, increasing producer / consumer satisfaction, and thus enhancing their participation and the activity of energy sharing within VPPs. Attached Figure Description

[0100] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0101] Figure 1 This is a block diagram of an energy blockchain-based electricity trading method for a joint VPP, according to an embodiment of the present invention.

[0102] Figure 2 This is a flowchart illustrating a power trading method for a joint VPP in an energy blockchain environment, according to an embodiment of the present invention.

[0103] Figure 3 This is a flowchart illustrating the completion of a smart contract in a P2P electricity transaction according to an embodiment of the present invention. Detailed Implementation

[0104] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention are described clearly and completely. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0105] This application provides a method and system for electricity trading in a blockchain-based energy trading environment for joint Virtual Power Providers (VPPs). This addresses the technical problem that existing energy sharing and trading methods for VPPs cannot meet the preferences of producers and consumers, thereby increasing the satisfaction of producers and consumers in participating in transactions, and thus enhancing their enthusiasm for participating in transactions and increasing the activity of energy sharing for VPPs.

[0106] The technical solution in this application is to solve the above-mentioned technical problems, and the general idea is as follows:

[0107] Energy sharing and trading methods for VPPs mainly fall into two categories: one is an energy trading mechanism based on cooperative game theory, and the other is an energy trading mechanism based on non-cooperative game theory. The former involves VPPs participating in energy market transactions as an alliance, achieving energy supply and demand balance within the alliance through P2P transactions and other methods. Some scholars have constructed VPP aggregation models including photovoltaics, energy storage, and gas turbines, established stochastic optimization scheduling models considering photovoltaic uncertainties, and used the Shapley method to allocate VPP cooperative surplus. This approach encourages multiple VPPs to actively participate in P2P transactions, improving overall operational profitability. Other scholars treat multiple VPPs as a cooperative alliance participating in market bidding and have proposed methods for sharing revenue and rewards / penalties based on the output characteristics of each VPP. The latter, non-cooperative game theory, differs from the cooperative game theory approach. It cannot achieve its goals through an alliance of VPPs but instead seeks equilibrium amidst conflicting interests among stakeholders. Some scholars treat multiple VPPs as a non-cooperative game relationship, predicting the impact of other VPPs on their own decisions based on market simulation clearing results, thus forming a market bidding strategy that maximizes profits. Other scholars have established game strategy sets under constraints, constructed payoff functions after VPP game theory, introduced penalty functions to restrict game behavior, and introduced potential game models for optimization in the power generation competition among VPPs, seeking the optimal power generation strategy through interaction between VPPs. Both different game relationships can play a valuable role in different scenarios. However, when conducting electricity trading for VPPs, most studies model the producers and consumers of P2P transactions in a homogeneous and unified manner, rarely addressing the heterogeneity of different producers and consumers due to different resource characteristics and geographical locations. In past studies, electricity was often treated as a single commodity, but with the maturity of carbon markets worldwide and the growing awareness of environmental protection, more and more producers and consumers are no longer solely focused on the economics of energy consumption. Meanwhile, blockchain technology enables the precise identification and tracking of energy from different sources without tampering, providing a prerequisite for constructing different energy categories. On the other hand, in electricity trading research, most studies focus on the same level, generally only studying electricity trading between VPPs in a multi-VPP environment, without linking intra-VPP electricity trading with inter-VPP trading into a systematic and procedural solution. The P2P trading mechanism that integrates transactions between producers and sellers within a VPP and transactions between VPPs can better mitigate the impact of power supply uncertainties, reduce transaction costs, and better achieve supply and demand balance.

[0108] The existing technology has the following drawbacks:

[0109] (1) Existing electricity trading strategies generally use homogeneous and unified modeling for producers and consumers, rarely taking into account the heterogeneity of different producers and consumers due to trading preferences, resource characteristics, etc., and cannot effectively improve the trading enthusiasm of producers and consumers in real-world trading scenarios.

[0110] (2) Existing multi-VPP power trading generally focuses on the same level, and studies power trading strategies between VPPs and determines research plans through game theory relationships, etc. There are relatively few studies that simultaneously study P2P transactions between producers and consumers within VPPs and transactions between VPPs.

[0111] (3) Most existing research on P2P transaction methods for joint VPPs focuses on maximizing their value from the perspective of VPPs, and rarely considers the multifaceted value of individual producers and sellers.

[0112] To address the aforementioned issues, this invention proposes a power trading method for joint VPPs in an energy blockchain environment. This method fully considers the trading preferences of producers and consumers and the heterogeneity of energy when conducting P2P transactions, making the designed P2P trading strategy more in line with real-world needs. It not only considers economic benefits but also personalizes the preferences of producers and consumers for green energy or risk, improving their satisfaction with participating in transactions, thereby increasing their enthusiasm for participating in transactions and enhancing the activity of energy sharing for VPPs.

[0113] To better understand the above technical solutions, the following will provide a detailed explanation of the technical solutions in conjunction with the accompanying drawings and specific implementation methods.

[0114] This invention provides a method for electricity trading in a blockchain-based energy trading environment for a federated Virtual Power Plan (VPP), such as... Figure 1 As shown, the method includes:

[0115] S1. The energy blockchain receives and stores the producer and consumer categories determined by the producers and consumers themselves, as well as the energy category preferences determined by the producer and consumer categories.

[0116] S2. The energy blockchain receives and publishes the initial energy consumption plans formulated by each producer and consumer based on their energy category preferences. It optimizes the effectiveness of the energy consumption plans with the aim of minimizing costs, and adjusts the energy consumption plans through feedback from endorsing nodes. After multiple iterations, the final energy consumption plan is formed.

[0117] S3, the smart contract of the energy blockchain records the final energy consumption plan of producers and consumers, completes the transaction through bidding and negotiation, and determines whether the supply and demand balance has been reached within the VPP. If not, it proceeds to the next step.

[0118] S4: The energy blockchain calculates real-time power deviations and informs other VPPs. Different VPPs conduct energy transactions with the goal of minimizing the total cost of eliminating power deviations among multiple VPPs participating in the market.

[0119] In this embodiment of the invention, when conducting P2P transactions between producers and consumers for joint VPPs, producers and consumers are classified and their energy preferences are determined, which better meets the actual transaction needs, improves the satisfaction of producers and consumers participating in transactions, thereby increasing the enthusiasm of producers and consumers to participate in transactions and enhancing the activity of energy sharing for VPPs.

[0120] The following is combined with, for example Figure 2 The flowchart shown provides a detailed explanation of each step:

[0121] In step S1, the energy blockchain receives and stores the producer-consumer category determined by the producer-consumer and the energy category preference determined by the producer-consumer category. The specific implementation process is as follows:

[0122] It should be noted that before producers and sellers participate in electricity trading for the first time, they need to register in the energy blockchain and obtain certification from the CA in the blockchain to become user nodes in the energy blockchain.

[0123] The preferences of producers and consumers can be analyzed from the aspects of financial returns, green preferences, and risk aversion. Producers and consumers are first divided into: green proportion energy consumers, profit seekers, low-income families, and environmentalists.

[0124] Secondly, based on the requirements of energy heterogeneity and the classification of producers and consumers, energy categories are divided into:

[0125] High-priced grey energy: Electricity generated using a mix of traditional and renewable energy sources has a higher price than low-priced grey energy, but lower than the grid connection price, and generally also lower than the price of green energy.

[0126] Low-priced grey energy: Subsidized energy that is only available to low-income families. Charities are willing to purchase grey energy at low prices to subsidize low-income families.

[0127] Stable green energy: Green energy with a stable power supply generally has a higher electricity price than grey energy.

[0128] Fluctuating green energy: Green energy with unstable power supply, and its electricity price is generally higher than that of gray energy.

[0129] Through a thorough analysis of producer and consumer preferences and energy heterogeneity, the following producer and consumer energy trading preferences can be derived:

[0130] Green proportion of energy consumers: high-priced grey energy, stable green energy;

[0131] Profit-seekers: High-priced grey energy;

[0132] Low-income families: low-priced grey energy, stable green energy, fluctuating green energy, and high-priced grey energy;

[0133] Environmentalists: Stable green energy, fluctuating green energy.

[0134] Meanwhile, energy heterogeneity can be measured and distinguished using two indicators:

[0135] Energy cleanliness: carbon emissions;

[0136] Energy volatility: The degree of volatility in the output of an energy generation system can be assessed by calculating the amplitude or standard deviation of the energy generation system over a specific time period.

[0137] After determining their producer / seller category, producers and sellers upload the producer / seller category information to the blockchain for storage.

[0138] In step S2, the energy blockchain receives and publishes the initial energy consumption plans formulated by each producer and consumer based on their energy category preferences. The effectiveness of these plans is optimized to minimize costs, and adjustments are made based on feedback from endorsing nodes. This process iterates multiple times to form the final energy consumption plan. The specific implementation process is as follows:

[0139] S201. The energy blockchain receives and publishes the initial energy consumption plans formulated by each producer and consumer based on their energy category preferences, specifically:

[0140] To better reflect the trading preferences of producers and consumers, each individual producer and consumer will have an initial energy consumption plan, which can be represented as:

[0141]

[0142] Where i represents producer i, This represents the electricity reduction by the producer / seller after considering discomfort and energy costs. and It is the charge and discharge capacity of the energy storage device of producer i. It is the electricity that producer i purchases from the power grid. It is the amount of electricity that producer i sells to the power grid. In the P2P electricity trading market, this refers to the electricity volume traded between producer i and other producers i and sellers i. The positive or negative sign of this variable represents the different identities of the producers and sellers. At this time, it is indicated that producer i is the electricity purchaser. This indicates an electricity sales user.

[0143] S202. Construct the cost function, specifically as follows:

[0144] Producers and consumers will gain different benefits from different energy consumption plans, so constructing a cost function can measure the utility level of each energy consumption plan.

[0145]

[0146] in, G represents the unit cost of the generator at time t. i,t This represents the amount of electricity generated by the generator of producer i at time t. This represents the cost of depreciating the energy storage battery at time t. and λ represents the power of battery charging and discharging. i,t This reflects the attitude of producers and consumers towards load reduction. The larger the value, the lower the willingness of producer / consumer i to reduce load at time t, and the higher the discomfort cost per unit of load reduction. This represents the amount of electricity that producer i can reduce its load at time t. This represents the utility coefficient of producer i for satisfying its demand for energy from type k. This represents the utility coefficient by which producers and consumers tend to supply type k energy. This represents the average distributed load power of producer i at time t. This represents the average renewable energy output power of producer i at time t.

[0147] The constraints of the cost function include:

[0148] 1) Generator

[0149] Generator capacity constraints:

[0150]

[0151] Climbing constraints:

[0152]

[0153] in, The generator power conversion factor of producer i at time t. This represents the total production capacity of producer i at time t. This represents the total production capacity of producer i at time t-1. This represents the maximum value of the change in production capacity power of producer i at time t.

[0154] 2) Degradation of energy storage devices

[0155]

[0156] in, This represents the upper limit of the charging power of the energy storage device of producer i at time t. This represents the upper limit of the discharge power of the energy storage device of producer i at time t.

[0157] 3) Reduce load

[0158]

[0159] in, This represents the maximum load reduction that producers and consumers can achieve while ensuring their normal livelihoods. This constraint is used to ensure that load reduction by producers and consumers will not affect their normal lives.

[0160] 4) Trading with other producers and distributors

[0161]

[0162] Among them, constraint (6) means that the amount of electricity purchased and sold in the point-to-point electricity trading market is always equal in any time period, and all the electricity traded can be traced to its source and destination.

[0163] 5) Trading with the power grid

[0164]

[0165] Among them, constraint (7) indicates that the purchased and sold electricity in the grid transaction is greater than 0.

[0166] 6) Power balance constraints

[0167]

[0168] Where k represents the k types of energy, this formula indicates that all k types of energy have achieved power balance.

[0169] S203. Solve the cost function and apply feedback adjustments to obtain the final energy consumption plan, including:

[0170] The non-cooperative game problem between producers and sellers in the P2P electricity trading market can be transformed into an optimization problem of minimizing costs:

[0171]

[0172] By introducing slack variables The problem of N coupled variables in constraint (6) can be transformed into a problem of bivariate coupling, thereby simplifying the solution process.

[0173]

[0174]

[0175] The augmented Lagrangian function used to solve the objective function (9) of the energy consumption plan is:

[0176]

[0177] Where, δ iσ is the dual variable of formula (11), and σ>0 is the penalty parameter of formula (11), thus ensuring the constraint holds as much as possible. The energy consumption planning process of producers and sellers in P2P electricity trading under the energy blockchain environment can be determined by the ADMM (Alternating Direction Multiplier Method) algorithm. In the m-th iteration, each producer and seller participating in P2P electricity trading under the energy blockchain environment updates x by solving its own minimum cost function. i :

[0178]

[0179] in, δ m-1 These are the corresponding variables δ represents the updated result of the endorsement nodes after the previous iteration. The updated energy consumption plan x is obtained by solving the cost function with the objective of minimization. k Producers and sellers will trade their electricity volume q in the P2P electricity trading market under the energy blockchain environment. trading The data is sent to the endorsing nodes. The endorsing nodes collect the peer-to-peer electricity transaction volumes submitted by all producers and sellers in the market, and after processing, obtain the overall market supply and demand situation. Subsequently, based on the above information, the endorsing nodes update the slack variable q. trading And the dual variable δ. First, Update according to the following formula:

[0180]

[0181] Secondly, the updated results Substituting into formula (15), the endorsement node can solve for the new dual variable δ:

[0182]

[0183] Endorsement nodes will include the latest slack variables. and dual variable δ m Feedback is then provided to producers and consumers. From the slack variables, producers and consumers can obtain the actual supply and demand situation of the P2P electricity trading market under the energy blockchain environment at this stage, and further adjust their energy consumption plans based on their personal preferences, energy storage device status, etc. Subsequently, producers and consumers will trade the adjusted electricity volume q in the peer-to-peer electricity trading market. trading The message is then sent to the endorsing node again. This iterative process will repeat until a pre-set stopping criterion in the market is met. In this embodiment of the invention, the termination condition for this iteration is set to... Where ξ1>0 is the tolerance for the feasibility of constraint (12).

[0184] It should be noted that, in the specific implementation process, other optimization algorithms can also be used to solve this optimization problem with the lowest cost, which will not be elaborated here.

[0185] In step S3, after the smart contract of the energy blockchain records the final energy consumption plan of the producers and consumers, the transaction is completed through bidding and negotiation, and it is determined whether the supply and demand within the VPP has reached equilibrium. If not, the next step is executed. The specific implementation process is as follows:

[0186] S301. Producers and sellers compete to maximize utility, resulting in a final bid. Specifically, this includes:

[0187] After the smart contract records the energy consumption plans of producers and consumers, a market bidding process will commence. The utility functions of producers and consumers in the market bidding are shown in (16) and (17):

[0188]

[0189]

[0190] in, and These represent the transaction utility values ​​of the producer / seller (buyer) and the producer / seller (seller) with potential trading partners at the time of the transaction, respectively.

[0191]

[0192] in, The endorsed node will pass the energy to the opposite producer and seller to obtain the final compromise in the traded energy. It is the settlement price recorded by the smart contract when producers, buyers, and sellers transact with each other during matching, and its expression is:

[0193]

[0194] If seller j is selected as a trading partner during the matching process, the final offer from buyer i is calculated as follows:

[0195]

[0196]

[0197] in, This indicates the additional value that buyer i is willing to add for seller j the k-th type of energy; P i k Let L represent the initial offer from buyer i; in formula (21), the first term represents spatial preference, where L is the spatial preference if i and j are located in the same region. i =L j Its coefficient The highest value, defined as the price buyer i is willing to pay for this situation, indicates that it is less important to the buyer. Otherwise, the coefficient will be smaller depending on the distance between peers, indicating less importance to the buyer. M represents the spatial distance coefficient. It is important to note that M is a large value used to identify the importance of distance between P2P transaction producers and sellers. This means that a larger M indicates that producers and sellers located in different regions have no significant impact on their willingness to trade in P2P, while a smaller M indicates the inertia of P2P transactions over long distances. The second term shows reputation preference, that is, once seller j has a higher reputation, buyer i is willing to pay a higher price for a potential energy transaction. R j This represents the credit index of seller j, with a maximum value of 1 and a minimum value of 0. G represents the credit limit of buyer i, i.e., the price coefficient they are willing to pay in addition to the credit index of seller j. The third term represents the willingness to trade green energy, G. j This indicates the proportion of renewable energy sold by seller j. This indicates the added value that buyer i is willing to contribute to its bid for renewable energy. Finally, the fourth item represents risk aversion; buyer i is willing to pay a higher price for stable energy. j This represents the stability coefficient of the energy sold by seller j. This indicates the additional value that buyer i is willing to pay for a stable energy source.

[0198] The calculation method for seller j's final offer is similar to that for buyer i. Seller j's final offer to buyer i for the sale of energy can be calculated as follows:

[0199]

[0200] It is worth noting that if the buyer meets the seller's requirements, the seller will tend to lower their offer. During the market bidding process, the initial bids, final offers, and P2P transaction prices of each producer and seller are recorded in a smart contract. Information generated during the transaction is encrypted using a hash algorithm to prevent tampering.

[0201] S302. The energy blockchain randomly splits the electricity purchase and sale strategy set and sends it to different producers and consumers. Based on the optimal utility value, it selects the buyer / seller producer / consumer and conducts flexible bilateral negotiations. If the negotiation succeeds, the transaction proceeds; if the negotiation fails, the transaction cannot be completed. The electricity purchase and sale strategy set includes the final energy consumption plan and the final price, specifically including:

[0202] a. Information Dissemination: During the transaction period, each producer and consumer will publish their electricity sales / purchase demands on the P2P trading platform. This information will be transmitted to each producer and consumer with corresponding demands through communication channels. Due to the differentiated characteristics of producers and consumers, different producers and consumers have different internal resources, and their published power information and bidding scale will vary. To avoid competitors capturing their supply and demand characteristics, the blockchain needs to randomly split the transaction information and send it to different producers and consumers.

[0203] b. Flexible Bilateral Negotiation: After the market bidding is completed, the buyer and seller will reach a transaction price with each other. Simultaneously, their respective utility values ​​in the transaction will be calculated. This entire process is handled by a smart contract, which sorts the utility values ​​from highest to lowest. The smart contract will prioritize arranging bilateral flexible negotiations between the producer / consumer and the trading partner with the highest utility value. The transaction can only be established when both the buyer / consumer and the seller reach their optimal utility values; otherwise, the transaction cannot be established. After the negotiation results are released and both parties agree, a transaction contract is signed. The transaction contract is considered effective after being signed by both the buyer / seller and a third party.

[0204] S303. Determine whether VPP has reached supply and demand balance. If it has not reached balance, proceed to step S4.

[0205] In step S4, the energy blockchain calculates real-time power deviations and informs other VPPs. Energy transactions between different VPPs aim to minimize the total cost of eliminating power deviations among multiple VPPs participating in the market. The specific implementation process is as follows:

[0206] To mitigate power imbalances among VPPs caused by supply uncertainties, inter-VPP power trading can be implemented. Each VPP uploads its power supply and demand data for a specific time zone to a smart contract, which then divides this data into two sets: M... o,vpp For a collection of VPPs with power supply capability, M a,vpp This refers to the set of VPPs that need to purchase electricity. When conducting energy transactions between VPPs, the goal is to minimize the total cost of eliminating power deviations among multiple VPPs participating in the market, in order to address the uncertainty of day-ahead forecast data.

[0207]

[0208]

[0209] In the formula, D p Let be the electricity sales cost function of the p-th VPP. In this embodiment of the invention, the electricity cost is described by a quadratic function. To actually provide power to the p-th VPP, For the power required by the w-th VPP, e p This is the cost coefficient. This represents the power balance that needs to be satisfied in a VCG (Vickrey-Clarke-Groves) auction.

[0210]

[0211] For ease of processing, use y pt As the unit price of the p-th VPP in time period t, i.e. y pt Yuan / (kW·h). Bids must be submitted in sealed envelope format, encrypted using the MD2 hash function. Endorsing nodes then transmit the bid to the corresponding VPP. The encryption process is as follows:

[0212] H=S(y,s) (82)

[0213] In the formula, y is the VPP's quote. pt ;s is a random string defined by the bidder. All bids are cleared according to the VCG auction rules (the final price is determined by the mechanism): all valid bids are entered into the clearing queue in ascending order until the deviation power balance constraint is met. The revenue of each successful bidder is the revenue loss that the successful bidder brings to the other bidders.

[0214] The smart contract then calculates the winning bidder's payout and transmits it to the corresponding winning bidder through the endorsing node. The specific payout calculation method is as follows:

[0215] Z p =V′-V″ (83)

[0216] In the formula, Z p V' represents the profit of the p-th winning bidder, V″ represents the total profit of the remaining winning bidders in the clearing team, and V′ represents the total profit of the new clearing team formed according to the clearing rules when the p-th winning bidder does not participate in the bidding.

[0217]

[0218] In the formula, p t The final transaction price for the publisher. To determine the total revenue of each winning VPP in the team, With the total clearing power, the platform can now perform rapid, large-scale energy clearing based on the deviation energy auction results according to the VCG rules. This minimizes the total cost of eliminating energy deviations while maximizing VPP welfare.

[0219] As described above, the power trading method for joint VPPs in an energy blockchain environment proposed in this invention is all conducted on the blockchain. Blockchain technology can ensure that, without the need for third-party institutions, corresponding actions and events are automatically executed and verified through code when preset rules are met. The P2P power trading proposed in this invention can be completed through smart contracts, which can accelerate the execution speed of the transaction process and the alternating direction multiplier algorithm at the blockchain layer, shorten the time spent on transaction and information uploading to the chain, and improve the user experience. The specific flowchart is as follows... Figure 3 As shown.

[0220] This invention also provides an embodiment of an electricity trading system for a consortium of Virtual Power Companies (VPPs) in an energy blockchain environment. The system includes:

[0221] The preference determination module is used by the energy blockchain to receive and store the producer and consumer categories determined by producers and consumers and the energy category preferences determined by the producer and consumer categories.

[0222] The energy consumption plan acquisition module is used by the energy blockchain to receive and publish the initial energy consumption plans formulated by each producer and consumer based on their energy category preferences. The module optimizes the effectiveness of the energy consumption plans with the aim of minimizing costs, and adjusts the energy consumption plans through feedback from endorsing nodes. After multiple iterations, the final energy consumption plan is formed.

[0223] The bidding and negotiation module is used in the energy blockchain to record the final energy consumption plans of producers and consumers through smart contracts, complete transactions through bidding and negotiation, and determine whether supply and demand balance has been achieved within the VPP. If not, the content in the multilateral transaction module between VPPs is executed.

[0224] The VPP multilateral transaction module is used to statistically analyze real-time power deviations in the energy blockchain and inform other VPPs. The goal of different VPPs is to conduct energy transactions with the aim of minimizing the total cost of eliminating power deviations among multiple VPPs participating in the market operation.

[0225] It is understood that the power trading system for joint VPPs in the energy blockchain environment provided in this embodiment of the invention corresponds to the power trading method for joint VPPs in the energy blockchain environment described above. The explanations, examples, and beneficial effects of the relevant content can be referred to the corresponding content in the power trading method for joint VPPs in the energy blockchain environment, and will not be repeated here.

[0226] This invention also provides a computer-readable storage medium storing a computer program for electricity trading in a federated VPP environment under an energy blockchain environment, wherein the computer program causes a computer to execute the electricity trading method for a federated VPP under an energy blockchain environment as described above.

[0227] This invention also provides an electronic device, comprising:

[0228] One or more processors;

[0229] Memory; and

[0230] One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the programs including methods for performing electricity trading for a federated VPP in an energy blockchain environment as described above.

[0231] In summary, compared with existing technologies, it has the following beneficial effects:

[0232] 1. In the embodiments of the present invention, when conducting P2P transactions between producers and consumers for joint VPPs, the producers and consumers are classified and their energy preferences are determined, which better meets the actual transaction needs, improves the satisfaction of producers and consumers in participating in transactions, thereby increasing the enthusiasm of producers and consumers to participate in transactions and enhancing the activity of energy sharing for VPPs.

[0233] 2. The embodiments of the present invention maximize the welfare of VPPs through transactions between producers and sellers within VPPs and multilateral transactions between VPPs, and complete the design of a systematic power trading process more efficiently and in real time. At the same time, it further eliminates the power deviation of individual VPPs caused by power supply uncertainty, reduces operating costs, protects privacy and security, and achieves supply and demand balance more efficiently.

[0234] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0235] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A power trading method for joint VPPs in an energy blockchain environment, characterized in that, include: S1. The energy blockchain receives and stores the producer and consumer categories determined by the producers and consumers themselves, as well as the energy category preferences determined by the producer and consumer categories. S2. The energy blockchain receives and publishes the initial energy consumption plans formulated by each producer and consumer based on their energy category preferences. It optimizes the efficiency of these plans with the aim of minimizing costs, and adjusts them through feedback from endorsing nodes, iterating multiple times to form the final energy consumption plan. This includes: S201. The energy blockchain receives and publishes the initial energy consumption plans formulated by each producer and consumer based on their energy category preferences. Each producer's initial energy consumption plan can be represented as: in, i Indicates producers and distributors i , This indicates that producers and sellers have taken into account discomfort and energy costs. i Reduced electricity consumption and Producers and sellers i The charge and discharge capacity of the energy storage device. Producers and sellers i Electricity purchased from the grid, Producers and sellers i Electricity sold to the grid Producers and sellers in the P2P electricity trading market i The volume of electricity traded with other producers and sellers; the sign of this variable represents the different identities of the producers and sellers. When indicating producers and sellers i For electricity purchasers, This indicates an electricity sales user; S202. Construct a cost function to measure the effectiveness of energy consumption planning. Its expression is as follows: (1) The constraints of the cost function include: (2) Constraint (2) is the generator capacity constraint; (3) Constraint (3) is the ramping constraint for the generator; (4) Constraint (4) is a degradation constraint for energy storage devices; (5) Constraint (5) is a load reduction constraint; (6) Constraint (6) means that the amount of electricity purchased and sold in the peer-to-peer electricity trading market is always equal in any time period, and all the electricity traded can be traced to its source and destination. (7) Constraint (7) indicates that the purchased and sold electricity quantities traded with the power grid are greater than 0; (8) Constraint (8) is a power balance constraint; in, express t Unit cost of generator at all times express t Producers and sellers at all times i The generator's power output, express t The cost of depreciation of energy storage batteries. and This indicates the power of battery charging and discharging. This reflects the attitude of producers and consumers towards load reduction; the higher the value, the stronger the attitude of producers and consumers. i At any moment t The lower the willingness to reduce load, the higher the discomfort cost per unit of load reduction. express t Producers and sellers at all times i The amount of electricity that can reduce the load, Indicates producers and distributors i The utility coefficient for satisfying the demand for k types of energy is given by the preference. This indicates that producers and distributors tend to supply... k The utility coefficient of energy types express t Producers and sellers at all times i Average load power distribution express t Producers and sellers at all times i Average renewable energy output power; represent t Producers and sellers at all times i The generator power conversion factor, represent t Producers and sellers at all times i Total production capacity represent t -1 moment producers and distributors i Total production capacity represent t Producers and sellers at all times i The maximum value of the change in production capacity; represent t Producers and sellers at all times i The upper limit of the charging power of energy storage devices. represent t Producers and sellers at all times i The upper limit of the discharge power of the energy storage device; This represents the maximum load reduction that producers and consumers can achieve while ensuring their normal livelihoods. This constraint is used to ensure that load reduction by producers and consumers will not affect their normal lives. k represent k The formula represents the category of energy. k All energy sources have achieved power balance; S203. Solve the cost function and perform feedback adjustment to obtain the final energy consumption plan; S3, the smart contract of the energy blockchain records the final energy consumption plan of producers and consumers, completes the transaction through bidding and negotiation, and determines whether the supply and demand balance has been reached within the VPP. If not, it proceeds to the next step. S4: The energy blockchain calculates real-time power deviations and informs other VPPs. Different VPPs conduct energy transactions with the goal of minimizing the total cost of eliminating power deviations among multiple VPPs participating in the market.

2. The power trading method for joint VPPs in an energy blockchain environment as described in claim 1, characterized in that, The producer and consumer categories include green proportion energy consumers, profit-seekers, low-income families, and environmentalists; And / or, The energy categories include high-priced grey energy, low-priced grey energy, stable green energy, and fluctuating green energy.

3. The power trading method for a joint VPP in an energy blockchain environment as described in claim 1, characterized in that, S203 includes: The non-cooperative game problem between producers and sellers in the P2P electricity trading market is transformed into an optimization problem that minimizes costs: (9) By introducing slack variables The problem of N coupled variables in constraint (6) is transformed into a problem of two coupled variables: (10) (11) The augmented Lagrangian function used to solve the objective function (9) of the energy consumption plan is: (12) in, It is the dual variable of formula (11), σ>0 is the penalty parameter of formula (11), and the energy consumption planning process of producers and consumers in P2P electricity trading in the energy blockchain environment is determined by the alternating direction multiplier method algorithm; in the m-th iteration, each producer and consumer participating in P2P electricity trading in the energy blockchain environment updates by solving its own minimum cost function. : (13) in, These are the corresponding variables The updated energy consumption plan is obtained after the endorsement node is updated following the previous iteration; the updated plan is then obtained by solving the cost function with the goal of minimization. Producers and sellers will trade their electricity in the P2P electricity trading market under the energy blockchain environment. The data is sent to the endorsing nodes; the endorsing nodes collect the peer-to-peer electricity transaction volumes submitted by all producers and sellers in the market, and after processing, obtain the overall market supply and demand situation; based on the overall market supply and demand situation, the endorsing nodes update the slack variables. and dual variables ; Update according to the following formula: (14) Secondly, the updated results , Substituting into formula (15), the endorsement node solves for the new dual variable. : (15) Endorsement nodes will include the latest slack variables. and dual variables Feedback is provided to producers and consumers; producers and consumers obtain the actual supply and demand situation of the P2P electricity trading market in the energy blockchain environment at this stage from the slack variables, and further adjust their energy consumption plans based on their personal preferences, energy storage device status, etc.; producers and consumers will then trade the adjusted electricity volume in the peer-to-peer electricity trading market. The data is then sent to the endorsing node again; this iterative process will continue until the pre-set stopping criteria are met, resulting in the final energy consumption plan.

4. The power trading method for a joint VPP in an energy blockchain environment as described in any one of claims 1 to 3, characterized in that, S3 includes: S301. Conduct bidding among producers and sellers with the goal of maximizing utility to arrive at the final price. S302. The energy blockchain randomly splits the electricity purchase and sale strategy set and sends it to different producers and consumers. Based on the optimal utility value, it selects the buyer or seller producer and consumer and conducts flexible bilateral negotiations. If the negotiation is successful, the transaction will proceed; if the negotiation fails, the transaction will not be completed. The electricity purchase and sale strategy set includes the final energy consumption plan and the final price. S303. Determine whether VPP has reached supply and demand balance. If it has not reached balance, proceed to step S4.

5. The power trading method for a joint VPP in an energy blockchain environment as described in claim 4, characterized in that, S301 includes: The utility functions of producers and sellers engaging in market bidding are shown in (16) and (17): (16) (17) in, and These represent the transaction utility values ​​of the producer / seller (buyer) and the producer / seller (seller) with potential trading partners at the time of the transaction, respectively. (18) in, / The endorsed node will pass the energy to the opposite producer and seller to obtain the final compromise in the traded energy. / ; / It is the settlement price recorded by the smart contract when producers, buyers, and sellers transact with each other during matching, and its expression is: (19) If the seller j The buyer is selected as a trading partner during the matching process. i Final offer The calculation is as follows: (20) (21) in, Indicates buyer i Willing to be the seller j No. k The additional value added by this type of energy; Indicates buyer i Initial quote; in formula (21), the first term represents spatial preference, The first term represents the importance coefficient, and the second term represents the spatial distance coefficient; the third term represents reputation preference. This represents the credit index of seller j, with a maximum value of 1 and a minimum value of 0. Indicates buyer i Credit permission, that is, willingness to grant credit to the seller j The credit index represents the additional price factor paid; the third item indicates the willingness to trade green energy. This indicates the proportion of renewable energy sold by seller j. Indicates buyer i The fourth item indicates the buyer's willingness to add value to their bid for renewable energy; the fifth item represents the buyer's risk aversion. i Willing to pay higher prices for stable energy; This represents the stability coefficient of the energy sold by seller j. This indicates the additional value that buyer i is willing to pay for a stable energy source; Seller j To the buyer i The formula for calculating the final price quote for the sale of energy is as follows: (22) In the formula, Indicates the seller j Willing to be the buyer i No. k The additional value added by this type of energy; Indicates the seller j Initial quote; Indicates the seller j To the buyer i The final offer for the sale of energy.

6. The power trading method for a joint VPP in an energy blockchain environment as described in any one of claims 1 to 3, characterized in that, S4 includes: Each VPP uploads its own electricity supply and demand information for a specific time zone to a smart contract, which then divides it into two sets: A collection of VPPs with power supply capability. For a collection of VPPs that need to purchase electricity; When conducting energy trading between VPPs, the objective is to minimize the total cost of eliminating power deviations among multiple VPPs participating in the market operation. (23) (24) In the formula, For the first p The electricity sales cost function of a VPP; For the first p Each VPP actually provides power. For the first w The power required per VPP This is the cost coefficient. This represents the power balance that needs to be satisfied in a VCG auction; (25) use y pt As the first p VPP in time period t The unit price, i.e. y pt Yuan / (kW) h); The bid is a sealed bid, encrypted using the MD2 hash function. The endorsing node transmits the bid to the corresponding VPP. The encryption process is as follows: (26) In the formula, y Quotation for VPP y pt ;s is a random string defined by the bidder; all bids are cleared according to VCG auction rules; The smart contract calculates the winning bidder's profit and transmits it to the corresponding winning bidder through the endorsing node. The specific profit calculation method is as follows: (27) In the formula, Z p For the first p The benefits for each successful bidder To clear the total revenue of the remaining successful bidders in the queue, For the first p When a successful bidder does not participate in the bidding, the total revenue of the new clearing team formed according to the clearing rules; (28) In the formula, The final transaction price for the publisher. To determine the total revenue of each winning VPP in the team, This represents the total clearing power.

7. A power trading system for joint VPPs in an energy blockchain environment, characterized in that, include: The preference determination module is used by the energy blockchain to receive and store the producer and consumer categories determined by producers and consumers and the energy category preferences determined by the producer and consumer categories. The energy consumption plan acquisition module is used by the energy blockchain to receive and publish initial energy consumption plans formulated by each producer and consumer based on their energy category preferences. It optimizes the effectiveness of these plans with the aim of minimizing costs, and adjusts them through feedback from endorsing nodes, iterating multiple times to form the final energy consumption plan. This includes: S201. The energy blockchain receives and publishes the initial energy consumption plans formulated by each producer and consumer based on their energy category preferences. Each producer's initial energy consumption plan can be represented as follows: in, i Indicates producers and distributors i , This indicates that producers and sellers have taken into account discomfort and energy costs. i Reduced electricity consumption and Producers and sellers i The charge and discharge capacity of the energy storage device. Producers and sellers i Electricity purchased from the grid, Producers and sellers i Electricity sold to the grid Producers and sellers in the P2P electricity trading market i The volume of electricity traded with other producers and sellers; the sign of this variable represents the different identities of the producers and sellers. When indicating producers and sellers i For electricity purchasers, This indicates an electricity sales user; S202. Construct a cost function to measure the effectiveness of energy consumption planning. Its expression is as follows: (1) The constraints of the cost function include: (2) Constraint (2) is the generator capacity constraint; (3) Constraint (3) is the ramping constraint for the generator; (4) Constraint (4) is a degradation constraint for energy storage devices; (5) Constraint (5) is a load reduction constraint; (6) Constraint (6) means that the amount of electricity purchased and sold in the peer-to-peer electricity trading market is always equal in any time period, and all the electricity traded can be traced to its source and destination. (7) Constraint (7) indicates that the purchased and sold electricity quantities traded with the power grid are greater than 0; (8) Constraint (8) is a power balance constraint; in, express t Unit cost of generator at all times express t Producers and sellers at all times i The generator's power output, express t The cost of depreciation of energy storage batteries. and This indicates the power of battery charging and discharging. This reflects the attitude of producers and consumers towards load reduction; the higher the value, the stronger the attitude of producers and consumers. i At any moment t The lower the willingness to reduce load, the higher the discomfort cost per unit of load reduction. express t Producers and sellers at all times i The amount of electricity that can reduce the load, Indicates producers and distributors i The utility coefficient for satisfying the demand for k types of energy is given by the preference. This indicates that producers and distributors tend to supply... k The utility coefficient of energy types express t Producers and sellers at all times i Average load power distribution express t Producers and sellers at all times i Average renewable energy output power; represent t Producers and sellers at all times i The generator power conversion factor, represent t Producers and sellers at all times i Total production capacity represent t -1 moment producers and distributors i Total production capacity represent t Producers and sellers at all times i The maximum value of the change in production capacity; represent t Producers and sellers at all times i The upper limit of the charging power of energy storage devices. represent t Producers and sellers at all times i The upper limit of the discharge power of the energy storage device; This represents the maximum load reduction that producers and consumers can achieve while ensuring their normal livelihoods. This constraint is used to ensure that load reduction by producers and consumers will not affect their normal lives. k represent k The formula represents the category of energy. k All energy sources have achieved power balance; S203. Solve the cost function and perform feedback adjustment to obtain the final energy consumption plan; The bidding and negotiation module is used in the energy blockchain to record the final energy consumption plans of producers and consumers through smart contracts, complete transactions through bidding and negotiation, and determine whether supply and demand balance has been achieved within the VPP. If not, the content in the multilateral transaction module between VPPs is executed. The VPP multilateral transaction module is used to statistically analyze real-time power deviations in the energy blockchain and inform other VPPs. Different VPPs conduct energy transactions with the goal of minimizing the total cost of eliminating power deviations among multiple VPPs participating in the market operation.

8. A computer-readable storage medium, characterized in that, It stores a computer program for electricity trading in a federated VPP environment under an energy blockchain, wherein the computer program causes a computer to execute the electricity trading method for a federated VPP under an energy blockchain environment as described in any one of claims 1 to 6.

9. An electronic device, characterized in that, include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the programs including methods for performing electricity trading for a federated VPP in an energy blockchain environment as described in any one of claims 1 to 6.