Block chain-based distributed power transaction management method, system and device, and medium
Through the blockchain-based distributed power transaction management method, point-to-point transactions are directly implemented, which solves the reliability problem in distributed power transactions, breaks down traditional transaction barriers, and improves transaction efficiency and reliability.
Patent Information
- Application Number
- CN202411123196.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-15
- Publication Date
- 2024-12-20
AI Technical Summary
In distributed power transactions, the point-to-point microgrid trading mechanism is incomplete, resulting in the inability to guarantee the reliability of the transaction process, and it is difficult to achieve trust barriers and data coordination.
Adopt a distributed power transaction management method based on blockchain, and directly implement point-to-point transactions by generating power transaction broadcast information, matching rule matching, distributed authentication and smart contract settlement.
It effectively breaks the barriers of traditional power trading, builds a new distributed power trading model, realizes power user-side management, and improves transaction reliability and efficiency.
Smart Images

Figure CN119168258A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power transaction management, and specifically to a distributed power transaction management method, system, device and medium based on blockchain. Background Art
[0002] As the technology of distributed power generation such as solar energy and wind energy becomes increasingly mature, many electricity consumers use solar photovoltaic panels, wind power and natural gas generators to generate electricity. Therefore, distributed power energy transactions represented by "new energy + Internet" are developing rapidly. At present, the roles of producers and consumers in distributed power energy transactions tend to be diversified and miniaturized. Sometimes the producers of power energy are also consumers. At the same time, distributed power transactions are usually conducted directly by power energy producers and consumers at an unfixed selling price. The traditional transaction method centered on power grid companies can no longer meet the needs of distributed power transactions. Due to the flexibility and diversity of distributed power transaction types, the reliability of the transaction process cannot be guaranteed.
[0003] With the accelerated development of the energy internet, many problems have gradually been exposed. The trust barriers between energy industries have not yet been broken, and it is difficult to achieve effective coordination and interaction between multiple links such as sources, networks, loads, and storage. The main reason is that the data trust mechanism between various entities and levels is still imperfect, especially for distributed power user-side transactions and the point-to-point microgrid transaction mechanism in the power market design, which makes it impossible to ensure the reliability of the transaction process. Summary of the invention
[0004] Aiming at the problem that the reliability of the transaction process cannot be guaranteed due to the imperfect point-to-point microgrid transaction mechanism in the existing distributed power user-side transaction and power market design, the present invention proposes a distributed power transaction management method, system, equipment and medium based on blockchain; the method first generates power transaction broadcast information according to the power transaction request, publishes it to the blockchain and broadcasts it; secondly, the power transaction request is matched according to the set power transaction matching rules, and the power transaction matching information is generated and published to the blockchain transaction platform and broadcasted; then the distributed authentication matches the successfully matched power transaction and executes the authenticated power transaction; finally, according to the power transaction smart contract obtained from the blockchain transaction platform, the power transaction settlement is executed; the power user-side management based on blockchain is realized, the hierarchical level and intermediate links of the transaction system are reduced, and the point-to-point transaction is directly realized.
[0005] The specific implementation contents of the present invention are as follows: A distributed power transaction management method based on blockchain, specifically comprising the following steps: Step S1: Generate power transaction broadcast information according to the acquired power transaction request, publish it to the blockchain and broadcast it; Step S2: Match the power transaction request according to the set power transaction matching rules, generate power transaction matching information, publish it to the blockchain transaction platform and broadcast it; Step S3: Distributed authentication matches successfully the power transaction and executes the authenticated power transaction; Step S4: Execute power transaction settlement according to the power transaction smart contract obtained from the blockchain transaction platform.
[0006] In order to better implement the present invention, further, the step S1 specifically includes the following steps: Step S11: Generate power transaction request information according to the user ID and user transaction information; Step S12: signing the power transaction request information, and generating power transaction broadcast information according to the block header information and the signed power transaction request information; Step S13: Publish the electricity transaction broadcast information to the blockchain.
[0007] In order to better implement the present invention, further, the step S2 specifically includes the following steps: Step S21: Obtaining the agreed electricity price for power trading and the electricity price for power trading; Step S22: Calculate the power transaction price difference according to the power transaction agreed price and the power transaction transaction price; Step S23: setting a power transaction matching rule according to the power transaction price difference, and matching power transaction requests within a set period according to the set power transaction matching rule; Step S24: If the match is successful, the power transaction matching information is generated and published to the blockchain transaction platform and broadcast; if the match fails, the power transaction request is modified and the matching continues. If the match is not successful within the set period, the matching fails.
[0008] In order to better implement the present invention, further, the specific operation of step S3 is: Step S31: Matching the power transaction broadcast information with the acquired power sales information; Step S32: According to the set consensus mechanism, the distributed authentication successfully matches the power transaction broadcast information corresponding to the power transaction request.
[0009] In order to better implement the present invention, further, the step S4 specifically includes the following steps: Step S41: executing power trading on the distributed authenticated power trading request according to the power trading matching result; Step S42: Settle the power transaction according to the power transaction smart contract obtained from the blockchain transaction platform.
[0010] In order to better realize the present invention, further, the specific operation of step S42 is: first, lock the account balances of the two parties to the transaction according to the smart contract obtained from the blockchain transaction platform, then encrypt the payment voucher according to the private key signature of the transaction payee and the public key of the transaction payee, and decrypt the payment voucher according to the private key of the transaction payee, and finally complete the electricity transaction settlement according to the decrypted payment voucher.
[0011] In order to better implement the present invention, further, the user transaction information includes transaction electricity amount, transaction price, and transaction time.
[0012] Based on the above-mentioned distributed power transaction management method based on blockchain, in order to better realize the present invention, further, a distributed power transaction management system based on blockchain is proposed, which is used to execute the above-mentioned distributed power transaction management method based on blockchain; including a publishing unit, a matching unit, an execution unit, and a settlement unit; The publishing unit is used to generate power transaction broadcast information according to the obtained power transaction request, publish it to the blockchain and broadcast it; The matching unit is used to match the power transaction request according to the set power transaction matching rules, generate power transaction matching information, publish it to the blockchain transaction platform and broadcast it; The execution unit is used for distributed authentication of successfully matched power transactions and executing the authenticated power transactions; The settlement unit is used to perform power transaction settlement according to the power transaction smart contract obtained from the blockchain transaction platform.
[0013] Based on the above-mentioned distributed power trading management method based on blockchain, in order to better realize the present invention, further, an electronic device is proposed, including a memory and a processor; a computer program is stored on the memory; when the computer program is executed on the processor, the above-mentioned distributed power trading management method based on blockchain is implemented.
[0014] Based on the above-mentioned distributed power trading management method based on blockchain, in order to better realize the present invention, further, a computer-readable storage medium is proposed, on which computer instructions are stored; when the computer instructions are executed on the above-mentioned electronic device, the above-mentioned distributed power trading management method based on blockchain is implemented.
[0015] The present invention has the following beneficial effects: The present invention realizes distributed power trading based on blockchain, and uses blockchain as the technical support point of the power trading platform to carry out power energy trading in the micro-energy network, effectively breaking the traditional power trading barriers; and according to the formulated power trading matching rules, a new distributed power trading model is constructed to realize blockchain-based power user-side management, reduce the hierarchical levels and intermediate links of the trading system, and directly realize point-to-point power trading. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A schematic diagram of the flow chart of the distributed power trading management method based on blockchain provided by the present invention. DETAILED DESCRIPTION
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. It should be understood that the described embodiments are only part of the embodiments of the present invention, not all of the embodiments, and therefore should not be regarded as limiting the scope of protection. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technical personnel in this field without making creative work are within the scope of protection of the present invention.
[0018] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "disposed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be an indirect connection through an intermediate medium, or it can be the internal communication of two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0019] Embodiment 1: This embodiment proposes a distributed power transaction management method based on blockchain, which specifically includes the following steps: Step S1: Generate power transaction broadcast information based on the acquired power transaction request, publish it to the blockchain and broadcast it.
[0020] The step S1 specifically includes the following steps: Step S11: Generate power transaction request information according to the user ID and user transaction information; Furthermore, the user transaction information includes transaction electricity amount, transaction price, and transaction time.
[0021] Step S12: signing the power transaction request information, and generating power transaction broadcast information according to the block header information and the signed power transaction request information; Step S13: Publish the electricity transaction broadcast information to the blockchain.
[0022] Step S2: Match the power transaction request according to the set power transaction matching rules, generate power transaction matching information, publish it to the blockchain transaction platform and broadcast it.
[0023] The step S2 specifically includes the following steps: Step S21: Obtaining the agreed electricity price for power trading and the electricity price for power trading; Step S22: Calculate the power transaction price difference according to the power transaction agreed price and the power transaction transaction price; Step S23: setting a power transaction matching rule according to the power transaction price difference, and matching power transaction requests within a set period according to the set power transaction matching rule; Step S24: If the match is successful, the power transaction matching information is generated and published to the blockchain transaction platform and broadcast; if the match fails, the power transaction request is modified and the matching continues. If the match is not successful within the set period, the matching fails.
[0024] Step S3: Distributed authentication matches successfully the electricity transaction and executes the authenticated electricity transaction.
[0025] Step S4: Execute power transaction settlement according to the power transaction smart contract obtained from the blockchain transaction platform.
[0026] Furthermore, the specific operations of step S3 are: Step S31: Matching the power transaction broadcast information with the acquired power sales information; Step S32: According to the set consensus mechanism, the distributed authentication successfully matches the power transaction broadcast information corresponding to the power transaction request.
[0027] Furthermore, the step S4 specifically includes the following steps: Step S41: executing power trading on the distributed authenticated power trading request according to the power trading matching result; Step S42: Settle the power transaction according to the power transaction smart contract obtained from the blockchain transaction platform.
[0028] Furthermore, the specific operation of step S42 is: first, lock the account balances of both parties to the transaction according to the smart contract obtained from the blockchain transaction platform, then encrypt the payment voucher according to the private key signature of the transaction payee and the public key of the transaction payee, and decrypt the payment voucher according to the private key of the transaction payee, and finally complete the electricity transaction settlement according to the decrypted payment voucher.
[0029] Working principle: This embodiment first generates power transaction broadcast information according to the power transaction request, publishes it to the blockchain and broadcasts it; secondly, it matches the power transaction request according to the set power transaction matching rules, generates power transaction matching information, publishes it to the blockchain transaction platform and broadcasts it; then, distributed authentication matches the successfully matched power transaction, and executes the authenticated power transaction; finally, according to the power transaction smart contract obtained from the blockchain transaction platform, executes the power transaction settlement; realizes the blockchain-based power user-side management, reduces the hierarchical level and intermediate links of the transaction system, and directly realizes point-to-point power transactions.
[0030] Embodiment 2: This embodiment is based on the above embodiment 1. Figure 1 As shown, a specific embodiment is described in detail, which specifically includes the following steps.
[0031] Step S1: The two parties to the power transaction issue a power transaction request based on demand, sign the transaction request and publish it to the blockchain, and broadcast it. The broadcasted transaction request information includes the user identification, i.e., user ID, transaction volume, transaction price, and transaction time. The generated power transaction broadcast information includes the block header information, i.e., block version number, timestamp and random number, as well as the signed transaction request information.
[0032] Step S2: According to the set transaction matching rules, the power transaction requests obtained in the blockchain power trading platform within a certain period of time are matched, and the power transaction smart contract is combined to promote power transaction matching; the successfully matched power transactions are broadcast to the blockchain trading platform, the transaction requests of the failed power transactions are modified, and the modified power transaction requests are matched again until the match is successful. If the match is not successful at the end of the set transaction matching time, the transaction matching in this cycle fails.
[0033] The specific power transaction matching rules include: G min =G i,a -G j,b Among them, G min is the price difference of electricity trading, G min ≥0, G i,a The electricity price is agreed upon for power trading, G j,b is the electricity price of electricity trading, i and j are blockchain nodes.
[0034] Step S3: The successfully matched power transactions are distributedly authenticated. The broadcast matching information needs to undergo consensus voting and signature authentication. During the distributed authentication, the power transaction request and power sales information are matched, and the successfully matched information is further distributedly authenticated according to the set consensus constraints.
[0035] The consensus constraint set in this embodiment is that the authentication is successful if more than 50% of the blockchain nodes agree to the power transaction.
[0036] Step S4: The power transaction smart contract obtained from the blockchain transaction platform will execute the power transaction according to the power transaction matching result of the successfully authenticated power transaction request, and conduct the power transaction settlement. During the power transaction settlement process, the account balances of both parties to the power transaction are locked according to the power transaction smart contract. The power transaction payer signs with its own private key and encrypts it with the public key of the power transaction payee, and sends it to the power transaction payee. The power transaction payee uses its own private key to decrypt the payer's certificate, completes the transaction settlement, and unlocks the accounts of both parties to the transaction.
[0037] Working principle: This embodiment realizes distributed power trading based on blockchain, and uses blockchain as the technical support point of the power trading platform to carry out power energy trading in the micro-energy network, effectively breaking the traditional power trading barriers; and according to the formulated power trading matching rules, a new distributed power trading model is constructed to realize blockchain-based power user-side management, reduce the hierarchical levels and intermediate links of the trading system, and directly realize point-to-point power trading.
[0038] The other parts of this embodiment are the same as those of the above-mentioned embodiment 1, and thus will not be described in detail.
[0039] Embodiment 3: This embodiment, based on any one of the above-mentioned embodiments 1 to 2, proposes a distributed power transaction management system based on blockchain, which is used to execute the above-mentioned distributed power transaction management method based on blockchain; it includes a publishing unit, a matching unit, an execution unit, and a settlement unit; The publishing unit is used to generate power transaction broadcast information according to the obtained power transaction request, publish it to the blockchain and broadcast it; The matching unit is used to match the power transaction request according to the set power transaction matching rules, generate power transaction matching information, publish it to the blockchain transaction platform and broadcast it; The execution unit is used for distributed authentication of successfully matched power transactions and executing the authenticated power transactions; The settlement unit is used to perform power transaction settlement according to the power transaction smart contract obtained from the blockchain transaction platform.
[0040] This embodiment also proposes an electronic device, including a memory and a processor; a computer program is stored on the memory; when the computer program is executed on the processor, the above-mentioned blockchain-based distributed power trading management method is implemented.
[0041] This embodiment also proposes a computer-readable storage medium, on which computer instructions are stored; when the computer instructions are executed on the above-mentioned electronic device, the above-mentioned blockchain-based distributed power trading management method is implemented.
[0042] The other parts of this embodiment are the same as any of the above-mentioned embodiments 1 to 2, and thus will not be described in detail.
[0043] The processor involved in the embodiments of the present application may be a chip. For example, it may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD), or other integrated chips.
[0044] The memory involved in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0045] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0046] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0047] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0048] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0049] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one device or distributed on multiple devices. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.
[0050] In addition, each functional module in each embodiment of the present application may be integrated into one device, or each module may exist physically separately, or two or more modules may be integrated into one device.
[0051] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or may include one or more servers, data centers and other data storage devices that can be integrated with the medium. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).
[0052] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A distributed power transaction management method based on blockchain, characterized in that: The specific steps include: Step S1: Generate power transaction broadcast information based on the obtained power transaction request, publish it to the blockchain and broadcast it; Step S2: Match the power transaction request according to the set power transaction matching rules, generate power transaction matching information, publish it to the blockchain transaction platform and broadcast it; Step S3: Distributed authentication matches successfully the power transaction and executes the authenticated power transaction; Step S4: Execute power transaction settlement according to the power transaction smart contract obtained from the blockchain transaction platform.
2. A distributed power transaction management method based on blockchain according to claim 1, characterized in that: The step S1 specifically includes the following steps: Step S11: Generate power transaction request information based on user ID and user transaction information; Step S12: Sign the power transaction request information, and generate power transaction broadcast information based on the block header information and the signed power transaction request information; Step S13: Publish the electricity transaction broadcast information to the blockchain.
3. A distributed power transaction management method based on blockchain according to claim 2, characterized in that: The step S2 specifically includes the following steps: Step S21: Obtaining the agreed electricity price and the transaction price of electricity; Step S22: Calculate the power transaction price difference based on the power transaction agreed price and the power transaction transaction price; Step S23: setting power transaction matching rules according to the power transaction price difference, and matching power transaction requests within a set period according to the set power transaction matching rules; Step S24: If the match is successful, the power transaction matching information is generated and published to the blockchain transaction platform and broadcast; if the match fails, the power transaction request is modified and the matching continues. If the match is not successful within the set period, the matching fails.
4. A distributed power transaction management method based on blockchain according to claim 1, characterized in that: The specific operations of step S3 are: Step S31: Matching the power transaction broadcast information with the acquired power sales information; Step S32: According to the set consensus mechanism, the distributed authentication successfully matches the power transaction broadcast information corresponding to the power transaction request.
5. A distributed power transaction management method based on blockchain according to claim 1, characterized in that: The step S4 specifically includes the following steps: Step S41: executing power trading according to the power trading matching result based on the distributed authenticated power trading request; Step S42: Settle the power transaction according to the power transaction smart contract obtained from the blockchain transaction platform.
6. A distributed power transaction management method based on blockchain according to claim 5, characterized in that: The specific operations of step S42 are: first, locking the account balances of both parties to the transaction according to the smart contract obtained from the blockchain transaction platform, then encrypting the payment voucher according to the private key signature of the transaction payee and the public key of the transaction payee, and decrypting the payment voucher according to the private key of the transaction payee, and finally completing the electricity transaction settlement according to the decrypted payment voucher.
7. A distributed power transaction management method based on blockchain according to claim 2, characterized in that: The user transaction information includes transaction power, transaction price, and transaction time.
8. A distributed power transaction management system based on blockchain, used to implement the distributed power transaction management method based on blockchain as claimed in claim 1; characterized in that: Includes publishing unit, matching unit, execution unit, and settlement unit; The publishing unit is configured to generate power transaction broadcast information based on the obtained power transaction request, publish the information to the blockchain, and broadcast the information; The matching unit is configured to match power transaction requests according to a set power transaction matching rule, generate power transaction matching information, publish it to the blockchain transaction platform, and broadcast it; The execution unit is used for distributed authentication of successfully matched power transactions and executing the authenticated power transactions; The settlement unit is used to perform power transaction settlement based on the power transaction smart contract obtained from the blockchain transaction platform.
9. An electronic device, characterized in that: It includes a memory and a processor; a computer program is stored on the memory; when the computer program is executed on the processor, the distributed power transaction management method based on blockchain as described in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions; when the computer instructions are executed on the electronic device as described in claim 9, the blockchain-based distributed power trading management method as described in any one of claims 1 to 7 is implemented.
