Carbon quota transaction method and device based on block chain, equipment and medium
By using the Transformer model and BiLSTM neural network to build the TBLT payment mechanism in carbon emission trading, the problem of unreliability of cross-chain information is solved, and the security of transactions and the healthy operation of the market is improved.
Patent Information
- Application Number
- CN202510168717.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-17
- Publication Date
- 2025-05-16
AI Technical Summary
The existing cross-chain carbon emission trading technology faces the problem of unreliability of information, which may seriously disrupt the normal operation of the market.
The TBLT payment mechanism built on the Transformer model and BiLSTM neural network is used to verify the payment data to ensure the authenticity and security of the information.
Through the TBLT payment mechanism, the authenticity and security of cross-chain information are improved, and the healthy operation and effectiveness of the carbon quota market are maintained.
Smart Images

Figure CN120013668A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of carbon emission trading technology, and in particular to a blockchain-based carbon quota trading method, device, equipment and medium. Background Art
[0002] As the global climate change problem becomes increasingly serious, effective emission reduction measures are becoming increasingly important. Carbon emission trading has emerged as a market-based emission reduction method. This trading system commercializes carbon emission rights, allowing companies to buy and sell emission rights in the market, thereby encouraging companies to reduce greenhouse gas emissions through economic incentives.
[0003] Blockchain technology provides a safe, reliable, efficient, convenient, open and inclusive platform suitable for the implementation of the carbon quota trading market. The immutable, encrypted and secure distributed ledger on the blockchain allows for the reliable issuance and tracking of carbon quotas, ensuring the authenticity of transactions and the integrity of data, thereby avoiding data tampering and fraud. The current cross-chain carbon emission trading technology faces the problem of cross-chain calls for unreliable information, which may seriously disrupt the normal operation of the market.
[0004] It can be seen that how to enhance the reliability of cross-chain transactions of carbon emissions has become a technical problem that needs to be urgently solved by technicians in this field. Summary of the invention
[0005] The present invention provides a carbon quota trading method, device, equipment and medium based on blockchain to improve the security and reliability in the carbon quota trading process.
[0006] In order to solve the above technical problems, an embodiment of the present invention provides a carbon quota trading method based on blockchain, including:
[0007] In response to the carbon quota trading request sent by the target user, the identity information of the target user is verified.
[0008] The carbon quota transaction request that has passed identity authentication is matched, a carbon quota transaction order is generated, and the carbon quota transaction order is returned to the target user.
[0009] In response to the payment data sent by the target user, the payment data is verified based on a TBLT payment mechanism, wherein the TBLT payment mechanism is constructed according to a Transformer model and a BiLSTM neural network.
[0010] Verify the carbon quota transaction results corresponding to the verified payment data.
[0011] Furthermore, in response to the carbon quota trading request sent by the target user, verifying the identity information of the target user includes:
[0012] After receiving the carbon quota transaction request sent by the target user, the server verifies the identity code, private key, public key, identity certificate and account address in the transaction request. If the verification fails, the carbon quota transaction request is rejected and verification failure information is returned.
[0013] Furthermore, matching the carbon quota transaction request that has passed identity authentication, generating a carbon quota transaction order, and returning the carbon quota transaction order to the target user includes:
[0014] According to the carbon quota trading request, a carbon emission quota that meets the conditions is matched in the carbon quota trading library.
[0015] After the match is successful, a carbon quota transaction order is generated according to the information of the two transaction parties, the carbon quota transaction order is sent to the target user, and a match success message is returned.
[0016] Further, in response to the payment data sent by the target user, verifying the payment data based on the TBLT payment mechanism includes:
[0017] The historical transaction data of the target user is obtained, and the payment data and the historical transaction data are input into a Transformer model to obtain transaction record relationship data of the target user.
[0018] The payment data and the historical transaction data are input into the BiLSTM neural network to obtain the transaction record time series information data of the target user.
[0019] The transaction record feature data and the transaction record time series information data are integrated through Transformer-Decoder and input into a deep neural network to obtain the transaction feature data of the target user.
[0020] The payment data is verified according to the transaction characteristic data. If the verification fails, the payment data is rejected and payment failure information is returned.
[0021] Further, the verifying the payment data according to the transaction characteristic data includes:
[0022] The transaction feature data is input into a Softmax classifier to identify abnormal carbon transactions, and whether the payment data is abnormal is determined based on the identification result.
[0023] Furthermore, the verification of the carbon quota transaction result corresponding to the verified payment data includes:
[0024] After the verification is passed, the carbon emission quota corresponding to the carbon quota trading order is burned, and the corresponding carbon emission quota is deducted from the seller's account.
[0025] Furthermore, the method further comprises:
[0026] During the carbon quota trading process, the data information in the blockchain transaction records is saved and a transaction report is generated.
[0027] Another embodiment of the present invention provides a carbon quota trading device based on blockchain, comprising:
[0028] The identity authentication module is used to verify the identity information of the target user in response to the carbon quota trading request sent by the target user.
[0029] The order generation module is used to match the carbon quota transaction request that has passed identity authentication, generate a carbon quota transaction order, and return the carbon quota transaction order to the target user.
[0030] A payment verification module is used to verify the payment data sent by the target user based on a TBLT payment mechanism in response to the payment data, wherein the TBLT payment mechanism is constructed according to a Transformer model and a BiLSTM neural network.
[0031] The result verification module is used to verify the carbon quota transaction results corresponding to the verified payment data.
[0032] Another embodiment of the present invention provides a computer device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the blockchain-based carbon quota trading method as described above is implemented.
[0033] Yet another embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein when the device where the computer-readable storage medium is located executes the computer program, the blockchain-based carbon quota trading method as described above is implemented.
[0034] Compared with the prior art, the embodiments of the present invention have the following advantages:
[0035] A TBLT security authentication mechanism based on the Transformer model and BiLSTM neural network is established, taking into account the connection between different features and the temporal characteristics of the features, ensuring the authenticity and security of cross-chain information and maintaining the healthy operation and effectiveness of the carbon quota market. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 A flowchart of the steps of the blockchain-based carbon quota trading method provided in an embodiment of the present invention;
[0037] Figure 2 A structural diagram of a TBLT-based payment mechanism provided in an embodiment of the present invention;
[0038] Figure 3 A structural block diagram of a carbon quota trading device based on blockchain provided in an embodiment of the present invention;
[0039] Figure 4 A structural diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0040] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. The purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0041] In the description of this application, the terms "first", "second", "third", etc. are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first", "second", "third", etc. may explicitly or implicitly include one or more of the feature. In the description of this application, unless otherwise specified, "plurality" means two or more.
[0042] In the description of the present application, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "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 indirectly connected through an intermediate medium, or it can be a connection between the two elements. The terms "vertical", "horizontal", "left", "right", "upper", "lower" and similar expressions used herein are only for illustrative purposes, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0043] In the description of this application, it should be noted that, unless otherwise defined, all technical and scientific terms used in the present invention have the same meaning as those commonly understood by those skilled in the art. The terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood by specific circumstances.
[0044] An embodiment of the present invention provides a carbon quota trading method based on blockchain. For details, please refer to Figure 1 , Figure 1 The flowchart of the carbon quota trading method based on blockchain in one embodiment of the present invention includes steps S11 to S14:
[0045] Step S11, in response to the carbon quota trading request sent by the target user, verify the identity information of the target user.
[0046] After receiving the carbon quota transaction request sent by the target user, the server verifies the user identity data in the transaction request.
[0047] Specifically, in the carbon quota trading market, when target users such as emission-controlled enterprises join the carbon quota trading market, they need to register with the government department to become a legal trading entity. User i’s real identity code is ID i After registering and joining the carbon quota trading system, you will get a private key SK on the chain C (CChain) i C 、Public key PK on chain C i C And proof of identity Cert i At the same time, the system will also generate the account address Addr on the user chain C i C , thus forming the user's information set {ID i ,SK i C ,PK i C ,Cert i ,Addr i C}, this information is used to verify the transaction entity and ensure the security and effectiveness of the transaction.
[0048] If the verification fails, the carbon quota trading request is rejected and verification failure information is returned.
[0049] Step S12, matching the carbon quota transaction request that has passed identity authentication, generating a carbon quota transaction order, and returning the carbon quota transaction order to the target user.
[0050] Specifically, according to the carbon quota trading request, a carbon emission quota that meets the conditions is matched in the carbon quota trading library.
[0051] After the match is successful, a carbon quota transaction order is generated according to the information of the two transaction parties, the carbon quota transaction order is sent to the target user, and a match success message is returned.
[0052] Step S13, in response to the payment data sent by the target user, verifying the payment data based on the TBLT payment mechanism, wherein the TBLT payment mechanism is constructed according to the Transformer model and the BiLSTM neural network.
[0053] The cross-chain trusted carbon quota trading platform based on blockchain mainly consists of three parts, including the carbon trading chain, the payment chain, and the verification chain. The carbon trading chain mainly records the user's carbon quota transfer and balance information, and its main function is to conduct carbon quota auctions and government departments to allocate carbon quotas. In this process, the carbon trading chain ensures that each user's carbon quota transactions are recorded transparently and accurately, avoiding the confusion and opacity of accounts that may occur in traditional transactions. The payment chain mainly records the user's payment information using carbon tokens, and generates corresponding Merkel proofs to verify the payment results. The payment chain plays an important role in the entire mechanism, ensuring the security and credibility of cross-chain payments by generating and verifying Merkel proofs. Each transaction is encrypted and verified to ensure that the payment information cannot be tampered with and is transparent. In this way, users can make carbon token payments with confidence, ensuring that each payment is effectively recorded and verified. The verification chain verifies the carbon emission data of emission-controlled enterprises based on smart contracts and burns their carbon quotas to offset carbon emissions. The verification chain automatically executes the verification process through smart contracts to ensure that the carbon emission data of the controlled enterprises are authentic and reliable. The design of this part ensures the fairness and impartiality of the entire system. Through strict verification mechanisms and smart contracts, it ensures that each participant fulfills their carbon emission and carbon fixation obligations in accordance with regulations.
[0054] Specifically, the TBLT mechanism used by the payment chain in this embodiment is as follows: Figure 2 As shown, the transaction platform obtains the historical transaction data of the target user, inputs the payment data and the historical transaction data into the Transformer model, and obtains the transaction record relationship data of the target user.
[0055] The payment data and the historical transaction data are input into the BiLSTM neural network to obtain the transaction record time series information data of the target user.
[0056] The transaction record feature data and the transaction record time series information data are integrated through Transformer-Decoder and input into a deep neural network to obtain the transaction feature data of the target user.
[0057] The transaction feature data is input into the Softmax classifier to identify abnormal carbon transactions, and whether the payment data is abnormal is determined based on the identification result. If the data is abnormal, the verification fails, the server rejects the payment data, and returns payment failure information.
[0058] The above payment data verification process based on TBLT payment mechanism is as follows: Figure 2 The structure shown in the figure is implemented, the seller publishes the auction information of carbon quota on the transaction chain, and the buyer participates in the auction and reaches a transaction through the smart contract. At this time, the transaction contract will first generate a carbon quota transaction request. When the payment verification mechanism receives the transaction request, it will generate a payment query request Req q={C2,Q}, where q is the query request body, which includes the information query target chain C2 (i.e., the payment chain) and the specific content of the query request Q. Subsequently, the seller and buyer need to use their private keys on the C2 chain and Sign the payment query request q and get and compare it with the request q and the identity code ID of both a 、ID b They are sent together to the TBLT security certification mechanism model for abnormal carbon trading review.
[0059] The Transformer model is combined with the BiLSTM neural network in the TBLT security authentication mechanism. After obtaining the user's historical transaction data based on the user information, the data is first input into the Transformer-Encoder module to preliminarily establish the connection between different transaction records and different features, and extract richer feature information through multi-head attention. The encoded data is then input into the BiLSTM neural network to obtain the connection between the previous and subsequent transaction records and features to retain the timing information. Then, the data is input into the Transformer-Decoder module, the data is integrated with the timing information, and the features are further extracted through DNN and the Softmax classifier is used to classify and identify abnormal carbon transactions to obtain the final result. The TBLT security authentication model draws on the advantages of each model, while considering the connection between different features and the timing information of the features.
[0060] Long Short-Term Memory (LSTM) is a special recurrent neural network (RNN) designed to solve the common long-distance information loss problem in long-sequence data processing, while effectively alleviating the gradient explosion and gradient vanishing problems in traditional RNN. Bidirectional Long Short-Term Memory (BiLSTM) further expands this capability. It consists of a forward LSTM and a reverse LSTM, which can process the forward and backward information of the sequence at the same time, integrate context from both directions, and provide a more comprehensive understanding of the time series. After receiving the input data, it is input into the forward network and the reverse network respectively, and then the results of the two are spliced.
[0061] After the TBLT security authentication model conducts a security review of the carbon transaction corresponding to the payment information query request, it sets the VER flag to indicate whether the security review has passed. The query request is then sent to the payment chain to request payment information. After the payment chain receives the payment information query request, it uses the identity code to query the public keys of both parties. and And verify the signature. According to the request, get the payment details Info (pay ab ) and generates its Merkle proof MK(Info(pay ab )). The payment chain sends both back to the transaction chain, and after verification, the carbon quota is sent to the buyer.
[0062] Step S14, verifying the carbon quota transaction result corresponding to the verified payment data.
[0063] Specifically, after the verification is passed, the carbon emission quota corresponding to the carbon quota trading order is burned, and the corresponding carbon emission quota is deducted from the seller's account.
[0064] During the transaction process, the carbon trading chain, payment chain and verification chain will keep transaction records, including transaction time, transaction parties, transaction quantity, transaction price and other information.
[0065] Generate a transaction report based on the data in the transaction record for traders and relevant personnel to check.
[0066] Examples of implementation methods:
[0067] First, users need to authenticate their identities. In the carbon quota auction process, user A initiates the auction and transfers the sold carbon quota to the contract carbon trading account, and other buyers participate in the auction. After each bid, carbon tokens must be paid to the contract payment account, and TBLT cross-chain payment verification must be performed. After the auction, the contract payment account transfers the bid of the highest bidder to the seller's payment account, and the remaining bidders withdraw their bids, and the contract carbon trading account transfers the sold carbon quota to the carbon quota account of the highest bidder.
[0068] In the carbon quota allocation process, the government department first sets a carbon reduction target and uploads the carbon reduction data of the company in the previous settlement period to the carbon quota allocation contract. The contract calculates the carbon quota allocation of the company based on this series of data, and after verification and confirmation by the government department, the carbon quota is minted and sent to the carbon quota account of the company.
[0069] In the carbon quota offset process, the emission-controlled enterprise uploads the carbon emission data during the accounting period. After verification and confirmation by the verifier, the corresponding amount of carbon quota in the carbon quota account of the emission-controlled enterprise is burned. If the carbon quota is sufficient, a carbon offset certificate will be issued to it; otherwise, a fine will be calculated for the excess carbon emissions and it will be punished.
[0070] In the carbon quota generation process, the generator uploads the carbon fixation certificate to the smart contract, and after verification and confirmation by the verifier, the corresponding number of carbon quotas will be minted and transferred to the generator's carbon quota account.
[0071] The blockchain carbon quota trading method of the present invention establishes a TBLT security authentication mechanism based on the Transformer model and the BiLSTM neural network, while taking into account the connection between different features and the temporal characteristics of the features, ensuring the authenticity and security of cross-chain information and maintaining the healthy operation and effectiveness of the carbon quota market.
[0072] The embodiment of the present invention also provides a carbon quota trading device based on blockchain, which is used to execute the carbon quota trading method based on blockchain as described above. Figure 3 This is a structural block diagram of a carbon quota trading device based on blockchain according to an embodiment of the present invention, and the device includes:
[0073] The identity authentication module 21 is used to verify the identity information of the target user in response to the carbon quota trading request sent by the target user.
[0074] The order generation module 22 is used to match the carbon quota transaction request that has passed identity authentication, generate a carbon quota transaction order, and return the carbon quota transaction order to the target user.
[0075] The payment verification module 23 is used to verify the payment data sent by the target user based on the TBLT payment mechanism in response to the payment data sent by the target user, wherein the TBLT payment mechanism is constructed according to the Transformer model and the BiLSTM neural network.
[0076] The result verification module 24 is used to verify the carbon quota transaction result corresponding to the verified payment data.
[0077] The technical features and technical effects of the device proposed in the embodiment of the present invention are the same as those of the method proposed in the embodiment of the present invention, and are not described in detail here. Each module in the above device can be implemented in whole or in part by software, hardware, and a combination thereof. Each of the above modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.
[0078] An embodiment of the present invention also provides a computer-readable storage medium, which includes a stored computer program; wherein, when the computer program is running, it controls the device where the computer-readable storage medium is located to execute the blockchain-based carbon quota trading method as described above.
[0079] The embodiment of the present invention further provides a computer device, Figure 4 A structural block diagram of a preferred embodiment of a computer device provided by the present invention, wherein the computer device includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and the processor implements the blockchain-based carbon quota trading method as described above when executing the computer program.
[0080] Preferably, the computer program can be divided into one or more modules / units (such as computer program 1, computer program 2, ...), and the one or more modules / units are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units can be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program in the computer device.
[0081] The processor may be a central processing unit (CPU), or other general-purpose processors, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor. The processor is the control center of the computer device, and various parts of the computer device are connected using various interfaces and lines.
[0082] The memory mainly includes a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function, etc., and the data storage area can store related data, etc. In addition, the memory can be a high-speed random access memory, or a non-volatile memory, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, and a flash card (Flash Card), etc., or the memory can also be other volatile solid-state storage devices.
[0083] It should be noted that the above-mentioned computer device may include, but is not limited to, a processor and a memory. Those skilled in the art will understand that Figure 4 The structural block diagram is merely an example of a computer device and does not constitute a limitation of the computer device, and may include more or less components than shown in the figure, or combine certain components, or different components.
[0084] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A carbon quota trading method based on blockchain, characterized in that: include: In response to a carbon quota trading request sent by a target user, verify the identity information of the target user; Matching the carbon quota transaction request that has passed identity authentication, generating a carbon quota transaction order, and returning the carbon quota transaction order to the target user; In response to the payment data sent by the target user, verifying the payment data based on a TBLT payment mechanism, wherein the TBLT payment mechanism is constructed according to a Transformer model and a BiLSTM neural network; Verify the carbon quota transaction results corresponding to the verified payment data.
2. The blockchain-based carbon quota trading method according to claim 1, characterized in that: The step of verifying the identity information of the target user in response to the carbon quota transaction request sent by the target user includes: After receiving the carbon quota transaction request sent by the target user, the server verifies the identity code, private key, public key, identity certificate and account address in the transaction request. If the verification fails, the carbon quota transaction request is rejected and verification failure information is returned.
3. The blockchain-based carbon quota trading method according to claim 1, characterized in that: The matching of the carbon quota transaction request that has passed identity authentication, generating a carbon quota transaction order, and returning the carbon quota transaction order to the target user includes: Matching qualified carbon emission quotas in the carbon quota trading library according to the carbon quota trading request; After the match is successful, a carbon quota transaction order is generated according to the information of the two transaction parties, the carbon quota transaction order is sent to the target user, and a match success message is returned.
4. The blockchain-based carbon quota trading method according to claim 1, characterized in that: The step of verifying the payment data in response to the payment data sent by the target user based on the TBLT payment mechanism includes: Acquire historical transaction data of the target user, input the payment data and the historical transaction data into a Transformer model, and obtain transaction record relationship data of the target user; Input the payment data and the historical transaction data into a BiLSTM neural network to obtain transaction record time series information data of the target user; The transaction record feature data and the transaction record time series information data are integrated through Transformer-Decoder and input into a deep neural network to obtain the transaction feature data of the target user; The payment data is verified according to the transaction characteristic data. If the verification fails, the payment data is rejected and payment failure information is returned.
5. The blockchain-based carbon quota trading method according to claim 4, characterized in that: The verifying the payment data according to the transaction characteristic data includes: The transaction feature data is input into a Softmax classifier to identify abnormal carbon transactions, and whether the payment data is abnormal is determined based on the identification result.
6. The blockchain-based carbon quota trading method according to claim 1, characterized in that: The verification of the carbon quota transaction result corresponding to the verified payment data includes: After the verification is passed, the carbon emission quota corresponding to the carbon quota trading order is burned, and the corresponding carbon emission quota is deducted from the seller's account.
7. The blockchain-based carbon quota trading method according to claim 1, characterized in that: The method further comprises: During the carbon quota trading process, the data information in the blockchain transaction records is saved and a transaction report is generated.
8. A carbon quota trading device based on blockchain, characterized in that: include: An identity authentication module, used to verify the identity information of the target user in response to the carbon quota trading request sent by the target user; An order generation module, used to match the carbon quota transaction request that has passed identity authentication, generate a carbon quota transaction order, and return the carbon quota transaction order to the target user; A payment verification module, configured to verify the payment data sent by the target user based on a TBLT payment mechanism in response to the payment data, wherein the TBLT payment mechanism is constructed according to a Transformer model and a BiLSTM neural network; The result verification module is used to verify the carbon quota transaction results corresponding to the verified payment data.
9. A computer device, characterized in that: It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, it implements the blockchain-based carbon quota trading method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein when the device where the computer-readable storage medium is located executes the computer program, the blockchain-based carbon quota trading method as described in any one of claims 1 to 7 is implemented.