CN116957566A - Block chain-based data processing method and device, electronic equipment and storage medium - Google Patents

Block chain-based data processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116957566A
CN116957566A CN202211517622.2A CN202211517622A CN116957566A CN 116957566 A CN116957566 A CN 116957566A CN 202211517622 A CN202211517622 A CN 202211517622A CN 116957566 A CN116957566 A CN 116957566A
Authority
CN
China
Prior art keywords
carbon
resource
transaction
resources
account
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211517622.2A
Other languages
Chinese (zh)
Inventor
张慧
蓝虎
王宗友
黄桂鸿
陈自民
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202211517622.2A priority Critical patent/CN116957566A/en
Publication of CN116957566A publication Critical patent/CN116957566A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3827Use of message hashing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/389Keeping log of transactions for guaranteeing non-repudiation of a transaction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Health & Medical Sciences (AREA)
  • Development Economics (AREA)
  • Technology Law (AREA)
  • Computer Security & Cryptography (AREA)
  • Public Health (AREA)
  • Water Supply & Treatment (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • Primary Health Care (AREA)
  • Tourism & Hospitality (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The embodiment of the application discloses a data processing method and device based on a blockchain, electronic equipment and a storage medium, wherein the method comprises the following steps: the method comprises the steps of obtaining transaction carbon resources from a plurality of carbon resources contained in a carbon account transferred from resources corresponding to a carbon resource transaction request, calculating resource difference between carbon resource quantity and carbon resource transaction quantity of the transaction carbon resources, splitting the transaction carbon resources into first carbon resources containing carbon resource quantity matched with the resource difference and second carbon resources containing carbon resource quantity matched with the carbon resource transaction quantity, updating the transaction carbon resources into the first carbon resources, updating the second carbon resources into the resources transferred to the account, generating transaction records corresponding to the carbon resource transaction request, and storing the transaction records into a blockchain network, wherein the transaction records contain identification information of the transaction carbon resources. The technical scheme of the embodiment of the application can improve the credibility and the safety of carbon transaction.

Description

Block chain-based data processing method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of blockchain technologies, and in particular, to a blockchain-based data processing method and apparatus, an electronic device, a storage medium, and a program product.
Background
In order to cope with a series of environmental changes such as greenhouse effect caused by emission of greenhouse gases (e.g., carbon dioxide), the emission rights of greenhouse gases are traded as a commodity, namely carbon trade, so that the emission of greenhouse gases is effectively controlled.
However, in the related technology, the carbon transaction flow of different transaction parties is disordered, a trust mechanism is lacked, and the reliability and the safety of the carbon transaction are low.
Disclosure of Invention
The embodiment of the application provides a data processing method and device based on a blockchain, electronic equipment, a storage medium and a program product, which can improve the credibility and safety of carbon transaction.
According to an aspect of an embodiment of the present application, there is provided a data processing method based on a blockchain, the method including:
searching a resource transfer-out carbon account and a resource transfer-in carbon account corresponding to a received carbon resource transaction request from a plurality of carbon accounts contained in a blockchain network, and acquiring transaction carbon resources for transaction from a plurality of carbon resources contained in the resource transfer-out carbon account;
Calculating the resource difference between the carbon resource amount of the transaction carbon resource and the carbon resource transaction amount corresponding to the carbon resource transaction request, and splitting the transaction carbon resource into a first carbon resource with the carbon resource amount matched with the resource difference and a second carbon resource with the carbon resource amount matched with the carbon resource transaction amount; wherein the first carbon resource and the second carbon resource comprise identification information of the transaction carbon resource;
updating the transaction carbon resources contained in the resource transfer-out carbon account to the first carbon resources, and updating the second carbon resources to the resource transfer-in account;
generating a carbon resource transaction record corresponding to the carbon resource transaction request, and storing the carbon resource transaction record to the blockchain network; the carbon resource transaction record comprises identification information of the transaction carbon resource, the carbon account into which the resource is transferred, and carbon resource amounts respectively contained in the transaction carbon resource, the first carbon resource and the second carbon resource.
According to an aspect of an embodiment of the present application, there is provided a blockchain-based data processing apparatus, the apparatus including:
The acquisition module is configured to search a resource transfer-out carbon account and a resource transfer-in carbon account corresponding to the received carbon resource transaction request from a plurality of carbon accounts contained in the blockchain network, and acquire transaction carbon resources for transaction from a plurality of carbon resources contained in the resource transfer-out carbon account;
a splitting module configured to calculate a resource difference between a carbon resource amount of the transaction carbon resource and a carbon resource transaction amount corresponding to the carbon resource transaction request, and split the transaction carbon resource into a first carbon resource containing an amount of carbon resource that matches the resource difference, and a second carbon resource containing an amount of carbon resource that matches the carbon resource transaction amount; wherein the first carbon resource and the second carbon resource comprise identification information of the transaction carbon resource;
the updating module is configured to update the transaction carbon resources contained in the resource transfer-out carbon account to the first carbon resources and update the second carbon resources to the resource transfer-in account;
the recording module is configured to generate a carbon resource transaction record corresponding to the carbon resource transaction request and store the carbon resource transaction record to the blockchain network; the carbon resource transaction record comprises identification information of the transaction carbon resource, the carbon account into which the resource is transferred, and carbon resource amounts respectively contained in the transaction carbon resource, the first carbon resource and the second carbon resource.
According to an aspect of an embodiment of the present application, there is provided an electronic apparatus including:
one or more processors;
storage means for storing one or more computer programs that, when executed by the one or more processors, cause the electronic device to implement a blockchain-based data processing method as described above.
According to an aspect of an embodiment of the present application, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor of an electronic device, causes the electronic device to implement a blockchain-based data processing method as described above.
According to an aspect of an embodiment of the present application, there is provided a computer program product comprising a computer program which, when executed by a processor, implements a blockchain-based data processing method as described above.
In the technical scheme provided by the embodiment of the application, after a resource transfer-out carbon account and a resource transfer-in carbon account corresponding to a received carbon resource transaction request are searched from a plurality of carbon accounts contained in a blockchain network, and transaction carbon resources for transaction are obtained from a plurality of carbon resources contained in the resource transfer-out carbon account, firstly calculating the resource difference between the carbon resource quantity of the transaction carbon resources and the carbon resource transaction quantity corresponding to the carbon resource transaction request, and splitting the transaction carbon resources into a first carbon resource with the contained carbon resource quantity matched with the resource difference and a second carbon resource with the contained carbon resource quantity matched with the carbon resource transaction quantity, wherein the first carbon resource and the second carbon resource contain identification information of the transaction carbon resources; then, updating the transaction carbon resources contained in the resource transfer-out carbon account to first carbon resources, and updating the second carbon resources to the resource transfer-in account; finally, generating a carbon resource transaction record corresponding to the carbon resource transaction request, and storing the carbon resource transaction record into a blockchain network; the carbon resource transaction record comprises identification information of transaction carbon resources, a carbon account into which the resources are transferred, and carbon resource amounts respectively contained in the transaction carbon resources, the first carbon resources and the second carbon resources, and compared with the related technology, on one hand, storage of carbon resource information and transaction of the carbon resources are realized through a blockchain technology, so that the transparency and the safety of the transaction are improved based on the characteristics of tamper resistance, traceability, common maintenance and the like of the blockchain technology; on the other hand, the output carbon resource (i.e., the first carbon resource and the second carbon resource) of each carbon resource transaction contains the identification information of the input carbon resource (i.e., the transaction carbon resource), and a carbon resource transaction record containing the identification information of the input carbon resource is generated, so that all carbon resource transaction records of the carbon resource can be traced based on the identification information of the carbon resource, traceability of the carbon resource transaction is realized, supervision of the carbon resource is facilitated, and the transaction safety is further improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application as claimed.
Drawings
FIG. 1 is a schematic diagram of a blockchain network;
FIG. 2 is a schematic diagram of the connections of blocks in a blockchain;
FIG. 3 is a schematic diagram of an implementation environment shown in an exemplary embodiment of the application;
FIG. 4 is a flowchart illustrating a blockchain-based data processing method in accordance with an exemplary embodiment of the present application;
FIG. 5 is a flowchart illustrating a blockchain-based data processing method in accordance with another exemplary embodiment of the present application;
FIG. 6 is a flowchart illustrating a blockchain-based data processing method in accordance with another exemplary embodiment of the present application;
FIG. 7 is a flowchart illustrating a blockchain-based data processing method in accordance with another exemplary embodiment of the present application;
FIG. 8 is a flowchart illustrating a blockchain-based data processing method in accordance with another exemplary embodiment of the present application;
FIG. 9 is a flowchart illustrating a blockchain-based data processing method in accordance with another exemplary embodiment of the present application;
FIG. 10 is a flowchart illustrating a blockchain-based data processing method in accordance with another exemplary embodiment of the present application;
FIG. 11 is a flowchart illustrating a blockchain-based data processing method in accordance with another exemplary embodiment of the present application;
FIG. 12 is a flowchart illustrating a blockchain-based data processing method in accordance with another exemplary embodiment of the present application;
FIG. 13 is a flowchart illustrating a blockchain-based data processing method in accordance with another exemplary embodiment of the present application;
FIG. 14 is a flowchart illustrating a blockchain-based data processing method in accordance with another exemplary embodiment of the present application;
FIG. 15 is a schematic diagram of an implementation environment in which another exemplary embodiment of the present application is shown;
FIG. 16A is a schematic diagram illustrating carbon resource transfer in accordance with another exemplary embodiment of the present application;
FIG. 16B is a schematic diagram illustrating carbon resource transfer in accordance with another exemplary embodiment of the present application;
FIG. 17 is a schematic diagram of a carbon resource transaction shown in accordance with an exemplary embodiment of the present application;
FIG. 18 is a schematic diagram of a carbon integration generation process shown in an exemplary embodiment of the application;
FIG. 19 is a schematic diagram of a smart contract shown in accordance with an exemplary embodiment of the present application;
FIG. 20 is a schematic diagram of a block chain based data processing apparatus shown in accordance with another exemplary embodiment of the present application;
Fig. 21 shows a schematic diagram of a computer system suitable for use in implementing an embodiment of the application.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with aspects of the application as detailed in the accompanying claims.
The block diagrams depicted in the figures are merely functional entities and do not necessarily correspond to physically separate entities. That is, the functional entities may be implemented in software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The flow diagrams depicted in the figures are exemplary only, and do not necessarily include all of the elements and operations/steps, nor must they be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the order of actual execution may be changed according to actual situations.
Also to be described is: in the present application, the term "plurality" means two or more. "and/or" describes an association relationship of an association object, meaning that there may be three relationships, e.g., a and/or B may represent: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
The technical scheme of the embodiment of the application relates to the technical field of block chains, and before the technical scheme of the embodiment of the application is introduced, the block chain technology is simply introduced.
Blockchain (Blockchain): a distributed account book in the field of information technology is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. Blockchains are essentially a de-centralized database, which is a series of data blocks (i.e., blocks) that are generated in association using cryptographic methods, each of which contains information from a batch of network transactions for verifying the validity (anti-counterfeiting) of the information and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, and an application services layer. Common mechanisms include, but are not limited to, POW (Proof of Work), POS (Proof of equity), DPOS (shared Proof of-of-stane consistence), PBFT (Practical Byzantine Fault Tolerance, practical bayer fault tolerance protocol), and the like.
As above, a blockchain is essentially a de-centralized database, and the blockchain is commonly maintained by nodes in the blockchain network, which are the smallest units involved in blockchain maintenance, and which are the deployment and execution units for the blockchain point program. For example, referring to FIG. 1, in the blockchain network 10 shown in FIG. 1, a plurality of nodes 101 may be included. Each node 101 may receive input information while operating normally and maintain shared data within the blockchain network based on the received input information. In order to ensure information intercommunication in the blockchain network, information connection can exist between every two nodes in the blockchain network, and information transmission can be carried out between the nodes through the information connection. For example, when any node in the blockchain network receives input information, other nodes in the blockchain network acquire the input information according to a consensus algorithm, and store the input information as shared data, so that the data stored on all the nodes in the blockchain network are consistent. The blocks are commonly known through nodes, so that the blocks have the characteristics of non-falsification, traceability, common maintenance and the like.
For each node in the blockchain network, there is a node identification corresponding thereto, and each node in the blockchain network may store the node identifications of other nodes for subsequent broadcasting of the generated blocks to other nodes in the blockchain network based on the node identifications of the other nodes. Each node can maintain a node identification list, and the node names and the node identifications are correspondingly stored in the node identification list. The node identifier may be an IP (Internet Protocol, protocol interconnecting between networks) address, or any other information that can be used to identify the node.
Each node in the blockchain network stores one and the same blockchain. Referring to fig. 2, the blockchain is composed of a plurality of blocks, the starting block includes a block header and a block body, the block header stores input information characteristic values, version numbers, time stamps, difficulty values and the like, and the block body stores input information; the next block of the starting block takes the starting block as a father block, the next block also comprises a block head and a block main body, the block head stores the input information characteristic value of the current block, the block head characteristic value, the version number, the timestamp, the difficulty value and the like of the father block, and the like, so that the block data stored in each block in the block chain are associated with the block data stored in the father block, and the safety of the input information in the block is ensured.
It is understood that each node in the blockchain network may be a server or a terminal. The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a Cloud server providing Cloud services, cloud databases, cloud Computing (Cloud Computing), cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network ), basic Cloud Computing services such as big data and intelligent platform. The terminal may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, a terminal used in an automobile, an aircraft, and the like. The nodes may be directly or indirectly connected through wired or wireless communication, and the present application is not limited herein.
The technical scheme of the embodiment of the application relates to a block chain technology, and is described in detail as follows:
in the related technology, the carbon transaction flows of different transaction parties are disordered, unified standards are not formed, and a trust mechanism is lacked, so that the reliability and the safety of the carbon transaction are low. Based on the above, the embodiment of the application provides a data processing method and device based on a blockchain, electronic equipment, a storage medium and a program product, which can improve the credibility and the safety of carbon transaction.
Referring to fig. 3, fig. 3 is a schematic diagram of an implementation environment according to the present application, where the implementation environment includes a transaction initiator 310, a transaction processor 320, and a blockchain network 330, where the transaction initiator 310 and the transaction processor 320 may communicate through a wired or wireless network, and the blockchain network includes a plurality of blockchain nodes 331, and the blockchain nodes 331 may communicate through a wired or wireless network. Transaction handler 320 may be any blockchain node in blockchain network 330, or the transaction handler may be a server or terminal capable of communicating with blockchain node 331. The transaction initiator 310 may be a server or a terminal, and specific examples of the server and the terminal are referred to in the foregoing description, and are not repeated herein.
The blockchain network includes a plurality of carbon accounts, and each carbon account is used for recording information of carbon resources held by a carbon resource holding object to which the carbon account belongs, for example, carbon resource holding amount and the like. Transaction initiator 310 may initiate a carbon resource transaction request for a carbon resource to transaction processor 320. The transaction processor 320 receives a carbon resource transaction request, searches a resource transfer-out carbon account and a resource transfer-in carbon account corresponding to the carbon resource transaction request from a plurality of carbon accounts contained in the blockchain network 330, and obtains a transaction carbon resource for transaction from a plurality of carbon resources contained in the resource transfer-out carbon account, then calculates a resource difference between a carbon resource amount of the transaction carbon resource and a carbon resource transaction amount corresponding to the carbon resource transaction request, splits the transaction carbon resource into a first carbon resource containing carbon resource with an amount matching the resource difference, and a second carbon resource containing carbon resource with an amount matching the carbon resource transaction amount, wherein the first carbon resource and the second carbon resource contain identification information of the transaction carbon resource; then, updating transaction carbon resources contained in the resource transfer-out carbon account into first carbon resources, and updating second carbon resources to the resource transfer-in account so as to complete carbon resource transaction; and then, generating a carbon resource transaction record corresponding to the carbon resource transaction request, and storing the carbon resource transaction record into a blockchain network, wherein the carbon resource transaction record comprises identification information of transaction carbon resources, a carbon account into which the resources are transferred, and carbon resource amounts respectively contained in the transaction carbon resources, the first carbon resources and the second carbon resources. In the whole transaction process, on one hand, storage of carbon resource information and transaction of carbon resources are realized through a blockchain technology, so that the transparency and the safety of the transaction are improved based on the characteristics of tamper resistance, traceability, common maintenance and the like of the blockchain technology; on the other hand, the output carbon resource (i.e., the first carbon resource and the second carbon resource) of each carbon resource transaction contains the identification information of the input carbon resource (i.e., the transaction carbon resource), and a carbon resource transaction record containing the identification information of the input carbon resource is generated, so that all carbon resource transaction records of the carbon resource can be traced based on the identification information of the carbon resource, traceability of the carbon resource transaction is realized, supervision of the carbon resource is facilitated, and the transaction safety is further improved.
It should be noted that, in the present application, data related to a carbon resource holding object, such as a carbon account, a carbon resource amount, etc., is obtained or agreed by the carbon resource holding object when the method of the present application is applied to a specific product or technology, and extraction, use and processing of the related data all comply with local safety standards and regulations of local laws and regulations.
Referring to fig. 4, fig. 4 is a flowchart illustrating a blockchain-based data processing method according to an exemplary embodiment of the present application. The method may be applied to the implementation environment shown in fig. 3, which may be performed by the transaction processor 320 in the implementation environment shown in fig. 3. As shown in FIG. 4, in an exemplary embodiment, the blockchain-based data processing method may include steps S410-S440, described in detail below:
step S410, searching a resource transfer-out carbon account and a resource transfer-in carbon account corresponding to the received carbon resource transaction request from a plurality of carbon accounts contained in the blockchain network, and acquiring transaction carbon resources for transaction from a plurality of carbon resources contained in the resource transfer-out carbon account.
The carbon resource refers to a resource related to the emission amount of greenhouse gases such as carbon dioxide, and can be used for transactions. For example, to effectively control emissions of room gases such as carbon dioxide, reduce greenhouse gas emissions for individuals and businesses, for individuals, convert low carbon behavior into carbon emissions, trading media (e.g., carbon credits, etc.) available for trading, etc., which can be used to purchase goods, redeem carbon credits, etc.; for businesses, trading media or carbon quotas may be purchased from individuals or other businesses; correspondingly, the carbon resource includes, but is not limited to, at least one of carbon emissions, trading media such as carbon credits, and the like. The carbon quota refers to a greenhouse gas emission reduction index which is required to be completed according to regulations, and can be set by related departments.
In order to realize the trusted transaction of the carbon resource, a carbon account is arranged in the blockchain network and is used for recording the information of the carbon resource held by the carbon resource holder. Carbon resource holders include, but are not limited to, individuals, businesses, related departments, etc. that can register with a blockchain network to obtain carbon accounts. The information of the carbon resource includes, but is not limited to, the amount of the carbon resource contained in the carbon resource, identification information of the carbon resource, and the like, and the identification information of the carbon resource includes, but is not limited to, the identification number of the carbon resource. Each carbon account can contain multiple carbon resources, each carbon resource contains the corresponding carbon resource amount and identification information, and the carbon resource amounts contained by different carbon resources can be equal or unequal.
If the transaction of the carbon resource is required, the transaction initiator may initiate a carbon resource transaction request for the carbon resource, where the transaction request may include transaction information such as carbon account information (resource transfer-out carbon account, resource transfer-in carbon account) of both transaction parties, and transaction amount of the carbon resource. The resource transfer-out carbon account is a carbon account of a carbon resource transfer-out party, and the resource transfer-in carbon account is a carbon account of a carbon resource transfer-in party, that is, carbon resources contained in the resource transfer-out carbon account need to be transferred to the resource transfer-in carbon account. The carbon resource trade volume is the number of carbon resources that need to be traded, i.e., the number of carbon resources that need to be transferred from the resource transfer-out carbon account to the resource transfer-in carbon account.
After receiving the carbon resource transaction request, the transaction processor can search a resource transfer-out carbon account and a resource transfer-in carbon account from a plurality of carbon accounts contained in the blockchain network according to the carbon account information of both transaction sides contained in the carbon resource transaction request, and acquire transaction carbon resources for transaction from a plurality of carbon resources contained in the resource transfer-out carbon account.
Optionally, in the process of acquiring the information of the transaction carbon resources for the transaction included in the resource transfer-out carbon account, at least one carbon resource with the sum of the carbon resource amounts matched with the transaction amount of the carbon resources is screened out from the multiple carbon resources included in the resource transfer-out carbon account, and then the screened at least one carbon resource is used as the transaction carbon resource for the transaction. Wherein, to ensure that the transaction can be successfully performed, matching the sum of the amounts of carbon resources contained in the at least one carbon resource with the transaction amount of carbon resources may mean that the sum of the amounts of carbon resources contained in the at least one carbon resource is greater than or equal to the transaction amount of carbon resources. The specific manner of screening out at least one carbon resource, in which the sum of the amounts of the carbon resources contained in the plurality of carbon resources contained in the carbon account transferred from the resource matches the transaction amount of the carbon resource, may be flexibly set according to actual needs, including but not limited to: firstly, randomly transferring out a plurality of carbon resources contained in a carbon account from the resource to obtain the carbon resource until the sum of the carbon resource amounts contained in the obtained carbon resource is matched with the carbon resource transaction amount; second, carbon resources are acquired from a plurality of carbon resources contained in the carbon account transferred from the resources according to a specified sequence until the sum of the carbon resource amounts contained in the acquired carbon resources is matched with the carbon resource transaction amount, wherein the specified sequence may be a sequence from large to small in the carbon resource amount contained, a sequence from small to large in the carbon resource amount contained, a sequence from front to back in the carbon resource generation time (or update time), a sequence from back to front in the carbon resource generation time (or update time), and the like.
S420, calculating the resource difference between the carbon resource amount of the transaction carbon resource and the carbon resource transaction amount corresponding to the carbon resource transaction request, and splitting the transaction carbon resource into a first carbon resource with the carbon resource amount matched with the resource difference and a second carbon resource with the carbon resource amount matched with the carbon resource transaction amount; wherein the first carbon resource and the second carbon resource comprise identification information of the transaction carbon resource.
In order to transfer the carbon resources matched with the carbon resource transaction amount to the carbon account, the resource difference between the carbon resource amount of the transaction carbon resources and the carbon resource transaction amount can be calculated, and then the transaction carbon resources contained in the carbon account of the resource transfer are split into first carbon resources and second carbon resources, wherein the carbon resources contained in the first carbon resources are matched with the resource difference, and the carbon resources contained in the second carbon resources are matched with the carbon resource transaction amount, that is, the first carbon resources are the residual carbon resources of the transaction carbon resources after the carbon resources matched with the carbon resource transaction amount are transferred from the transaction carbon resources to the carbon account.
In order to determine the source of the first carbon resource and the second carbon resource, thereby facilitating subsequent traceability, the first carbon resource and the second carbon resource further comprise identification information of the transaction carbon resource.
Alternatively, in some embodiments, the resource transfer-out carbon account contains multiple carbon resources, and the corresponding transaction carbon resource may contain one or more carbon resources. If the transaction carbon resource contains one part of carbon resource, the transaction carbon resource can be directly split into two parts of carbon resource in the splitting process, wherein one part is used as the first carbon resource, and the other part is used as the second carbon resource. If the transaction carbon resource contains multiple carbon resources, in the splitting process, determining the carbon resource to be split and other carbon resources except the carbon resource to be split from the multiple carbon resources contained in the transaction carbon resource, and splitting the carbon resource to be split to obtain one carbon resource matched with the resource difference and another carbon resource, so that the sum of the carbon resource contained in the other carbon resource and the carbon resource contained in the other carbon resource is matched with the carbon resource transaction amount, and taking the other carbon resource and the other carbon resource as a second carbon resource and taking the carbon resource matched with the resource difference obtained by splitting as a first carbon resource.
Alternatively, in some scenarios, multiple carbon resources may be involved in the carbon resource trading process, for example, an individual may include carbon credits, where the enterprise needs carbon emission reduction, in the process of purchasing a commodity sold by the enterprise, for an individual carbon account, a carbon resource is turned out to be carbon credits, and for an enterprise carbon account, a carbon resource is turned into be carbon emission reduction, under the condition, calculating a resource difference between a carbon resource amount of the trading carbon resource and a carbon resource trading amount corresponding to the carbon resource trading request, and splitting the trading carbon resource into a first carbon resource including a carbon resource amount matching the resource difference, and a second carbon resource including a carbon resource amount matching the carbon resource trading amount may include: determining a transfer-out resource type and a transfer-in resource type according to a transaction request, if the transfer-out resource type is different from the transfer-in resource type, acquiring transaction carbon resources with the type matched with the transfer-out resource type from a resource transfer-out account, converting the transaction carbon resources into intermediate carbon resources with the type matched with the transfer-in resource type, and splitting the intermediate carbon resources into first carbon resources and second carbon resources according to the carbon resource transaction amount, wherein the carbon resource amount of the first carbon resources is matched with the resource difference (the difference between the carbon resource amount of the intermediate carbon resources and the carbon resource transaction amount), the carbon resource amount of the second carbon resources is matched with the carbon resource transaction amount, and optionally, the first carbon resources and the second carbon resources can contain identification information of the transaction carbon resources, or the first carbon resources and the second carbon resources can contain identification information of the intermediate carbon resources. For example, assuming that the carbon resource contained in the personal carbon account is carbon deposit, the carbon resource contained in the enterprise carbon account is carbon reduction amount, 1000 carbon deposit can be converted into 20 kg carbon reduction amount, 2 kg carbon reduction amount is needed in the enterprise carbon account 1, and 18 kg carbon reduction amount is needed in the enterprise carbon account 2, in the transaction process, 1000 carbon deposit can be converted into 20 kg carbon reduction amount from the carbon deposit contained in the personal carbon account, and then 20 kg carbon reduction amount is divided into 2 kg carbon reduction amount and 18 kg carbon reduction amount, and the two carbon reduction amounts are respectively updated to the enterprise carbon account 1 and the enterprise carbon account 2, wherein the 2 kg carbon reduction amount and the 18 kg carbon reduction amount can contain identification information of 20 kg carbon reduction amount or identification information of 1000 carbon deposit.
S430, updating the transaction carbon resources contained in the resource transfer-out carbon account to the first carbon resources, and updating the second carbon resources to the resource transfer-in account.
After the first carbon resource and the second carbon resource are obtained, the transaction carbon resource contained in the resource transfer-out carbon account is updated to the first carbon resource, and the second carbon resource is updated to the resource transfer-in carbon account, so that the carbon resource matched with the carbon resource transaction amount is transferred from the resource transfer-out carbon account to the resource transfer-in carbon account. That is, the first carbon resource is the balance of the transaction carbon resource after the transaction, and the second carbon resource is the resource which needs to be transferred to the carbon account. For example, assuming that the carbon resource is a carbon emission amount, the carbon resource transaction amount is 15 kg, and the resource transfer-out carbon account contains 20 kg of carbon resource a, after the transaction, the resource transfer-out carbon account contains 5 kg of carbon resource identified as a, and 15 kg of carbon resource identified as a is added to the resource transfer-out carbon account.
Optionally, if the carbon resource amount of the transaction carbon resource is equal to the carbon resource transaction amount, the carbon resource amount of the first carbon resource is 0, and in a process of updating the transaction carbon resource included in the resource transfer-out carbon account to the first carbon resource, the transaction carbon resource included in the resource transfer-out carbon account may be directly deleted without updating the first carbon resource to the resource transfer-out carbon account.
It should be noted that, if the carbon account in which the resource is transferred includes a plurality of resources, the transaction carbon resource needs to be split into a first carbon resource and a second carbon resource corresponding to each carbon account in which the resource is transferred. The carbon resource amount contained in the second carbon resource is matched with the carbon resource amount required to be transferred by the corresponding resource transferred into the carbon account.
S440, generating a carbon resource transaction record corresponding to the carbon resource transaction request, and storing the carbon resource transaction record to the blockchain network; the carbon resource transaction record comprises identification information of transaction carbon resources, a carbon account into which the resources are transferred, and carbon resource amounts respectively contained in the transaction carbon resources, the first carbon resources and the second carbon resources.
After the transaction carbon resources contained in the resource transfer-out carbon account are updated to the first carbon resources and the second carbon resources are updated to the resource transfer-in account, a carbon resource transaction record corresponding to the carbon resource transaction request can be generated and stored in the blockchain network, so that the transaction data can be traced.
The carbon resource transaction record includes, but is not limited to, a carbon account into which a resource is transferred, and carbon resource amounts respectively included in the transaction carbon resource, the first carbon resource, and the second carbon resource, and the carbon resource transaction record may further include a carbon account into which a resource is transferred. The specific form of the carbon resource transaction record can be flexibly set according to actual needs, and optionally, a UTXO (Unspent Transaction Output, unconsumed transaction output) mode can be adopted to generate the carbon resource transaction record corresponding to the carbon resource transaction request. It should be noted that UTXOs are a record keeping method in a blockchain system, each transaction has several transaction inputs, that is, a resource source, and several transaction outputs, that is, a resource destination, and the generated output is "unexpired transaction output", that is, UTXOs. For the transaction of carbon resources, the transaction input is a transaction carbon resource, the transaction output is a first carbon resource and a second carbon resource, and the transaction record of the carbon resources comprises the transaction input, the transaction output and identification information of the carbon resources corresponding to the transaction input. For example, assuming that the transaction 1001 corresponding to the first carbon resource transaction request needs to transfer a carbon resource with a carbon resource amount of 5 from carbon account a to carbon account B, carbon account a contains a carbon resource with a carbon resource amount of 18, see table 1 below, and the carbon resource transaction record includes a transaction input (carbon resource amount of 18, carbon resource 1 belonging to carbon account a), a transaction output (carbon resource amount of 13, carbon resource 2 belonging to carbon account a, carbon resource amount of 5, carbon resource 3 belonging to carbon account B), and identification information of carbon resource 1; the transaction 1002 corresponding to the second carbon resource transaction request is that carbon resources with carbon resource amount of 2 need to be transferred from carbon account B to carbon account C, and carbon resources with carbon resource amount of 3 need to be transferred from carbon account B to carbon account D, and then, as shown in table 2 below, the carbon resource transaction record includes transaction input (carbon resource amount of 5, carbon resource 3 with carbon account of carbon account B), transaction output (carbon resource amount of 2, carbon resource 4 with carbon account of carbon account C, carbon resource amount of 3, carbon resource 6 with carbon account of carbon account D), and identification information of carbon resource 3.
TABLE 1
TABLE 2
Optionally, in some embodiments, the carbon resource transaction record may include identification information of a carbon resource transaction request, and the first carbon resource and the second carbon resource may also include identification information of a carbon resource transaction request, so that, for a carbon resource, the carbon resource transaction record may be searched from the identification information of the carbon resource transaction request included in the carbon resource transaction record, a direct source of the carbon resource transaction record may be determined according to the carbon resource transaction record, and further tracing may be performed according to the identification information of the carbon resource transaction request included in the directly-sourced carbon resource, so that the original source of the carbon resource may be determined by tracing gradually according to the identification information of the transaction request.
In the embodiment shown in fig. 4, on one hand, storage of carbon resource information and transaction of carbon resources are realized through a blockchain technology, so that transparency and safety of the transaction are improved based on characteristics of tamper resistance, traceability, common maintenance and the like of the blockchain technology; on the other hand, the output carbon resources (namely, the first carbon resources and the second carbon resources) of each carbon resource transaction comprise identification information of the input carbon resources (namely, transaction carbon resources), the carbon resource transaction record comprises the identification information of the input carbon resources, even if the carbon resources are transacted for a plurality of times, all the carbon resource transaction records can be searched based on the identification information of the carbon resources, so that the original source carbon resources are searched, traceability of the carbon resource transaction is realized, supervision of the carbon resources is facilitated, the transaction safety is further improved, and the transaction carbon resources are split into the first carbon resources and the second carbon resources, so that the transaction of UTXO mode can be realized, and the transaction accuracy is improved.
In an exemplary embodiment, referring to fig. 5, fig. 5 is a flowchart illustrating a blockchain-based data processing method according to another exemplary embodiment of the present application. The method may be applied to the implementation environment shown in fig. 3, which may be performed by the transaction processor 320 in the implementation environment shown in fig. 3. As shown in fig. 5, the method includes steps S410-S440, and steps S510-S530, which are described in detail as follows:
step S510, acquiring carbon behavior data, and searching a carbon account to which the carbon behavior data belongs from a plurality of carbon accounts.
The carbon behavior refers to behaviors related to reducing the emission of greenhouse gases such as carbon dioxide, including but not limited to low-carbon travel behaviors such as walking, riding bicycles, riding public transportation means, and the like, network office behaviors for reducing travel such as online ticket purchasing, online payment, online reservation, and the like, and behaviors for reducing paper and plastic use such as paperless reading, electronic invoice, and the like. Carbon behavior data refers to data related to carbon behavior, including but not limited to, the category of carbon behavior, time of occurrence, number of times, etc., such as number of athletic steps, number of public transportation rides, number of electronic invoices, and the like.
To encourage low carbon life, etc., the carbon behavioral data may be converted into carbon resources for trade, thereby allowing the carbon behavioral subjects to benefit. After the carbon behavior data is obtained, a carbon account to which the carbon behavior data belongs may be searched from a plurality of carbon accounts contained in the blockchain network.
Optionally, after the carbon behavior data is obtained and the carbon account to which the carbon behavior data belongs is searched from the plurality of carbon accounts, the carbon account may be verified, for example, whether the registration information included in the carbon account is true, whether the carbon account is authenticated by a real name, whether the carbon account has authority to generate a carbon point, and the like, and after the verification is successful, step S520 is performed again.
Step S520, generating carbon resources to be checked-in according to the carbon behavior data, and updating the carbon resources to be checked-in to a carbon account to which the carbon behavior data belongs; the carbon resource to be checked-in comprises a corresponding carbon resource amount and identification information.
After the carbon behavior data is acquired, carbon resources to be charged can be generated according to the carbon behavior data, wherein each carbon resource to be charged contains corresponding carbon resource amount and identification information. And then, updating the carbon resources to be checked-in to the carbon account to which the carbon behavior data belongs, so that the carbon resources are used as uplink carbon resources for subsequent transactions.
In order to reasonably determine the amount of carbon resources to be charged, in an alternative embodiment, the carbon emission reduction amount may be calculated according to the carbon behavior data, the amount of carbon resources to be charged corresponding to the carbon emission reduction amount may be calculated, and then the carbon resources to be charged may be generated according to the amount of carbon resources to be charged. Alternatively, the carbon resource amount to be charged corresponding to the carbon behavior data may be calculated according to the conversion parameter between the carbon emission reduction amount and the carbon resource and the carbon emission reduction amount corresponding to the carbon behavior data, for example, assuming that the carbon resource is carbon integral, reducing the emission by 1 gram of carbon dioxide may obtain 10 integral, and if the carbon emission reduction amount corresponding to the carbon behavior data is 2 grams, the carbon resource amount to be charged is 20 integral. The specific mode of calculating the carbon emission reduction amount according to the carbon behavior data can be flexibly set according to actual needs, and optionally, in order to unify the calculation mode of the carbon emission reduction amount, the transparency and the reliability of the carbon emission reduction amount are improved, and the blockchain intelligent contract can be called to calculate the carbon emission reduction amount.
Step S530, generating a carbon resource generation record corresponding to the carbon resource to be checked in, and storing the carbon resource generation record into the blockchain network; the carbon resource generation record comprises carbon behavior data, identification information of carbon resources to be checked-in, and carbon resource quantity of the carbon resources to be checked-in.
After the carbon resources to be checked-in are generated and updated to the corresponding carbon accounts, carbon resource generation records corresponding to the carbon resources to be checked-in can be generated, and the carbon resource generation records comprise carbon behavior data, identification information of the carbon resources to be checked-in and carbon resource quantity of the carbon resources to be checked-in, so that the tracing of the carbon resources is facilitated. The carbon resource generation record may also contain information related to the carbon resource, such as a carbon account to which the carbon behavior data pertains. Optionally, a UTXO manner may be used to generate a carbon resource generation record, where the carbon resource generation record includes a transaction input, a transaction output, and identification information of a carbon resource corresponding to the transaction output, where the transaction input is carbon behavior data, and the transaction output is carbon resource to be checked corresponding to the carbon behavior data.
And then, storing the generated carbon resource generation record into a blockchain network, so that the traceability of the carbon resource is facilitated.
To enable trusted generation of carbon resources, in an alternative embodiment, a blockchain smart contract may be invoked and steps S520-S530 are implemented by the blockchain smart contract.
Optionally, the carbon resource generation record may further include identification information (e.g., hash value) of the carbon resource generation record, where the carbon resource to be checked may include identification information of the carbon resource generation record, in a transaction process of the carbon resource, identification information of the carbon resource generation record included in the input carbon resource may be added to the output carbon resource, so that tracing of the carbon behavior data may be performed based on the identification information of the carbon resource generation record included in the carbon resource, for example, assuming that the hash value of the carbon resource transaction record is hash1 generated based on the carbon behavior data, the carbon resource a1 includes hash1, in a certain carbon resource transaction process, the carbon resource a1 is split into carbon resource a2 and carbon resource a3, and in another carbon resource transaction process, the carbon resource a3 is split into carbon resource a4 and carbon resource a5, and then the carbon resources a2-a5 each include hash1, so that the original source hash1 included in the carbon resource a5 may be directly searched for, and the carbon behavior data of the original source can be traced.
It should be noted that: specific implementation details of step S410-step S440 shown in fig. 5 may refer to step S410-step S440 shown in fig. 4, and will not be described here.
In the embodiment shown in fig. 5, carbon behavior data is acquired, a carbon account to which the carbon behavior data belongs is searched from a plurality of carbon accounts, carbon resources to be charged are generated according to the carbon behavior data, and the carbon resources to be charged are updated to the carbon account to which the carbon behavior data belongs; the method comprises the steps that carbon resources to be checked-in comprise corresponding carbon resource quantity and identification information, a carbon resource generation record corresponding to the carbon resources to be checked-in is generated, and the carbon resource generation record is stored in a blockchain network; the carbon resource generation record contains carbon behavior data, identification information of carbon resources to be checked in and carbon resource quantity of the carbon resources to be checked in, so that conversion from the carbon behavior data to the carbon resources is realized, tracing of the carbon resources can be realized through the carbon resource generation record, reliability of the carbon resources is improved, the carbon resource generation record contains the identification information of the carbon resources, tracing can be performed based on identification of the carbon resources, and tracing efficiency is improved.
In an exemplary embodiment, referring to FIG. 6, FIG. 6 is a flow chart of a blockchain-based data processing method shown in another exemplary embodiment of the application. The method may be applied to the implementation environment shown in fig. 3, which may be performed by the transaction processor 320 in the implementation environment shown in fig. 3. As shown in fig. 6, the method includes steps S410-S440, steps S510-S530, and steps S610-S630, wherein the detailed descriptions of steps S610-S630 are as follows:
Step S610, obtaining a plurality of carbon resources to be authenticated from a plurality of carbon accounts.
The carbon account includes carbon resources to be authenticated, for example, carbon resources to be checked-in that are updated to the carbon account and are not authenticated. In order to improve authentication efficiency, multiple carbon resources to be authenticated can be obtained from multiple carbon accounts.
Optionally, a specified number of carbon resources to be authenticated may be obtained from a plurality of carbon accounts, where the specified number may be flexibly set according to actual needs, for example, set to 100 parts, 1000 parts, and so on; or, the carbon resources to be checked-in generated in the specified time period can be obtained from a plurality of carbon accounts, wherein the specified time period can be flexibly set according to actual needs, for example, 10 minutes, 1 day and the like.
Step S620, obtaining carbon resource generation records corresponding to the carbon resources to be authenticated respectively, and sending the carbon resource generation records corresponding to the carbon resources to be authenticated respectively to an authenticator, so that the authenticator authenticates each carbon resource to be authenticated according to the carbon resource generation record corresponding to each carbon resource to be authenticated.
And after the carbon resource generation records corresponding to the carbon resources to be authenticated are obtained, the transaction processing party sends the carbon resource generation records to the authentication party.
The authenticator is used for authenticating the carbon resource to be authenticated, and can be equipment corresponding to a relevant regulatory agency or a third party agency. After receiving the carbon resource generation records corresponding to the carbon resources to be authenticated, the authenticator can authenticate the carbon resources to be authenticated according to the carbon resource generation records, wherein a specific authentication mode can be flexibly set according to actual needs, for example, the authentication mode comprises at least one of the following authentication modes: first, the amount of carbon resources can be calculated according to the carbon behavior data contained in the carbon resource generation record, so as to verify whether the amount of carbon resources contained in the carbon resources to be authenticated is correct or not according to the calculated amount of carbon resources; second, the source of the carbon behavior data is authenticated.
Step S630, receiving an authentication success message sent by the authentication party, and setting a plurality of carbon resources to be authenticated as carbon resources for transaction according to the authentication success message.
After the authentication party authenticates the carbon resources to be authenticated, if authentication is successful, an authentication success message is sent to the transaction processing party, and the transaction processing party sets the carbon resources to be authenticated as carbon resources for transaction according to the authentication success message, that is, the carbon resources to be authenticated are authenticated, and after authentication is successful, the carbon resources can be used for transaction.
It should be noted that: specific implementation details of step S410 to step S440 shown in fig. 6 may refer to step S410 to step S440 shown in fig. 4, and specific implementation details of step S510 to step S530 shown in fig. 6 may refer to step S510 to step S530 shown in fig. 5, which will not be described herein.
In the embodiment shown in fig. 6, after the carbon resource to be authenticated is authenticated and the authentication is successful, the carbon resource can be used for carrying out the transaction, so that the security and the credibility of the transaction can be improved; and, the transaction party authenticates the carbon resources to be authenticated in batches, so that the authentication efficiency can be improved, and further the transaction efficiency is improved.
In an exemplary embodiment, referring to FIG. 7, FIG. 7 is a flow chart of a blockchain-based data processing method shown in another exemplary embodiment of the application. The method may be applied to the implementation environment shown in fig. 3, which may be performed by the transaction processor 320 in the implementation environment shown in fig. 3. As shown in fig. 7, the method includes steps S410-S440, S510, S710-S740, and S530, wherein the detailed descriptions of steps S710-S740 are as follows:
step S710, calculating the amount of carbon resources to be charged according to the carbon behavior data, and generating the carbon resources to be charged according to the amount of carbon resources to be charged.
The carbon resource amount to be charged can be calculated according to the carbon behavior data, and the carbon resource to be charged, which is matched with the carbon resource amount to be charged, is generated.
Step S720, a data block for storing a carbon resource generation record corresponding to the carbon resource to be checked in is obtained, and identification information of the carbon resource to be checked in is generated according to the identification information of the data block.
The carbon resource generation record is stored in a data block contained in the blockchain network, after the carbon resource to be checked in is generated, the data block for storing the carbon resource generation record corresponding to the carbon resource to be checked in can be obtained, and the identification information of the carbon resource to be checked in is generated according to the identification information of the data block. Wherein the identification information of the data block includes, but is not limited to, hash value of the data block, block height, etc.
The specific mode of generating the identification information of the carbon resource to be checked-in according to the identification information of the data block can be set according to actual needs, for example, a random number can be generated, and the random number and the identification information of the data block are spliced to obtain the identification information of the carbon resource to be checked-in; or, the serial number of the carbon resource to be checked in can be obtained, and the serial number of the carbon resource to be checked in is spliced with the identification information of the data block to obtain the identification information of the carbon resource to be checked in. Optionally, in order to avoid that other people determine the number of carbon resources, the height of the data block and the like according to the identification information of the carbon resources to be checked in, the identification information obtained by splicing can be encrypted, and the encrypted identification information is used as the identification information of the carbon resources to be checked in.
In step S730, the identification information of the to-be-charged carbon resource is added to the to-be-charged carbon resource.
And after the identification information of the carbon resources to be checked-in is generated, adding the identification information of the carbon resources to be checked-in to the carbon resources to be checked-in.
Step S740, updating the carbon resources to be checked-in to the carbon account to which the carbon behavior data belong.
And updating the generated carbon resources to be checked into the carbon account to which the carbon behavior data belongs, so as to complete the conversion of the carbon behavior data and the carbon resources.
It should be noted that: specific implementation details of step S410-step S440 shown in fig. 7 may refer to step S410-step S440 shown in fig. 4, and specific implementation details of step S510 and step S530 shown in fig. 7 may refer to step S510 and step S530 shown in fig. 5, which are not described herein.
In the embodiment shown in fig. 7, the identification information of the carbon resource to be checked is generated according to the identification information of the data block for storing the carbon resource generation record corresponding to the carbon resource to be checked, so that the identification information of the data block storing the carbon resource generation record thereof can be restored according to the identification information of the carbon resource to be checked, the data block is conveniently positioned according to the identification information of the data block, and the carbon resource generation record is searched from the data block, thus, even if the carbon resource is transacted for a plurality of times, the identification information of the carbon resource of the original source is included in the carbon resource, the identification information of the data block corresponding to the carbon resource generation record of the original source carbon resource can be directly determined according to the identification information, the data block can be positioned and the carbon resource generation record of the original source carbon resource can be searched from the data block based on the identification information of the data block, and the layer-by-layer tracing efficiency is not required.
In an exemplary embodiment, referring to FIG. 8, FIG. 8 is a flow chart of a blockchain-based data processing method shown in another exemplary embodiment of the application. The method may be applied to the implementation environment shown in fig. 3, which may be performed by the transaction processor 320 in the implementation environment shown in fig. 3. As shown in fig. 8, in the condition that the carbon behavior data includes a plurality of pieces of carbon behavior data, the method includes steps S410 to S440, S510, S810 to S830, and S530, wherein the detailed descriptions of steps S810 to S830 are as follows:
step S810, calculating carbon emission reduction amount corresponding to each carbon behavior data, and calculating the carbon resource amount to be charged corresponding to each carbon behavior data according to the carbon emission reduction amount corresponding to each carbon behavior data.
Under the condition of containing a plurality of carbon behavior data, the carbon emission reduction amount corresponding to each carbon behavior data can be calculated, and the carbon resource amount to be checked corresponding to each carbon behavior data is calculated according to the carbon emission reduction amount corresponding to each carbon behavior data.
Step S820, according to the amount of carbon resources to be charged corresponding to each carbon behavior data, generating carbon resources to be charged corresponding to each carbon behavior data.
Under the condition of containing a plurality of carbon behavior data, in order to facilitate the tracing of carbon resources, the amount of carbon resources to be charged corresponding to each carbon behavior data can be calculated, and based on the amount of carbon resources to be charged corresponding to each carbon behavior data, corresponding carbon resources to be charged can be generated.
Step S830, the carbon resources to be checked-in are updated to the carbon account to which the carbon behavior data belongs.
And updating the generated carbon resources to be checked into the corresponding carbon accounts.
It should be noted that: specific implementation details of step S410-step S440 shown in fig. 8 may refer to step S410-step S440 shown in fig. 4, and specific implementation details of step S510 and step S530 shown in fig. 8 may refer to step S510 and step S530 shown in fig. 5, which are not described herein.
In the embodiment shown in fig. 8, carbon resources corresponding to each carbon behavior data are generated, so that the traceability of the carbon resources is facilitated.
In an exemplary embodiment, referring to fig. 9, fig. 9 is a flowchart illustrating a blockchain-based data processing method according to another exemplary embodiment of the present application. The method may be applied to the implementation environment shown in fig. 3, which may be performed by the transaction processor 320 in the implementation environment shown in fig. 3. As shown in fig. 9, in the condition that the carbon behavior data includes a plurality of pieces of carbon behavior data, the method includes steps S410 to S440, steps 510, steps S910 to S940, and step S530, wherein the detailed descriptions of steps S910 to S940 are as follows:
step S910, calculating carbon emission reduction amount corresponding to each carbon behavior data, and calculating the carbon resource amount to be charged corresponding to each carbon behavior data according to the carbon emission reduction amount corresponding to each carbon behavior data.
Under the condition of containing a plurality of carbon behavior data, the carbon emission reduction amount corresponding to each carbon behavior data can be calculated, and the carbon resource amount to be checked corresponding to each carbon behavior data is calculated according to the carbon emission reduction amount corresponding to each carbon behavior data.
Step S920, at least one carbon behavior data set is obtained from the plurality of carbon behavior data sets, wherein the sum of the amounts of carbon resources to be charged corresponding to the at least one carbon behavior data contained in each carbon behavior data set is matched with the set amount of carbon resources.
In the condition of containing a plurality of carbon behavior data, in order to reduce the data processing amount, carbon behavior data sets can be obtained from the plurality of carbon behavior data sets, wherein each carbon behavior data set contains at least one carbon behavior data, and the carbon resource amount contained in the at least one carbon behavior data is matched with the set carbon resource amount after the carbon resource amount is contained in the at least one carbon behavior data.
Step S930, generating carbon resources to be checked corresponding to each carbon behavior data set according to the set carbon resource amount.
And generating carbon resources to be checked-in corresponding to each carbon behavior data set, wherein the carbon resource amount contained in each carbon resource to be checked-in is a set carbon resource amount.
Step S940, updating the carbon resources to be checked-in to the carbon account to which the carbon behavior data belongs.
And updating the generated carbon resources to be checked into the corresponding carbon accounts.
It should be noted that: specific implementation details of step S410-step S440 shown in fig. 9 may refer to step S410-step S440 shown in fig. 4, and specific implementation details of step S510 and step S530 shown in fig. 9 may refer to step S510 and step S530 shown in fig. 5, which are not described herein.
In the embodiment shown in fig. 9, the carbon resources are generated according to the set carbon resource amount, so that the data processing amount is reduced, and the processing efficiency of the carbon resource transaction is improved.
In an exemplary embodiment, referring to fig. 10, fig. 10 is a flowchart illustrating a blockchain-based data processing method according to another exemplary embodiment of the present application. The method may be applied to the implementation environment shown in fig. 3, which may be performed by the transaction processor 320 in the implementation environment shown in fig. 3. As shown in fig. 10, the blockchain-based data processing method includes S410-S440 and S1010-S1040 under the condition that the carbon account further includes a carbon quota, wherein the detailed description of steps S1010-S1040 is as follows:
step S1010, acquiring a carbon resource conversion request, and searching a resource conversion carbon account and a designated carbon account from a plurality of carbon accounts according to the carbon resource conversion request; wherein the carbon resource conversion request contains a carbon resource conversion amount.
In some scenarios, the carbon account may contain a carbon quota, where the carbon resource needs to be converted into a carbon quota, for example, for an enterprise, a related department may allocate a carbon quota index to be completed for the enterprise, the enterprise needs to implement the carbon quota index, and if the enterprise cannot implement the carbon quota index, the carbon resource held by the enterprise may be converted into a carbon quota, thereby completing the carbon quota index.
The designated carbon account contained in the blockchain network refers to an account for managing carbon quotas, which may be applied by a related department registered in the blockchain network.
If conversion between carbon resources and carbon configuration is required, a carbon resource conversion request may be initiated, where the carbon resource conversion request includes information of a carbon account required to perform carbon resource conversion and a carbon resource conversion amount (the number of carbon resources required to be converted).
After the carbon resource conversion request is obtained, the resource conversion carbon account and the designated carbon account can be searched from a plurality of carbon accounts contained in the blockchain network.
Step S1020, determining a carbon quota conversion amount matched with the carbon resource conversion amount according to the conversion parameters between the carbon resource and the carbon quota.
The conversion parameter between the carbon resource and the carbon quota is used for describing the number of carbon quota obtained by converting a certain number of carbon resources, is a conversion unit between the carbon resource and the carbon quota, and for convenience in calculation, may be the number of carbon quota obtained by converting a unit carbon resource, or refers to the number of carbon resources obtained by converting a unit carbon quota.
According to the conversion parameters between the carbon resources and the carbon quota, the number of the carbon quota which can be obtained by conversion of the carbon resources and is matched with the carbon resource conversion amount, namely the carbon quota conversion amount, can be calculated.
In step S1030, a converted carbon resource for conversion is determined from the plurality of carbon resources included in the resource conversion carbon account, and the carbon resource amount of the converted carbon resource and the carbon resource amount included in the designated carbon account are adjusted according to the carbon resource conversion amount.
The resource conversion account contains a plurality of carbon resources, and the converted carbon resources used for the conversion can be screened from the plurality of carbon resources. Optionally, in order to ensure that the resource conversion is successfully performed, at least one carbon resource with the sum of the carbon resources contained in the resource conversion account being greater than or equal to the carbon resource conversion amount may be screened out from the multiple carbon resources contained in the resource conversion account, and then the screened at least one carbon resource is used as the converted carbon resource, where the specific manner of screening out the converted carbon resource from the multiple carbon resources contained in the resource conversion account is similar to the specific manner of screening out the transaction carbon resource from the multiple carbon resources contained in the resource conversion account, and is not repeated herein.
And then, adjusting the carbon resource amount of the converted carbon resource and the carbon resource amount contained in the designated carbon account according to the carbon resource conversion amount, wherein the carbon resource amount contained in the converted carbon resource is adjusted down in the resource conversion carbon account, the adjusted down value is matched with the carbon resource conversion amount, the carbon resource is added in the designated carbon account, and the added carbon resource amount is matched with the carbon resource conversion amount, so that the carbon resource matched with the carbon resource conversion amount is transferred from the resource conversion carbon account to the designated carbon account for exchanging carbon quota.
Optionally, the converted carbon resource may be split into a third carbon resource and a fourth carbon resource, where the carbon resource amount of the third carbon resource matches the resource delta (a difference between the carbon resource amount of the converted carbon resource and the carbon resource conversion amount), the carbon resource amount of the fourth carbon resource matches the carbon resource conversion amount, and then the converted carbon resource is updated to the third carbon resource, and the fourth carbon resource is updated to the designated carbon account, where the third carbon resource and the fourth carbon resource may include identification information of the converted carbon resource. The specific processing manner is similar to the processing manner of the first carbon resource and the second carbon resource, and will not be repeated here.
Step S1040, adjusting the carbon quota amount contained in the resource conversion carbon account and the designated carbon account according to the carbon quota conversion amount.
After the carbon resource amount of the converted carbon resource and the carbon resource amount contained in the designated carbon account are adjusted according to the carbon resource conversion amount, the carbon quota amount contained in the resource conversion carbon account and the designated carbon account can be adjusted according to the carbon quota conversion amount, namely, the carbon quota is added in the resource conversion carbon account and matched with the carbon quota conversion amount, the carbon quota is reduced in the designated carbon account and matched with the carbon quota conversion amount, so that the carbon quota matched with the carbon quota conversion amount is transferred from the designated carbon account to the resource conversion carbon account, and conversion between the carbon resource and the carbon quota is realized.
Alternatively, in some embodiments, in a designated carbon account, the carbon resource may be destroyed and a carbon quota matched with the destroyed carbon resource generated. Correspondingly, after the carbon resource amount of the converted carbon resource and the carbon resource amount contained in the designated carbon account are adjusted according to the carbon resource conversion amount (i.e., after the carbon resource matched with the carbon resource conversion amount is transferred to the designated carbon account), in the process of adjusting the carbon resource conversion carbon account and the carbon quota amount contained in the designated carbon account according to the carbon quota conversion amount, the carbon resource matched with the carbon resource conversion amount obtained from the resource conversion account can be destroyed in the designated carbon account, and the carbon quota matched with the carbon quota conversion amount is generated, and the generated carbon quota is transferred from the designated carbon account to the carbon resource conversion account, so as to realize the destruction of the carbon resource and the generation of the carbon quota, wherein the corresponding destruction record can be stored in a blockchain network, the destruction record can contain identification information of the destroyed carbon resource, the generated carbon quota amount and the like, and optionally, the destruction record can contain input and output, and the output is transferred to the carbon of the carbon resource conversion account assuming that the carbon resource received by the designated carbon account is the fourth carbon resource.
It should be noted that, in the embodiment shown in fig. 10, the transfer of carbon resources and carbon quota between the non-designated carbon account and the designated carbon account is implemented, and in other embodiments, the transfer of carbon resources and carbon quota between the non-designated carbon account may also be implemented based on a similar manner, for example, an enterprise carbon account may purchase carbon quota from other enterprise carbon accounts through carbon resources.
It should be noted that: specific implementation details of S410-step S440 shown in fig. 10 may refer to S410-step S440 shown in fig. 4, and will not be described here.
In the embodiment shown in fig. 10, a carbon resource conversion request is acquired, and a resource conversion carbon account and a designated carbon account are searched from a plurality of carbon accounts according to the carbon resource conversion request; the carbon resource conversion request comprises carbon resource conversion quantity, conversion carbon resources used for conversion are determined from a plurality of carbon resources contained in a resource conversion carbon account, the carbon resource quantity of the conversion carbon resources and the carbon resource quantity contained in a designated carbon account are adjusted according to the carbon resource conversion quantity, and the carbon quota quantity contained in the resource conversion carbon account and the designated carbon account is adjusted according to the carbon quota conversion quantity, so that conversion between carbon resources and carbon quota between a non-designated carbon account and the designated carbon account is realized.
In an exemplary embodiment, referring to FIG. 11, FIG. 11 is a flow chart of a blockchain-based data processing method shown in another exemplary embodiment of the application. The method may be applied to the implementation environment shown in fig. 3, which may be performed by the transaction processor 320 in the implementation environment shown in fig. 3. As shown in fig. 11, the blockchain-based data processing method includes steps S410-S440, steps S1010-S1040, and steps S1110-S1120, which are described in detail as follows:
step S1110, generating a conversion record corresponding to the carbon resource conversion request; the conversion record contains identification information of the converted carbon resource.
After the conversion between the carbon resources corresponding to the carbon resource conversion request and the carbon quota is achieved, a conversion record corresponding to the carbon resource conversion request can be generated, wherein the conversion record contains identification information of the converted carbon resources, and therefore searching of the conversion record is facilitated based on the identification information of the converted carbon resources.
Optionally, the conversion record may further include at least one of information related to the carbon resource conversion request, such as a carbon resource conversion account, a designated account, a carbon resource conversion amount, a carbon quota conversion amount, and the like.
Alternatively, the conversion record may be generated by adopting a UTXO mode, where the conversion record may include a transaction input corresponding to the carbon resource conversion request, a transaction output, and the like, where the transaction input includes information about the converted carbon resource before updating (for example, an amount of carbon resource), and the transaction output may include information about the converted carbon resource after updating (for example, an amount of remaining carbon resource), a number of carbon quotas received by the carbon resource conversion account, and the like. Optionally, the conversion record includes a first sub-record and a second sub-record, wherein the transaction input of the first sub-record is a conversion carbon resource, the transaction output is a third carbon resource and a fourth carbon resource, the transaction input of the second sub-record is a fourth carbon resource, and the transaction output is a carbon quota transferred to the carbon resource conversion account.
In step S1120, the conversion record is stored in the blockchain network.
After the conversion record is generated, the generated conversion record is stored in the blockchain network, so that the traceability of the resource conversion is facilitated.
It should be noted that: specific implementation details of step S410 to step S440 shown in fig. 11 may refer to step S410 to step S440 shown in fig. 4, and specific implementation details of step S1010 to step S1040 shown in fig. 11 may refer to step S1010 to step S1040 shown in fig. 10, which will not be described herein.
In the embodiment shown in fig. 11, a conversion record corresponding to the carbon resource conversion request is generated; the conversion record contains identification information of the conversion carbon resource, and the conversion record is stored in the blockchain network, so that the traceability of the conversion of the carbon resource is facilitated, and the traceability can be performed based on the identification information of the carbon resource.
In an exemplary embodiment, referring to fig. 12, fig. 12 is a flowchart illustrating a blockchain-based data processing method according to another exemplary embodiment of the present application. The method may be applied to the implementation environment shown in fig. 3, which may be performed by the transaction processor 320 in the implementation environment shown in fig. 3. As shown in fig. 12, the method includes steps S410-S440, and steps S1210-S1220, wherein the detailed descriptions of steps S1210-S1220 are as follows:
In step S1210, a carbon resource transaction record search request is received, where the carbon resource transaction record search request includes feature information of a carbon resource transaction record to be searched.
The carbon resource transaction record searching request is used for triggering and searching the carbon resource transaction record and comprises characteristic information of the carbon resource transaction record to be searched, wherein the carbon resource transaction record to be searched corresponds to identification information of the carbon resource transaction request and the like.
Step S1220, the carbon resource transaction record matching the feature information is searched for from the plurality of carbon resource transaction records stored in the blockchain network.
After receiving the carbon resource transaction record searching request, searching the carbon resource transaction record matched with the characteristic information from a plurality of carbon resource transaction records stored in the blockchain network.
It should be noted that: specific implementation details of step S410-step S440 shown in fig. 12 may refer to step S410-step S440 shown in fig. 4, and will not be described here.
In the embodiment shown in fig. 12, a carbon resource transaction record search request is received, where the carbon resource transaction record search request includes characteristic information of a carbon resource transaction record to be searched, and a carbon resource transaction record matched with the characteristic information is searched from a plurality of carbon resource transaction records stored in a blockchain network, so that a query of the carbon resource transaction record can be realized, and the supervision of transactions is facilitated.
In an exemplary embodiment, referring to fig. 13, fig. 13 is a flowchart illustrating a blockchain-based data processing method according to another exemplary embodiment of the present application. The method may be applied to the implementation environment shown in fig. 3, which may be performed by the transaction processor 320 in the implementation environment shown in fig. 3. As shown in fig. 12, in the condition that the characteristic information of the carbon resource transaction record to be searched includes the identification information of the target carbon resource, the method includes steps S410-S440, S1210, and S1310, where the detailed description of step S1310 is as follows:
step S1310, searching a carbon resource transaction record containing identification information of the target carbon resource from a plurality of carbon resource transaction records stored in the blockchain network.
The carbon resource transaction record contains identification information of the transaction carbon resource, so that the carbon resource transaction record can be searched based on the identification information of the carbon resource. Correspondingly, the carbon resource transaction record searching request can comprise identification information of a target carbon resource corresponding to the carbon resource transaction record to be searched, and then the carbon resource transaction record comprising the identification information of the target carbon resource is searched from a plurality of carbon resource transaction records stored in the blockchain network.
The target carbon resource is the carbon resource contained in the carbon resource transaction record to be searched.
Optionally, the blockchain network further includes other records including identification information of carbon resources, such as a carbon resource generation record and a conversion record, and the transaction processing party may also receive a record searching request including identification information of a target carbon resource of the record to be searched, so as to search the record including identification information of the target carbon resource (including the carbon resource transaction record, the carbon resource generation record, the carbon resource conversion record, and the like) from the blockchain network according to the identification information of the target carbon resource, thereby implementing tracing.
It should be noted that: specific implementation details of step S410-step S440 shown in fig. 13 may refer to step S410-step S440 shown in fig. 4, and specific implementation details of step S1210 shown in fig. 13 may refer to step S1210 shown in fig. 12, which are not described herein.
In the embodiment shown in fig. 13, the carbon resource transaction records containing the identification information of the target carbon resource are searched from the plurality of carbon resource transaction records stored in the blockchain network, so that all the carbon resource transaction records of the carbon resource can be searched based on the identification information of the carbon resource, and the tracing of the whole carbon resource transaction records of the carbon resource is facilitated.
In an exemplary embodiment, referring to fig. 14, fig. 14 is a flowchart illustrating a blockchain-based data processing method according to another exemplary embodiment of the present application. The method may be applied to the implementation environment shown in fig. 3, which may be performed by the transaction processor 320 in the implementation environment shown in fig. 3. As shown in fig. 12, in the condition that the characteristic information of the carbon resource transaction record to be searched includes the target carbon account, the method includes steps S410-S440, S1210, and S1410, wherein the detailed description of step S1410 is as follows:
step S1410, a carbon resource transaction record including the target carbon account is searched from the plurality of carbon resource transaction records stored in the blockchain network.
The carbon resource transaction record comprises a resource transfer account and a resource transfer account, so that the carbon resource transaction record can be searched based on the carbon account. Correspondingly, the carbon resource transaction record searching request can comprise a target carbon account corresponding to the carbon resource transaction record to be searched, and then the carbon resource transaction record comprising the target carbon account is searched from a plurality of carbon resource transaction records stored in the blockchain network.
The target carbon account is the carbon account contained in the carbon resource transaction record to be searched.
It should be noted that: specific implementation details of step S410-step S440 shown in fig. 14 may refer to step S410-step S440 shown in fig. 4, and specific implementation details of step S1210 shown in fig. 14 may refer to step S1210 shown in fig. 12, which are not described herein.
In the embodiment shown in fig. 14, the carbon resource transaction record including the target carbon account is searched from the plurality of carbon resource transaction records stored in the blockchain network, so that all the carbon resource transaction records of the carbon account can be searched based on the carbon account, and the carbon resource transaction records can be conveniently queried by the use object of the carbon account.
In an exemplary embodiment, the implementation environment includes a personal terminal 1510, an enterprise terminal 1520, and a related department terminal 1530, where the usage object of the personal terminal 1510 is a personal user, the usage object of the enterprise terminal 1520 is an enterprise user, and the usage object of the related department terminal 1530 is a related department staff. As shown in fig. 15, the implementation environment includes a personal terminal 1510, an enterprise terminal 1520, a related department terminal 1530, a blockchain platform 1540, and a processing platform 1550.
The usage objects corresponding to the personal terminal 1510, the enterprise terminal 1520 and the related department terminal 1530 may be registered in the blockchain platform 1540 to obtain corresponding carbon accounts, so that for convenience of distinction, the carbon account corresponding to the personal terminal 1510 is designated as a personal carbon account, the account corresponding to the enterprise terminal 1520 is designated as an enterprise carbon account, the personal carbon account may be used to store carbon points, the enterprise carbon account may be used to store carbon points and carbon quota, and the designated carbon account may be used to store carbon points and carbon quota.
The personal terminal 1510 may acquire carbon behavior data of the personal user, for example, public transportation travel data, life payment data, public welfare activity data, etc., through a native application, applet, etc., under the authority of the personal user. The personal terminal 1510 may then upload the acquired carbon behavior data to the processing platform 1550 and the blockchain platform 1540.
The blockchain platform 1540 includes a carbon metering contract 1541, a carbon account contract 1542, a carbon integration contract 1543, and a carbon trade contract 1544. The carbon metering contract 1541, the carbon account contract 1542, the carbon integration contract 1543 and the carbon transaction contract 1544 are all blockchain intelligent contracts, wherein the carbon metering contract 1541 is used for calculating corresponding carbon emission reduction amounts according to carbon behavior data, the carbon account contract 1542 is used for managing registration of carbon accounts, and the carbon integration contract 1543 is used for managing carbon integration, including but not limited to calculating carbon integration corresponding to carbon emission reduction amounts, transferring carbon integration among carbon accounts and the like; carbon trade contracts 1544 are used to manage transfer of carbon credits, transfer of carbon quotas, and the like.
The processing platform 1550 includes a behavior calculation module 1551, a point management module 1552, a equity redemption module 1553, and a commodity redemption module 1554. The behavior calculation module 1551 is configured to calculate a corresponding carbon emission reduction amount according to the carbon behavior data, and may invoke the carbon metering contract 1541 to calculate the carbon emission reduction amount corresponding to the carbon behavior data; the points management module 1552 is configured to manage carbon points contained in the carbon account, including but not limited to increasing carbon points, decreasing carbon points, transferring carbon points, etc., and optionally, the points management module 1552 may invoke the carbon points contract 1543 to calculate a carbon point corresponding to the carbon reduction amount via the carbon points contract 1543. The equity redemption module 1553 may be used to redeem equity based on carbon, and the commodity redemption module 1554 may be used to redeem commodity based on carbon, where equity and commodity may be provided by an enterprise. During the equity redemption and the commodity redemption, carbon point transfer is involved, and therefore, equity redemption module 1553 and commodity redemption module 1554 may invoke carbon trade contracts 1544 to effect carbon point transfer.
The enterprise terminal 1520 includes a carbon quota transaction module 1521 and a carbon behavior recording module 1522, the carbon quota transaction module 1521 being configured to implement transactions for carbon quota, the carbon behavior recording module 1522 being configured to record relevant carbon behavior data (e.g., carbon emissions, etc.) for the enterprise.
The related department terminal 1530 may include a carbon quota management module 1531 and a monitoring module 1532. The carbon quota management module 1531 is configured to implement management of carbon quota, including, but not limited to, generation of carbon quota, destruction of carbon credits, transfer of carbon quota, and the like. The monitoring module 1532 is configured to enable monitoring of data related to carbon credits, etc., such as monitoring of carbon credit transactions and carbon credit transactions.
In the implementation environment shown in fig. 15, conversion of personal carbon behavior data to carbon credits may be implemented, transfer of carbon credits between a personal carbon account and an enterprise carbon account (e.g., an individual user may purchase merchandise provided by an enterprise user via carbon credits, etc.), transfer of carbon credits and carbon credits between an enterprise carbon account and an enterprise carbon account (e.g., an enterprise carbon account purchases carbon credits from other enterprise carbon accounts via carbon credits), transfer of carbon credits and carbon credits between an enterprise carbon account and a designated carbon account, etc. In one example, see fig. 16A, which may include steps S1601-S1605, described in detail below:
Step S1601, obtain carbon behavior data corresponding to the personal carbon account.
In step S1602, carbon credits are calculated based on the carbon behavior data and the carbon credits obtained from the credits are updated to the personal carbon account.
In step S1603, a commodity purchase request initiated by the personal carbon account is received.
The application object of the personal carbon account can initiate a commodity purchase request for purchasing commodities sold by the enterprise carbon account.
Step S1604 transfers the carbon credit corresponding to the commodity purchase request from the personal carbon account to the business carbon account.
The carbon points for purchasing the commodity are transferred from the personal carbon account to the business carbon account.
In step S1605, the carbon credits contained in the enterprise carbon account are converted to carbon credits.
The carbon credits contained in the enterprise carbon account can be transferred to the appointed carbon account, the appointed carbon account destroys the received carbon credits, a corresponding carbon quota is generated, and the carbon quota is transferred to the enterprise carbon account.
In step S1601-step S1605, the transfer process of the carbon credits and the carbon credits is shown in fig. 16B, where, referring to fig. 16B, the carbon credits corresponding to the carbon behavior data are updated into the personal carbon account, then, the carbon credits are transferred from the personal carbon account to the enterprise carbon account due to purchase of the commodity, the carbon credits are transferred from the enterprise carbon account to the designated carbon account due to exchange of the carbon credits, and the carbon credits corresponding to the carbon credits are transferred from the designated carbon account to the enterprise carbon account.
In some alternative embodiments, carbon resources such as carbon credits and carbon quota may be transferred and recorded by using UTXO, where each carbon resource transfer may be recorded as a transaction, each transaction corresponds to one or more transaction inputs and one or more transaction outputs, the transaction inputs may include an identification number token_id of the carbon resource, and the transaction outputs may include identification information of a carbon resource transfer-out party and an amount of the carbon resource. For example, referring to fig. 17, in the Tx1 transaction, the transaction input is 20 kg of carbon resources of the personal carbon account a, and the transaction output is 12 kg of carbon resources of the business carbon account B1 and 12 kg of carbon resources of the business carbon account B2; in Tx2 transactions, the transaction input is 12 kg of carbon resources for business carbon account B1, and the transaction output is 12 kg of carbon resources for designated carbon account C, thereby being used to purchase carbon quotas; in Tx3 transactions, the transaction input is 8 kg of carbon resources of the enterprise carbon account B2, and the transaction output is 6 kg of carbon resources of the enterprise carbon account B2 and 2 kg of carbon resources of the enterprise carbon account B2; in transaction Tx4, the transaction input is 6 kg of carbon resources for business carbon account B2, and the transaction output is 6 kg of carbon resources for designated carbon account C, for redemption of the carbon quota; in the Tx5 transaction, the transaction input is 12 kg carbon resources and 6 kg carbon resources of designated carbon account B2, the transaction output is 17 kg carbon quota of designated carbon account C, and 1 kg carbon resources of designated carbon account C. And then, generating a transaction record of each transaction in the transactions Tx1-Tx5 based on the transaction input and the transaction output, wherein the transaction records of the transactions Tx1-Tx5 all contain the identification number of 20 kg of carbon resources of the personal carbon account A, so that the related transaction records are conveniently searched based on the identification information of 20 kg of carbon resources of the personal carbon account A, and tracing is realized.
In an exemplary embodiment, taking carbon resources as carbon credits as an example, in order to improve the security of carbon transactions, referring to fig. 18, the implementation environment includes a personal terminal, a carbon transaction platform, a carbon verification platform, a blockchain network, a regulatory agency verification platform, and a data analysis platform of the regulatory agency.
Referring to fig. 18, the process of generating the carbon integral from the carbon behavior data may include steps S1801 to S1813, which are described in detail as follows:
step S1801, the personal terminal reports the carbon behavior data to the carbon transaction platform through the applet.
In step S1802, the carbon transaction platform sends carbon behavior data to the carbon verification platform.
In step S1803, the carbon verification platform uploads carbon behavior data to the blockchain node through the intelligent contract interface in the blockchain network.
In step S1804, the blockchain node generates carbon points corresponding to the carbon behavior data through the smart contract, and initiates a carbon point generation transaction.
The process of generating carbon credits from carbon behavior data is referred to as a blockchain transaction (i.e., carbon credit generation transaction) to facilitate on-chain recording.
In step S1805, the block link point generates a data block containing the transaction record corresponding to the carbon integration generation transaction, and performs consensus uplink on the data block.
The transaction record, i.e. carbon integral generation record, here contains carbon behavior data, corresponding carbon integral and transaction hash value.
In step S1806, the blockchain node returns the transaction result to the carbon verification platform.
In step S1807, the carbon verification platform returns the transaction result to the carbon transaction platform.
In step S1808, the carbon transaction platform updates the carbon points to the carbon account to which the carbon behavior data belongs, and stores the hash value of the transaction generated by the carbon points.
After the transaction result is received by the carbon transaction platform, if the transaction result indicates that the transaction is successful, updating the carbon points in the carbon account to which the carbon behavior data belong, and storing the hash value corresponding to the carbon point generation record.
Step S1809, the carbon transaction platform sends a carbon point exchange success message to the applet of the personal terminal.
The carbon credit redemption success message is used to inform the user to whom the personal terminal belongs that the carbon behavioral data has been converted into carbon credits.
In step S1810, the regulatory agency verification platform sends a request to the blockchain node to find carbon integration generation transactions.
In step S1811, the blockchain node sends the carbon integration to the regulatory agency verification platform to generate a transaction record corresponding to the transaction.
In step S1812, the regulatory body verification platform transmits the carbon behavior data and the carbon deposit contained in the transaction record to the data analysis platform of the regulatory body.
In step S1813, the data analysis platform of the regulatory body authenticates the carbon behavior data and the carbon integration.
Alternatively, the data analysis platform of the regulatory agency may be a big data analysis system that may calculate a carbon reduction amount from the carbon behavior data, calculate a corresponding carbon amount from the carbon reduction amount, and authenticate the carbon amount contained in the transaction record based on the carbon amount.
Optionally, the data analysis platform of the regulatory body may send the authentication result to the blockchain node through the verification platform of the regulatory body.
Alternatively, as shown in FIG. 19, the smart contracts may include carbon reduction contracts, points contracts, carbon reduction methodological contracts, account contracts, and evidence-based contracts. In the process of generating carbon credits according to the carbon behavior data, the carbon emission reduction contract is used for providing a contract interface, so that the carbon-carbon transaction platform is convenient to call, and the carbon behavior data can be received through the interface; then, the account contract is called to verify account information and authority data of the carbon account to which the carbon behavior data belong, and in the verification process, the account contract can verify whether the registration data of the carbon account are real, verify the real-name state of the carbon account (namely, verify whether the real-name authentication is carried out), and the like; after verification is successful, carbon emission reduction capacity and carbon integral are calculated by calling carbon emission reduction methodology contracts, carbon emission reduction capacity can be calculated according to carbon behavior data in the calculation process, and carbon integral corresponding to carbon behavior data is calculated according to conversion parameters between the carbon emission reduction capacity and the carbon integral and the carbon emission reduction capacity corresponding to the carbon behavior data; after calculating the carbon integral, calling an integral contract to cast the carbon integral, updating the carbon integral to a carbon account, generating identification information of the carbon integral in the casting process, and adding the identification information into the carbon integral; then, the certification contract is invoked to store the carbon behavior data. In the process of carrying out carbon integration transaction, receiving a carbon integration transaction request through a carbon emission reduction contract; then, an account contract is called to verify the carbon point transfer account and the carbon point transfer account, and in the verification process, the account contract can verify whether the registered data of the carbon point transfer account and the carbon point transfer account are real or not, and verify whether the carbon point transfer account and the carbon point transfer account are authenticated by real names or not; after verification is successful, calling a point contract to execute transaction so as to transfer carbon points; after executing the transaction, invoking the credit contract to store a carbon credit transaction record, wherein the carbon credit transaction record can contain order information, commodity information for exchanging carbon credits, carbon credit transfer amount and the like.
In the embodiment shown in fig. 18, the carbon behavior data is converted into carbon emission reduction, and the carbon emission reduction is transferred into an integral account in the form of carbon integral, and the whole process is automatically performed on a blockchain through an intelligent contract, and the reliability of the carbon integral is improved through supervision by a supervision mechanism.
With reference to FIG. 20, FIG. 20 is a block diagram of a blockchain-based data processing device is shown in accordance with an exemplary embodiment of the present application. As shown in fig. 20, the apparatus includes:
an obtaining module 2001 configured to find a resource transfer-out carbon account and a resource transfer-in carbon account corresponding to the received carbon resource transaction request from a plurality of carbon accounts included in the blockchain network, and obtain a transaction carbon resource for transaction from a plurality of carbon resources included in the resource transfer-out carbon account;
the splitting module 2002 is configured to calculate a resource difference between a carbon resource amount of the transaction carbon resource and a carbon resource transaction amount corresponding to the carbon resource transaction request, and split the transaction carbon resource into a first carbon resource containing a carbon resource amount matched with the resource difference, and a second carbon resource containing a carbon resource amount matched with the carbon resource transaction amount; wherein the first carbon resource and the second carbon resource comprise identification information of the transaction carbon resource;
An updating module 2003 configured to update the transaction carbon resources contained in the resource transfer-out carbon account to the first carbon resources and to update the second carbon resources to the resource transfer-in account;
a recording module 2004 configured to generate a carbon resource transaction record corresponding to the carbon resource transaction request and store the carbon resource transaction record to the blockchain network; the carbon resource transaction record comprises identification information of transaction carbon resources, a carbon account into which the resources are transferred, and carbon resource amounts respectively contained in the transaction carbon resources, the first carbon resources and the second carbon resources.
In another exemplary embodiment, based on the foregoing, the carbon resource transaction record further includes identification information of the carbon resource transaction request, and the first carbon resource and the second carbon resource further include identification information of the carbon resource transaction request.
In another exemplary embodiment, based on the foregoing aspect, the apparatus further includes a carbon resource generation module configured to: acquiring carbon behavior data, and searching a carbon account to which the carbon behavior data belongs from a plurality of carbon accounts; generating carbon resources to be charged according to the carbon behavior data, and updating the carbon resources to be charged to a carbon account to which the carbon behavior data belong; the carbon resource to be checked-in comprises corresponding carbon resource quantity and identification information; generating a carbon resource generation record corresponding to the carbon resource to be charged, and storing the carbon resource generation record into a blockchain network; the carbon resource generation record comprises carbon behavior data, identification information of carbon resources to be checked-in, and carbon resource quantity of the carbon resources to be checked-in.
In another exemplary embodiment, based on the foregoing, the apparatus further includes an authentication module configured to: acquiring a plurality of carbon resources to be authenticated from a plurality of carbon accounts; acquiring carbon resource generation records corresponding to the carbon resources to be authenticated respectively, and sending the carbon resource generation records corresponding to the carbon resources to be authenticated respectively to an authenticator, so that the authenticator authenticates each carbon resource to be authenticated according to the carbon resource generation record corresponding to each carbon resource to be authenticated; and receiving an authentication success message sent by the authentication party, and setting a plurality of carbon resources to be authenticated as carbon resources for transaction according to the authentication success message.
In another exemplary embodiment, based on the foregoing scheme, generating carbon resources to be charged from carbon behavior data includes: calculating the amount of carbon resources to be charged according to the carbon behavior data, and generating the carbon resources to be charged according to the amount of carbon resources to be charged; acquiring a data block for storing a carbon resource generation record corresponding to the carbon resource to be checked in, and generating identification information of the carbon resource to be checked in according to the identification information of the data block; and adding the identification information of the carbon resource to be checked-in to the carbon resource to be checked-in.
In another exemplary embodiment, based on the foregoing aspect, generating the carbon resource to be charged according to the carbon behavior data under the condition that the carbon behavior data includes a plurality of pieces of carbon behavior data includes: calculating carbon emission reduction capacity corresponding to each carbon behavior data, and calculating the carbon resource quantity to be charged corresponding to each carbon behavior data according to the carbon emission reduction capacity corresponding to each carbon behavior data; and generating carbon resources to be billed corresponding to each carbon behavior data according to the carbon resources to be billed corresponding to each carbon behavior data.
In another exemplary embodiment, based on the foregoing aspect, generating the carbon resource to be charged according to the carbon behavior data under the condition that the carbon behavior data includes a plurality of pieces of carbon behavior data includes: calculating carbon emission reduction capacity corresponding to each carbon behavior data, and calculating the carbon resource quantity to be charged corresponding to each carbon behavior data according to the carbon emission reduction capacity corresponding to each carbon behavior data; acquiring at least one carbon behavior data set from a plurality of carbon behavior data sets, wherein the sum of carbon resource amounts to be charged corresponding to the at least one carbon behavior data contained in each carbon behavior data set is matched with a set carbon resource amount; and generating carbon resources to be checked corresponding to each carbon behavior data set according to the set carbon resource amount.
In another exemplary embodiment, based on the foregoing aspect, the apparatus further includes a resource conversion module configured to: acquiring a carbon resource conversion request, and searching a resource conversion carbon account and a designated carbon account from a plurality of carbon accounts according to the carbon resource conversion request; wherein the carbon resource conversion request includes a carbon resource conversion amount; determining a carbon quota conversion amount matched with the carbon resource conversion amount according to conversion parameters between the carbon resource and the carbon quota; determining conversion carbon resources for conversion from a plurality of carbon resources contained in a resource conversion carbon account, and adjusting the carbon resource amount of the conversion carbon resources and the carbon resource amount contained in a designated carbon account according to the carbon resource conversion amount; and adjusting the carbon quota amount contained in the resource conversion carbon account and the appointed carbon account according to the carbon quota conversion amount.
In another exemplary embodiment, based on the foregoing aspect, the apparatus further includes a conversion record generation module configured to: generating a conversion record corresponding to the carbon resource conversion request; the conversion record contains identification information of conversion carbon resources; the translation record is stored into the blockchain network.
In another exemplary embodiment, based on the foregoing, the apparatus further includes a search module configured to: receiving a carbon resource transaction record searching request, wherein the carbon resource transaction record searching request comprises characteristic information of a carbon resource transaction record to be searched; and searching the carbon resource transaction records matched with the characteristic information from a plurality of carbon resource transaction records stored in the blockchain network.
In another exemplary embodiment, based on the foregoing solution, the searching module is specifically configured to: and searching the carbon resource transaction records containing the identification information of the target carbon resource from a plurality of carbon resource transaction records stored in the blockchain network.
In another exemplary embodiment, based on the foregoing solution, the searching module is specifically configured to, in a condition that the characteristic information of the carbon resource transaction record to be searched includes the target carbon account: and searching the carbon resource transaction records containing the target carbon account from a plurality of carbon resource transaction records stored in the blockchain network.
It should be noted that, the blockchain-based data processing apparatus provided in the foregoing embodiments and the blockchain-based data processing method provided in the foregoing embodiments belong to the same concept, and the specific manner in which each module and unit perform the operation has been described in detail in the method embodiments, which is not repeated herein.
The embodiment of the application also provides electronic equipment, which comprises: one or more processors; and a storage means for storing one or more computer programs which, when executed by the one or more processors, cause the electronic device to implement the blockchain-based data processing method provided in the various embodiments described above.
Fig. 21 shows a schematic diagram of a computer system suitable for use in implementing an embodiment of the application. The electronic device may be a proposal node or a verification node as shown in fig. 3.
It should be noted that, the computer system 2100 of the electronic device shown in fig. 21 is only an example, and should not impose any limitation on the functions and the application scope of the embodiments of the present application.
As shown in fig. 21, the computer system 2100 includes a central processing unit (Central Processing Unit, CPU) 2101, which can perform various appropriate actions and processes, such as performing the blockchain-based data processing method in the above-described embodiment, according to a computer program stored in a Read-Only Memory (ROM) 2102 or a computer program loaded from a storage portion 2108 into a random access Memory (Random Access Memory, RAM) 2103. In the RAM 2103, various computer programs and data required for system operation are also stored. The CPU 2101, ROM 2102, and RAM 2103 are connected to each other via a bus 2104. An Input/Output (I/O) interface 2105 is also connected to bus 2104.
In some embodiments, the following components are connected to the I/O interface 2105: an input section 2106 including a keyboard, a mouse, and the like; an output portion 2107 including a Cathode Ray Tube (CRT), a liquid crystal display (Liquid Crystal Display, LCD), and the like, a speaker, and the like; a storage portion 2108 including a hard disk and the like; and a communication section 2109 including a network interface card such as a LAN (Local Area Network ) card, a modem, or the like. The communication section 2109 performs communication processing via a network such as the internet. The drive 2110 is also connected to the I/O interface 2105 as needed. A removable medium 2111 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed on the drive 2110 as needed, so that a computer program read out therefrom is installed into the storage section 2108 as needed.
In particular, according to an embodiment of the present application, a computer program implementing a blockchain-based data processing method may be carried on a computer readable medium, the computer program may be downloaded and installed from a network through the communication part 2109, and/or installed from the removable medium 2111.
It should be noted that, the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium may be, for example, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-Only Memory (ROM), an erasable programmable read-Only Memory (Erasable Programmable Read Only Memory, EPROM), flash Memory, an optical fiber, a portable compact disc read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable signal medium may comprise a propagated data signal with a computer readable program embodied therein, either in baseband or as part of a carrier wave, and the propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic signals, optical signals, or any suitable combination of the foregoing. The computer program embodied by a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. Where each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer programs.
The units involved in the embodiments of the present application may be implemented by software, or may be implemented by hardware, and the described units may also be provided in a processor. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
Another aspect of the application also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor of an electronic device, causes the electronic device to implement a blockchain-based data processing method as before. The computer-readable storage medium may be included in the electronic device described in the above embodiment or may exist alone without being incorporated in the electronic device.
Another aspect of the application also provides a computer program product comprising a computer program which, when executed by a processor, implements the blockchain-based data processing method provided in the various embodiments described above. Wherein the computer program may be stored in a computer readable storage medium.
The foregoing is merely illustrative of the preferred embodiments of the present application and is not intended to limit the embodiments of the present application, and those skilled in the art can easily make corresponding variations or modifications according to the main concept and spirit of the present application, so that the protection scope of the present application shall be defined by the claims.

Claims (16)

1. A method of blockchain-based data processing, the method comprising:
Searching a resource transfer-out carbon account and a resource transfer-in carbon account corresponding to a received carbon resource transaction request from a plurality of carbon accounts contained in a blockchain network, and acquiring transaction carbon resources for transaction from a plurality of carbon resources contained in the resource transfer-out carbon account;
calculating the resource difference between the carbon resource amount of the transaction carbon resource and the carbon resource transaction amount corresponding to the carbon resource transaction request, and splitting the transaction carbon resource into a first carbon resource with the carbon resource amount matched with the resource difference and a second carbon resource with the carbon resource amount matched with the carbon resource transaction amount; wherein the first carbon resource and the second carbon resource comprise identification information of the transaction carbon resource;
updating the transaction carbon resources contained in the resource transfer-out carbon account to the first carbon resources, and updating the second carbon resources to the resource transfer-in account;
generating a transaction record corresponding to the carbon resource transaction request, and storing the transaction record to the blockchain network; the carbon resource transaction record comprises identification information of the transaction carbon resource, the carbon account into which the resource is transferred, and carbon resource amounts respectively contained in the transaction carbon resource, the first carbon resource and the second carbon resource.
2. The method of claim 1, wherein the carbon resource transaction record further comprises identification information of the carbon resource transaction request, and wherein the first carbon resource and the second carbon resource further comprise identification information of the carbon resource transaction request.
3. The method of claim 1, wherein the method further comprises:
acquiring carbon behavior data, and searching a carbon account to which the carbon behavior data belongs from the plurality of carbon accounts;
generating carbon resources to be checked-in according to the carbon behavior data, and updating the carbon resources to be checked-in to a carbon account to which the carbon behavior data belong; wherein the carbon resource to be checked-in comprises corresponding carbon resource amount and identification information;
generating a carbon resource generation record corresponding to the carbon resource to be charged, and storing the carbon resource generation record into the blockchain network; the carbon resource generation record contains the carbon behavior data, the identification information of the carbon resource to be checked in and the carbon resource quantity of the carbon resource to be checked in.
4. The method of claim 3, wherein after the updating the carbon resource to be billed to the carbon account to which the carbon behavior data pertains, the method further comprises:
Acquiring a plurality of carbon resources to be authenticated from the plurality of carbon accounts;
acquiring carbon resource generation records corresponding to the carbon resources to be authenticated respectively, and sending the carbon resource generation records corresponding to the carbon resources to be authenticated respectively to an authenticator, so that the authenticator authenticates each carbon resource to be authenticated according to the carbon resource generation record corresponding to the carbon resource to be authenticated;
and receiving an authentication success message sent by the authentication party, and setting the plurality of carbon resources to be authenticated as carbon resources for transaction according to the authentication success message.
5. The method of claim 3, wherein the generating a carbon resource to be charged from the carbon behavior data comprises:
calculating the carbon resource quantity to be checked-in according to the carbon behavior data, and generating the carbon resource to be checked-in according to the carbon resource quantity to be checked-in;
acquiring a data block for storing a carbon resource generation record corresponding to the carbon resource to be charged, and generating identification information of the carbon resource to be charged according to the identification information of the data block;
and adding the identification information of the carbon resource to be checked into the carbon resource to be checked.
6. The method of claim 3, wherein the carbon behavior data comprises a plurality of pieces of carbon behavior data;
The generating the carbon resource to be charged according to the carbon behavior data comprises the following steps:
calculating carbon emission reduction capacity corresponding to each carbon behavior data, and calculating the carbon resource quantity to be charged corresponding to each carbon behavior data according to the carbon emission reduction capacity corresponding to each carbon behavior data;
and generating the carbon resources to be charged corresponding to each carbon behavior data according to the carbon resources to be charged corresponding to each carbon behavior data.
7. The method of claim 3, wherein the carbon behavior data comprises a plurality of pieces of carbon behavior data;
the generating the carbon resource to be charged according to the carbon behavior data comprises the following steps:
calculating carbon emission reduction capacity corresponding to each carbon behavior data, and calculating the carbon resource quantity to be charged corresponding to each carbon behavior data according to the carbon emission reduction capacity corresponding to each carbon behavior data;
acquiring at least one carbon behavior data set from the plurality of carbon behavior data, wherein the sum of the amounts of carbon resources to be charged corresponding to the at least one carbon behavior data contained in each carbon behavior data set is matched with a set amount of carbon resources;
and generating carbon resources to be checked corresponding to each carbon behavior data set according to the set carbon resource amount.
8. The method of claim 1, wherein the carbon account further comprises a carbon quota, the method further comprising:
acquiring a carbon resource conversion request, and searching a resource conversion carbon account and a designated carbon account from the plurality of carbon accounts according to the carbon resource conversion request; wherein the carbon resource conversion request includes a carbon resource conversion amount;
determining a carbon quota conversion amount matched with the carbon resource conversion amount according to conversion parameters between the carbon resource and the carbon quota;
determining a converted carbon resource for conversion from a plurality of carbon resources contained in the resource converted carbon account, and adjusting the carbon resource amount of the converted carbon resource and the carbon resource amount contained in the designated carbon account according to the carbon resource conversion amount;
and adjusting the carbon quota amount contained in the resource conversion carbon account and the appointed carbon account according to the carbon quota conversion amount.
9. The method of claim 8, wherein after said adjusting the carbon quota amount contained in the resource conversion carbon account and the designated carbon account according to the carbon quota conversion amount, the method further comprises:
generating a conversion record corresponding to the carbon resource conversion request; the conversion record contains identification information of the conversion carbon resource;
And storing the conversion record into the blockchain network.
10. The method of claim 1, wherein the method further comprises:
receiving a carbon resource transaction record searching request, wherein the carbon resource transaction record searching request comprises characteristic information of a carbon resource transaction record to be searched;
and searching the carbon resource transaction records matched with the characteristic information from a plurality of carbon resource transaction records stored in the blockchain network.
11. The method of claim 10, wherein the characteristic information of the carbon resource transaction record to be looked up includes identification information of a target carbon resource;
and searching the carbon resource transaction records matched with the characteristic information from a plurality of carbon resource transaction records stored in the blockchain network, wherein the method comprises the following steps of:
and searching a carbon resource transaction record containing the identification information of the target carbon resource from a plurality of carbon resource transaction records stored in the blockchain network.
12. The method of claim 10, wherein the characteristic information of the carbon resource transaction record to be looked up comprises a target carbon account;
and searching the carbon resource transaction records matched with the characteristic information from a plurality of carbon resource transaction records stored in the blockchain network, wherein the method comprises the following steps of:
And searching the carbon resource transaction records containing the target carbon account from a plurality of carbon resource transaction records stored in the blockchain network.
13. A blockchain-based data processing device, the device comprising:
the acquisition module is configured to search a resource transfer-out carbon account and a resource transfer-in carbon account corresponding to the received carbon resource transaction request from a plurality of carbon accounts contained in the blockchain network, and acquire transaction carbon resources for transaction from a plurality of carbon resources contained in the resource transfer-out carbon account;
a splitting module configured to calculate a resource difference between a carbon resource amount of the transaction carbon resource and a carbon resource transaction amount corresponding to the carbon resource transaction request, and split the transaction carbon resource into a first carbon resource containing an amount of carbon resource that matches the resource difference, and a second carbon resource containing an amount of carbon resource that matches the carbon resource transaction amount; wherein the first carbon resource and the second carbon resource comprise identification information of the transaction carbon resource;
the updating module is configured to update the transaction carbon resources contained in the resource transfer-out carbon account to the first carbon resources and update the second carbon resources to the resource transfer-in account;
The recording module is configured to generate a carbon resource transaction record corresponding to the carbon resource transaction request and store the carbon resource transaction record to the blockchain network; the carbon resource transaction record comprises identification information of the transaction carbon resource, the carbon account into which the resource is transferred, and carbon resource amounts respectively contained in the transaction carbon resource, the first carbon resource and the second carbon resource.
14. An electronic device, comprising:
one or more processors;
storage means for storing one or more computer programs that, when executed by the one or more processors, cause the electronic device to implement the blockchain-based data processing method of any of claims 1-12.
15. A computer readable storage medium, having stored thereon a computer program which, when executed by a processor of an electronic device, causes the electronic device to implement the blockchain-based data processing method of any of claims 1-12.
16. A computer program product comprising a computer program which, when executed by a processor, implements the blockchain-based data processing method of any of claims 1-12.
CN202211517622.2A 2022-11-29 2022-11-29 Block chain-based data processing method and device, electronic equipment and storage medium Pending CN116957566A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211517622.2A CN116957566A (en) 2022-11-29 2022-11-29 Block chain-based data processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211517622.2A CN116957566A (en) 2022-11-29 2022-11-29 Block chain-based data processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116957566A true CN116957566A (en) 2023-10-27

Family

ID=88443275

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211517622.2A Pending CN116957566A (en) 2022-11-29 2022-11-29 Block chain-based data processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116957566A (en)

Similar Documents

Publication Publication Date Title
US10708060B2 (en) System and method for blockchain-based notification
US11171789B2 (en) System and method for implementing a resolver service for decentralized identifiers
CN113711536B (en) Extracting data from a blockchain network
US10917246B2 (en) System and method for blockchain-based cross-entity authentication
US20210075589A1 (en) System and method for blockchain-based cross-entity authentication
US10825024B1 (en) Systems, devices, and methods for DLT-based data management platforms and data products
CN110383791B (en) Map application crowdsourcing based on blockchain
US11150271B2 (en) Method or system for management of a device for energy consumption by applying blockchain protocol
WO2020088110A1 (en) Blockchain-based node management method and device
US20130290226A1 (en) System and method for social graph and graph assets valuation and monetization
CN109635585A (en) Method, agent node and the medium of Transaction Information are inquired in block chain network
CN112200571A (en) Resource distribution method and device based on block chain and electronic equipment
CN111291394B (en) False information management method, false information management device and storage medium
CN112612856B (en) Block chain-based data processing method and device
WO2022241945A1 (en) Data processing method and device, and computer-readable storage medium
CN116957566A (en) Block chain-based data processing method and device, electronic equipment and storage medium
CN116894727A (en) Data processing method and device based on block chain and related equipment
US12015715B2 (en) Trusted aggregation with data privacy based on zero-knowledge-proofs
US20240007309A1 (en) Systems and methods for facilitating blockchain operations involving on chain and off chain interactions
US20190066121A1 (en) Methods and systems for enhancing the trustworthiness of internet services
CN118018602A (en) Data processing method, device, equipment and medium based on block chain
CN116015614A (en) Key processing method, device, medium and electronic equipment based on blockchain system
CN116010371A (en) Data processing method, device, medium and electronic equipment based on block chain system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication