Carbon data processing method, and device

By using an updatable public key and commitment algorithm to encrypt carbon account identifiers and emission reductions on the blockchain, combined with random carbon account updates, the problem of poor carbon account privacy on blockchain platforms is solved, achieving higher security and privacy protection.

WO2025246318A1PCT designated stage Publication Date: 2025-12-04CHINA UNIONPAY
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/141984
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-05-31
Filing Date
2024-12-24
Publication Date
2025-12-04

AI Technical Summary

Technical Problem

Carbon accounts on existing blockchain platforms have poor privacy, with carbon emission reduction figures recorded in plain text and transaction relationships traceable and linked, leading to the leakage of users' carbon account information.

Method used

By setting up an updatable public key and commitment algorithm on the blockchain, encrypted carbon account identifiers and carbon emission reduction commitment values ​​are generated. These are then combined with random carbon accounts to form an input carbon account set for updating, thus protecting the privacy of the target carbon account.

Benefits of technology

It improves the privacy and security of carbon accounts, prevents the leakage of actual updated carbon account information, and enhances the privacy protection of transactions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024141984_04122025_PF_FP_ABST
    Figure CN2024141984_04122025_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides a carbon data processing method, and a device, which are applicable to the technical field of data processing. The method comprises: determining an input carbon account set on a blockchain, wherein at least two input carbon accounts in the input carbon account set include: at least one target carbon account and at least one random carbon account, the target carbon account includes a carbon account with carbon emission reductions pending update, and the random carbon account includes a carbon account with carbon emission reductions not subject to update, the carbon emission reductions pending update including: remaining carbon emission reductions pending update and / or frozen carbon emission reductions pending update; and updating each input carbon account in the input carbon account set. In the present application, during the actual update of target carbon accounts, random carbon accounts and the target carbon accounts are combined into an input carbon account set for update, so that the target carbon accounts to be actually updated can be protected by means of the random carbon accounts, thereby enhancing the privacy and security of carbon accounts.
Need to check novelty before this filing date? Find Prior Art

Description

Carbon data processing methods and equipment

[0001] This application claims priority to Chinese Patent Application No. 202410706626.8, filed on May 31, 2024, entitled "Carbon Data Processing Method and Apparatus", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of data processing technology, and in particular to a carbon data processing method and apparatus. Background Technology

[0003] Carbon peaking and carbon neutrality are major strategic decisions made by my country for energy conservation and emission reduction, aiming to promote green, healthy, and high-quality economic and social development. Building a green and low-carbon society requires not only changes on the production side but also active participation from the consumption side to drive comprehensive reform across the entire industrial chain. Individuals play a crucial role in propelling society towards green and low-carbon goals, and the establishment and development of carbon accounts is an important means to achieve this.

[0004] In existing technologies, blockchain platforms can record the remaining carbon emission reductions in a user's personal carbon account. These remaining carbon emission reductions represent the cumulative carbon emission reductions achieved through the user's energy-saving and emission-reduction activities. The platform provides carbon trading functionality, allowing users to sell the remaining carbon emission reductions in their carbon accounts. Specifically, the platform can bundle users' carbon emission reduction sale requests and sell the bundled remaining carbon emission reductions together.

[0005] However, the above scheme has the problem of poor privacy. Specifically, the remaining carbon emission reductions, newly accumulated carbon emission reductions, and carbon emission reductions deducted due to transactions in the carbon account on the blockchain are all in plaintext; at the same time, which accumulation behavior increased the balance of which carbon account, which transaction behavior decreased the balance of which carbon account, and the relationship between these transactions are all traceable and correlated on the chain. Summary of the Invention

[0006] This application provides a carbon data processing method and apparatus that can maximize the privacy of carbon accounts.

[0007] In a first aspect, this application provides a carbon data processing method, the method comprising:

[0008] A set of input carbon accounts is determined on the blockchain, wherein at least two input carbon accounts in the set include: at least one target carbon account and at least one random carbon account. The target carbon account includes carbon accounts with carbon emission reductions pending updates, and the random carbon account includes carbon accounts with carbon emission reductions not pending updates. The carbon emission reductions pending updates include: remaining carbon emission reductions pending updates and / or frozen carbon emission reductions pending updates. Each input carbon account in the set is then updated.

[0009] Secondly, this application provides a carbon data processing apparatus, comprising:

[0010] An account set determination module is used to determine an input carbon account set on the blockchain. The input carbon account set includes at least two input carbon accounts: at least one target carbon account and at least one random carbon account. The target carbon account includes carbon accounts with carbon emission reductions to be updated, and the random carbon account includes carbon accounts with carbon emission reductions not being updated. The carbon emission reductions to be updated include: remaining carbon emission reductions to be updated and / or frozen carbon emission reductions to be updated.

[0011] The account set update module is used to update each input carbon account in the input carbon account set.

[0012] Thirdly, this application provides an electronic device, including a memory and at least one processor;

[0013] The memory stores the instructions executed by the computer.

[0014] At least one processor executes computer execution instructions stored in memory, causing the electronic device to implement the method of the first aspect mentioned above.

[0015] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method described in the first aspect.

[0016] Fifthly, this application provides a computer program product comprising a computer program that, when executed by a processor, implements the method described in the first aspect.

[0017] The carbon data processing method and apparatus provided in this application determine an input carbon account set on a blockchain. The input carbon account set includes at least two input carbon accounts: at least one target carbon account and at least one random carbon account. The target carbon account includes carbon accounts with carbon emission reductions pending updates, and the random carbon account includes carbon accounts with carbon emission reductions not yet updated. Carbon emission reductions pending updates include: remaining carbon emission reductions pending updates and / or frozen carbon emission reductions pending updates. The method updates each input carbon account in the input carbon account set. This application can combine the random carbon account and the target carbon account into an input carbon account set for updating when actually updating the target carbon account. This allows the random carbon account to protect the target carbon account being updated, thus improving the privacy of the carbon accounts. Attached Figure Description

[0018] Figure 1 is a schematic diagram of a software architecture provided in an embodiment of this application;

[0019] Figure 2 is a flowchart of the steps of a carbon data processing method provided in an embodiment of this application;

[0020] Figure 3 is a schematic flowchart of a carbon account update process provided in an embodiment of this application;

[0021] Figure 4 is a structural block diagram of a carbon data processing device provided in an embodiment of this application;

[0022] Figure 5 is a structural block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0023] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0024] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with relevant laws, regulations and standards, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0025] To promote energy conservation and emission reduction, many software platforms convert users' energy-saving and emission-reduction behaviors into carbon emission reductions, using these reductions to represent a user's contribution to energy conservation and emission reduction. A larger carbon emission reduction indicates a higher contribution, while a smaller reduction indicates a lower contribution. For example, energy-saving and emission-reduction behaviors can include cycling and walking; the longer the activity continues, the greater the carbon emission reduction.

[0026] The aforementioned platforms specify the target carbon account to be updated each time they update the carbon emission reduction amount in the carbon account based on carbon emission reduction behavior. This could lead to the leakage of the target carbon account, resulting in poor security.

[0027] To address the aforementioned technical problems, this application embodiment sets two types of carbon emission reductions for each carbon account: remaining carbon emission reductions and frozen carbon emission reductions. When it is necessary to update the carbon emission reductions of the target carbon account, an input carbon account set is formed by combining the random carbon account and the target carbon account, and the update is performed based on the input carbon account set. In this way, it appears that the updated carbon account includes not only the target carbon account but also the random carbon account, thus protecting the actual target carbon account being updated and improving the security of the update.

[0028] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0029] Figure 1 is a schematic diagram of a software architecture provided in an embodiment of this application. Referring to Figure 1, the software architecture of this embodiment involves: blockchain, trusted execution environment, middleware platform, and user terminal.

[0030] Blockchain is a tool used to store carbon accounts, and it supports the updating of carbon accounts.

