CN-122023010-A - Block chain-based electric carbon transaction method and device
Abstract
The invention discloses an electric carbon transaction method and device based on a blockchain, belonging to the field of electric carbon transaction, wherein the method comprises the steps of executing first verification on a first transaction public key of a buyer and a second transaction public key of a seller based on a first database; the method comprises the steps of receiving a first transaction commitment, a first balance commitment, a first proving tuple and a second proving tuple submitted by a buyer, receiving a second transaction commitment, a second balance commitment and a third proving tuple submitted by a seller, respectively executing second verification on the first proving tuple and the third proving tuple, executing third verification on the second proving tuple, updating a value corresponding to a first transaction public key in a second database according to the first balance commitment, and updating a value corresponding to the second transaction public key in the second database according to the second balance commitment. Therefore, by implementing the invention, the enterprises participating in the electric carbon transaction can be anonymously processed on the premise of meeting the real-name supervision requirement, and the sensitive asset attributes such as the electric carbon quota balance, the fund balance and the like can be effectively protected.
Inventors
- CHEN KE
- ZHAO XINZHE
- CHEN SHAN
- Ying Zhangchi
- CHAI LIN
- ZHANG JIANSONG
Assignees
- 国网浙江省电力有限公司信息通信分公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260414
Claims (10)
- 1. A blockchain-based electric carbon transaction method, adapted for deployment on a blockchain smart contract, the electric carbon transaction method comprising: Performing a first verification of a first transaction public key of the buyer and a second transaction public key of the seller based on a first database, wherein the first database is used for storing the transaction public key of the enterprise that completes registration; After the first verification is passed, receiving a first transaction commitment and a first balance commitment submitted by the buyer, and a second transaction commitment and a second balance commitment submitted by the seller, wherein the first transaction commitment and the first balance commitment are constructed based on transaction funds, post-transaction funds balance and public cryptographic parameters of the buyer; Receiving a first proving tuple and a second proving tuple submitted by the buyer, and a third proving tuple submitted by the seller; the first proving tuple is used for proving that the transaction funds and the post-transaction funds balance are within a preset numerical range, the second proving tuple is used for proving that the multiplication of the transaction electric carbon quota and the preset unit price is equal to the transaction funds, and the third proving tuple is used for proving that the transaction electric carbon quota and the post-transaction electric carbon quota balance are within the preset numerical range; And respectively executing second verification on the first proving tuple and the third proving tuple, executing third verification on the second proving tuple, updating a value corresponding to the first transaction public key in a second database according to the first balance commitment after the second verification and the third verification are passed, and updating a value corresponding to the second transaction public key in the second database according to the second balance commitment to complete the electric carbon transaction of an enterprise on a blockchain, wherein the second database is used for storing the fund balance commitment and the electric carbon quota balance commitment of the enterprise which are completed to be registered.
- 2. The blockchain-based electric carbon transaction method of claim 1, wherein the performing a first verification of a first transaction public key of a buyer and a second transaction public key of a seller based on a first database comprises: And comparing the first transaction public key and the second transaction public key with the transaction public keys stored in the first database, and if the transaction public key which is the same as the first transaction public key exists in the first database and the transaction public key which is the same as the second transaction public key exists in the first database, the first verification is passed.
- 3. The blockchain-based electric carbon transaction method of claim 1, further comprising an enterprise registration prior to the first verification of the buyer's first transaction public key and the seller's second transaction public key based on the first database, in particular: submitting a true identity and a compliance certificate to a supervisor so that the supervisor performs fourth verification on the true identity and the compliance certificate, and storing the true identity in a third database after the fourth verification is passed; respectively constructing a Pedersen commitment based on the fund balance and the electric carbon quota balance, correspondingly obtaining a first commitment and a second commitment, submitting the first commitment and the second commitment to the supervision party, enabling the supervision party to execute a fifth verification on the first commitment and the second commitment, and generating a group credential after the fifth verification is passed, wherein the group credential comprises credential elements constructed based on the real identity, the first commitment and the second commitment; And randomly generating a transaction private key and a transaction public key corresponding to the transaction private key, constructing a credential tuple based on the transaction private key, the transaction public key and the group credential and submitting the credential tuple to the intelligent contract so that the intelligent contract performs sixth verification on the credential tuple, and performing state updating of the first database and the second database based on the credential tuple after the sixth verification is passed so as to finish registration of an enterprise on a blockchain.
- 4. A blockchain-based electric carbon transaction method as in claim 3, wherein the performing a state update of the first database and the second database based on the credential tuple after the sixth validation passes comprises: The credential elements and the public key of the credential tuples are stored as key-value pairs in the first database, and the public key of the transaction in the credential tuples and the tuple comprising the first commitment and the second commitment are stored as key-value pairs in the second database.
- 5. The blockchain-based electric carbon transaction method of claim 3, wherein the receiving the first transaction commitment and the first balance commitment submitted by the buyer and the second transaction commitment and the second balance commitment submitted by the seller after the first verification is passed comprises: the buyer constructs a first transaction commitment based on a first blinding factor, transaction funds and a generating tuple, and constructs a first balance commitment based on a second blinding factor, a post-transaction funds balance and the generating tuple, wherein the generating tuple belongs to a public cryptography parameter issued by the supervisor; The seller constructs a second transaction commitment based on a third blinding factor, the transaction electric carbon quota and the generation tuple, and constructs a second balance commitment based on a fourth blinding factor, the post-transaction electric carbon quota balance and the generation tuple; Encrypting the first blinding factor and the transaction funds by the buyer by adopting the second transaction public key to obtain a first encryption tuple, and submitting the first transaction commitment, the first balance commitment and the first encryption tuple to the intelligent contract; and the seller encrypts the third blinding factor and the transaction electric carbon quota by adopting the first transaction public key to obtain a second encryption tuple, and submits the second transaction commitment, the second balance commitment and the second encryption tuple to the intelligent contract.
- 6. The blockchain-based electric carbon transaction method of claim 5, wherein the receiving the first and second attestation tuples submitted by the buyer and the third attestation tuple submitted by the seller comprises: The buyer constructs a first commitment tuple based on the transacted funds, the post-transacted funds balance and the generation tuple, constructs a second commitment tuple based on the first transacted commitment, the second transacted commitment, the preset unit price and the generation tuple; The buyer generates a first challenge tuple and a second challenge tuple respectively by adopting a hash function based on the first commitment tuple and the second commitment tuple, and the seller generates a third challenge tuple by adopting a hash function based on the third commitment tuple; The buyer constructs a first attestation tuple based on the first commitment tuple and the first challenge tuple, constructs a second attestation tuple based on the second commitment tuple and the second challenge tuple, and constructs a third attestation tuple based on the third commitment tuple and the third challenge tuple.
- 7. The blockchain-based electrical carbon transaction method of claim 6, wherein performing a second validation on the first and third attestation tuples, respectively, and performing a third validation on the second attestation tuple comprises: reconstructing based on the first, second and third attestation tuples, respectively obtaining a fourth, fifth and sixth challenge tuples; substituting the first proving tuple and the fourth challenge tuple into a preset first cryptography formula group, and if the first cryptography formula group is established, passing the second verification aiming at the first proving tuple; substituting the third proving tuple and the sixth challenge tuple into a preset first cryptographic formula group, and if the first cryptographic formula group is established, passing the second verification aiming at the third proving tuple; Substituting the second proving tuple and the fifth challenge tuple into a preset second cryptography formula group, and if the second cryptography formula group is established, passing the third verification aiming at the second proving tuple.
- 8. The blockchain-based electric carbon transaction method of claim 4, wherein updating the value corresponding to the first transaction public key in a second database according to the first balance commitment and updating the value corresponding to the second transaction public key in the second database according to the second balance commitment to complete the electric carbon transaction of the enterprise on the blockchain comprises: Updating a first commitment in a tuple containing the first commitment and a second commitment corresponding to the first transaction public key in the second database to the first balance commitment; updating a second commitment in a tuple comprising the first commitment and the second commitment corresponding to the second transaction public key in the second database to the second balance commitment.
- 9. The blockchain-based electric carbon transaction method of claim 4, further comprising a supervisor performing a supervision traceability after the completion of the electric carbon transaction of the enterprise on the blockchain, specifically: Inquiring in the first database according to a transaction public key used in a first abnormal transaction to obtain a credential element corresponding to the transaction public key, and inquiring in the third database according to the credential element to obtain a real identity corresponding to the credential element; Receiving a transaction private key of a first enterprise corresponding to the real identity, acquiring all transaction parameters related to the transaction public key, executing seventh verification based on the transaction private key and the transaction parameters, and reconstructing a fund balance sequence and an electric carbon quota balance sequence after the seventh verification is passed; And constructing a transaction behavior map based on the fund balance sequence and the electric carbon quota balance sequence, executing abnormal recognition based on the transaction behavior map, recognizing all second abnormal transactions participated by the first enterprise, and performing supervision tracing on all second enterprises involved in all second abnormal transactions.
- 10. The electric carbon transaction device based on the blockchain is characterized by being suitable for intelligent contracts deployed on the blockchain, and comprises an identity verification module, a promise construction module, a zero knowledge proof module and an electric carbon transaction module; The identity verification module is used for executing first verification on the first transaction public key of the buyer and the second transaction public key of the seller based on a first database, wherein the first database is used for storing the transaction public key of the enterprise which completes registration; The commitment construction module is used for receiving a first transaction commitment and a first balance commitment submitted by the buyer and a second transaction commitment and a second balance commitment submitted by the seller after the first verification is passed, wherein the first transaction commitment and the first balance commitment are constructed based on transaction funds, post-transaction funds balance and public cryptographic parameters of the buyer, and the second transaction commitment and the second balance commitment are constructed based on transaction carbon quota, post-transaction carbon quota balance and the public cryptographic parameters of the seller; The zero-knowledge proof module is used for receiving a first proof tuple and a second proof tuple submitted by the buyer and a third proof tuple submitted by the seller, wherein the first proof tuple is used for proving that the transaction funds and the post-transaction funds balance are in a preset numerical range, the second proof tuple is used for proving that the multiplication of the transaction electric carbon quota and a preset unit price is equal to the transaction funds, and the third proof tuple is used for proving that the transaction electric carbon quota and the post-transaction electric carbon quota balance are in a preset numerical range; The electric carbon transaction module is used for respectively executing second verification on the first proving tuple and the third proving tuple, executing third verification on the second proving tuple, updating a value corresponding to the first transaction public key in a second database according to the first balance commitment after the second verification and the third verification are passed, and updating a value corresponding to the second transaction public key in the second database according to the second balance commitment to finish electric carbon transaction of an enterprise on a blockchain, wherein the second database is used for storing a fund balance commitment and an electric carbon quota balance commitment of the enterprise which finish registration.
Description
Block chain-based electric carbon transaction method and device Technical Field The invention relates to the field of electric carbon transaction, in particular to an electric carbon transaction method and device based on a blockchain. Background Carbon quota is a tradable emissions asset, not only an important credential for enterprises to fulfill the relief obligations, but also an important economic tool reflecting carbon emissions costs and environmental value. Along with the increase of the clean energy duty ratio and the quickening of the energy structure adjustment, the carbon quota transaction mechanism is introduced into an electric carbon transaction mode in the electric power transaction process, the carbon emission cost is directly embedded into an electric power transaction link, the market main body is guided to optimize the energy utilization structure and the production mode, and the energy conservation and emission reduction targets are realized. The electric carbon trade market is generally formulated by a supervision organization into quota allocation and trade rules, a trade platform provides matching and settlement services, and enterprises conduct quota buying and selling according to self production plans and emission conditions. In recent years, with diversification of market participants and expansion of trade scale, electric carbon trade is being developed toward digitization, automation and intellectualization to improve trade efficiency, enhance transparency and support more refined regulatory requirements. In this context, the industry has begun to explore the introduction of various digitization and informatization techniques in electrical carbon transaction systems to meet the requirements of security, compliance, and efficient operation. For example, in the aspect of transaction data recording and storage, a distributed database, a log tamper-proof technology and a redundant storage strategy are adopted to improve data reliability and verifiability, in the aspect of information transmission, an encryption communication protocol and a security authentication mechanism are used to ensure confidentiality and integrity of data in the transmission process, in the aspect of market operation and supervision, functions such as real-time monitoring, anomaly detection and automatic rule matching are deployed so as to discover potential risks in real time in the transaction execution process, and in the aspect of platform management, audit logs, authority grading and operation trace-keeping mechanisms are integrated to provide technical support for subsequent dispute handling and compliance checking. The general technical means lays a foundation for the digital development of the electric carbon trade market, so that the platform can realize safe and controllable operation and basic risk prevention capability to a certain extent. When the conventional electric carbon transaction system is designed, real-name management is generally adopted for the purpose of preventing illegal transactions, so that a supervision and management organization can directly check the identity of a transaction main body, but core business information such as carbon quota balance and fund balance of an enterprise can be easily obtained in the process of transaction matching and settlement, and the risk of leakage of business confidentiality exists. In order to avoid information leakage, some schemes introduce complete anonymization processing to completely hide transaction details and participant identities on a chain, but the method can lead a supervision party to be unable to trace transaction main bodies and asset sources when facing risks such as money laundering, excessive transaction or fictional assets, and the supervision capability is weakened. Although the partial improvement scheme combines the technologies of on-chain evidence storage, encryption signature or multiparty security calculation and the like, compliance verification still depends on manual or centralized logic, and lacks the capability of efficiently verifying transaction funds, carbon quota quantity and proportional relation thereof in a ciphertext state, so that loopholes are left for matching results of data tampering and unilateral counterfeiting. Meanwhile, the schemes lack encryption binding and consistency verification mechanisms for multiple asset attributes, and do not establish a complete flow of revealing anonymous identities, verifying the authenticity of registered assets and carrying out suspicious transaction analysis by combining historical data under legal authorization conditions, so that a supervisor often lacks timely and reliable technical means when processing abnormal transactions. Disclosure of Invention The invention provides an electric carbon transaction method and device based on a blockchain, which can realize anonymous processing on enterprises participating in electric carbon transaction and effectively pr