A privacy protection method and system under a blockchain
By leveraging the interaction of the on-chain state contract module, privacy wallet module, and off-chain extension module, and utilizing fragmented state data storage and zero-knowledge proofs, the complexity of off-chain transaction operations for users is solved, thereby achieving enhanced privacy protection and security.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU QULIAN TECHNOLOGY CO LTD
- Filing Date
- 2023-01-04
- Publication Date
- 2026-07-07
Smart Images

Figure CN116108481B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of blockchain technology, and in particular relates to a privacy protection method and system under blockchain. Background Technology
[0002] As we all know, users who can access blockchain nodes can obtain data on the chain. Therefore, data in the blockchain can be considered public data. With the increasing demand for privacy protection from users, some technologies that can protect blockchain privacy have emerged.
[0003] Current technologies require users to execute transactions and generate proofs off-chain, which is inconvenient for users and has a high technical threshold. Summary of the Invention
[0004] This application provides a privacy protection method and system under blockchain, which can solve the above-mentioned technical problems.
[0005] In a first aspect, embodiments of this application provide a privacy protection method under a blockchain, applied to an on-chain state contract module, a privacy wallet module interacting with an off-chain extension module, and the off-chain extension module interacting with the on-chain state contract module. The off-chain extension module includes multiple off-chain extension nodes, and at the same time, there is one off-chain extension master node among the off-chain extension nodes. The method includes: responding to a deposit request, obtaining deposit data; wherein the deposit data includes deposit user information and deposit fund information; increasing the off-chain funds of the depositing user according to the deposit user information and the deposit fund information; wherein the off-chain funds of the depositing user are stored in the off-chain extension node in the form of state data fragments; responding to a withdrawal request, receiving proof of executed transactions, an updated state root hash, and withdrawal data sent by the off-chain extension master node; wherein the withdrawal data includes withdrawal user information and withdrawal fund information; after verifying that the proof of executed transactions is passed, increasing the on-chain funds of the withdrawal user according to the withdrawal user information and withdrawal fund information.
[0006] Furthermore, if the deposited funds information specifies a first target quantity of native trading objects, the step of responding to the deposit request and obtaining the deposit data includes: responding to the deposit request, obtaining the deposit data, and receiving the first target quantity of native trading objects pledged by the depositing user; the step of increasing the depositing user's off-chain funds according to the depositing user information and the deposited funds information includes: increasing the depositing user's off-chain funds of the type native trading objects and the quantity of the first target quantity according to the depositing user information and the deposited funds information.
[0007] Further, if the deposited funds information indicates a first target quantity of non-native trading objects, the on-chain state contract module responds to the deposit request by acquiring deposit data, including: responding to the deposit request by acquiring the deposit data and receiving the collateral data of the depositing user; wherein, the collateral corresponding to the collateral data can be used within the on-chain state contract to replace the first target quantity of non-native trading objects; and increasing the depositing user's off-chain funds according to the depositing user information and the deposited funds information, including: increasing the depositing user's off-chain funds in the off-chain state contract with the type being non-native trading objects and the quantity being the first target quantity; wherein, the off-chain state contract is a state contract deployed in the off-chain extension module that is the same as the on-chain state contract.
[0008] Furthermore, the on-chain state contract module includes a monitoring module, which further includes: the monitoring module responding to a proposal request, obtaining proposal data, conducting community voting or designated voting on the proposal based on the proposal data, and if the number of supporting votes reaches a preset vote threshold, executing the privileged instruction corresponding to the proposal in the proposal data, and receiving transaction record data, state data, and / or execution results related to the proposal; the monitoring module obtaining the public key corresponding to the monitoring account, and encrypting and storing the transaction record data, state data, and / or execution results related to the proposal based on the public key corresponding to the monitoring account.
[0009] Secondly, this application provides a privacy protection method under a blockchain, applied to a privacy wallet module. The privacy wallet module interacts with an off-chain extension module, which in turn interacts with the on-chain state contract module described in the first aspect. The off-chain extension module includes multiple off-chain extension nodes, with one off-chain extension master node existing among the off-chain extension nodes at any given time. The method includes: responding to a first transaction request, parsing the first transaction request, obtaining the transaction target data, and obtaining a first public key; wherein the first public key is the public key corresponding to the off-chain extension node receiving the transaction; signing the transaction target data, and encrypting the signed transaction target data according to the first public key to obtain first encrypted transaction target data; generating and sending a second transaction request to the off-chain extension node receiving the transaction; the second transaction request is used to trigger the off-chain extension node receiving the transaction to generate and send a transaction request to the off-chain extension master node.
[0010] Thirdly, this application provides a privacy protection method under blockchain, applied to an off-chain extension module. The privacy wallet module described in the second aspect interacts with the off-chain extension module, and the off-chain extension module interacts with the on-chain state contract module described in the first aspect. The off-chain extension module includes multiple off-chain extension nodes, and at the same time, there is one off-chain extension master node among the off-chain extension nodes. The method includes: the off-chain extension node receiving the transaction receiving a second transaction request sent by the privacy wallet module; the off-chain extension node receiving the transaction responding to the second transaction request, parsing the second transaction request, and obtaining first encrypted transaction target data; the off-chain extension node receiving the transaction decrypting the first encrypted transaction target data according to the first private key to obtain the signed transaction target data; the off-chain extension node receiving the transaction obtaining a second public key, encrypting the signed transaction target data according to the second public key to obtain second encrypted transaction target data, generating and sending a transaction request to the off-chain extension master node; wherein, the second public key is the public key corresponding to the off-chain extension master node; the off-chain extension master node responding to the transaction request... The system requests and acquires transaction target data. Based on the transaction target data, it requests fragments of transaction dependency data from the off-chain extension node. When the number of received transaction dependency data fragments reaches a preset threshold, the transaction is executed. After the transaction is executed, the system acquires transaction record data and post-transaction state data, divides the transaction record data and post-transaction state data into fragments, and sends them to the off-chain extension node. The transaction request is sent to the off-chain extension master node via the privacy wallet module and the off-chain extension node receiving the transaction. In response to the first withdrawal request, the off-chain extension master node acquires the updated state root hash and the withdrawal data, and generates a proof of the executed transaction based on a preset zero-knowledge proof algorithm. The state root hash is updated after the transaction is executed. Based on the proof of the executed transaction, the updated state root hash, and the withdrawal data, the off-chain extension master node generates and sends a withdrawal request to the on-chain state contract module. The withdrawal request triggers the on-chain state contract module to verify the proof of the executed transaction. After the verification is passed, the on-chain funds of the withdrawing user are increased based on the withdrawing user information and withdrawal fund information.
[0011] Furthermore, the step of responding to a transaction request and obtaining transaction target data includes: the off-chain extended master node responding to the transaction request, parsing the transaction request, and obtaining the second encrypted transaction target data; the off-chain extended master node decrypting the second encrypted transaction target data according to the second private key to obtain the signed transaction target data, and verifying the signature of the signed transaction target data to obtain the transaction target data.
[0012] Furthermore, if the transaction target data indicates that the first user intends to transfer a second target amount of off-chain funds to the second user, the transaction dependency data includes the off-chain funds of the first user and the off-chain funds of the second user; requesting fragments of transaction dependency data from the off-chain extension node, and executing the transaction when the number of received fragments of transaction dependency data reaches a preset threshold, includes: the off-chain extension master node requesting fragments of the first user's off-chain funds and fragments of the second user's off-chain funds from the off-chain extension node; when the number of fragments of the first user's off-chain funds reaches the preset threshold and when the number of fragments of the second user's off-chain funds reaches the preset threshold, the off-chain extension master node determines whether the first user's off-chain funds are not less than the second target amount; if so, based on the second target amount, the first user's off-chain funds are reduced and the second user's off-chain funds are increased.
[0013] Furthermore, the transaction record data indicates that the first user has transferred the second target amount of off-chain funds to the second user, and the post-transaction status data includes the off-chain funds of the first user and the second user after the transaction. The step of dividing the transaction record data and the post-transaction status data into fragments and sending them to the off-chain extension node includes: the off-chain extension master node dividing the transaction record data indicating that the first user has transferred the second target amount of off-chain funds to the second user into fragments and sending them to the off-chain extension node, and dividing the off-chain funds of the first user and the second user after the transaction into fragments and sending them to the off-chain extension node.
[0014] Fourthly, this application provides a privacy protection system under a blockchain, comprising a privacy wallet module, an off-chain extension module, and an on-chain state contract module. The privacy wallet module interacts with the off-chain extension module, which in turn interacts with the on-chain state contract module. The off-chain extension module includes multiple off-chain extension nodes, with one off-chain extension master node existing at any given time. The on-chain state contract module is used to respond to deposit requests and obtain deposit data, including user information and deposit funds. The on-chain state contract module is also used to increase the off-chain funds of the depositing user based on the user information and deposit funds. The user's off-chain funds are stored in the off-chain extension nodes in the form of state data fragments. The off-chain extension master node is used to respond to transaction requests, obtain transaction target data, and determine the transaction target... The system requests fragments of transaction-dependent data from off-chain extension nodes. When the number of received transaction-dependent data fragments reaches a preset threshold, the transaction is executed. After the transaction is executed, the system obtains the transaction record data and post-transaction state data, and then segments the transaction record data and post-transaction state data into fragments and sends them to the off-chain extension nodes. The transaction request is sent to the off-chain extension master node via the privacy wallet module and the off-chain extension node receiving the transaction. The on-chain state contract module responds to withdrawal requests by receiving proof of the executed transaction, the updated state root hash, and withdrawal data sent by the off-chain extension master node. The withdrawal data includes withdrawal user information and withdrawal fund information. The on-chain state contract module also verifies that after the proof of the executed transaction passes, it increases the on-chain funds of the withdrawal user based on the withdrawal user information and withdrawal fund information.
[0015] Fifthly, embodiments of this application provide a privacy protection device under a blockchain, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the methods described in the first, second, or third aspects above.
[0016] Sixthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the methods described in the first, second, or third aspects above.
[0017] The method provided in this application embodiment is mainly implemented by the interaction of three modules: privacy wallet module, off-chain extension module, and on-chain state contract module. Specifically, the privacy wallet module interacts with the off-chain extension module, and the off-chain extension module interacts with the on-chain state contract module. The off-chain extension module includes multiple off-chain extension nodes, and at the same time, there is one off-chain extension master node among the off-chain extension nodes.
[0018] Firstly, regarding the on-chain state contract module, when a user deposits funds, the module responds to the deposit request and obtains the deposit data, which includes the depositing user information and the deposited funds. Based on this information, the module adds the depositing user's off-chain funds. These off-chain funds are stored in off-chain extension nodes in the form of state data fragments. In other words, users can transfer on-chain funds to off-chain transactions through deposits. Because these funds are stored in fragments in the off-chain extension nodes, each user can only view their own off-chain funds. If an external party compromises a node, the insufficient fragments obtained will prevent them from accessing the user's privacy. When a user withdraws funds, the on-chain state contract module responds to the withdrawal request by receiving proof of the executed transaction, the updated state root hash, and withdrawal data sent by the off-chain extended masternode. The withdrawal data includes the withdrawing user information and the withdrawal funds information. After the on-chain state contract module verifies the proof of the executed transaction, it increases the withdrawing user's on-chain funds based on the withdrawing user information and withdrawal funds information. Since the off-chain extended masternode not only executes transactions but also generates proof of the executed transaction and obtains the updated state root hash, submitting it to the chain, it can greatly simplify user operations and lower the technical threshold for off-chain transactions. After the on-chain state contract module verifies the proof of the executed transaction, it transfers the user's off-chain funds to the chain.
[0019] Secondly, regarding the privacy wallet module, when a user conducts an off-chain transaction, the privacy wallet module responds to the first transaction request, parses the first transaction request, obtains the transaction target data, and acquires the first public key; wherein, the first public key is the public key corresponding to the off-chain extended node receiving the transaction; then, the privacy wallet module signs the transaction target data, and encrypts the signed transaction target data according to the first public key, obtaining the first encrypted transaction target data, and generates and sends a second transaction request to the off-chain extended node receiving the transaction; the second transaction request is used to trigger the off-chain extended node receiving the transaction to generate and send a transaction request to the off-chain extended master node. Transaction triggering through the privacy wallet module can protect the privacy of off-chain transactions and improve their security.
[0020] Thirdly, for off-chain extension nodes, when implementing off-chain transactions, transaction requests are sent to the off-chain extension master node via the privacy wallet module and the receiving off-chain extension node. The off-chain extension master node responds to the transaction request, obtains the transaction target data, and requests fragments of transaction dependent data from the off-chain extension nodes based on the transaction target data. When the number of transaction dependent data fragments received reaches a preset threshold, the transaction is executed. After the transaction is executed, the transaction record data and post-transaction state data are obtained, and the transaction record data and post-transaction state data are divided into fragments and sent to the off-chain extension nodes. By dividing the transaction record data and post-transaction state data into fragments, the details of off-chain transactions can be well protected, ensuring the privacy of data storage. Furthermore, since the transaction is executed in a trusted off-chain execution environment, this not only ensures the correctness of transaction execution but also further enhances data security.
[0021] In summary, the privacy protection method provided in this application can not only more effectively hide transaction details and protect transaction privacy, but also protect the data of on-chain state contracts. It can be used to extend the privacy protection capabilities of existing blockchains, and is easy for users to operate and user-friendly. Attached Figure Description
[0022] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 This is a schematic diagram of the architecture of a privacy protection system under blockchain provided in the first embodiment of this application;
[0024] Figure 2 This is a schematic flowchart of a privacy protection method under blockchain provided in the second embodiment of this application;
[0025] Figure 3 This is another schematic flowchart of a privacy protection method under blockchain provided in the second embodiment of this application;
[0026] Figure 4 This is a schematic flowchart of a privacy protection method under blockchain provided in the third embodiment of this application;
[0027] Figure 5 This is a schematic flowchart of a privacy protection method under blockchain provided in the fourth embodiment of this application;
[0028] Figure 6This is a schematic flowchart of S305 in a privacy protection method under blockchain provided in the fourth embodiment of this application;
[0029] Figure 7 This is another schematic flowchart of S305 in a privacy protection method under blockchain provided in the fourth embodiment of this application;
[0030] Figure 8 This is a schematic diagram of a privacy protection device under a blockchain provided in the fifth embodiment of this application;
[0031] Figure 9 This is a schematic diagram of a privacy protection device under a blockchain provided in the sixth embodiment of this application;
[0032] Figure 10 This is a schematic diagram of a privacy protection device under a blockchain provided in the seventh embodiment of this application;
[0033] Figure 11 This is a schematic diagram of a privacy protection device under a blockchain provided in the eighth embodiment of this application. Detailed Implementation
[0034] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0035] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0036] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0037] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."
[0038] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0039] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0040] Please see Figure 1 , Figure 1 This is a schematic diagram of the architecture of a blockchain-based privacy protection system provided in the first embodiment of this application. The system includes a privacy wallet module 101, an off-chain extension module 102, and an on-chain state contract module 103. The off-chain extension module 102 includes multiple off-chain extension nodes 1021. The privacy wallet module 101 interacts with the off-chain extension module 102, and the off-chain extension module 102 interacts with the on-chain state contract module 103.
[0041] It should be noted that there are multiple interpretations of the concept of a module. For example, it can be understood as a program in a hardware device, or it can be understood as a hardware device itself.
[0042] In this embodiment of the application, each module in the system refers to a hardware device. The privacy wallet module 101 refers to a hardware device that implements the privacy wallet function. The off-chain extension module 102 refers to a hardware device that implements the off-chain extension function and creates a trusted execution environment. The on-chain state contract module 103 refers to a hardware device that deploys on-chain state contracts (also known as smart contracts). The off-chain extension module 102 includes multiple off-chain extension nodes 1021. Multiple off-chain extension nodes 1021 refer to hardware devices that jointly implement the off-chain extension function. Each off-chain extension node 1021 can create a trusted execution environment.
[0043] The following section will provide a detailed explanation of privacy protection methods under the blockchain, demonstrating how the above modules achieve data privacy protection under the blockchain.
[0044] Please see Figure 2 , Figure 2This is a schematic flowchart of a privacy protection method under blockchain provided in the second embodiment of this application.
[0045] In this embodiment, the privacy protection method under the blockchain is described using the on-chain state contract module as the execution subject. The on-chain state contract module can be a server, server cluster, processor, microprocessor, etc., all referring to devices that implement the corresponding functions. Figure 2 The privacy protection methods shown under the blockchain can include:
[0046] S101: In response to a deposit request, obtain deposit data; wherein, deposit data includes deposit user information and deposit funds information.
[0047] S102: Based on the deposit user information and deposit funds information, increase the deposit user's off-chain funds; wherein, the deposit user's off-chain funds are stored in the off-chain extension node in the form of state data fragments.
[0048] Regarding step S101, the on-chain state contract module responds to the deposit request, parses the deposit request, and obtains the deposit data.
[0049] The deposit data includes information on depositing users and deposited funds.
[0050] The deposit user information is used to indicate which user made the deposit.
[0051] Deposit information is used to specify the type and amount of deposited funds.
[0052] Deposit requests are generated by users and their purpose is to increase the off-chain funds of users for off-chain transactions.
[0053] Simply put, depositing funds is a special type of transaction that is related to an on-chain state contract. Essentially, it involves a user transferring funds from on-chain to off-chain via the on-chain state contract.
[0054] The on-chain state contract module increases the off-chain funds of the depositing user based on the user information and deposit amount information.
[0055] Specifically, the on-chain state contract module increases the off-chain funds of depositing users through off-chain extension nodes based on the depositing user information and deposit funds information.
[0056] In other words, the operation of increasing the off-chain funds of depositing users is actually completed by off-chain extended master nodes.
[0057] The off-chain extension masternode polls the latest transactions in the blockchain. When it finds a transaction related to the on-chain state contract, it parses it. If a deposit transaction is required, it will add the corresponding off-chain funds to the depositing user based on the depositing user information and deposit funds information.
[0058] The off-chain funds of the depositing user are stored in the form of state data fragments in the off-chain extension nodes. There are a total of n off-chain extension nodes. The off-chain extension nodes storing the off-chain funds of the depositing user may be n or m out of n, where n and m are both positive integers.
[0059] Specifically, the off-chain funds of depositing users are stored in off-chain extended nodes in the form of state data fragments through secret sharing technology.
[0060] The off-chain extension node creates a Trusted Execution Environment (TEE): it uses trusted hardware as a carrier to provide strong hardware-level security isolation and a general computing environment. Data is only decrypted and computed within the isolated secure zone "enclave". No other method can access the plaintext content of the data. The data is automatically encrypted before leaving the "enclave".
[0061] By storing each user's off-chain funds in this manner, each user can only view their own off-chain funds. If an external party breaches a node, it can only obtain a small portion of the data. Due to the insufficient number of fragments obtained, the data cannot be reconstructed, and thus the user's privacy cannot be accessed.
[0062] In one optional implementation, the type of deposited funds can be either native trading objects or non-native trading objects.
[0063] Native transaction objects are certified transaction objects in the blockchain, which can be used to pay on-chain transaction fees, etc.
[0064] Non-native transaction objects are transaction objects certified by state contracts and can only circulate within on-chain and off-chain state contracts.
[0065] If the deposit information specifies the first target amount of native trading objects, the S101 on-chain state contract module responds to the deposit request and obtains the deposit data, including:
[0066] S1011: In response to a deposit request, obtain deposit data and receive the first target amount of native trading objects staked by the depositing user.
[0067] The S102 on-chain state contract module increases the off-chain funds of depositing users based on their information and the amount deposited, including:
[0068] S1012: Based on the deposit user information and deposit funds information, add off-chain funds of the type of deposit user who is a native trading object and the quantity is the first target quantity.
[0069] Regarding step S1011, the on-chain state contract module responds to the deposit request, obtains the deposit data, and receives the first target amount of native transaction objects staked by the depositing user.
[0070] Simply put, depositing users stake their native trading objects on the blockchain into the on-chain state contract.
[0071] Here, the deposit data still includes the information of the depositing user and the deposited funds; the specific meanings will not be repeated here.
[0072] Regarding step S1012, the on-chain state contract module adds off-chain funds to the user's account based on the user information and the amount of funds deposited, with the user type being the native transaction object and the amount being the first target quantity.
[0073] Specifically, the on-chain state contract module adds off-chain funds of the depositing user, which are of the type of native transaction object and the quantity is the first target number, through the off-chain extended master node based on the depositing user information and deposit funds information. In this way, the depositing user can operate the first target number of native transaction objects off-chain.
[0074] If the deposit information specifies a non-native trading object of the first target quantity, the S101 on-chain state contract module responds to the deposit request and obtains the deposit data, including:
[0075] S1012: In response to a deposit request, obtain deposit data and receive the depositor's collateral data; wherein, the collateral corresponding to the collateral data can be used to replace the first target number of non-native transaction objects within the on-chain state contract.
[0076] The S102 on-chain state contract module increases the off-chain funds of depositing users based on their information and the amount deposited, including:
[0077] S1022: Based on the deposit user information and deposit funds information, add the type of the deposit user to the off-chain state contract, which is a non-native transaction object, and the amount is the first target amount of off-chain funds; wherein, the off-chain state contract is the same state contract as the on-chain state contract deployed in the off-chain extension module.
[0078] Regarding step S1012, the on-chain state contract module responds to the deposit request, obtains the deposit data, and receives the collateral data of the depositing user.
[0079] Specifically, the collateral corresponding to the collateral data can be used within the on-chain state contract to replace the first target number of non-native transaction objects. The specific type of collateral is not limited here; the on-chain state contract accepts collateral as long as it can be used to replace non-native transaction objects.
[0080] Regarding step S1022, the on-chain state contract module adds off-chain funds to the off-chain state contract based on the deposit user information and deposit funds information. The type of the deposit user is a non-native transaction object and the quantity is the first target quantity.
[0081] Based on the depositor information and deposit funds, the on-chain state contract module adds off-chain funds of the depositor (type of non-native transaction object) to the off-chain state contract through the off-chain extension master node. This means that the depositor can operate the first target number of non-native transaction objects off-chain.
[0082] The off-chain state contract is the same as the on-chain state contract, which is deployed in the off-chain extension module. This is because there is no transaction environment for non-native transaction objects off-chain, so it is necessary to deploy the same state contract as the on-chain state contract in the off-chain extension module.
[0083] S103: In response to a withdrawal request, receive proof of the executed transaction, the updated state root hash, and withdrawal data sent by the off-chain extended master node; the withdrawal data includes withdrawal user information and withdrawal fund information.
[0084] Withdrawal requests are also generated by users, and their purpose is to transfer funds from off-chain to on-chain.
[0085] Since transactions are executed off-chain, and withdrawals typically occur only after multiple transactions, the on-chain state contract module needs to verify the off-chain computed proof and update the previously stored state root hash when responding to withdrawal requests.
[0086] The withdrawal user information indicates which user is withdrawing funds. The withdrawal amount information specifies the type and amount of funds withdrawn. Generally, the withdrawing user's off-chain funds are cleared after the withdrawal.
[0087] The off-chain extended masternode will send proof of executed transactions, the updated state root hash, and withdrawal data to the on-chain state contract module.
[0088] The proof of executed transactions is generated by off-chain extended masternodes using a pre-defined zero-knowledge proof algorithm.
[0089] Off-chain data is stored in the form of a Merkle tree. The state root hash here is the hash of the root node of this Merkle tree. The state root hash is updated after the transaction is executed. Therefore, the off-chain extended master node needs to send the updated state root hash to the on-chain state contract module for storage.
[0090] S104: After the proof of the executed transaction is verified, the on-chain funds of the withdrawing user are increased based on the withdrawing user information and the withdrawing funds information.
[0091] Once the on-chain state contract module verifies the proof of the executed transaction using a preset zero-knowledge proof algorithm, it will increase the on-chain funds of the withdrawing user based on the withdrawing user information and the withdrawing funds information.
[0092] If the type of withdrawal funds is a native trading object, increasing the on-chain funds of the withdrawing user means transferring the native trading object that is staked in the on-chain state contract to the user's on-chain address.
[0093] If the type of withdrawal funds is not the native trading object, increasing the on-chain funds of the withdrawal user means transferring the collateral that has been pledged in the on-chain state contract.
[0094] In an optional implementation, please refer to Figure 3 , Figure 3 This is another schematic flowchart illustrating a blockchain-based privacy protection method provided in the second embodiment of this application. The on-chain state contract module includes a monitoring module, which refers to a hardware device that implements monitoring functions and is located within the on-chain state contract module. The method further includes:
[0095] S105: The regulatory module responds to the proposal request, obtains the proposal data, conducts community voting or designated voting on the proposal based on the proposal data, and executes the privileged instructions corresponding to the proposal in the proposal data if the number of supporting votes reaches the preset vote threshold, and receives transaction record data, status data and / or execution results related to the proposal.
[0096] When governments or regulatory agencies need to monitor certain illegal transactions or accounts, they can execute the corresponding privileged instructions through the monitoring module of the on-chain state contract module.
[0097] Specifically, the government or regulatory agency can generate proposal requests through the regulatory module, and the regulatory module responds to the proposal requests by obtaining proposal data.
[0098] The proposal data specifies which particular proposal it refers to. A proposal could be: viewing transaction records of an account involved in money laundering, or freezing a money laundering account, etc.
[0099] The regulatory module conducts community voting or designated voting on proposals based on the proposal data. If the number of supporting votes reaches a preset threshold, it executes the privileged instructions corresponding to the proposal in the proposal data and receives transaction record data, status data and / or execution results related to the proposal.
[0100] Privileged instructions include instructions to view transaction data, instructions to view status data, and / or instructions to freeze an account.
[0101] Then, executing the command to view the transaction data corresponding to the proposal will receive the transaction record data related to the proposal.
[0102] Executing the command to view the state data corresponding to the proposal will receive the state data related to the proposal (i.e., the storage data of the specified on-chain state contract).
[0103] Executing the account freeze command corresponding to the proposal will result in receiving the account freeze execution result related to the proposal.
[0104] S106: The regulatory module obtains the public key corresponding to the regulatory account and encrypts and saves the transaction record data, status data and / or execution results related to the proposal based on the public key corresponding to the regulatory account.
[0105] By obtaining the public key corresponding to the regulatory account, and encrypting and storing the transaction records, status data, and / or execution results related to the proposal based on the public key of the regulatory account, the regulator can easily view the transaction records, status data, and / or execution results related to the proposal through the regulatory account.
[0106] In this example, by setting up a monitoring module, regulatory agencies can monitor transactions, freeze hacker accounts and illicit money accounts, prevent illegal transactions, and avoid the transfer of illicit assets.
[0107] The method provided in this embodiment is mainly implemented through the interaction of three modules: a privacy wallet module, an off-chain extension module, and an on-chain state contract module. Specifically, the privacy wallet module interacts with the off-chain extension module, and the off-chain extension module interacts with the on-chain state contract module. The off-chain extension module includes multiple off-chain extension nodes, with one off-chain extension master node existing at any given time. For the on-chain state contract module, when a user deposits funds, the module responds to the deposit request and obtains the deposit data, which includes the depositor's information and the deposited funds. Based on this information, the module increases the depositor's off-chain funds. These funds are stored in the off-chain extension nodes in the form of state data fragments. In other words, users can transfer on-chain funds to off-chain transactions through deposits. Because the off-chain funds are stored in fragments in the off-chain extension nodes, each user can only view their own off-chain funds. When an external party compromises a node, the obtained fragments are insufficient to access the user's privacy. When a user withdraws funds, the on-chain state contract module responds to the withdrawal request by receiving proof of the executed transaction, the updated state root hash, and withdrawal data sent by the off-chain extended masternode. The withdrawal data includes the withdrawing user information and the withdrawal funds information. After the on-chain state contract module verifies the proof of the executed transaction, it increases the withdrawing user's on-chain funds based on the withdrawing user information and withdrawal funds information. Since the off-chain extended masternode not only executes transactions but also generates proof of the executed transaction and obtains the updated state root hash, submitting it to the chain, it can greatly simplify user operations and lower the technical threshold for off-chain transactions. After the on-chain state contract module verifies the proof of the executed transaction, it transfers the user's off-chain funds to the chain.
[0108] Please see Figure 4 , Figure 4 This is a schematic flowchart of a privacy protection method under blockchain provided in the third embodiment of this application.
[0109] In this embodiment, the privacy wallet module is used as the execution entity to describe the privacy protection method under the blockchain. The privacy wallet module can be a server, server cluster, processor, microprocessor, etc., all referring to devices that implement the corresponding functions. This embodiment mainly explains how the privacy wallet module triggers transaction execution before a transaction occurs. Figure 4 The privacy protection methods shown under the blockchain can include:
[0110] S201: In response to the first transaction request, parse the first transaction request, obtain the transaction target data, and obtain the first public key; wherein, the first public key is the public key corresponding to the off-chain extension node receiving the transaction.
[0111] The privacy wallet module is a hardware device used to implement privacy wallet functionality. The first transaction request is actively initiated and generated by the user. By parsing the first transaction request, the transaction target data can be obtained.
[0112] Specifically, the user can define the transaction target in the client, trigger the client to obtain the transaction target data, and generate the first transaction request based on the transaction target data.
[0113] The privacy wallet module responds to the first transaction request by parsing the first transaction request, obtaining the transaction target data, and obtaining the first public key.
[0114] The first public key is the public key corresponding to the off-chain extension node that receives the transaction. Here, it is not limited to which off-chain extension node receives the transaction.
[0115] S202: Sign the transaction target data, encrypt the signed transaction target data according to the first public key to obtain the first encrypted transaction target data, generate and send the second transaction request to the off-chain extension node that receives the transaction.
[0116] The privacy wallet module signs the transaction target data and encrypts the signed transaction target data according to the first public key to obtain the first encrypted transaction target data.
[0117] The signature and encryption methods used in the privacy wallet module are not specified here.
[0118] The privacy wallet module generates and sends a second transaction request to the off-chain extension node that receives the transaction, based on the first encrypted transaction target data.
[0119] The method provided in this embodiment is mainly implemented through the interaction of three modules: a privacy wallet module, an off-chain extension module, and an on-chain state contract module. Specifically, the privacy wallet module interacts with the off-chain extension module, and the off-chain extension module interacts with the on-chain state contract module. The off-chain extension module includes multiple off-chain extension nodes, and at any given time, one off-chain extension master node exists among the off-chain extension nodes. For the privacy wallet module, when a user conducts an off-chain transaction, the privacy wallet module responds to a first transaction request, parses the first transaction request, obtains the transaction target data, and obtains a first public key; wherein, the first public key is the public key corresponding to the off-chain extension node receiving the transaction; then, the privacy wallet module signs the transaction target data, and encrypts the signed transaction target data according to the first public key to obtain the first encrypted transaction target data, generates and sends a second transaction request to the off-chain extension node receiving the transaction; the second transaction request is used to trigger the off-chain extension node receiving the transaction to generate and send a transaction request to the off-chain extension master node. By triggering transactions through the privacy wallet module, the privacy of off-chain transactions can be protected and the security of off-chain transactions can be improved.
[0120] Please see Figure 5 , Figure 5 This is a schematic flowchart of a privacy protection method under blockchain provided in the fourth embodiment of this application.
[0121] In this embodiment, the privacy protection method under the blockchain is described using off-chain extension modules as the execution subject. These off-chain extension modules can be servers, server clusters, processors, microprocessors, etc., all referring to devices that implement the corresponding functions. Figure 5 The privacy protection methods shown under the blockchain can include:
[0122] S301: The off-chain extension node receiving the transaction receives the second transaction request sent by the privacy wallet module.
[0123] S302: The off-chain extension node receiving the transaction responds to the second transaction request, parses the second transaction request, and obtains the first encrypted transaction target data.
[0124] S303: The off-chain extension node receiving the transaction decrypts the first encrypted transaction target data using the first private key to obtain the signed transaction target data.
[0125] The first private key corresponds to the first public key. The off-chain extension node receiving the transaction decrypts the first encrypted transaction target data based on the first private key to obtain the signed transaction target data.
[0126] S304: The off-chain extension node receiving the transaction obtains the second public key, encrypts the signed transaction target data according to the second public key, obtains the second encrypted transaction target data, generates and sends a transaction request to the off-chain extension master node; wherein, the second public key is the public key corresponding to the off-chain extension master node.
[0127] The off-chain extension node receiving the transaction obtains the second public key, and encrypts the signed transaction target data according to the second public key to obtain the second encrypted transaction target data.
[0128] The off-chain extension node receiving the transaction generates and sends a transaction request to the off-chain extension master node based on the second encrypted transaction target data.
[0129] Understandably, to send data to a specific off-chain extension node, the corresponding public key is obtained to encrypt the data, ensuring its security during transmission.
[0130] S305: The off-chain extended master node responds to a transaction request, obtains the transaction target data, and requests fragments of transaction dependent data from the off-chain extended nodes based on the transaction target data. When the number of received transaction dependent data fragments reaches a preset threshold, the transaction is executed. After the transaction is executed, the transaction record data and post-transaction status data are obtained, and the transaction record data and post-transaction status data are divided into fragments and sent to the off-chain extended nodes. Among them, the transaction request is sent to the off-chain extended master node through the privacy wallet module and the off-chain extended node receiving the transaction.
[0131] At any given time, only one off-chain extension node is the off-chain extension master node, which can be used to execute transactions. To ensure the data security of the entire network when the off-chain extension master node goes offline or is compromised, the off-chain extension master node needs to be changed periodically. When the term of the off-chain extension master node ends or it fails to submit proofs to the chain for a long time, other off-chain extension nodes elect a new off-chain extension master node in the order of off-chain extension node ID.
[0132] The off-chain extended master node responds to the transaction request, obtains the transaction target data, and requests fragments of the transaction dependent data from the off-chain extended node based on the transaction target data.
[0133] The transaction request is sent from the privacy wallet module and the off-chain extension node that receives the transaction to the off-chain extension master node.
[0134] The transaction target data indicates the transaction target, which can be a transfer transaction or a query transaction, etc.
[0135] Transaction-dependent data refers to the data required to complete a transaction.
[0136] For example, a transfer transaction must at least specify the users involved in the transfer (sender and recipient) and the amount transferred. If there are multiple transaction parties, the transaction party type must also be specified.
[0137] To query a transaction, you must at least specify the user involved in the query and which data you are querying.
[0138] Specifically, off-chain extended master nodes can obtain transaction dependency data through pre-executed transaction records.
[0139] Since the data is stored in fragments on the off-chain extension nodes, the off-chain extension master node needs to request fragments of the transaction-dependent data from the off-chain extension nodes.
[0140] When the number of received transaction dependency data fragments reaches a preset threshold, it indicates that the transaction dependency data can be restored. Then, the off-chain extended master node executes the transaction. After the transaction is executed, the off-chain extended master node obtains the transaction record data and the post-transaction status data, divides the transaction record data and the post-transaction status data into fragments, and sends them to the off-chain extended node.
[0141] The post-transaction status data includes at least the user's off-chain funds after the transaction.
[0142] If it is a transfer transaction, the post-transaction status data should at least include the off-chain funds held by the users (sender and receiver) involved in the transfer after the transfer.
[0143] In one optional implementation, after the transaction is completed, a transaction execution receipt needs to be sent to the user who initiated the transaction.
[0144] For querying transactions, if the query is successful, the transaction execution receipt will include the query results.
[0145] For transfer transactions, the transaction execution receipt will be empty. Optionally, the transaction execution receipt can be used to indicate whether the transfer transaction was successful or failed.
[0146] Based on this, please refer to Figure 6 , Figure 6 This is a schematic flowchart of step S305 in a blockchain-based privacy protection method provided in the fourth embodiment of this application. Step S305 includes:
[0147] S3051: The off-chain extended master node responds to the transaction request, parses the transaction request, and obtains the second encrypted transaction target data.
[0148] S3052: The off-chain extended master node decrypts the second encrypted transaction target data according to the second private key to obtain the signed transaction target data, and verifies the signature of the signed transaction target data to obtain the transaction target data.
[0149] The above process involves off-chain extended master nodes performing decryption and signature verification in order to obtain the transaction target data.
[0150] The off-chain extended master node responds to the transaction request, parses the transaction request, obtains the second encrypted transaction target data, then decrypts the second encrypted transaction target data according to the second private key to obtain the signed transaction target data, and verifies the signature of the signed transaction target data to obtain the transaction target data.
[0151] In one optional implementation, please refer to Figure 7 , Figure 7 This is another schematic flowchart of S305 in a blockchain-based privacy protection method provided in the fourth embodiment of this application. If the transaction target data indicates that a first user intends to transfer a second target amount of off-chain funds to a second user, and the transaction dependency data includes the off-chain funds of the first user and the second user, S305 requests fragments of the transaction dependency data from the off-chain extension node. When the number of received transaction dependency data fragments reaches a preset threshold, the transaction is executed, including:
[0152] S3053: The off-chain extension master node requests fragments of the off-chain funds of the first user and the second user from the off-chain extension node.
[0153] Since the transaction target data indicates that the first user intends to transfer a second target amount of off-chain funds to the second user, the transaction dependency data includes the off-chain funds of both the first and second users. Therefore, the off-chain extension masternode needs to request fragments of the first and second user's off-chain funds from the off-chain extension nodes.
[0154] S3054: When the number of fragments of the first user's off-chain funds reaches a preset threshold and when the number of fragments of the second user's off-chain funds reaches a preset threshold, the off-chain extension master node determines whether the first user's off-chain funds are not less than the second target amount. If so, based on the second target amount, the first user's off-chain funds are reduced and the second user's off-chain funds are increased.
[0155] When the number of fragments of the first user's off-chain funds reaches a preset threshold, and when the number of fragments of the second user's off-chain funds reaches a preset threshold, the fragments can be restored to obtain the off-chain funds of the first user and the second user. More precisely, it can be determined how much off-chain funds the first user and the second user each possess.
[0156] Since the first user is the transferor, it is necessary to determine whether the first user's off-chain funds are no less than the second target amount. If so, the transfer can be completed. Based on the second target amount, the first user's off-chain funds are reduced and the second user's off-chain funds are increased.
[0157] Otherwise, the transfer transaction will not be completed due to insufficient off-chain funds for the first user.
[0158] Based on this embodiment, in S305, transaction record data and post-transaction status data are segmented into fragments and sent to off-chain extension nodes, including:
[0159] S3055: The off-chain extension master node will divide the transaction record data indicating that the first user has transferred the second target amount of off-chain funds to the second user into fragments and send them to the off-chain extension node, and also divide the off-chain funds of the first user and the second user after the transaction into fragments and send them to the off-chain extension node.
[0160] The transaction record data indicates that the first user has transferred the second target amount of off-chain funds to the second user.
[0161] The post-transaction status data includes the off-chain funds of the first user and the second user after the transaction.
[0162] To ensure data security, the off-chain extended master node will fragment the transaction record data indicating that the first user has transferred the second target amount of off-chain funds to the second user and send it to the off-chain extended node. It will also fragment the off-chain funds of the first user and the second user after the transaction and send them to the off-chain extended node.
[0163] In this embodiment, by segmenting transaction record data and post-transaction state data into fragments, the details of off-chain transactions can be well protected, ensuring the privacy of data storage. Furthermore, since the transactions are executed in a trusted off-chain execution environment, this not only ensures the correctness of transaction execution but also further enhances data security.
[0164] S306: The off-chain extended master node responds to the first withdrawal request, obtains the updated state root hash and the withdrawal data, and generates proof of the executed transaction according to the preset zero-knowledge proof algorithm; wherein, the state root hash is updated after the transaction is executed.
[0165] S307: The off-chain extended master node generates and sends a withdrawal request to the on-chain state contract module based on the proof of the executed transaction, the updated state root hash, and the withdrawal data. The withdrawal request is used to trigger the on-chain state contract module to verify that the proof of the executed transaction has passed. After that, the module increases the on-chain funds of the withdrawing user based on the withdrawal user information and withdrawal fund information.
[0166] In response to the first withdrawal request, the off-chain extended masternode obtains the updated state root hash and withdrawal data, and generates proof of the executed transaction based on the preset zero-knowledge proof algorithm. Based on the proof of the executed transaction, the updated state root hash, and the withdrawal data, the off-chain extended masternode generates and sends a withdrawal request to the on-chain state contract module.
[0167] The first withdrawal request was generated when the user called the specific withdrawal interface of the off-chain extended master node.
[0168] The method provided in this application embodiment is mainly implemented by the interaction of three modules: privacy wallet module, off-chain extension module, and on-chain state contract module. Specifically, the privacy wallet module interacts with the off-chain extension module, and the off-chain extension module interacts with the on-chain state contract module. The off-chain extension module includes multiple off-chain extension nodes, and at the same time, there is one off-chain extension master node among the off-chain extension nodes. For off-chain extension nodes, when implementing off-chain transactions, the transaction request is sent to the off-chain extension master node via the privacy wallet module and the receiving off-chain extension node. The off-chain extension master node responds to the transaction request, obtains the transaction target data, and requests fragments of transaction dependent data from the off-chain extension nodes based on the transaction target data. When the number of transaction dependent data fragments received reaches a preset threshold, the transaction is executed. After the transaction is executed, the transaction record data and post-transaction state data are obtained, and the transaction record data and post-transaction state data are divided into fragments and sent to the off-chain extension nodes. By dividing the transaction record data and post-transaction state data into fragments, the details of the off-chain transaction can be well protected, ensuring the privacy of data storage. Furthermore, since the transaction is executed in a trusted off-chain execution environment, this not only ensures the correctness of the transaction execution but also further enhances data security.
[0169] In summary, the privacy protection method provided in this application can not only more effectively hide transaction details and protect transaction privacy, but also protect the data of on-chain state contracts. It can be used to extend the privacy protection capabilities of existing blockchains, and is easy for users to operate and user-friendly.
[0170] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0171] Please see Figure 8 , Figure 8 This is a schematic diagram of a privacy protection device under a blockchain provided in the fifth embodiment of this application. The device 8 includes:
[0172] The first response unit 81 is used to respond to a deposit request and obtain deposit data; wherein, the deposit data includes deposit user information and deposit fund information;
[0173] Deposit unit 82 is used to increase the off-chain funds of the depositing user based on the depositing user information and the depositing funds information; wherein, the off-chain funds of the depositing user are stored in the off-chain extension node in the form of state data fragments;
[0174] The second response unit 83 is used to respond to a withdrawal request by receiving proof of the executed transaction, the updated state root hash, and withdrawal data sent by the off-chain extended master node; wherein the withdrawal data includes withdrawal user information and withdrawal fund information.
[0175] The withdrawal unit 84 is used to verify that the proof of the executed transaction has passed, and then add the on-chain funds of the withdrawal user based on the withdrawal user information and withdrawal fund information.
[0176] Furthermore, the device 8 also includes: a monitoring unit, used to respond to a proposal request, obtain proposal data, conduct community voting or designated voting on the proposal based on the proposal data, execute the privileged instructions corresponding to the proposal in the proposal data if the number of supporting votes reaches a preset vote threshold, and receive transaction record data, status data and / or execution results related to the proposal; and an encrypted storage unit, used to obtain the public key corresponding to the monitoring account, and encrypt and store the transaction record data, status data and / or execution results related to the proposal based on the public key corresponding to the monitoring account.
[0177] Please see Figure 9 , Figure 9 This is a schematic diagram of a privacy protection device under a blockchain provided in the sixth embodiment of this application. The device 9 includes:
[0178] The response unit 91 is configured to respond to the first transaction request, parse the first transaction request, obtain the transaction target data, and obtain the first public key; wherein the first public key is the public key corresponding to the off-chain extension node receiving the transaction;
[0179] The signature unit 92 is used to sign the transaction target data, encrypt the signed transaction target data according to the first public key to obtain the first encrypted transaction target data, generate and send a second transaction request to the off-chain extension node receiving the transaction; the second transaction request is used to trigger the off-chain extension node receiving the transaction to generate and send a transaction request to the off-chain extension master node.
[0180] Please see Figure 10 , Figure 10 This is a schematic diagram of a privacy protection device under a blockchain provided in the seventh embodiment of this application. The device 10 includes:
[0181] The request receiving unit 101 is used for the off-chain extended node receiving the transaction to receive the second transaction request sent by the privacy wallet module.
[0182] Request parsing unit 102 is used for the off-chain extension node receiving the transaction to respond to the second transaction request, parse the second transaction request, and obtain the first encrypted transaction target data;
[0183] The data decryption unit 103 is used by the off-chain extension node receiving the transaction to decrypt the first encrypted transaction target data according to the first private key to obtain the signed transaction target data.
[0184] The data encryption unit 104 is used for the off-chain extended node receiving the transaction to obtain a second public key, encrypt the signed transaction target data according to the second public key to obtain the second encrypted transaction target data, and generate and send a transaction request to the off-chain extended master node; wherein, the second public key is the public key corresponding to the off-chain extended master node;
[0185] Transaction unit 105 is used by the off-chain extended master node to respond to a transaction request, obtain transaction target data, request fragments of transaction dependent data from the off-chain extended node based on the transaction target data, execute the transaction when the number of received fragments of the transaction dependent data reaches a preset threshold, obtain transaction record data and post-transaction status data after the transaction is executed, and divide the transaction record data and post-transaction status data into fragments and send them to the off-chain extended node; wherein, the transaction request is sent to the off-chain extended master node via the privacy wallet module and the off-chain extended node receiving the transaction;
[0186] The generation unit 106 can be used by the off-chain extended master node to respond to the first withdrawal request, obtain the updated state root hash and the withdrawal data, and generate proof of the executed transaction according to a preset zero-knowledge proof algorithm; wherein, the state root hash is updated after the transaction is executed;
[0187] The withdrawal request unit 107 is used by the off-chain extended master node to generate and send a withdrawal request to the on-chain state contract module based on the proof of the executed transaction, the updated state root hash, and the withdrawal data. The withdrawal request is used to trigger the on-chain state contract module to verify that the proof of the executed transaction has passed, and then increase the on-chain funds of the withdrawing user based on the withdrawing user information and the withdrawal funds information.
[0188] Furthermore, transaction unit 105 includes:
[0189] The acquisition unit is used by the off-chain extended master node to respond to the transaction request, parse the transaction request, and acquire the second encrypted transaction target data.
[0190] The decryption and signature verification unit is used by the off-chain extended master node to decrypt the second encrypted transaction target data according to the second private key to obtain the signed transaction target data, and to verify the signature of the signed transaction target data to obtain the transaction target data.
[0191] Furthermore, transaction unit 105 includes:
[0192] Fragment request unit, used by the off-chain extension master node to request fragments of the off-chain funds of the first user and the second user from the off-chain extension node;
[0193] The transaction execution unit is used to determine whether the off-chain funds of the first user are not less than the second target amount when the number of fragments of the off-chain funds of the first user reaches a preset threshold and when the number of fragments of the off-chain funds of the second user reaches a preset threshold. If so, the off-chain funds of the first user are reduced and the off-chain funds of the second user are increased according to the second target amount.
[0194] Furthermore, transaction unit 105 includes:
[0195] The fragmentation unit is used by the off-chain extended master node to fragment the transaction record data indicating that the first user has transferred the second target amount of off-chain funds to the second user and send it to the off-chain extended node, and to fragment the off-chain funds of the first user and the second user after the transaction and send them to the off-chain extended node.
[0196] It should be noted that the content of the privacy protection device under the blockchain proposed above is based on the same concept as the method embodiment of this application. Its specific functions and the resulting technical effects can be found in the method embodiment section, and will not be repeated here.
[0197] Please see Figure 1 , Figure 1 This is a schematic diagram of the architecture of a blockchain-based privacy protection system provided in the first embodiment of this application. The system includes a privacy wallet module 101, an off-chain extension module 102, and an on-chain state contract module 103. The off-chain extension module 102 includes multiple off-chain extension nodes 1021, and at any given time, one off-chain extension master node 100 exists among the off-chain extension nodes 1021. The privacy wallet module 101 interacts with the off-chain extension module 102, and the off-chain extension module 102 interacts with the on-chain state contract module 103.
[0198] The explanations of each module will not be repeated here.
[0199] The on-chain state contract module 103 is used to respond to deposit requests and obtain deposit data; the deposit data includes deposit user information and deposit fund information.
[0200] The on-chain state contract module 103 is also used to increase the off-chain funds of the depositing user based on the depositing user information and depositing funds information; wherein, the off-chain funds of the depositing user are stored in the off-chain extension node 1021 in the form of state data fragments;
[0201] The off-chain extended master node 100 is used to respond to transaction requests, obtain transaction target data, and request fragments of transaction dependent data from the off-chain extended node 1021 based on the transaction target data. When the number of received transaction dependent data fragments reaches a preset threshold, the transaction is executed. After the transaction is executed, the transaction record data and post-transaction status data are obtained, and the transaction record data and post-transaction status data are divided into fragments and sent to the off-chain extended node 1021. The transaction request is sent to the off-chain extended master node 100 via the privacy wallet module 101 and the off-chain extended node 1021 that receives the transaction.
[0202] The on-chain state contract module 103 is used to respond to withdrawal requests by receiving proof of executed transactions, updated state root hashes, and withdrawal data sent by the off-chain extended master node 100; wherein, the withdrawal data includes withdrawal user information and withdrawal fund information;
[0203] The on-chain state contract module 103 is also used to verify that after the proof of the executed transaction has passed, it increases the on-chain funds of the withdrawing user based on the withdrawing user information and the withdrawing funds information.
[0204] Furthermore, if the deposit funds information indicates that the first target quantity of native trading objects is involved, the on-chain state contract module 103 is used to respond to the deposit request, obtain the deposit data, and receive the first target quantity of native trading objects pledged by the depositing user; the on-chain state contract module 103 is also used to increase the depositing user's off-chain funds with the type of native trading objects and the quantity of the first target quantity according to the depositing user information and the deposit funds information.
[0205] Furthermore, if the deposited funds information indicates a first target quantity of non-native trading objects, the on-chain state contract module 103 is used to respond to the deposit request, obtain deposit data, and receive the depositor's collateral data; wherein, the collateral corresponding to the collateral data can be used within the on-chain state contract to replace the first target quantity of non-native trading objects; the on-chain state contract module 103 is also used to add the depositor's information and deposited funds information to the off-chain state contract, specifying the depositor's type as non-native trading objects and the quantity as the first target quantity; wherein, the off-chain state contract is the same state contract as the on-chain state contract deployed in the off-chain extension module 102.
[0206] Furthermore, before responding to a transaction request, the off-chain extended master node 100 parses the first transaction request, obtains the transaction target data, and obtains the first public key; wherein, the first public key is the public key corresponding to the off-chain extended node 1021 receiving the transaction; the privacy wallet module 101 is also used to sign the transaction target data, encrypt the signed transaction target data according to the first public key, obtain the first encrypted transaction target data, generate and send a second transaction request to the off-chain extended node 1021 receiving the transaction; the off-chain extended node receiving the transaction... Point 1021 is used to respond to the second transaction request, parse the second transaction request, and obtain the first encrypted transaction target data; the off-chain extension node 1021 receiving the transaction is also used to decrypt the first encrypted transaction target data according to the first private key to obtain the signed transaction target data; the off-chain extension node 1021 receiving the transaction is also used to obtain the second public key, encrypt the signed transaction target data according to the second public key to obtain the second encrypted transaction target data, generate and send a transaction request to the off-chain extension master node 100; wherein, the second public key is the public key corresponding to the off-chain extension master node 100.
[0207] Furthermore, the off-chain extended master node 100 is used to respond to the transaction request, parse the transaction request, and obtain the second encrypted transaction target data; the off-chain extended master node 100 is also used to decrypt the second encrypted transaction target data according to the second private key to obtain the signed transaction target data, and verify the signature of the signed transaction target data to obtain the transaction target data.
[0208] Furthermore, if the transaction target data indicates that the first user intends to transfer a second target amount of off-chain funds to the second user, the transaction dependency data includes the off-chain funds of the first user and the off-chain funds of the second user. The off-chain extension master node 100 is used to request fragments of the off-chain funds of the first user and the second user from the off-chain extension node 1021. When the number of fragments of the first user's off-chain funds reaches a preset threshold and when the number of fragments of the second user's off-chain funds reaches a preset threshold, the off-chain extension master node 100 is also used to determine whether the off-chain funds of the first user are not less than the second target amount. If so, according to the second target amount, the off-chain funds of the first user are reduced and the off-chain funds of the second user are increased.
[0209] Furthermore, the transaction record data indicates that the first user has transferred the second target amount of off-chain funds to the second user. The post-transaction status data includes the off-chain funds of the first user and the second user after the transaction. The off-chain extended master node 100 is also used to divide the transaction record data indicating that the first user has transferred the second target amount of off-chain funds to the second user into fragments and send them to the off-chain extended node, and to divide the off-chain funds of the first user and the second user after the transaction into fragments and send them to the off-chain extended node 1021.
[0210] Furthermore, before the on-chain state contract module 103 receives the proof of the executed transaction, the updated state root hash, and the withdrawal data sent by the off-chain extended master node 100 in response to the withdrawal request, the off-chain extended master node 100 is used to obtain the updated state root hash and withdrawal data in response to the first withdrawal request, and generate the proof of the executed transaction according to the preset zero-knowledge proof algorithm; wherein, the state root hash is updated after the transaction is executed; the off-chain extended master node 100 is also used to generate and send a withdrawal request to the on-chain state contract module 103 based on the proof of the executed transaction, the updated state root hash, and the withdrawal data.
[0211] Furthermore, the on-chain state contract module 103 includes a regulatory module, which further includes: the regulatory module responding to a proposal request, obtaining proposal data, conducting community voting or designated voting on the proposal based on the proposal data, executing the privileged instructions corresponding to the proposal in the proposal data if the number of supporting votes reaches a preset vote threshold, and receiving transaction record data, state data and / or execution results related to the proposal; the regulatory module obtaining the public key corresponding to the regulatory account, and encrypting and storing the transaction record data, state data and / or execution results related to the proposal based on the public key corresponding to the regulatory account.
[0212] It should be noted that the content of the blockchain-based privacy protection system proposed above is based on the same concept as the method embodiment of this application. Its specific functions and technical effects can be found in the method embodiment section, and will not be repeated here.
[0213] Please see Figure 11 , Figure 11 This is a schematic diagram of a privacy protection device under a blockchain provided in the eighth embodiment of this application.
[0214] like Figure 11 As shown, the blockchain-based privacy protection device 11 in this embodiment includes: a processor 110, a memory 111, and a computer program 112 stored in the memory 111 and executable on the processor 110, such as a blockchain-based privacy protection program. When the processor 110 executes the computer program 112, it implements the steps in the various blockchain-based privacy protection method embodiments described above, for example... Figure 2 Steps S101 to S104 shown, or, for example, Figure 4 Steps S201 to S202 shown, or, for example, Figure 5 Steps S301 to S307 are shown.
[0215] For example, the computer program 112 may be divided into one or more modules / units, which are stored in the memory 111 and executed by the processor 110 to complete this application. The one or more modules / units may be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program 112 in the privacy protection device 11 under the blockchain.
[0216] For example, the computer program 112 can be divided into a first response unit, a deposit unit, a second response unit, and a withdrawal unit, with the specific functions of each unit as follows:
[0217] The first response unit is used to respond to a deposit request and obtain deposit data; wherein, the deposit data includes deposit user information and deposit fund information;
[0218] The deposit unit is used to increase the off-chain funds of the depositing user based on the depositing user information and the depositing funds information; wherein, the off-chain funds of the depositing user are stored in the off-chain extension node in the form of state data fragments;
[0219] The second response unit is used to respond to a withdrawal request by receiving proof of the executed transaction, the updated state root hash, and withdrawal data sent by the off-chain extended master node; wherein the withdrawal data includes withdrawal user information and withdrawal fund information.
[0220] The withdrawal unit is used to verify that the proof of the executed transaction has passed, and then add the on-chain funds of the withdrawal user based on the withdrawal user information and withdrawal fund information.
[0221] For example, the computer program 112 can be divided into a response unit and a signature unit, with each unit having the following specific functions:
[0222] A response unit is configured to respond to a first transaction request, parse the first transaction request, obtain the transaction target data, and obtain a first public key; wherein the first public key is the public key corresponding to the off-chain extension node receiving the transaction;
[0223] The signing unit is used to sign the transaction target data, encrypt the signed transaction target data according to the first public key to obtain the first encrypted transaction target data, generate and send a second transaction request to the off-chain extension node receiving the transaction; the second transaction request is used to trigger the off-chain extension node receiving the transaction to generate and send a transaction request to the off-chain extension master node.
[0224] For example, the computer program 112 can be divided into a request receiving unit, a request parsing unit, a data decryption unit, a data encryption unit, a transaction unit, a generation unit, and a withdrawal request unit, with the specific functions of each unit as follows:
[0225] A request receiving unit is used for the off-chain extended node receiving the transaction to receive a second transaction request sent by the privacy wallet module;
[0226] The request parsing unit is used to parse the second transaction request in response to the second transaction request of the off-chain extension node receiving the transaction, and obtain the first encrypted transaction target data.
[0227] The data decryption unit is used by the off-chain extension node receiving the transaction to decrypt the first encrypted transaction target data according to the first private key to obtain the signed transaction target data.
[0228] The data encryption unit is used for the off-chain extended node receiving the transaction to obtain a second public key, encrypt the signed transaction target data according to the second public key to obtain second encrypted transaction target data, and generate and send a transaction request to the off-chain extended master node; wherein, the second public key is the public key corresponding to the off-chain extended master node;
[0229] A transaction unit is used by the off-chain extended master node to respond to a transaction request, obtain transaction target data, request fragments of transaction dependent data from the off-chain extended node based on the transaction target data, execute the transaction when the number of received fragments of the transaction dependent data reaches a preset threshold, obtain transaction record data and post-transaction status data after the transaction is executed, and divide the transaction record data and the post-transaction status data into fragments and send them to the off-chain extended node; wherein, the transaction request is sent to the off-chain extended master node via the privacy wallet module and the off-chain extended node receiving the transaction;
[0230] The generation unit can be used by the off-chain extended master node in response to the first withdrawal request to obtain the updated state root hash and the withdrawal data, and generate proof of the executed transaction according to a preset zero-knowledge proof algorithm; wherein the state root hash is updated after the transaction is executed.
[0231] The withdrawal request unit is used by the off-chain extended master node to generate and send a withdrawal request to the on-chain state contract module based on the proof of the executed transaction, the updated state root hash, and the withdrawal data. The withdrawal request is used to trigger the on-chain state contract module to verify that the proof of the executed transaction has passed, and then to increase the on-chain funds of the withdrawing user based on the withdrawing user information and the withdrawal funds information.
[0232] The privacy protection device 11 under the blockchain may include, but is not limited to, a processor 110 and a memory 111. Those skilled in the art will understand that... Figure 11 This is merely an example of a privacy protection device 11 under the blockchain and does not constitute a limitation on the privacy protection device 11 under the blockchain. It may include more or fewer components than shown, or combine certain components, or different components. For example, the privacy protection device 11 under the blockchain may also include input / output devices, network access devices, buses, etc.
[0233] The processor 110 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0234] The memory 111 can be an internal storage unit of the privacy protection device 11 under the blockchain, such as a hard drive or memory of the privacy protection device 11 under the blockchain. The memory 111 can also be an external storage device of the privacy protection device 11 under the blockchain, such as a plug-in hard drive, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the privacy protection device 11 under the blockchain. Furthermore, the privacy protection device 11 under the blockchain can include both internal storage units and external storage devices. The memory 111 is used to store the computer program and other programs and data required by the privacy protection device 11 under the blockchain. The memory 111 can also be used to temporarily store data that has been output or will be output.
[0235] The information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.
[0236] This application also provides a network device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein the processor executes the computer program to implement the steps in any of the above method embodiments.
[0237] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the various method embodiments above.
[0238] This application provides a computer program product that, when run on a mobile terminal, enables the mobile terminal to implement the steps described in the above-described method embodiments.
[0239] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a photographing device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.
[0240] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0241] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0242] In the embodiments provided in this application, it should be understood that the disclosed apparatus / network devices and methods can be implemented in other ways. For example, the apparatus / network device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0243] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0244] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A privacy protection method under blockchain, applied to an on-chain state contract module, characterized in that, The privacy wallet module interacts with the off-chain extension module, which in turn interacts with the on-chain state contract module. The off-chain extension module includes multiple off-chain extension nodes, and at any given time, one off-chain extension master node exists among these nodes. In response to a deposit request, the deposit data is obtained; wherein, the deposit data includes deposit user information and deposit fund information; Based on the deposit user information and the deposit funds information, the off-chain funds of the deposit user are increased; wherein, the off-chain funds of the deposit user are stored in the off-chain extension node in the form of state data fragments; In response to a withdrawal request, the system receives proof of the executed transaction, an updated state root hash, and withdrawal data sent by the off-chain extended master node; wherein the withdrawal data includes withdrawal user information and withdrawal fund information. After the proof of the executed transaction is verified, the on-chain funds of the withdrawing user are increased according to the withdrawing user information and the withdrawing funds information; The on-chain state contract module includes a monitoring module. In response to a proposal request, the monitoring module obtains proposal data, conducts community voting or designated voting on the proposal based on the proposal data, and if the number of supporting votes reaches a preset vote threshold, executes the privileged instruction corresponding to the proposal in the proposal data, and receives transaction record data, status data and / or execution results related to the proposal. The supervision module obtains the public key corresponding to the supervision account, and encrypts and saves the transaction record data, status data and / or execution results related to the proposal based on the public key corresponding to the supervision account. The method further includes: The privacy wallet module responds to the first transaction request by parsing the first transaction request, obtaining the transaction target data, and obtaining the first public key; it signs the transaction target data, and encrypts the signed transaction target data according to the first public key to obtain the first encrypted transaction target data; it then generates and sends a second transaction request to the off-chain extension node receiving the transaction; wherein, the first public key is the public key corresponding to the off-chain extension node receiving the transaction, and the second transaction request is used to trigger the off-chain extension node receiving the transaction to generate and send a transaction request to the off-chain extension master node.
2. The privacy protection method under blockchain as described in claim 1, characterized in that, If the deposit information specifies a first target quantity of native trading objects, the step of responding to the deposit request and obtaining deposit data includes: In response to a deposit request, the deposit data is obtained, and the first target number of native trading objects pledged by the depositing user are received; The step of increasing the off-chain funds of the depositing user based on the depositing user information and the depositing funds information includes: Based on the deposit user information and the deposit funds information, the off-chain funds of the deposit user are increased to the type of native trading object and the quantity is the first target quantity.
3. The privacy protection method under blockchain as described in claim 1, characterized in that, If the deposited funds information specifies a first target quantity of non-native trading objects, the on-chain state contract module responds to the deposit request and obtains the deposit data, including: In response to a deposit request, the deposit data is obtained, and the collateral data of the depositing user is received; wherein, the collateral corresponding to the collateral data can be used to replace the first target number of non-native transaction objects within the on-chain state contract; Based on the depositor information and the deposit funds information, increase the off-chain funds of the depositor, including: Based on the deposit user information and the deposit funds information, the off-chain funds of the deposit user, which are of the type of non-native transaction object and the quantity is the first target quantity, are added to the off-chain state contract; wherein, the off-chain state contract is the same state contract as the on-chain state contract deployed in the off-chain extension module.
4. A privacy protection method under blockchain, applied to off-chain extension modules, characterized in that, The privacy wallet module interacts with the off-chain extension module, and the off-chain extension module interacts with the on-chain state contract module as described in any one of claims 1-3. The off-chain extension module includes multiple off-chain extension nodes, and at any given time, one off-chain extension master node exists among the off-chain extension nodes, including: The off-chain extension node receiving the transaction receives a second transaction request sent by the privacy wallet module; The off-chain extension node receiving the transaction responds to the second transaction request, parses the second transaction request, and obtains the first encrypted transaction target data; The off-chain extension node receiving the transaction decrypts the first encrypted transaction target data using the first private key to obtain the signed transaction target data. The off-chain extension node receiving the transaction obtains a second public key, encrypts the signed transaction target data using the second public key to obtain second encrypted transaction target data, and generates and sends a transaction request to the off-chain extension master node; wherein, the second public key is the public key corresponding to the off-chain extension master node; The off-chain extended master node responds to a transaction request by acquiring the transaction target data, requesting fragments of transaction dependency data from the off-chain extended node based on the transaction target data, and executing the transaction when the number of received transaction dependency data fragments reaches a preset threshold. After the transaction is executed, it acquires transaction record data and post-transaction status data, and segments the transaction record data and post-transaction status data into fragments and sends them to the off-chain extended node. The transaction request is sent to the off-chain extended master node via the privacy wallet module and the off-chain extended node receiving the transaction. In response to a withdrawal request, the off-chain extended master node obtains the updated state root hash and the withdrawal data, and generates proof of the executed transaction based on a preset zero-knowledge proof algorithm; wherein, the state root hash is updated after the transaction is executed. The off-chain extended master node generates and sends a withdrawal request to the on-chain state contract module based on the proof of the executed transaction, the updated state root hash, and the withdrawal data. The withdrawal request is used to trigger the on-chain state contract module to verify that the proof of the executed transaction has passed, and then increases the on-chain funds of the withdrawing user based on the withdrawing user information and withdrawal fund information.
5. The privacy protection method under blockchain as described in claim 4, characterized in that, The off-chain extended master node responds to the transaction request and obtains the transaction target data, including: The off-chain extended master node responds to the transaction request, parses the transaction request, and obtains the second encrypted transaction target data; The off-chain extended master node decrypts the second encrypted transaction target data according to the second private key to obtain the signed transaction target data, and verifies the signature of the signed transaction target data to obtain the transaction target data.
6. The privacy protection method under blockchain as described in claim 4, characterized in that, If the transaction target data indicates that the first user intends to transfer a second target amount of off-chain funds to the second user, the transaction dependency data includes the off-chain funds of the first user and the off-chain funds of the second user. The step of requesting fragments of transaction dependency data from the off-chain extension node, and executing the transaction when the number of received fragments of transaction dependency data reaches a preset threshold, includes: The off-chain extension master node requests fragments of the off-chain funds of the first user and the second user from the off-chain extension node; When the number of fragments of the first user's off-chain funds reaches a preset threshold and when the number of fragments of the second user's off-chain funds reaches a preset threshold, the off-chain extension master node determines whether the first user's off-chain funds are not less than the second target amount. If so, based on the second target amount, the off-chain funds of the first user are reduced and the off-chain funds of the second user are increased.
7. The privacy protection method under blockchain as described in claim 6, characterized in that, The transaction record data indicates that the first user has transferred the second target amount of off-chain funds to the second user. The post-transaction status data includes the off-chain funds of the first user and the second user after the transaction. The step of dividing the transaction record data and the post-transaction status data into fragments and sending them to the off-chain extension node includes: The off-chain extended master node will divide the transaction record data indicating that the first user has transferred the second target amount of off-chain funds to the second user into fragments and send them to the off-chain extended node, and also divide the off-chain funds of the first user and the second user after the transaction into fragments and send them to the off-chain extended node.
8. A privacy protection system under blockchain, characterized in that, include: Privacy wallet module, off-chain extension module, and on-chain state contract module; The privacy wallet module interacts with the off-chain extension module, and the off-chain extension module interacts with the on-chain state contract module. The off-chain extension module includes multiple off-chain extension nodes, and at the same time, there is one off-chain extension master node among the off-chain extension nodes. The on-chain state contract module is used to respond to deposit requests and obtain deposit data; wherein, the deposit data includes deposit user information and deposit fund information; The on-chain state contract module is also used to increase the off-chain funds of the depositing user based on the depositing user information and the depositing funds information; wherein, the off-chain funds of the depositing user are stored in the off-chain extension node in the form of state data fragments; The off-chain extended master node is used to respond to transaction requests, obtain transaction target data, request fragments of transaction dependent data from the off-chain extended node based on the transaction target data, execute the transaction when the number of received transaction dependent data fragments reaches a preset threshold, obtain transaction record data and post-transaction status data after the transaction is executed, and divide the transaction record data and post-transaction status data into fragments and send them to the off-chain extended node; wherein, the transaction request is sent to the off-chain extended master node via the privacy wallet module and the off-chain extended node receiving the transaction; The on-chain state contract module is used to respond to withdrawal requests by receiving proof of executed transactions, updated state root hashes, and withdrawal data sent by the off-chain extended masternode; wherein, the withdrawal data includes withdrawal user information and withdrawal fund information; The on-chain state contract module is also used to verify that after the proof of the executed transaction has passed, it increases the on-chain funds of the withdrawing user based on the withdrawing user information and the withdrawing funds information.
9. A privacy protection device under a blockchain, comprising: A processor, a memory, and a computer program stored in the memory and executable on the processor, characterized in that, when the processor executes the computer program, it implements the steps of the method as claimed in claims 1 to 3 or any one of claims 4 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method as described in any one of claims 1 to 3 or 4 to 7.