[0031] The user-side refers to the software or device used by the user. The user-side is used to collect data on carbon reduction activities, and to update the carbon account on the blockchain based on the corresponding carbon reduction amounts. It can also update the carbon account on the blockchain through an intermediary software platform based on user authorization.

[0032] A Trusted Execution Environment (TEE) is used to calculate the corresponding carbon emission reduction based on carbon emission reduction behavior.

[0033] The middleware platform is any software platform that needs to access carbon accounts. The middleware platform can update carbon accounts on the blockchain based on user authorization on the user's end.

[0034] Based on the above software architecture, two data processing flows are presented below.

[0035] In the first data processing flow, firstly, the user terminal collects the user's carbon emission reduction behavior and sends the carbon emission reduction behavior to the trusted execution environment; then, the trusted execution environment calculates the carbon emission reduction amount based on the received carbon emission reduction behavior and sends the carbon emission reduction amount to the user terminal; finally, the user terminal updates the carbon account on the blockchain based on the received carbon emission reduction amount.

[0036] In the second data processing flow, firstly, the user authorizes the carbon emission reduction to be updated on the user terminal. The user terminal generates an update request based on the carbon emission reduction and the corresponding carbon account identifier on the blockchain, and sends the update request to the intermediate software platform. Then, the intermediate software platform can perform a series of processing on the update request and update the carbon account on the blockchain.

[0037] Traditional update algorithms typically only update the user-specified carbon accounts and the carbon accounts corresponding to users who have engaged in carbon emission reduction activities. This can lead to the leakage of these actually updated carbon accounts, resulting in poor security. Unlike traditional update algorithms, the carbon accounts updated in this application embodiment include not only the user-specified carbon accounts and the carbon accounts corresponding to users who have engaged in carbon emission reduction activities, but also some random carbon accounts. This protects the actually updated carbon accounts and improves carbon account security.

[0038] The carbon data processing method of this application embodiment can be applied to the intermediate software platform shown in FIG1, or to the user terminal shown in FIG1.

[0039] Figure 2 is a flowchart illustrating the steps of a carbon data processing method according to an embodiment of this application. Referring to Figure 2, the carbon data processing method of this application may include:

[0040] S101: Determine the set of input carbon accounts on the blockchain, wherein at least two input carbon accounts in the set include: at least one target carbon account and at least one random carbon account, wherein the target carbon account includes carbon accounts with carbon emission reductions pending updates, and the random carbon account includes carbon accounts with carbon emission reductions not pending updates, wherein carbon emission reductions pending updates include: remaining carbon emission reductions pending updates and / or frozen carbon emission reductions pending updates.

[0041] Among them, the target carbon account is the account that genuinely needs to update its carbon emission reductions, including: carbon accounts that need to update their carbon emission reductions based on the user's carbon emission reduction behavior, and carbon accounts that need to update their carbon emission reductions based on user authorization. Here, user authorization can be understood as the user authorizing the trading of carbon emission reductions.

[0042] A random carbon account is an account that does not require updating carbon emission reductions. When a target carbon account needs to be updated, one or more carbon accounts are randomly selected from the blockchain.

[0043] After a group of users take carbon emission reduction actions, the carbon accounts of that group of users on the blockchain become the target carbon accounts, and one or more carbon accounts are randomly selected from the blockchain as random carbon accounts. These target carbon accounts and random carbon accounts constitute the input carbon account set. When a group of users authorize to update their carbon emission reductions, the carbon accounts of that group of users on the blockchain become the target carbon accounts, and these target carbon accounts and random carbon accounts constitute the input carbon account set.

[0044] Each target carbon account or each random carbon account in the above input carbon account set can be called an input carbon account. Thus, the input carbon account set can be viewed as a collection of multiple input carbon accounts.

[0045] In this embodiment, each carbon account on the blockchain corresponds to a carbon account identifier and carbon emission reductions. The carbon emission reductions are further divided into remaining carbon emission reductions and frozen carbon emission reductions. Remaining carbon emission reductions are the carbon emission reductions currently available to the carbon account, while frozen carbon emission reductions are the carbon emission reductions that are currently unavailable to the carbon account. For example, when initiating a transaction, the carbon emission reductions to be traded are typically frozen to lock them in and ensure the transaction's success.

[0046] In some schemes, each carbon account on the blockchain stores the following information: carbon account identifier, remaining carbon emission reductions, and frozen carbon emission reductions. The carbon account identifier is used to uniquely identify a carbon account. However, this approach can lead to information leakage issues related to carbon accounts and compromises privacy.

[0047] To maximize the privacy of carbon accounts, each carbon account on the blockchain includes: a public key, a first commitment to the remaining carbon reductions, and a second commitment to the frozen carbon reductions. It can be seen that all information in the carbon account on the blockchain is encrypted, which enhances security.

[0048] The public key uniquely represents a carbon account and can be considered a unique identifier for the carbon account, offering higher security than traditional carbon account identifiers. The public key can be generated using a random number when the carbon account is created. The public key in this embodiment is an updatable public key, which can be updated using a random number without requiring an update to the corresponding private key. The algorithm for generating the updatable public key can be as follows: First, generate the private key SK and a random number. Then, based on the private key SK, the random number r, and the generator g of the updatable public key, an updatable public key PK is generated. The updatable public key... When updating the updatable public key, select a random number again. The updatable public key can be updated based on this random number. The private key holder does not need to know the random number to verify the mapping between the updatable public and private keys (VerifyKP(PK,SK)→0 / 1: parse PK=(g′,h′) and output(g′)). SK ? = h′). After updating the updatable public key, the correspondence between the updated and unupdatable public key can be verified using a random number (VerifyUpdate(PK′,PK,r)→0 / 1: parsing Update(PK;r)?=PK′).

[0049] The first commitment mentioned above is a commitment value calculated using an updatable public key on the remaining carbon emission reductions. The remaining carbon emission reductions can be input into the commitment algorithm to calculate the value.

[0050] Similarly, the second commitment mentioned above is a commitment value calculated using the updated public key on the frozen carbon emission reductions. This value can be obtained by inputting the frozen carbon emission reductions into the commitment algorithm. The commitment algorithms used for the first and second commitments are the same. The aforementioned commitment algorithm is used to calculate the value based on the updated public key (g... i ,h i The commitment value is calculated using the value to be committed (v) and a random number (r). The value v to be committed represents either the remaining carbon emission reductions or the frozen carbon emission reductions mentioned above. The commitment algorithm satisfies the homomorphic property, i.e., Commit pk (v1;r1)⊙Commit pk (v2; r2) = Commit pk (v1+v2; r1+r2), we refer to the homomorphic ⊙ operation as homomorphic addition. The commitment update interface is used to update the previous commitment based on the public key, the random number r used for the commitment update, and the committed value Δv to be updated, thus calculating the updated commitment. Specifically, the commitment update interface inputs the public key, the random number used for the commitment update, and the committed value to be updated into the commitment algorithm to obtain a temporary commitment (Commit). pk (Δv;r)); Then, perform a homomorphic addition operation on the temporary commitment and the commitment before the update to obtain the updated commitment (com′=com⊙Commit). pk (v i ;r2)).

[0051] In this embodiment, the carbon account is an updatable carbon account, comprising an updatable public key, a first commitment, and a second commitment. A carbon account update interface can be provided to update the carbon account. Specifically, the carbon account update interface can call the update interface for the updatable public key to update the public key, and call the commitment update interface to update the first and second commitments.

[0052] It should be noted that each carbon account on the aforementioned blockchain requires the generation of its public key and the calculation of a default first and second commitment upon creation. After creation, the carbon account can be updated as needed.

[0053] In some implementations, the creation process of any carbon account on the aforementioned blockchain includes: first, generating a public key for the carbon account; then, generating a default commitment based on the public key and a preset default carbon emission reduction; and finally, controlling the creation of the carbon account by the blockchain based on the public key and the default commitment, wherein the first and second commitments of the carbon account are both default commitments initially.

