Virtual power plant trusted distributed transaction method, apparatus and device, and medium
A blockchain-based transaction framework with smart contracts addresses inefficiencies and security issues in virtual power plants, ensuring transparent and secure power transactions and fair benefit distribution among distributed energy sources.
Patent Information
- Application Number
- CN202411373325.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2024-12-27
AI Technical Summary
Current virtual power plant electricity transactions are cumbersome, prone to privacy information leakage, and lack security, with offline contract signing and inefficient transaction processes.
A decentralized transaction framework using blockchain technology with smart contracts for automatic transaction matching, ensuring transparency, tamper-proof transactions, and fair distribution of benefits among distributed energy sources.
Enhances transaction efficiency and security, ensuring open and transparent power transactions while fairly distributing benefits among distributed energy sources, promoting voluntary participation in virtual power plants.
Smart Images

Figure CN119205341A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of electric power market, and specifically relates to a virtual power plant trusted distributed transaction method, device, equipment and medium. Background Art
[0002] Virtual power plants are composed of controllable units, uncontrollable units (distributed energy such as wind and light), energy storage equipment, loads, etc. Figure 2 . According to the type of distributed resources aggregated within the virtual power plant, virtual power plants can be divided into three categories: supply-side virtual power plants (supply-side VPPs), demand response virtual power plants (DR-based VPPs) and mixed-asset virtual power plants (mixed-asset VPPs). A virtual power plant consisting solely of power generation units is called a supply-side virtual power plant. A virtual power plant consisting solely of adjustable loads is called a demand response virtual power plant, also known as an energy efficiency power plant. A virtual power plant consisting of both power generation units and adjustable loads is called a mixed-asset type virtual power plant.
[0003] Current virtual power plant electricity transactions are generally based on offline contract signing and order execution. The transaction procedures are cumbersome, and there is a high risk of leakage and tampering of privacy information in electricity transactions, and the security of transactions cannot be guaranteed. Summary of the invention
[0004] The purpose of the present invention is to provide a trusted distributed transaction method, device, equipment and medium for a virtual power plant. By utilizing the decentralized, open, transparent and tamper-proof characteristics of blockchain, a distributed transaction framework for a virtual power plant is designed. At the same time, a transaction matching mechanism is established to complete automatic matching of the two parties to the transaction through smart contracts, ensuring that the transaction is open and cannot be tampered with at will.
[0005] In order to achieve the above object, the present invention adopts the following technical solution:
[0006] A first aspect of the present invention provides a virtual power plant trusted distributed transaction method, comprising the following steps:
[0007] Obtaining a power purchase transaction request from a power purchaser and a power sale transaction request from a power seller in a virtual power plant; wherein each user in the virtual power plant corresponds to a node in the blockchain platform;
[0008] Calling the preset transaction matching smart contract to match the power purchase transaction request with the power sale transaction request, and adding a timestamp to form a transaction order after a successful match;
[0009] The transaction order is encrypted to form a transaction record, and the transaction record is stored in the blockchain network.
[0010] Furthermore, the step of calling a preset transaction matching smart contract to match the power purchase transaction request with the power sale transaction request specifically includes:
[0011] Obtain the power purchaser's quotation in the power purchase transaction request. If the power purchaser's quotation is greater than the real-time power purchase price of the power grid, generate an instruction to recommend the user to purchase electricity directly from the power grid and end the matching;
[0012] The power selling user's quotation in the power selling transaction request is obtained. If the power selling user's quotation is lower than the grid-connected electricity price, an instruction is generated to recommend the user to sell electricity directly to the grid, and the matching is terminated.
[0013] Furthermore, the step of calling the preset transaction matching smart contract to match the power purchase transaction request and the power sale transaction request also includes: if the power purchase user's quotation is lower than the real-time power purchase price of the power grid, and the power sale user's quotation is higher than the power grid's on-grid electricity price; then the power purchase transaction request and the power sale transaction request in the same demand time period are sorted; wherein, the power purchase transaction requests are sorted from high to low according to the power purchase user's quotation, and the highest power purchase user's quotation is used as the optimal buying price; the power sale transaction requests are sorted from low to high according to the power sale user's quotation, and the lowest power sale user's quotation is used as the optimal selling price; when the optimal buying price is greater than or equal to the optimal selling price, the power purchase transaction request corresponding to the optimal buying price is matched with the power sale transaction request corresponding to the optimal selling price to reach a transaction, and the transaction price is the average price of the optimal buying price and the optimal selling price; and so on, when the optimal buying price is lower than the optimal selling price, the transaction is terminated; after the transaction is completed, the unmatched power purchase transaction request and power sale transaction request purchase or sell power to the large power grid.
[0014] Furthermore, in the step of calling the preset transaction matching smart contract to match the electricity purchase transaction request and the electricity sale transaction request, priority is given to matching the electricity purchase transaction request and the electricity sale transaction request within the same virtual power plant; when the electricity sales user of the current virtual power plant cannot meet the demand of the electricity purchase transaction request, the electricity sale transaction request of other virtual power plants is matched to the electricity purchase transaction request; when all virtual power plants cannot meet the demand of the electricity purchase transaction request, the electricity purchasing user purchases electricity from the power grid.
[0015] A second aspect of the present invention provides a virtual power plant trusted distributed transaction device, comprising:
[0016] An acquisition module is used to acquire power purchase transaction requests from power purchasers and power sales transaction requests from power sales users in a virtual power plant; wherein each user in the virtual power plant corresponds to a node in the blockchain platform;
[0017] The transaction matching module is used to call the preset transaction matching smart contract to match the power purchase transaction request with the power sale transaction request, and add a timestamp to form a transaction order after the match is successful;
[0018] The on-chain module is used to encrypt the transaction order to form a transaction record, and store the transaction record in the blockchain network.
[0019] Furthermore, the transaction matching module is specifically used for:
[0020] Obtain the power purchaser's quotation in the power purchase transaction request. If the power purchaser's quotation is greater than the real-time power purchase price of the power grid, generate an instruction to recommend the user to purchase electricity directly from the power grid and end the matching;
[0021] The power selling user's quotation in the power selling transaction request is obtained. If the power selling user's quotation is lower than the grid-connected electricity price, an instruction is generated to recommend the user to sell electricity directly to the grid, and the matching is terminated.
[0022] Furthermore, the transaction matching module is also used for:
[0023] If the power purchase user's offer is lower than the real-time power purchase price of the power grid, and the power sales user's offer is higher than the power grid's on-grid price, then the power purchase transaction requests and power sales transaction requests in the same demand time period are sorted; among them, the power purchase transaction requests are sorted from high to low according to the power purchase user's offer, and the highest power purchase user's offer is used as the optimal purchase price; the power sales transaction requests are sorted from low to high according to the power sales user's offer, and the lowest power sales user's offer is used as the optimal selling price;
[0024] When the best buying price is greater than or equal to the best selling price, the power purchase transaction request corresponding to the best buying price is matched with the power sale transaction request corresponding to the best selling price to complete the transaction. The transaction price is the average price of the best buying price and the best selling price. Similarly, when the best buying price is lower than the best selling price, the transaction is terminated.
[0025] After the transaction is completed, the unmatched power purchase transaction requests and power sales transaction requests will purchase or sell power from the large power grid.
[0026] Furthermore, in the transaction matching module, power purchase transaction requests and power sales transaction requests within the same virtual power plant are preferentially matched; when the power sales users of the current virtual power plant cannot meet the needs of the power purchase transaction requests, the power purchase transaction requests are matched with power sales transaction requests of other virtual power plants; when all virtual power plants cannot meet the needs of the power purchase transaction requests, the power purchasing users purchase electricity from the power grid.
[0027] According to a third aspect of the present invention, an electronic device is provided, comprising a processor and a memory, wherein the processor is used to execute a computer program stored in the memory to implement the above-mentioned virtual power plant trusted distributed transaction method.
[0028] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores at least one instruction, and when the at least one instruction is executed by a processor, the above-mentioned virtual power plant trusted distributed transaction method is implemented.
[0029] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0030] (1) The virtual power plant trusted distributed transaction method provided by the present invention calls the preset transaction matching smart contract to match the power purchase transaction request and the power sale transaction request. After the match is successful, a timestamp is added to form a transaction order; the transaction order is encrypted to form a transaction record, and the transaction record is stored in the blockchain network. By utilizing the decentralized, open, transparent and tamper-proof characteristics of the blockchain, a virtual power plant distributed transaction framework is designed, and a transaction matching mechanism is established to complete the automatic matching of the two parties through the smart contract. Applying blockchain technology to virtual power plants can ensure the contribution value of distributed energy to the system, that is, the output is open and transparent, and the system can reasonably measure and dispatch its output, ensuring that the benefits of each distributed energy are reasonably and fairly distributed. In addition, the virtual power plant using blockchain technology can make mutual selections between it and each distributed energy under information symmetry, the distributed information system matches the distributed energy of the virtual power plant, and each power generation unit voluntarily participates in the virtual power plant and implements system maintenance together.
[0031] (2) In distributed transactions, both electricity sellers and electricity buyers hope for higher efficiency and security, and there is a certain conflict of interest. This model improves the efficiency and security of transactions and brings greater market benefits to electricity buyers and sellers. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The drawings constituting a part of the present application are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0033] Figure 1 A schematic diagram of a flow chart of a trusted distributed transaction method for a virtual power plant according to the present invention;
[0034] Figure 2 This is a schematic diagram of the virtual power plant architecture;
[0035] Figure 3 This is a schematic diagram of the blockchain technology involved in the present invention;
[0036] Figure 4 This is a schematic diagram of the architecture of the blockchain-based virtual power plant power trading platform proposed in the present invention;
[0037] Figure 5This is a schematic diagram of a distributed transaction model in a virtual power plant proposed by the present invention;
[0038] Figure 6 This is a schematic diagram of the transaction matching mechanism proposed by the present invention;
[0039] Figure 7 This is a structural block diagram of a trusted distributed trading device for a virtual power plant according to the present invention;
[0040] Figure 8 The present invention is a structural block diagram of an electronic device. DETAILED DESCRIPTION
[0041] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.
[0042] The following detailed description is an exemplary description, which is intended to provide further detailed description of the present invention. Unless otherwise specified, all technical terms used in the present invention have the same meaning as those generally understood by those skilled in the art to which the present application belongs. The terms used in the present invention are only for describing specific embodiments, and are not intended to limit exemplary embodiments according to the present invention.
[0043] Explanation of terms used in this plan
[0044] Blockchain is a decentralized, distributed shared ledger. The first and last hash values of adjacent blocks are connected in one direction, which can realize chain storage, such as Figure 3 As shown. The block stores all distributed energy transaction data, and the hash algorithm can automatically generate a Merkle tree that stores the hash value of the transaction data. If the transaction data is maliciously tampered with, the Merkle tree root hash value will change. Using blockchain technology, in distributed energy transactions, each node can be desensitized. The anonymous transactions and data cache-free features in the blockchain ensure the realization of P2P transactions and two-way interactions. Blockchain can realize the immediate realization of benefits and subsidies, and P2P direct transactions can greatly reduce intermediate fees.
[0045] Example 1
[0046] The present invention takes into account the excellent properties of blockchain, designs a distributed transaction framework for virtual power plants, and establishes a transaction matching mechanism to automatically match the two parties through smart contracts. The present invention takes into account the characteristics of distributed power transactions and provides a trusted distributed transaction method for virtual power plants based on smart contracts.
[0047] like Figure 1 As shown, a virtual power plant trusted distributed transaction method includes the following steps:
[0048] S1. Obtaining power purchase transaction requests from power purchasers and power sales transaction requests from power sales users in the virtual power plant.
[0049] Among them, each user in the virtual power plant corresponds to a node in the blockchain platform.
[0050] Specifically, the electricity buyers and sellers in this solution are all users in the VPP distributed power trading architecture. The traditional virtual power plant is a centralized structure, and this solution is an improvement to establish a virtual power plant operation architecture based on blockchain technology. In the virtual power plant operation architecture, the virtual power plant is mainly composed of distributed resources such as wind power, photovoltaics, electric vehicles, energy storage systems, and residential / industrial loads. Each user in the virtual power plant corresponds to a node in the blockchain platform, and the user accesses the blockchain platform through a mobile phone terminal or a web page. Unlike traditional centralized platforms, users of this blockchain platform automatically complete transaction matching through smart contracts during the transaction process, and the power exchange center only participates in the transaction process as a platform maintainer. Figure 4 shown.
[0051] Through the blockchain platform, information can be exchanged, and virtual power plants and distributed energy owners can make two-way choices. Through smart contracts, data can be read and written to achieve automatic matching between buyers and sellers, form transaction orders, and improve transaction management efficiency. For each distributed resource connected to the power grid, its output information, geographical location, and its credibility and contract performance history will be recorded in the blockchain system in an open, transparent, and tamper-proof manner. The application of smart contracts reduces the management cost of the system and avoids unnecessary transaction disputes.
[0052] Specifically, Figure 5 As shown, in order to realize power trading in the virtual power plant, this solution also provides a distributed power trading model and process in the virtual power plant. This model is a distributed trading model based on the Hyperledger Fabric alliance chain platform. Figure 5 The model architecture is described. In this scheme, the entities participating in the power trading of virtual power plants are divided into two categories: power producers and power consumers, which correspond to power sellers and power buyers respectively. Power producers can include wind power, distributed photovoltaics and other distributed power sources in the above-mentioned virtual power plants, and power consumers can include residential users and industrial users in the above-mentioned virtual power plants. Among them, energy storage systems and electric vehicles can participate in power trading as power producers or power consumers in a trading cycle.
[0053] For electricity users in a virtual power plant, there are many ways to purchase electricity: first, purchase electricity generated by power producers in their own virtual power plant; second, purchase electricity from other virtual power plants; third, users can also purchase electricity from the power grid in traditional ways. Users within the virtual power plant have priority to purchase electricity from within the virtual power plant. When internal purchases cannot meet electricity demand, they can purchase electricity from the power grid. The distributed transaction process within a virtual power plant can be divided into four main steps: user registration, demand declaration, transaction matching, and order execution.
[0054] (1) User Registration
[0055] There are certain access rules for the distributed resources of virtual power plants. Distributed resource users need to apply to register on the platform to become virtual power plant users. After passing the review, they will obtain the public key and private key.
[0056] (2) Demand declaration
[0057] Users can upload their electricity purchase or electricity demand to Fabri c The private key signature is attached to the network. The electricity demand SellOrder and electricity sales demand BuyOrder information are shown in formulas (1) and (2).
[0058] Demand info =I1(B id , B Addr , B PK , B num , B price , B time ) (1)
[0059] Supply info =I2(S id , S Addr , S PK , S num , S price , B time ) (2)
[0060] (3) Transaction Matching
[0061] The transaction matching smart contract is used to automatically match the electricity purchase and sale parties, and the matched transactions are timestamped to form a transaction order. When matching transactions, it is necessary to consider information such as the real-time power grid purchase price and the on-grid price, as shown in formula (3). After the transaction order is formed, it will be encrypted to form a transaction record (TransactionRecord, TR) and permanently stored in the blockchain network, as shown in formula (4).
[0062] TS=Match(I1,I2,B price_grid , S price_grid) (3)
[0063] TR=Hash256(TS,B id , S id ) (4)
[0064] In the above formula: Demand info Indicates buyer demand information; B ia Indicates the buyer's ID; B num Indicates buyer's trading ability; B price Indicates the expected buying price; B time Indicates the estimated delivery time; B Addr Indicates the buyer's address; B PK represents the buyer's private key; I1 represents the amount of electricity required; Supply info Indicates the energy information of the seller; S id Indicates the seller ID; S num Indicates the seller's trading ability; S price Indicates the expected selling price; S Addr Indicates the seller's address; S PK represents the seller's private key; I2 represents the electricity demand; TS represents the matching record; B price_grid Represents the power grid purchase price; S price_grid represents the on-grid electricity price; TR represents the transaction record on the blockchain.
[0065] (4) Order Execution
[0066] All users in the virtual power plant adjust their own power generation and consumption according to the results of distributed power transactions. Each user installs a smart meter that can run a blockchain node. The smart meter detects the power generation and consumption of the producers and consumers, and generates data interaction with the smart contract on the blockchain through the built-in communication module. This process is completed autonomously by the smart meter without the involvement of the power grid company.
[0067] S2. Call the preset transaction matching smart contract to match the power purchase transaction request with the power sales transaction request. After the match is successful, add a timestamp to form a transaction order.
[0068] Specifically, the transaction matching smart contract provided in this solution is designed as follows:
[0069] Smart contracts based on blockchain are the key to realizing the application of blockchain technology. The development of specific applications is achieved through the state variables, structure types, functions, events, etc. defined in smart contracts. This solution designs different functional functions for the distributed transaction process of virtual power plants. The specific functions are as follows:
[0070] (1) Member registration function:
[0071] After registering, the user has a specific user ID and username, and obtains the public key PK and private key SK from the system.
[0072] (2) Demand declaration function:
[0073] Power users with trading qualifications and distributed energy generators submit power purchase and sale transaction requests through the client. In order to reduce the user's power purchase cost, when the power purchase user's quotation is greater than the real-time power purchase price of the power grid, it is recommended that the user purchases electricity directly from the power grid and refuse to add the transaction. In order to ensure the highest profit for the power seller, when the power seller's power sale quotation is lower than the power grid on-grid electricity price, it is recommended that the user sells electricity directly to the power grid and refuse to add the transaction. After the report is successful, the power purchase order SellOrder and the power sale order BuyOrder will be formed.
[0074] (3) Transaction matching function:
[0075] The transaction matching adopts the matching mechanism of "price first, time first". First, the power purchase transaction requests and power sales transaction requests in the same demand time period are sorted. The power purchase transaction requests are sorted from high to low according to the quotations of the power purchase users, and the highest power purchase user quotation is used as the optimal purchase price; the power sales transaction requests are sorted from low to high according to the quotations of the power sales users, and the lowest power sales user quotation is used as the optimal selling price; if the prices are the same, they are sorted according to the time of submission of the quotations. When the optimal buying price is greater than or equal to the optimal selling price, a transaction can occur. During the matching process, the power purchase user with the highest quotation is matched with the power sales user with the lowest quotation, and the transaction price is the average price of the two. Figure 6 As shown. And so on, until the best buying price is lower than the best selling price, the transaction ends. After the transaction order is formed, the transaction result is saved on the blockchain. If the buyer and seller in the market have not completed the match at the end of the transaction, they will purchase or sell electricity from the large power grid.
[0076] (4) Transaction query function:
[0077] All transaction orders of the user can be queried from the blockchain through the user's ID.
[0078] Based on the smart contract designed above, this step S2 is performed as follows:
[0079] Get the power purchaser's quotation in the power purchase transaction request. If the power purchaser's quotation is greater than the grid's real-time power purchase price, generate an instruction to recommend the user to purchase electricity directly from the grid and end the matching. Get the power sales user's quotation in the power sales transaction request. If the power sales user's quotation is lower than the grid's on-grid power price, generate an instruction to recommend the user to sell electricity directly to the grid and end the matching.
[0080] If the power purchaser's bid is lower than the real-time power purchase price of the power grid, and the power seller's bid is higher than the power grid's on-grid price, then the power purchase transaction requests and power sale transaction requests in the same demand time period are sorted; among them, the power purchase transaction requests are sorted from high to low according to the power purchaser's bid, and the highest power purchaser's bid is used as the optimal buying price; the power sale transaction requests are sorted from low to high according to the power sale user's bid, and the lowest power sale user's bid is used as the optimal selling price; when the optimal buying price is greater than or equal to the optimal selling price, the power purchase transaction request corresponding to the optimal buying price is matched with the power sale transaction request corresponding to the optimal selling price to reach a transaction, and the transaction price is the average price of the optimal buying price and the optimal selling price; and so on, when the optimal buying price is lower than the optimal selling price, the transaction is terminated; after the transaction is completed, the unmatched power purchase transaction requests and power sale transaction requests purchase or sell power to the large power grid.
[0081] Priority is given to matching power purchase transaction requests and power sales transaction requests within the same virtual power plant; when the power sales users of the current virtual power plant cannot meet the needs of the power purchase transaction requests, the power purchase transaction requests are matched with power sales transaction requests of other virtual power plants; when all virtual power plants cannot meet the needs of the power purchase transaction requests, the power purchasing users purchase electricity from the power grid.
[0082] S3. Encrypt the transaction order to form a transaction record, and store the transaction record in the blockchain network.
[0083] In summary, the implementation of this solution is based on blockchain. The decentralized, open, transparent and tamper-proof characteristics of blockchain technology are consistent with the technical characteristics of virtual power plants. The combination of the two can establish a decentralized energy trading management platform based on a consensus mechanism, providing a new solution to the current problems of virtual power plants. The compatibility of blockchain and virtual power plants: (1) Decentralization: All decisions of the blockchain system are executed by all nodes of the system. Virtual power plants contain a variety of distributed energy sources and urgently need to transform from the traditional centralized control mode to a decentralized control mode. (2) Collective maintenance: Each node of the blockchain system can participate in the block writing process, and each node also has the authority to access block data. The authorization of the virtual power plant to read, write and maintain the rights of distributed power sources can enhance the enthusiasm of distributed energy to participate in virtual power plants. (3) Smart contracts: The smart contracts of the blockchain system can realize the automatic execution of power transactions. After obtaining profits, the virtual power plant can automatically redistribute the profits, reducing the cycle of distributed energy owners to recover funds. (4) Information security: Blockchain technology makes secure and intelligent transactions possible in the energy field. At the same time, the existing transaction management model of virtual power plants has problems of information leakage and identity disguise. Combining the two to establish a virtual power plant transaction management model based on blockchain technology can improve the safety performance of virtual power plants.
[0084] Example 2
[0085] like Figure 7 As shown, based on the same inventive concept as the above embodiment, this embodiment further provides a virtual power plant trusted distributed trading device, including:
[0086] The acquisition module is used to obtain the power purchase transaction requests of the power purchasers and the power sales transaction requests of the power sellers in the virtual power plant; wherein each user in the virtual power plant corresponds to a node in the blockchain platform.
[0087] The transaction matching module is used to call the preset transaction matching smart contract to match the power purchase transaction request with the power sale transaction request, and add a timestamp to form a transaction order after a successful match.
[0088] Specifically, the transaction matching module is specifically used for:
[0089] Get the power purchaser's quotation in the power purchase transaction request. If the power purchaser's quotation is greater than the grid's real-time power purchase price, generate an instruction to recommend the user to purchase electricity directly from the grid and end the matching. Get the power sales user's quotation in the power sales transaction request. If the power sales user's quotation is lower than the grid's on-grid power price, generate an instruction to recommend the user to sell electricity directly to the grid and end the matching.
[0090] If the power purchaser's bid is lower than the real-time power purchase price of the power grid, and the power seller's bid is higher than the power grid's on-grid price, then the power purchase transaction requests and power sale transaction requests in the same demand time period are sorted; among them, the power purchase transaction requests are sorted from high to low according to the power purchaser's bid, and the highest power purchaser's bid is used as the optimal buying price; the power sale transaction requests are sorted from low to high according to the power sale user's bid, and the lowest power sale user's bid is used as the optimal selling price; when the optimal buying price is greater than or equal to the optimal selling price, the power purchase transaction request corresponding to the optimal buying price is matched with the power sale transaction request corresponding to the optimal selling price to reach a transaction, and the transaction price is the average price of the optimal buying price and the optimal selling price; and so on, when the optimal buying price is lower than the optimal selling price, the transaction is terminated; after the transaction is completed, the unmatched power purchase transaction requests and power sale transaction requests purchase or sell power to the large power grid.
[0091] When matching, power purchase transaction requests and power sales transaction requests within the same virtual power plant will be matched first; when the power sales users of the current virtual power plant cannot meet the needs of the power purchase transaction requests, the power purchase transaction requests will be matched with power sales transaction requests of other virtual power plants; when all virtual power plants cannot meet the needs of the power purchase transaction requests, the power purchasing users will purchase electricity from the power grid.
[0092] The on-chain module is used to encrypt the transaction order to form a transaction record, and store the transaction record in the blockchain network.
[0093] Example 3
[0094] like Figure 8 As shown, based on the same inventive concept as the above embodiment, the present invention further provides an electronic device 100 for implementing the above virtual power plant trusted distributed transaction method; the electronic device 100 includes a memory 101, at least one processor 102, a computer program 103 stored in the memory 101 and executable on the at least one processor 102, and at least one communication bus 104. The memory 101 can be used to store the computer program 103, and the processor 102 implements the steps of a virtual power plant trusted distributed transaction method in embodiment 1 by running or executing the computer program stored in the memory 101 and calling the data stored in the memory 101.
[0095] The memory 101 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data (such as audio data) created according to the use of the electronic device 100, etc. In addition, the memory 101 may include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other non-volatile solid-state storage devices.
[0096] At least one processor 102 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 102 may be a microprocessor or any conventional processor, etc. The processor 102 is the control center of the electronic device 100, and uses various interfaces and lines to connect various parts of the entire electronic device 100.
[0097] The memory 101 in the electronic device 100 stores a plurality of instructions to implement a virtual power plant trusted distributed transaction method, and the processor 102 can execute the plurality of instructions to implement:
[0098] Obtaining a power purchase transaction request from a power purchaser and a power sale transaction request from a power seller in a virtual power plant; wherein each user in the virtual power plant corresponds to a node in the blockchain platform;
[0099] Call the preset transaction matching smart contract to match the power purchase transaction request with the power sale transaction request, and add a timestamp to form a transaction order after the match is successful;
[0100] The transaction order is encrypted to form a transaction record, and the transaction record is stored in the blockchain network.
[0101] Example 4
[0102] If the module / unit integrated in the electronic device 100 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. Computer-readable media may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory and read-only memory (ROM, Read-Only Memory).
[0103] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0104] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0105] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0106] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0107] In the description of this specification, the description with reference to the terms "one embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0108] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A virtual power plant trusted distributed transaction method, characterized in that: The steps include: Obtaining a power purchase transaction request from a power purchaser and a power sale transaction request from a power seller in a virtual power plant; wherein each user in the virtual power plant corresponds to a node in the blockchain platform; Call the preset transaction matching smart contract to match the power purchase transaction request with the power sale transaction request, and add a timestamp to form a transaction order after the match is successful; The transaction order is encrypted to form a transaction record, and the transaction record is stored in the blockchain network.
2. The virtual power plant trusted distributed transaction method according to claim 1, characterized in that: The step of calling a preset transaction matching smart contract to match the power purchase transaction request with the power sale transaction request specifically includes: Obtain the power purchaser's quotation in the power purchase transaction request. If the power purchaser's quotation is greater than the real-time power purchase price of the power grid, generate an instruction to recommend the user to purchase electricity directly from the power grid and end the matching; The power selling user's quotation in the power selling transaction request is obtained. If the power selling user's quotation is lower than the grid-connected electricity price, an instruction is generated to recommend the user to sell electricity directly to the grid, and the matching is terminated.
3. The virtual power plant trusted distributed transaction method according to claim 2 is characterized in that: The step of calling a preset transaction matching smart contract to match the power purchase transaction request with the power sale transaction request also includes: If the power purchase user's offer is lower than the real-time power purchase price of the power grid, and the power sales user's offer is higher than the power grid's on-grid price, then the power purchase transaction requests and power sales transaction requests in the same demand time period are sorted; among them, the power purchase transaction requests are sorted from high to low according to the power purchase user's offer, and the highest power purchase user's offer is used as the optimal purchase price; the power sales transaction requests are sorted from low to high according to the power sales user's offer, and the lowest power sales user's offer is used as the optimal selling price; When the best buying price is greater than or equal to the best selling price, the power purchase transaction request corresponding to the best buying price is matched with the power sale transaction request corresponding to the best selling price to complete the transaction. The transaction price is the average price of the best buying price and the best selling price. Similarly, when the best buying price is lower than the best selling price, the transaction is terminated. After the transaction is completed, the unmatched power purchase transaction requests and power sales transaction requests will purchase or sell power from the large power grid.
4. The virtual power plant trusted distributed transaction method according to claim 1, characterized in that: In the step of calling the preset transaction matching smart contract to match the power purchase transaction request and the power sale transaction request, priority is given to matching the power purchase transaction request and the power sale transaction request within the same virtual power plant; when the power sales user of the current virtual power plant cannot meet the demand of the power purchase transaction request, the power sale transaction request of other virtual power plants is matched for the power purchase transaction request; when all virtual power plants cannot meet the demand of the power purchase transaction request, the power purchase user purchases electricity from the power grid.
5. A virtual power plant trusted distributed trading device, characterized in that: include: An acquisition module is used to acquire power purchase transaction requests from power purchasers and power sales transaction requests from power sales users in a virtual power plant; wherein each user in the virtual power plant corresponds to a node in the blockchain platform; The transaction matching module is used to call the preset transaction matching smart contract to match the power purchase transaction request with the power sale transaction request, and add a timestamp to form a transaction order after the match is successful; The on-chain module is used to encrypt the transaction order to form a transaction record, and store the transaction record in the blockchain network.
6. The virtual power plant trusted distributed transaction device according to claim 5, characterized in that: The transaction matching module is specifically used for: Obtain the power purchaser's quotation in the power purchase transaction request. If the power purchaser's quotation is greater than the real-time power purchase price of the power grid, generate an instruction to recommend the user to purchase electricity directly from the power grid and end the matching; The power selling user's quotation in the power selling transaction request is obtained. If the power selling user's quotation is lower than the grid-connected electricity price, an instruction is generated to recommend the user to sell electricity directly to the grid, and the matching is terminated.
7. The virtual power plant trusted distributed transaction device according to claim 6, characterized in that: The transaction matching module is further used for: If the power purchase user's offer is lower than the real-time power purchase price of the power grid, and the power sales user's offer is higher than the power grid's on-grid price, then the power purchase transaction requests and power sales transaction requests in the same demand time period are sorted; among them, the power purchase transaction requests are sorted from high to low according to the power purchase user's offer, and the highest power purchase user's offer is used as the optimal purchase price; the power sales transaction requests are sorted from low to high according to the power sales user's offer, and the lowest power sales user's offer is used as the optimal selling price; When the best buying price is greater than or equal to the best selling price, the power purchase transaction request corresponding to the best buying price is matched with the power sale transaction request corresponding to the best selling price to complete the transaction. The transaction price is the average price of the best buying price and the best selling price. Similarly, when the best buying price is lower than the best selling price, the transaction is terminated. After the transaction is completed, the unmatched power purchase transaction requests and power sales transaction requests will purchase or sell power from the large power grid.
8. The virtual power plant trusted distributed transaction device according to claim 5, characterized in that: In the transaction matching module, power purchase transaction requests and power sales transaction requests within the same virtual power plant are matched preferentially; when the power sales users of the current virtual power plant cannot meet the needs of the power purchase transaction requests, the power purchase transaction requests are matched with power sales transaction requests of other virtual power plants; when all virtual power plants cannot meet the needs of the power purchase transaction requests, the power purchase users purchase electricity from the power grid.
9. An electronic device, characterized in that: It comprises a processor and a memory, wherein the processor is used to execute a computer program stored in the memory to implement a trusted distributed transaction method for a virtual power plant as described in any one of claims 1 to 4.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction, and when the at least one instruction is executed by the processor, it implements the virtual power plant trusted distributed transaction method as described in any one of claims 1 to 4.
Citation Information
Cited By
Virtual power plant full-process credible aggregation method and system based on hierarchical trust chain
CN120955647A