[0054] The public key for the carbon account is an updatable public key, and its generation process is described above and will not be repeated here. After generating the public key for the carbon account to be created, a default commitment can be generated based on the public key and a preset default carbon emission reduction. The default carbon emission reduction is pre-set; for example, it can typically be set to 0, meaning that when the carbon account is created by default, both the remaining carbon emission reduction and the frozen carbon emission reduction are 0. Of course, the default carbon emission reduction can be flexibly set, and this embodiment does not impose any restrictions on it.

[0055] The process of generating the default commitment can also use the aforementioned commitment algorithm, which is to calculate the default carbon emission reduction as the value to be committed.

[0056] Optionally, when generating a default commitment based on the public key and a preset default carbon emission reduction, the default commitment can be generated using a fifth random number, the public key, and the preset default carbon emission reduction. The fifth random number is used to generate the default commitment. Specifically, the fifth random number, the public key, and the default carbon emission reduction can be input into the commitment algorithm to obtain the default commitment.

[0057] After generating the public key and default commitment, the carbon account creation interface provided by the carbon account smart contract on the blockchain can be invoked. This interface will then create a carbon account on the blockchain based on the public key and default commitment. Specifically, the carbon account creation interface can use the public key as the public key of the newly created carbon account and the default commitment as the first and second commitments of the newly created carbon account.

[0058] This application embodiment allows setting a default carbon emission reduction amount when creating a carbon account to ensure the integrity of the initially created carbon account.

[0059] In some implementations, the public and private keys are generated together to ensure their correspondence. Specifically, a public key and its corresponding private key for the carbon account are generated. Since the public and private keys are for the same carbon account, to ensure their correspondence, the private key for the carbon account is generated first, and then the public key for the carbon account is generated using a fourth random number and the private key.

[0060] After generating the aforementioned public key and corresponding private key, zero-knowledge verification can be performed based on the private key. Specifically, when controlling the blockchain to create a carbon account based on the public key and default commitment, firstly, a second zero-knowledge proof is generated based on the public key, default commitment, default carbon emission reduction, and private key; then, when the control blockchain successfully performs zero-knowledge verification based on the second zero-knowledge proof, it creates a carbon account based on the public key and default commitment.

[0061] The aforementioned second zero-knowledge proof information is used to verify the relation R(x,w) = 1: when creating a carbon account, the remaining carbon emission reductions and frozen carbon emission reductions in the carbon account are both the default carbon emission reductions, and the creator possesses the private key of the carbon account. The second zero-knowledge proof information is a zero-knowledge proof regarding the relation R(x,w) = 1, where x = (public key PK, default commitment COM) is the public input, and w = (private key sk) is the secret input. The second zero-knowledge proof is successfully verified if and only if R(x,w) = 1.

[0062] S102: Update each input carbon account in the input carbon account set.

[0063] In this embodiment of the application, the carbon account on the blockchain is an updatable carbon account, including: the carbon account's public key is updatable, the carbon account's first commitment is updatable, and the carbon account's second commitment is updatable.

[0064] For a target carbon account in the input carbon account set, when its public key, first commitment, and second commitment are updated, the remaining carbon emission reductions corresponding to the first commitment and / or the frozen carbon emission reductions corresponding to the second commitment may also be updated.

[0065] For a random carbon account within the input carbon account set, when its public key, first commitment, and second commitment are updated, the remaining carbon emission reductions corresponding to the first commitment and / or the frozen carbon emission reductions corresponding to the second commitment are not updated. Therefore, superficially, both the target carbon account and the random carbon account appear to be updated, but in reality, the remaining and frozen carbon emission reductions corresponding to the random carbon account are not updated. This ensures correctness while protecting the privacy of the target carbon account whose remaining and / or frozen carbon emission reductions are actually updated.

[0066] In some implementations, when updating each input carbon account in the input carbon account set, at least one random number can be used to update each input carbon account in the set, with different input carbon accounts using the same at least one random number. The random number is used to randomly update any item of the carbon account, ensuring the randomness of the input carbon account update and further guaranteeing the privacy of the carbon accounts. The random number can be processed on any at least one item of the carbon account to obtain the updated result.

[0067] Optionally, for each input carbon account in the input carbon account set, the corresponding output carbon account is determined based on at least one random number and the input carbon account, resulting in an output carbon account set, which controls the blockchain to update the input carbon account set to the output carbon account set.

[0068] The output carbon account is obtained by processing all contents of the input carbon account with at least one random number. The output carbon accounts corresponding to each input carbon account in the input carbon account set constitute the output carbon account set.

[0069] For all input carbon accounts in the input carbon account set, at least one random number is used identically. This random number randomly maps input carbon accounts to output carbon accounts, making the relationship between input and output carbon accounts random. Therefore, when replacing input carbon accounts with output carbon accounts, this replacement can be guaranteed to be private, contributing to the security of carbon accounts.

[0070] In some implementations, we can delete each carbon account in the input carbon account set from the blockchain, and then store each output carbon account corresponding to each input carbon account in the input carbon account set on the blockchain, thereby enabling the output carbon account to replace the input carbon account.

[0071] To further enhance privacy, before the control blockchain updates the input carbon account set to the output carbon account set, it also includes: sorting each input carbon account in the input carbon account set and each output carbon account in the output carbon account set according to the same rules.

[0072] The aforementioned rules are for sorting carbon accounts. For example, the rules can sort the input carbon accounts according to the dictionary order of their public keys, and the output carbon accounts according to the dictionary order of their public keys; or, sort them according to the size of the first or second commitment of the input carbon accounts, and the output carbon accounts according to the size of the first or second commitment. For convenience, well-known algorithms can also be directly used, such as the Shell sort algorithm for sorting according to the dictionary order of public keys.

[0073] This application embodiment can sort the input carbon account set and the output carbon account set separately to disrupt the mapping relationship between the input and output carbon accounts. This avoids the leakage of the mapping relationship and helps to further improve the privacy of the carbon accounts.

[0074] Optionally, when determining the output carbon account corresponding to the input carbon account based on at least one random number and the input carbon account, the following algorithm can be used: First, based on the first random number and the public key of the input carbon account, the above-mentioned public key update algorithm is called to determine the public key of the output carbon account corresponding to the input carbon account; then, based on the second random number, the public key of the output carbon account, the value to be updated (for random carbon accounts, the update value is 0), and the first commitment of the input carbon account, the first commitment of the output carbon account corresponding to the input carbon account is determined; then, based on the third random number, the public key of the output carbon account, the value to be updated (for random carbon accounts, the update value is 0), and the second commitment of the input carbon account, the second commitment of the output carbon account corresponding to the input carbon account is determined.

[0075] The first random number is used to randomly generate the public key of the output carbon account. Specifically, it is used to randomly update the public key of the input carbon account to obtain the public key of the output carbon account. All input carbon accounts in the input carbon account set can use the same first random number to obtain the corresponding public key of the output carbon account. Updating the public key with a random number can be done by calling an update interface for an updateable public key. This update interface can obtain the public key of the output carbon account by raising each item in the public key of the input carbon account to the power of the first random number. Specifically, if the public key of the input carbon account is PK = (g, h), then the public key of the output carbon account is PK' = (g...h). r1 ,h r1 ), where r1 is the first random number.

[0076] After obtaining the public key of the output carbon account for an input carbon account, the first commitment of the output carbon account can be calculated based on a second random number, the public key of the output carbon account, and the first commitment of the input carbon account. The second random number is used to randomly generate the first commitment of the output carbon account. Specifically, the first commitment of the output carbon account can be obtained by calling the commitment update interface. In this case, the public key of the output carbon account is used as the public key, the second random number is used as the random number to update the first commitment, and the first commitment of the input carbon account is used as the commitment before the update. These are input into the commitment update interface, and the updated commitment is the first commitment of the output carbon account.

[0077] Similar to the update process of the first commitment described above, the second commitment of the output carbon account can be calculated based on the third random number, the public key of the output carbon account, and the second commitment of the input carbon account. The third random number is used to randomly generate the second commitment of the output carbon account. Specifically, the second commitment of the output carbon account can also be obtained by calling the commitment update interface. In this case, the public key of the output carbon account is used as the public key, the third random number is used as the random number to update the second commitment, and the second commitment of the input carbon account is used as the commitment before the update. These are then input into the commitment update interface, and the updated commitment is the second commitment of the output carbon account.

[0078] As can be seen from the above description, the embodiments of this application can update the public key, the first commitment, and the second commitment of the input carbon account using three random numbers to obtain the output carbon account. Since the three random numbers are different, it can be ensured that the randomness of the update results for the public key, the first commitment, and the second commitment is also different when updating the carbon account, resulting in better randomness and helping to further ensure the security of the carbon account.

[0079] The aforementioned output carbon account is an updated version of the input carbon account. After obtaining the output carbon account, all input carbon accounts on the blockchain can be replaced with the corresponding output carbon account. In one implementation, to ensure the accuracy of the update, zero-knowledge proof is required before updating the input carbon account set to the output carbon account set. Therefore, when controlling the blockchain to update the input carbon account set to the output carbon account set, firstly, a first zero-knowledge proof is generated based on the input and output carbon account sets. This first zero-knowledge proof is used to verify that updating the input carbon account set through the output carbon account set is correct. Then, when the blockchain successfully performs zero-knowledge verification based on the first zero-knowledge proof, it updates the input carbon account set to the output carbon account set. It is understood that the blockchain will not update the input carbon account set to the output carbon account set if the zero-knowledge verification based on the first zero-knowledge proof fails. This ensures the accuracy of the carbon account update.

[0080] This application embodiment requires updating the target carbon account in two scenarios.

[0081] The first scenario is: a group of users have carried out carbon emission reduction activities. In this case, the carbon account corresponding to this group of users needs to be used as the target carbon account, and the above steps S101 and S102 are executed once to add the carbon emission reduction amount corresponding to the carbon emission reduction activities of this group of users to the remaining carbon emission reduction amount in the carbon account of this group of users on the blockchain.

[0082] In the first scenario described above, the update type for the target carbon account is: updating the carbon emission reduction amount of the target carbon account based on the user's carbon emission reduction behavior. In this case, the update amount of the remaining carbon emission reduction amount of the target carbon account is determined by the trusted execution environment based on the carbon emission reduction behavior. Since the carbon emission reduction behavior of users with different target carbon accounts may differ, the update amount of the remaining carbon emission reduction amount for different target carbon accounts may also differ. Furthermore, in this scenario, it is only necessary to directly increase the remaining carbon emission reduction amount; therefore, the update amount of the frozen carbon emission reduction amount of the target carbon account is 0, and it is not necessary to update the frozen carbon emission reduction amount of the target carbon account.

[0083] Understandably, in the first scenario described above, updating the remaining carbon emission reductions in the target carbon account involves increasing the remaining carbon emission reductions.

[0084] The second scenario is: a group of users authorize the trading of their own carbon emission reductions. In this case, the carbon accounts corresponding to this group of users need to be used as the target carbon accounts, and the above steps S101 and S102 need to be executed twice. That is, the update from S101 to S102 needs to be executed twice in order to realize this transaction for this group of users.

[0085] In the second scenario described above, during the first execution of updates S101 to S102, the update type for the target carbon account is: target carbon account update initiated based on a preset update amount. In this case, the update amount for the remaining carbon emission reductions in the target carbon account is the preset update amount, and the update amount for the frozen carbon emission reductions in the target carbon account is the opposite of the preset update amount. For example, if the preset update amount is -50, the remaining carbon emission reductions can be reduced by 50, and the frozen carbon emission reductions can be increased by 50.

[0086] In the second scenario described above, when the update from S101 to S102 is executed for the second time, the update type of the target carbon account is either: the target carbon account was successfully updated based on the preset update amount, or the update type of the target carbon account is: the target carbon account failed to be updated based on the preset update amount.

[0087] When the target carbon account update type is set to "Based on preset update amount," the update amount for the remaining carbon emission reductions in the target carbon account will be 0, and the update amount for the frozen carbon emission reductions in the target carbon account will be the preset update amount. For example, if the preset update amount is -50, the frozen carbon emission reductions can be reduced by 50.

[0088] When the target carbon account update type is set to "Failed to update the target carbon account based on a preset update amount", the update amount of the remaining carbon emission reductions in the target carbon account will be the opposite of the preset update amount, and the update amount of the frozen carbon emission reductions in the target carbon account will be the preset update amount. For example, if the preset update amount is -50, the remaining carbon emission reductions can be increased by 50, and the frozen carbon emission reductions can be decreased by 50.

[0089] As can be seen, for a target carbon account with a preset update amount of -50, firstly, when initiating an update for the target carbon account, the remaining carbon emission reductions of the target carbon account are reduced by 50, and the frozen carbon emission reductions of the target carbon account are increased by 50. This is equivalent to deducting the carbon emission reductions to be traded from the remaining carbon emission reductions and temporarily freezing them. Then, when the target user successfully pays for the above update of the target carbon account, the frozen carbon emission reductions of the target carbon account are reduced by 50 to cancel the freeze. When the target user fails to pay for the above update of the target carbon account or the timeout occurs, the remaining carbon emission reductions of the target carbon account are increased by 50, and the frozen carbon emission reductions of the target carbon account are reduced by 50.

[0090] It should be noted that the preset update amount for the target carbon account is specified by the user of the target carbon account, and therefore the corresponding preset update amount may not be the same for different target carbon accounts. Thus, through the above process, two-stage trading of the target carbon account can be achieved, ensuring the atomicity of the transaction.

[0091] When the update types of the aforementioned target carbon accounts are different, the corresponding first zero-knowledge proof information is also different, thus the generation process of the first zero-knowledge proof information is related to the update type of the target carbon accounts. When updating a set of target carbon accounts in batches, an input carbon account set can be generated based on this set of target carbon accounts, and the update types of this set of target carbon accounts are the same.

[0092] When the update type of the target carbon account is: updating the carbon emission reduction of the target carbon account based on the user's carbon emission reduction behavior, the process of generating the first zero-knowledge proof information based on at least two input carbon accounts and at least two output carbon accounts can include: first, obtaining the updated amount of the remaining carbon emission reduction for each input carbon account; then, generating the first zero-knowledge proof information based on the input carbon account set, the output carbon account set, the updated amount of the remaining carbon emission reduction for each input carbon account, and a first random number to a third random number. The first zero-knowledge proof information is used to verify that: the random carbon accounts have been updated, the remaining carbon emission reductions and frozen carbon emission reductions of the random carbon accounts have not been updated, the remaining carbon emission reductions of the target carbon account have been updated according to the updated amount of the remaining carbon emission reductions of the target carbon account, and the updated amount of the remaining carbon emission reductions of the target carbon account and the updated remaining carbon emission reductions of the target carbon account are both within a preset range. In this way, the accuracy of the update can be guaranteed when updating the carbon emission reduction of the target carbon account based on the user's carbon emission reduction behavior.

[0093] Understandably, when the input carbon account is a random carbon account, the update amount of the remaining carbon emission reductions for the input carbon account is 0.

[0094] When updating the target carbon account based on carbon reduction behavior, the input carbon account set is denoted as inputs, the output carbon account set as outputs, the public key set of each input carbon account as PK, the set of remaining carbon reductions of all input carbon accounts as BL, and the first, second, and third random numbers as r1, r2, and r3. The mapping relationship between each input carbon account in the input carbon account set and each output carbon account in the output carbon account set is denoted as F. At this time, the first zero-knowledge proof information is used to verify whether the relation R(x,w) = 1 holds, where x = (inputs, outputs), w = (PK, BL, V, r1, r2, r3, F, S), V is the set of updated remaining carbon reductions of all target carbon accounts, and S is the set of indices of all target carbon accounts in the input carbon account set.

[0095] Specifically, one of the relationships used to verify the first zero-knowledge proof information mentioned above is the remaining carbon emission reductions and frozen carbon emission reductions of the updated random carbon account and the unupdated random carbon account, which can be represented by the following formula (1).

[0096] Among them, acct i and acct′ F(i) Let i be the i-th input carbon account in the random carbon account set, and let i be the output carbon account corresponding to the i-th input carbon account. Thus, the above formula (1) is used to indicate that: the random carbon account in the n input carbon accounts has been updated, and the remaining carbon emission reductions and frozen carbon emission reductions have not been updated.

[0097] The second relationship used to verify the first zero-knowledge proof information above is that the remaining carbon emission reductions of the target carbon account have been updated according to the updated amount of the remaining carbon emission reductions of the target carbon account, which can be expressed by the following formula (2).

[0098] Where Vi is the update amount of the remaining carbon emission reduction of the i-th input carbon account. When i = S, Vi is also the update amount of the remaining carbon emission reduction of a target carbon account. The above formula (2) is used to indicate that the target carbon account among the n input carbon accounts has been updated, and the remaining carbon emission reduction has been updated according to the corresponding update amount.

[0099] The third relationship used to verify the first zero-knowledge proof information mentioned above is that the update amount of the remaining carbon emission reductions in the target carbon account is within a preset range, which can be expressed by formula (3).

[0100] V1R is the preset range for the update of the remaining carbon emission reductions.

[0101] The fourth relationship verified by the first zero-knowledge proof information mentioned above is that the remaining carbon emission reduction after the target carbon account update is within the preset range, which can be expressed by formula (4).

[0102] Where BLi is the remaining carbon emission reduction before the update of the i-th input carbon account, therefore, BLi+Vi is the carbon emission reduction after the update of the i-th input carbon account. V2R is the preset range of the remaining carbon emission reduction after the update of the target carbon account.

[0103] When the target carbon account update type is: target carbon account update initiated based on a preset update amount, target carbon account update successful based on a preset update amount, or target carbon account update failure based on a preset update amount, the process of generating the first zero-knowledge proof information based on at least two input carbon accounts and at least two output carbon accounts may include: First, obtaining the update identifier of the target carbon account based on the preset update amount; obtaining the update amount of the remaining carbon emission reduction of each target carbon account and the update amount of the frozen carbon emission reduction of each target carbon account; then, based on the input carbon account set and output carbon account set, the update identifier, the private key of each target carbon account, and the remaining carbon emission reduction of each target carbon account... The update amount of carbon emission reductions, the signature of each target carbon account, and a first to a third random number are used to generate a first zero-knowledge proof. This first zero-knowledge proof is used to verify that: the random carbon account has been updated, but the remaining and frozen carbon emission reductions of the random carbon account have not been updated; the update amounts of the frozen and remaining carbon emission reductions of the target carbon account are consistent with the update type; the update amounts of the remaining carbon emission reductions of the target carbon account, the updated remaining carbon emission reductions of the target carbon account, the updated frozen carbon emission reductions of the target carbon account, and the update amounts of the frozen carbon emission reductions of the target carbon account are all within a preset range. In this way, the accuracy of the update can be guaranteed when updating the carbon emission reductions of the target carbon account based on the preset update amount.

[0104] Understandably, when the input carbon account is a random carbon account, the update amounts for both the remaining carbon emission reductions and the frozen carbon emission reductions in the input carbon account are 0.

[0105] When the target carbon account update type is: target carbon account update initiated based on preset update amount, target carbon account update successful based on preset update amount, or target carbon account update failed based on preset update amount, the first zero-knowledge proof is not only used to verify the verification content represented by the aforementioned formulas (1), (3) and (4), but also needs to verify the verification content represented by formulas (5), (6) and (7).

[0106] in, is the signing public key of the i-th input carbon account. This signing public key is obtained by inputting the private key and the public key of the i-th input carbon account into the signature algorithm, so as to perform a signature calculation on the public key of the i-th input carbon account using the private key of the i-th input carbon account. The signature algorithm can be a signature algorithm based on the DDH assumption, such as the Schnorr signature algorithm or the Elgamal Signature algorithm. σi is the signature of the i-th input carbon account. When i belongs to S, In other words, σi is the signature public key of a target carbon account, which is the signature of that target carbon account. TID is the update identifier when updating this batch of target carbon accounts in the input carbon account set. TID||Vi is used to concatenate the update identifier and the preset update amount of the i-th input carbon account.

[0107] It can be seen that formula (5) is used to indicate that the signature of the target carbon account is correct.

[0108] Where SKi is the private key of the i-th input carbon account. It is the public key for signing the i-th input carbon account. When i belongs to S, SKi is the private key of a target carbon account. That is, the public key for signing a target carbon account.

[0109] It can be seen that formula (6) is used to indicate that the correspondence between the public key of the target carbon account and the private key of the target carbon account is valid.

[0110] Where BLi is the remaining carbon emission reduction of the i-th input carbon account, and DJi is the frozen carbon emission reduction of the i-th input carbon account.

[0111] It can be seen that formula (7) is used to indicate that the correspondence between the updated target carbon account and the private key is valid. Formulas (5)-(7) together are used to indicate that the owner of the target carbon account has indeed authorized the transaction limit.

[0112] When the target carbon account update type is: target carbon account update based on preset update amount, formula (8) can be used to represent: increase the remaining carbon emission reduction of each target carbon account by the preset update amount, and decrease the frozen carbon emission reduction by the preset update amount. Thus, the update amount of the frozen carbon emission reduction of the target carbon account and the update amount of the remaining carbon emission reduction of the target carbon account are consistent with the update type.

[0113] Where Vi is the preset update value for the i-th input carbon account, and Vi is less than zero.

[0114] When the target carbon account update type is "based on preset update amount", and the target carbon account update is successful, formula (9) can be used to represent: increase the frozen carbon emission reduction of each target carbon account by the preset update amount. Thus, the update amount of the frozen carbon emission reduction of the target carbon account and the update amount of the remaining carbon emission reduction of the target carbon account are consistent with the update type.

[0115] When the target carbon account update type fails to update the target carbon account based on the preset update amount, formula (10) is used to indicate that the remaining carbon emission reduction of each target carbon account is increased by the preset update amount, and the frozen carbon emission reduction is decreased by the preset update amount. Thus, it is determined that the update amount of the frozen carbon emission reduction of the target carbon account and the update amount of the remaining carbon emission reduction of the target carbon account are consistent with the update type.

[0116] In some implementations, the process by which the control blockchain updates the input carbon account set to the output carbon account set when zero-knowledge verification based on the first zero-knowledge proof information is successful may specifically include: first, calling the account update interface of the smart account contract on the blockchain, the account update interface being used to perform zero-knowledge verification based on the first zero-knowledge proof information, and updating the input carbon account set to the output carbon account set when the verification is successful.

[0117] Among them, smart account contracts are functional modules on the blockchain used to manage carbon accounts. They provide a variety of interfaces, including account creation interfaces and account update interfaces.

[0118] The account creation interface is used to create carbon accounts on the blockchain based on a pre-generated public key, a default commitment, and a second zero-knowledge proof. Specifically, the interface receives a pre-generated public key, a default commitment, and a second zero-knowledge proof. If the zero-knowledge verification of the second zero-knowledge proof passes, the received public key is used as the public key of the created carbon account, and the received default commitment is used as the first and second commitments in the created carbon account, indicating successful carbon account creation. If the zero-knowledge verification of the second zero-knowledge proof fails, the carbon account is not created, and the carbon account creation fails.

[0119] The account update interface is used to update carbon accounts on the blockchain based on a pre-generated set of input carbon accounts, a set of output carbon accounts, and a first zero-knowledge proof. Specifically, the interface receives the input carbon account set, the output carbon account set, and the first zero-knowledge proof information. If the zero-knowledge verification of the first zero-knowledge proof information passes, each input carbon account in the input carbon account set is deleted from the blockchain, and then each output carbon account in the output carbon account set is added to the blockchain; the carbon account update is successful. If the zero-knowledge verification of the first zero-knowledge proof information fails, the carbon account is not updated, and the carbon account update fails.

[0120] As can be seen, the embodiments of this application can achieve carbon account updates simply by sending the first zero-knowledge proof information, the input carbon account set, and the output carbon account set to the blockchain's account update interface. It does not require concern itself with the specific update logic within the account update interface, thus simplifying the software code outside the blockchain.

[0121] As can be seen from the foregoing description, the embodiments of this application involve batch updating of the input carbon account set. To better manage the batch update operation on the input carbon account set, an update execution status can be set to represent the progress of the batch update operation on that input carbon account set. The update execution status can be divided into at least four states: not executed, executing, executed successfully, and executed failed.

[0122] Before each batch update operation on the input carbon account set is performed, the update execution status of the input carbon account set is "not executed".

[0123] The update process for the above-mentioned update execution status is related to the update type of the target carbon account. Therefore, the update execution status can be adjusted according to the update type of the target carbon account. All target carbon accounts within the same input carbon account set have the same update type.

[0124] When the update type for the target carbon account is "Initiate target carbon account update based on preset update amount", the update execution status is adjusted to "Executing".

[0125] When the update type of the target carbon account is "update target carbon account based on preset update amount", the update execution status is adjusted to "execution successful".

[0126] When the update type of the target carbon account fails to update the target carbon account based on the preset update amount, the update execution status is adjusted to execution failure.

[0127] In practical applications, for a single transaction involving multiple target carbon accounts, two batch update operations need to be performed sequentially, including: first performing the first batch update operation, and then performing the second or third batch update operation.

[0128] During the first batch update operation, the update type for the target carbon account is "target carbon account update based on a preset update amount." Therefore, during the first batch update operation, the update execution status is first adjusted to "in progress," then an input carbon account set is formed to update the input carbon account set, and payment requests are initiated for each target carbon account in the input carbon account set. If the payment is successful and does not time out, the second batch update operation is performed; if the payment fails or times out, the third batch update operation is performed.

[0129] During the second batch update operation, the target carbon account update type is "update target carbon account successfully based on preset update amount". Therefore, when performing the second batch update operation, the update execution status is first adjusted to "execution successful", and then the input carbon account set is assembled to update the input carbon account set.

[0130] During the third batch update operation, the update type for the target carbon account was "failed to update the target carbon account based on the preset update amount". Therefore, during the second batch update operation, the update execution status was first adjusted to "execution failed", and then the input carbon account set was assembled to update the input carbon account set.

[0131] Figure 3 is a schematic flowchart of a carbon account update process provided in an embodiment of this application. Referring to Figure 3, two update processes are shown: the first update process is used to update the carbon account on the blockchain based on carbon emission reduction behavior, and the second update process is used to update the carbon account on the blockchain based on user-authorized transactions.

[0132] The first update process described above includes the following steps:

[0133] S201: User-side data collection of users' carbon emission reduction behavior.

[0134] S202: The client obtains the carbon emission reduction amount corresponding to the carbon emission reduction behavior from the trusted execution environment.

[0135] Specifically, the user client can send the carbon reduction action to the trusted execution environment, which will then generate the corresponding carbon reduction amount. Of course, to ensure the security of the carbon reduction amount, the trusted execution environment can also encrypt it, and the user client needs to decrypt it upon receiving the carbon reduction amount.

[0136] S203: User-side control of carbon account smart contracts on the blockchain, executing update processes based on carbon reduction behaviors.

[0137] Specifically, the user can update the target carbon account on the blockchain using the carbon data processing method described in this application. In this process, the user needs to determine a random carbon account to form an input carbon account set with the target carbon account, and update the account based on this input carbon account set. Specifically, this involves adding the carbon emission reduction amount corresponding to the user's carbon emission reduction behavior to the remaining carbon emission reduction amount in the user's carbon account.

[0138] The second update process described above includes the following steps:

[0139] S204: The user authorizes the transaction on the user terminal and sets the preset update volume.

[0140] S205: The user requests a transaction from the intermediary software platform.

[0141] S206: The middleware platform calls the transaction initiation interface of the carbon trading smart contract to initiate the target carbon account update process based on the preset update amount.

[0142] S207: The intermediate software platform initiates a payment process to the payment platform.

[0143] S208: After preparing the input carbon account set, the output carbon account set, and the first zero-knowledge proof information, the transaction initiation interface of the carbon trading smart contract calls the account update interface of the carbon account smart contract to execute the account update process for initiating the transaction.

[0144] S209: When the payment platform returns a payment success message, the intermediate software platform calls the transaction success interface of the carbon trading smart contract to perform a success update process based on a preset update amount.

[0145] S210: After preparing the input carbon account set, the output carbon account set, and the first zero-knowledge proof information, the transaction success interface of the carbon trading smart contract calls the account update interface of the carbon account smart contract to execute the account update process for successful transaction.

[0146] S211: When the payment platform returns a payment failure, the intermediate software platform calls the transaction failure interface of the carbon trading smart contract to perform a failure update process based on a preset update amount.

[0147] S212: After preparing the input carbon account set and output carbon account set, as well as the first zero-knowledge proof information, the carbon trading smart contract's transaction failure interface calls the carbon account smart contract's account update interface to execute the account update process for transaction failure.

[0148] It should be noted that the preset update amount can be greater than 0 or less than 0.

[0149] During the account update process for initiating a transaction, the remaining carbon emission reductions of the target carbon account are increased by a preset update amount, and the frozen carbon emission reductions of the target carbon account are decreased by a preset update amount. During the account update process for a successful transaction, the frozen carbon emission reductions of the target carbon account are decreased by a preset update amount. During the account update process for a failed transaction, the remaining carbon emission reductions of the target carbon account are decreased by a preset update amount, and the frozen carbon emission reductions of the target carbon account are increased by a preset update amount.

[0150] During the account update process described above, the public keys of the random carbon account and the target carbon account need to be updated, while the frozen carbon emission reductions and remaining carbon emission reductions of the random carbon account are not updated.

[0151] Figure 4 is a structural block diagram of a carbon data processing device provided in an embodiment of this application. Referring to Figure 4, the carbon data processing device 400 includes:

[0152] The account set determination module 401 is used to determine the input carbon account set on the blockchain. The input carbon account set includes at least two input carbon accounts: at least one target carbon account and at least one random carbon account. The target carbon account includes carbon accounts with carbon emission reductions to be updated. The random carbon account includes carbon accounts with carbon emission reductions not being updated. The carbon emission reductions to be updated include: remaining carbon emission reductions to be updated and / or frozen carbon emission reductions to be updated.

[0153] The account set update module 402 is used to update each input carbon account in the input carbon account set.

[0154] Optionally, each carbon account includes: a public key, a first commitment corresponding to the remaining carbon emission reductions, and a second commitment corresponding to the frozen carbon emission reductions, wherein the public key is used to uniquely identify the carbon account.

[0155] Optionally, the account set update module 402 is further configured to:

[0156] Each input carbon account in the input carbon account set is updated using at least one random number, with the same at least one random number used for different input carbon accounts.

[0157] Optionally, the account set update module 402 is further configured to:

[0158] For each input carbon account in the input carbon account set, the output carbon account corresponding to the input carbon account is determined based on at least one random number and the input carbon account, resulting in an output carbon account set; the blockchain is controlled to update the input carbon account set to the output carbon account set.

[0159] Optionally, the account set update module 402 is further configured to:

[0160] Each input carbon account in the input carbon account set and each output carbon account in the output carbon account set are sorted according to the same rules.

[0161] Optionally, the account set update module 402 is further configured to:

[0162] Based on a first random number and the public key of the input carbon account, determine the public key of the output carbon account corresponding to the input carbon account; based on a second random number, the public key of the output carbon account, and a first commitment of the input carbon account, determine the first commitment of the output carbon account corresponding to the input carbon account; based on a third random number, the public key of the output carbon account, and a second commitment of the input carbon account, determine the second commitment of the output carbon account corresponding to the input carbon account.

[0163] Optionally, the account set update module 402 is further configured to:

[0164] Based on the input carbon account set and the output carbon account set, a first zero-knowledge proof is generated. The first zero-knowledge proof is used to verify that updating the input carbon account set through the output carbon account set is correct. When the blockchain successfully performs zero-knowledge verification based on the first zero-knowledge proof information, it updates the input carbon account set to the output carbon account set.

[0165] Optionally, when the update type of the target carbon account is: updating the carbon emission reduction amount of the target carbon account based on the user's carbon emission reduction behavior, the update amount of the remaining carbon emission reduction amount of the target carbon account is determined by the trusted execution environment according to the carbon emission reduction behavior, and the update amount of the frozen carbon emission reduction amount of the target carbon account is 0.

[0166] Optionally, when the target carbon account update type is: when the target carbon account update is initiated based on a preset update amount, the update amount of the remaining carbon emission reductions of the target carbon account is the preset update amount, and the update amount of the frozen carbon emission reductions of the target carbon account is the opposite of the preset update amount; when the target carbon account update type is: when the target carbon account update is successful based on the preset update amount, the update amount of the remaining carbon emission reductions of the target carbon account is 0, and the update amount of the frozen carbon emission reductions of the target carbon account is the preset update amount; when the target carbon account update type is: when the target carbon account update fails based on the preset update amount, the update amount of the remaining carbon emission reductions of the target carbon account is the opposite of the preset update amount, and the update amount of the frozen carbon emission reductions of the target carbon account is the preset update amount.

[0167] Optionally, the account set update module 402 is further configured to:

[0168] Obtain the updated amount of remaining carbon emission reductions for each input carbon account; generate first zero-knowledge proof information based on the input carbon account set, the output carbon account set, the updated amount of remaining carbon emission reductions for each input carbon account, and the first random number to the third random number. The first zero-knowledge proof information is used to verify that: the random carbon account has been updated, the remaining carbon emission reductions and frozen carbon emission reductions of the random carbon account have not been updated, the remaining carbon emission reductions of the target carbon account have been updated according to the updated amount of remaining carbon emission reductions of the target carbon account, and the updated amount of remaining carbon emission reductions of the target carbon account and the updated remaining carbon emission reductions of the target carbon account are both within a preset range.

[0169] Optionally, the account set update module 402 is further configured to:

[0170] Obtain the update identifier of the target carbon account based on a preset update amount; obtain the update amount of the remaining carbon emission reduction of each target carbon account and the update amount of the frozen carbon emission reduction of each target carbon account; generate the first zero-knowledge proof information based on the input carbon account set and the output carbon account set, the update identifier, the private key of each target carbon account, the update amount of the remaining carbon emission reduction of each target carbon account, the signature of each target carbon account, and the first random number to the third random number. The first zero-knowledge proof information is used to verify that: the random carbon account has been updated, but the remaining carbon emission reduction and frozen carbon emission reduction of the random carbon account have not been updated; the update amount of the frozen carbon emission reduction of the target carbon account and the update amount of the remaining carbon emission reduction of the target carbon account are consistent with the update type; the update amount of the remaining carbon emission reduction of the target carbon account, the updated remaining carbon emission reduction of the target carbon account, the updated frozen carbon emission reduction of the target carbon account, and the update amount of the frozen carbon emission reduction of the target carbon account are all within a preset range.

[0171] Optionally, the account set update module 402 is further configured to:

[0172] The account update interface of the smart account contract on the blockchain is invoked. The account update interface is used to perform zero-knowledge verification based on the first zero-knowledge proof information, and when the verification is successful, the input carbon ledger is updated to the output carbon ledger.

[0173] Optionally, the account set update module 402 is further configured to:

[0174] The update execution status is adjusted according to the update type of the target carbon account; wherein, when the target carbon account update is initiated based on a preset update amount, the update execution status is adjusted to "in progress"; when the target carbon account is successfully updated based on the preset update amount, the update execution status is adjusted to "execution successful"; and when the target carbon account update fails based on the preset update amount, the update execution status is adjusted to "execution failed".

[0175] Optionally, the creation process of any carbon account on the blockchain includes:

[0176] A public key generation module is used to generate the public key for the carbon account.

[0177] The commitment generation module is used to generate a default commitment based on the public key and a preset default carbon emission reduction amount.

[0178] A creation module is used to control the creation of the carbon account on the blockchain based on the public key and the default commitment, wherein the first commitment and the second commitment of the carbon account are both the default commitment initially.

[0179] Optionally, the public key generation module is also used for:

[0180] Generate the public key for the carbon account and the corresponding private key.

[0181] Module creation is also used for:

[0182] Based on the public key, the default commitment, the default carbon emission reduction, and the private key, a second zero-knowledge proof is generated; when the blockchain successfully performs zero-knowledge verification based on the second zero-knowledge proof, it creates the carbon account based on the public key and the default commitment. The second zero-knowledge proof is used to verify that when the carbon account is created, the remaining carbon emission reduction and the frozen carbon emission reduction in the carbon account are both the default carbon emission reduction, and the creator has the private key of the carbon account.

[0183] Optionally, the private key generation module is further used for:

[0184] Generate the private key for the carbon account;

[0185] The public key of the carbon account is generated using a fourth random number and the private key of the carbon account.

[0186] Optionally, the commitment generation module is further configured to:

[0187] A default commitment is generated using a fifth random number, the public key, and a preset default carbon emission reduction amount.

[0188] The above-described device embodiments correspond to the aforementioned method embodiments. For detailed descriptions, please refer to the descriptions in the aforementioned method embodiments. The embodiments in this application will not be repeated here.

[0189] Figure 5 is a structural block diagram of an electronic device provided in an embodiment of this application. The electronic device 600 includes a memory 602 and at least one processor 601.

[0190] Among them, memory 602 stores computer-executed instructions.

[0191] At least one processor 601 executes computer execution instructions stored in memory 602, causing electronic device 600 to implement the aforementioned carbon data processing method.

[0192] In addition, the electronic device 600 may also include a receiver 603 and a transmitter 604, wherein the receiver 603 is used to receive information from other devices or equipment and forward it to the processor 601, and the transmitter 604 is used to send information to other devices or equipment.

[0193] The electronic device 600 here can be the user terminal shown in Figure 1, or it can be an intermediate software platform.

[0194] In an exemplary embodiment, a non-transitory computer-readable storage medium is also provided, which stores computer-executable instructions that, when executed by a processor, are used to implement the above-described method.

[0195] In an exemplary embodiment, a computer program product is also provided for implementing the aforementioned method.

[0196] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.

[0197] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A carbon data processing method characterized by, The method comprises: determining a set of input carbon accounts on a blockchain, at least two input carbon accounts in the set of input carbon accounts comprising: at least one target carbon account and at least one random carbon account, the target carbon account comprising a carbon account whose carbon reduction amount is to be updated, the random carbon account comprising a carbon account whose carbon reduction amount is not to be updated, the carbon reduction amount to be updated comprising: a remaining carbon reduction amount to be updated and / or a frozen carbon reduction amount to be updated; updating each input carbon account in the set of input carbon accounts.

2. The method of claim 1, wherein, Each carbon account comprises: a public key, a first commitment corresponding to the remaining carbon reduction amount, and a second commitment corresponding to the frozen carbon reduction amount, the public key being used to uniquely represent the carbon account.

3. The method of claim 2, wherein, The updating each input carbon account in the set of input carbon accounts comprises: updating each input carbon account in the set of input carbon accounts by using at least one random number, the same at least one random number being used for different input carbon accounts.

4. The method of claim 3, wherein, The updating each input carbon account in the set of input carbon accounts by using at least one random number comprises: for each input carbon account in the set of input carbon accounts, determining an output carbon account corresponding to the input carbon account according to at least one random number and the input carbon account, to obtain a set of output carbon accounts; controlling the blockchain to update the set of input carbon accounts to the set of output carbon accounts.

5. The method of claim 4, wherein, Before the controlling the blockchain to update the set of input carbon accounts to the set of output carbon accounts, the method further comprises: sequencing each input carbon account in the set of input carbon accounts and each output carbon account in the set of output carbon accounts according to the same rule, respectively.

6. The method of claim 4, wherein, The determining an output carbon account corresponding to the input carbon account according to at least one random number and the input carbon account comprises: determining a public key of the output carbon account corresponding to the input carbon account according to a first random number and a public key of the input carbon account; determining a first commitment of the output carbon account corresponding to the input carbon account according to a second random number, the public key of the output carbon account, and a first commitment of the input carbon account; determining a second commitment of the output carbon account corresponding to the input carbon account according to a third random number, the public key of the output carbon account, and a second commitment of the input carbon account.

7. The method of claim 6, wherein, When an update type of the target carbon account is to update the carbon reduction amount of the target carbon account based on a carbon reduction behavior of a user, an update amount of the remaining carbon reduction amount of the target carbon account is determined by a trusted execution environment according to the carbon reduction behavior, and an update amount of the frozen carbon reduction amount of the target carbon account is 0.

8. The method of claim 6, wherein when the update type of the target carbon account is to initiate an update of the target carbon account based on a preset update amount, the update amount of the remaining carbon reduction amount of the target carbon account is the preset update amount, and the update amount of the frozen carbon reduction amount of the target carbon account is an opposite number of the preset update amount. When the update type of the target carbon account is that the target carbon account is successfully updated based on the preset update amount, the update amount of the remaining carbon emission reduction amount of the target carbon account is 0, and the update amount of the frozen carbon emission reduction amount of the target carbon account is the preset update amount; When the update type of the target carbon account is that the target carbon account is unsuccessfully updated based on the preset update amount, the update amount of the remaining carbon emission reduction amount of the target carbon account is the opposite of the preset update amount, and the update amount of the frozen carbon emission reduction amount of the target carbon account is the preset update amount.

9. The method of claim 7, wherein, The control of the blockchain to update the input carbon account set to the output carbon account set comprises: obtaining the update amount of the remaining carbon emission reduction amount of each input carbon account; generating first zero-knowledge proof information according to the input carbon account set, the output carbon account set, the update amount of the remaining carbon emission reduction amount of each input carbon account, the first random number to the third random number, the first zero-knowledge proof information being used to verify that the random carbon account has been updated, the remaining carbon emission reduction amount and the frozen carbon emission reduction amount of the random carbon account have not been updated, the remaining carbon emission reduction amount of the target carbon account has been updated according to the update amount of the remaining carbon emission reduction amount of the target carbon account, the update amount of the remaining carbon emission reduction amount of the target carbon account and the updated remaining carbon emission reduction amount of the target carbon account are within a preset range; controlling the blockchain to update the input carbon account set to the output carbon account set when the zero-knowledge verification according to the first zero-knowledge proof information is successful.

10. The method of claim 8, wherein, The control of the blockchain to update the input carbon account set to the output carbon account set comprises: obtaining the update identification of the target carbon account based on the preset update amount; obtaining the update amount of the remaining carbon emission reduction amount of each target carbon account and the update amount of the frozen carbon emission reduction amount of each target carbon account; generating the first zero-knowledge proof information according to the input carbon account set and the output carbon account set, the update identification, the private key of each target carbon account, the update amount of the remaining carbon emission reduction amount of each target carbon account, the signature of each target carbon account, the first random number to the third random number, the first zero-knowledge proof information being used to verify that the random carbon account has been updated, the remaining carbon emission reduction amount and the frozen carbon emission reduction amount of the random carbon account have not been updated, the update amount of the frozen carbon emission reduction amount of the target carbon account and the update amount of the remaining carbon emission reduction amount of the target carbon account are consistent with the update type, the update amount of the remaining carbon emission reduction amount of the target carbon account, the updated remaining carbon emission reduction amount of the target carbon account, the updated frozen carbon emission reduction amount of the target carbon account and the update amount of the frozen carbon emission reduction amount of the target carbon account are within a preset range; controlling the blockchain to update the input carbon account set to the output carbon account set when the zero-knowledge verification according to the first zero-knowledge proof information is successful.

11. The method according to claim 9 or 10, characterized in that, The control of the blockchain to update the input carbon account set to the output carbon account set when the zero-knowledge verification according to the first zero-knowledge proof information is successful comprises: an account update interface of a smart account contract on the blockchain is called, the account update interface being configured to perform zero-knowledge verification according to the first zero-knowledge proof information, and when the verification is successful, the input carbon account set is updated to the output carbon account set.

12. The method of claim 9 or 10, wherein, After the control of the blockchain to update the input carbon account set to the output carbon account set when the zero-knowledge verification according to the first zero-knowledge proof information is successful, the method further includes: adjusting an update execution state according to the update type of the target carbon account; wherein, when the update of the target carbon account is initiated based on a preset update amount, the update execution state is adjusted to be in execution; when the update of the target carbon account based on the preset update amount is successful, the update execution state is adjusted to be in successful execution; when the update of the target carbon account based on the preset update amount fails, the update execution state is adjusted to be in failed execution.

13. The method according to any one of claims 2 to 10, characterized in that, a creation process of any one of the carbon accounts on the blockchain includes: generating a public key of the carbon account; generating a default commitment according to the public key and a preset default carbon reduction amount; controlling the blockchain to create the carbon account according to the public key and the default commitment, the first commitment and the second commitment of the carbon account being the default commitment at the beginning.

14. The method of claim 13, wherein, the generation of the public key of the carbon account includes: generating a public key of the carbon account and a private key corresponding to the public key; the control of the blockchain to create the carbon account according to the public key and the default commitment includes: generating second zero-knowledge proof information according to the public key, the default commitment, the default carbon reduction amount and the private key; controlling the blockchain to create the carbon account according to the public key and the default commitment when the zero-knowledge verification based on the second zero-knowledge proof information is successful, the second zero-knowledge proof information being used to verify that the remaining carbon reduction amount and the frozen carbon reduction amount of the carbon account are the default carbon reduction amount when the carbon account is created, and the creator has the private key of the carbon account.

15. The method of claim 14, wherein, the generation of the public key of the carbon account and the private key corresponding to the public key includes: generating a private key of the carbon account; generating a public key of the carbon account through a fourth random number and the private key of the carbon account.

16. The method of claim 13, wherein, the generation of the default commitment according to the public key and the preset default carbon reduction amount includes: generating a default commitment through a fifth random number, the public key and the preset default carbon reduction amount.

17. A carbon data processing apparatus, characterized by, includes: an account set determination module configured to determine an input carbon account set on a blockchain, at least two input carbon accounts in the input carbon account set including at least one target carbon account and at least one random carbon account, the target carbon account including a carbon account whose carbon reduction amount is to be updated, and the random carbon account including a carbon account whose carbon reduction amount is not to be updated, the carbon reduction amount to be updated including a remaining carbon reduction amount to be updated and / or a frozen carbon reduction amount to be updated; an account set update module configured to update each input carbon account in the input carbon account set.

18. An electronic device comprising a memory and at least one processor; wherein, the memory stores computer execution instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the electronic device implements the method in any one of claims 1 to 16.

19. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method in any one of claims 1 to 16.

20. A computer program product, characterised in that, The computer program product comprises a computer program, which, when executed by a processor, is used to implement the method in any one of claims 1 to 16.

Citation Information

Patent Citations

  • Carbon account accounting method and device, equipment and medium

    CN116843221A

  • Carbon account data processing method and device, electronic equipment and readable storage medium

    CN116933329A

  • Carbon data processing method and device

    CN118568748A

  • Blockchain-based transaction processing methods, apparatuses, and electronic devices

    US20210157800A1

  • Method, Device, Storage Medium and Program Product For Carbon Trading

    US20210248694A1