Blockchain transaction method and device, electronic device, and storage medium

By separating the income balance and expenditure balance in the blockchain account structure, and using a combination of promised amount and plain text amount, high concurrent transactions under the blockchain account model are achieved, solving the problem of low transaction throughput of the account model. Improve transaction efficiency and privacy.

CN113128989BActive Publication Date: 2024-11-08ANTCHAIN TECHNOLOGY PTE LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110391044.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-02-01
Publication Date
2024-11-08
Estimated Expiration
2039-02-01

AI Technical Summary

Technical Problem

The lack of concurrent transaction capabilities under the blockchain account model leads to low transaction throughput and cannot fully support smart contract functions and high throughput requirements.

Method used

By separating the income balance and expenditure balance in the account structure, and using a combination of promised amount and plain amount during the transaction process, a limited public transfer transaction is realized to ensure the privacy and concurrency of the transaction. Specific methods include recording the income balance as a cipher text amount and recording the expenditure balance as a plain text amount, ensuring the non-negative and adequacy of the transaction amount through interval proof, so that only explicit deductions and change are exposed in the blockchain ledger. , realize concurrent transactions under the account model.

Benefits of technology

On the premise of ensuring transaction privacy, the concurrency and throughput of blockchain transactions are improved, allowing the same account to participate in both remittance and remittance transactions, improving transaction efficiency and overall performance of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113128989B_ABST
    Figure CN113128989B_ABST
Patent Text Reader

Abstract

One or more embodiments of the present specification provide a blockchain transaction method and device, an electronic device, and a storage medium, which are applied to a remitter device, the method comprising: determining a transaction amount to be remitted from a remitter account to a receiver account, the remitter account comprising a remitter main balance using a committed amount, a remitter income balance using a committed amount, and a remitter expenditure balance using a plain text amount, the receiver account comprising a receiver main balance using a committed amount, a receiver income balance using a committed amount, and a receiver expenditure balance using a plain text amount; submitting a public transfer transaction to a blockchain, the public transfer transaction comprising a public transaction amount corresponding to the public transaction amount, so that the remitter expenditure balance deducts the public transaction amount after the transaction is completed, and the receiver expenditure balance increases the public transaction amount after the transaction is completed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of this specification relate to the field of blockchain technology, and in particular, to a blockchain transaction method and device, electronic device, and storage medium. Background Art

[0002] Blockchain can reach a consensus among various blockchain nodes, thereby jointly maintaining a unified blockchain ledger between various blockchain nodes to permanently record transaction information that has occurred in the blockchain network. The blockchain ledger is completely public, so that historical data of transactions that have occurred can be viewed and verified at any time. Summary of the invention

[0003] In view of this, one or more embodiments of this specification provide a blockchain transaction method and device, an electronic device, and a storage medium.

[0004] One or more embodiments of this specification provide the following technical solutions:

[0005] According to a first aspect of one or more embodiments of this specification, a blockchain transaction method is proposed, which is applied to a remitter device, and the method includes:

[0006] Determine the transaction amount to be remitted from the remitting party account to the receiving party account, the remitting party account includes the remitting party principal balance using the committed amount, the remitting party income balance using the committed amount, and the remitting party expenditure balance using the plain text amount, and the receiving party account includes the receiving party principal balance using the committed amount, the receiving party income balance using the committed amount, and the receiving party expenditure balance using the plain text amount;

[0007] Submit a public transfer transaction to the blockchain, wherein the public transfer transaction includes a public transaction amount corresponding to the public transaction amount, so that the remitter's expenditure balance is deducted from the public transaction amount after the transaction is completed, and the recipient's expenditure balance is increased by the public transaction amount after the transaction is completed.

[0008] According to a second aspect of one or more embodiments of this specification, a blockchain transaction device is proposed, which is applied to a remitter device, and the device includes:

[0009] a determination unit, determining a transaction amount to be remitted from a remitter's account to a receiver's account, wherein the remitter's account includes a remitter's main balance using a committed amount, a remitter's income balance using a committed amount, and a remitter's expenditure balance using a plain text amount, and the receiver's account includes a receiver's main balance using a committed amount, a receiver's income balance using a committed amount, and a receiver's expenditure balance using a plain text amount;

[0010] The submitting unit submits a public transfer transaction to the blockchain, wherein the public transfer transaction includes a public transaction amount corresponding to the public transaction amount, so that the remitter's expenditure balance is deducted from the public transaction amount after the transaction is completed, and the recipient's expenditure balance is increased by the public transaction amount after the transaction is completed.

[0011] According to a third aspect of one or more embodiments of this specification, an electronic device is provided, including:

[0012] processor;

[0013] a memory for storing processor-executable instructions;

[0014] The processor implements the method as described in the first aspect by running the executable instructions.

[0015] According to a fourth aspect of one or more embodiments of the present specification, a computer-readable storage medium is provided, on which computer instructions are stored, and when the instructions are executed by a processor, the steps of the method described in the first aspect are implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 is a schematic diagram of an example environment provided by an exemplary embodiment.

[0017] Figure 2 is a schematic diagram of a conceptual architecture provided by an exemplary embodiment.

[0018] Figure 3 The invention is a flowchart of an account creation method provided by an exemplary embodiment.

[0019] Figure 4 It is a schematic diagram of a blockchain account structure provided by an exemplary embodiment.

[0020] Figure 5 It is a flowchart of a blockchain transaction method provided by an exemplary embodiment.

[0021] Figure 6 The invention is a flowchart of a limited disclosure remittance transaction based on a spending balance provided by an exemplary embodiment.

[0022] Figure 7 It is a schematic diagram of the change of account balance before and after remittance provided by an exemplary embodiment.

[0023] Figure 8 It is a schematic diagram of another blockchain account structure provided by an exemplary embodiment.

[0024] Fig. 9 It is an interactive schematic diagram of a main balance recharging a spending balance provided by an exemplary embodiment.

[0025] Fig.10 It is a schematic diagram of the change of account balance before and after recharging provided by an exemplary embodiment.

[0026] Fig.11 It is an interactive schematic diagram of a merging operation provided by an exemplary embodiment.

[0027] Fig.12 It is a schematic diagram of the change of account balance before and after the merger provided by an exemplary embodiment.

[0028] Fig.13 It is a flowchart of another blockchain transaction method provided by an exemplary embodiment.

[0029] Fig.14 The present invention is a flowchart of a fully private remittance transaction based on a master balance provided by an exemplary embodiment.

[0030] Fig.15 It is a schematic diagram of another account balance change before and after remittance provided by an exemplary embodiment.

[0031] Fig.16 It is a flowchart of another blockchain transaction method provided by an exemplary embodiment.

[0032] Fig.17 The present invention is a flowchart of a public remittance transaction implemented based on a spending balance provided by an exemplary embodiment.

[0033] Fig.18 It is a schematic diagram of another change in account balance before and after remittance provided by an exemplary embodiment.

[0034] Fig.19 It is a structural schematic diagram of a device provided by an exemplary embodiment.

[0035] Fig. 20 It is a block diagram of a blockchain transaction device provided by an exemplary embodiment. DETAILED DESCRIPTION

[0036] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of this specification. Instead, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.

[0037] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.

[0038] Figure 1 FIG. 1 is a schematic diagram of an exemplary environment provided by an exemplary embodiment. Figure 1 As shown, the example environment 100 allows entities to participate in a blockchain network 102. The blockchain network 102 can be a public type, a private type, or a consortium type blockchain network. The example environment 100 may include computing devices 104, 106, 108, 110, 112 and a network 114; in one embodiment, the network 114 may include a local area network (LAN), a wide area network (WAN), the Internet, or a combination thereof, and is connected to a website, a user device (e.g., a computing device), and a backend system. In one embodiment, the network 114 can be accessed via wired and / or wireless communication.

[0039] In some cases, computing devices 106 , 108 may be nodes of a cloud computing system (not shown), or each computing device 106 , 108 may be a separate cloud computing system including multiple computers interconnected by a network and operating as a distributed processing system.

[0040] In one embodiment, computing devices 104-108 may run any suitable computing system to enable them to serve as nodes in blockchain network 102; for example, computing devices 104-108 may include, but are not limited to, servers, desktop computers, laptop computers, tablet computing devices, and smart phones. In one embodiment, computing devices 104-108 may belong to related entities and be used to implement corresponding services, such as the service that can be used to manage transactions between a certain entity or multiple entities.

[0041] In one embodiment, computing devices 104-108 respectively store blockchain ledgers corresponding to blockchain network 102. Computing device 104 may be (or include) a network server for providing browser functions, and the network server may provide visual information related to blockchain network 102 based on network 114. In some cases, computing device 104 may not participate in block verification, but monitor blockchain network 102 to determine when other nodes (such as computing devices 106-108) reach consensus, and generate a corresponding blockchain visual user interface accordingly.

[0042] In one embodiment, computing device 104 may receive a request for a blockchain visual user interface initiated by a client device (e.g., computing device 110 or computing device 112). In some cases, a node of blockchain network 102 may also serve as a client device, such as a user of computing device 108 may use a browser running on computing device 108 to send the above request to computing device 104.

[0043] In response to the above request, the computing device 104 may generate a blockchain visual user interface (such as a web page) based on the stored blockchain ledger, and send the generated blockchain visual user interface to the requesting client device. If the blockchain network 102 is a private type or a consortium type blockchain network, the request for the blockchain visual user interface may include user authorization information. Before the blockchain visual user interface is generated and sent to the requesting client device, the computing device 104 may verify the user authorization information and return the corresponding blockchain visual user interface after the verification is passed.

[0044] The blockchain visualization user interface can be displayed on the client device (e.g. Figure 1 116). When the blockchain ledger is updated, the display content of the user interface 116 may also be updated accordingly. In addition, the user's interaction with the user interface 116 may result in a request for other user interfaces, such as displaying a block list, block details, a transaction list, transaction details, an account list, account details, a contract list, contract details, or a search result page generated by a user's search of the blockchain network.

[0045] Figure 2 is a schematic diagram of a conceptual architecture provided by an exemplary embodiment. Figure 2 As shown, the conceptual architecture 200 includes an entity layer 202, a hosting service layer 204, and a blockchain network layer 206. For example, the entity layer 202 may include three entities: entity 1, entity 2, and entity 3, each entity having its own transaction management system 208.

[0046] In one embodiment, the managed service layer 204 may include an interface 210 corresponding to each transaction management system 208. For example, each transaction management system 208 uses a protocol (such as Hypertext Transfer Protocol Secure (HTTPS)) to communicate with each other over a network (such as Figure 1In some examples, each interface 210 can provide a communication connection between the corresponding transaction management system 208 and the blockchain network layer 206; more specifically, the interface 210 can communicate with the blockchain network 212 of the blockchain network layer 206. In some examples, the communication between the interface 210 and the blockchain network layer 206 can be implemented using remote procedure calls (RPCs). In some examples, the interface 210 can provide an API interface for accessing the blockchain network 212 to the transaction management system 208.

[0047] As described herein, the blockchain network 212 is provided in the form of a peer-to-peer network, which includes a plurality of nodes 214, each of which is used to persist a blockchain ledger 216 formed by the block chain data; wherein, Figure 2 Only one blockchain ledger 216 is shown, but there may be multiple blockchain ledgers 216 or copies thereof in the blockchain network 212. For example, each node 214 may respectively maintain a blockchain ledger 216 or a copy thereof.

[0048] It should be pointed out that the transaction described in this specification refers to a piece of data created by the user through the client of the blockchain and ultimately published to the distributed database of the blockchain. Among them, transactions in the blockchain can be divided into transactions in a narrow sense and transactions in a broad sense. A transaction in a narrow sense refers to a value transfer published by a user to the blockchain; for example, in a traditional blockchain network, a transaction can be a transfer initiated by a user in the blockchain. A transaction in a broad sense refers to a business data with business intent published by a user to the blockchain; for example, an operator can build a consortium chain based on actual business needs, and rely on the consortium chain to deploy some other types of online businesses that are not related to value transfer (for example, rental business, vehicle dispatch business, insurance claims business, credit services, medical services, etc.), and in this type of consortium chain, a transaction can be a business message or business request with business intent published by a user in the consortium chain.

[0049] In the technical solution of this specification, by improving the account structure in the blockchain, a new form of account transaction can be realized, thereby realizing concurrent transactions under the account model while ensuring transaction privacy, thereby improving transaction throughput.

[0050] Figure 3 FIG. 1 is a flowchart of an account creation method provided by an exemplary embodiment. Figure 3 As shown, the method is applied to a blockchain node, and the method includes:

[0051] Step 302: Receive a blockchain transaction, where the type of the blockchain transaction is an account creation type.

[0052] In one embodiment, a user may generate a blockchain transaction on a client and submit the blockchain transaction to a blockchain node through the client for processing by the blockchain node.

[0053] In one embodiment, a blockchain transaction includes several fields. For example, in the Ethereum blockchain, a blockchain transaction may generally include a from field, a to field, a data field, etc., to respectively indicate the account address of the transaction initiator, the contract address of the smart contract to be called, transaction-related content, etc. In the technical solution of this specification, a type field may be set in the blockchain transaction, and the content contained in the type field is used to indicate the type of the relevant blockchain transaction, so that the blockchain node can implement corresponding processing accordingly. For example, a blockchain transaction may be marked as an account creation type, so that the blockchain node can create a new account accordingly.

[0054] Step 304: Execute the blockchain transaction to create a first account, wherein the first account includes an income balance in a ciphertext amount and an expenditure balance in a plaintext amount.

[0055] There are two transaction models commonly used in blockchain networks, namely the UTXO (Unspent Transaction Output) model and the account model. On-chain assets under the UTXO model exist in the form of transaction outputs. When a transaction has unspent transaction outputs, the unspent transaction outputs belong to the private key holder. When used, one or more unspent transaction outputs can be used as inputs, and one or more outputs can be specified to form new one or more unspent transaction outputs. Although the UTXO model is adopted by a variety of blockchain networks, its support for smart contracts is very weak, which has caused great restrictions on application scenarios. The typical application scenario of the account model is the Ethereum blockchain. Under this model, by creating an account, the on-chain assets held by the account are represented as the balance corresponding to the account address. Each transfer transaction can transfer assets from one account address to another account address, and the transaction amount is directly updated to the balance corresponding to the account address. Compared with the UTXO model, the account model can support complete smart contract functions and has good scenario scalability.

[0056] For the purpose of transaction privacy protection, improvements to blockchain transactions have been proposed in related technologies. Under the UTXO model, the transaction amount can be protected by homomorphic encryption or homomorphic commitment technology, and the interval proof technology can be used to ensure that the transaction output is non-negative. Under the account model, the transaction amount can be protected by homomorphic encryption or homomorphic commitment technology, and the interval proof technology can be used to ensure that the transaction amount is non-negative and the account balance is sufficient for payment.

[0057] In the UTXO model, one or more transaction outputs are used as inputs of a transfer transaction, and one or more new transaction outputs are formed after the transfer is completed. It can be seen that a transaction output will only be spent in one transfer transaction and cannot be spent by multiple transfer transactions, so that the interval proof generated for a transfer transaction is only related to the input of the transfer transaction, and has nothing to do with the input of other transfer transactions. Therefore, the UTXO model naturally has high transaction concurrency. In the account model, the input of each transaction is the balance of the account, and the interval proof of each transaction is related to the balance of the account. The balance of the account will be updated after each transaction, so that all transactions under the same account need to be executed in sequence, that is, after a transaction is completed and the balance of the account is updated, the interval proof can be generated for the next transaction and the next transaction can be triggered. Otherwise, the transaction will be rejected by the consensus node because the interval proof is illegal. Therefore, when using privacy protection technology with interval proof under the account model, it will seriously hinder the throughput of transactions.

[0058] In order to solve the concurrency problem under the account model and ensure full support for smart contract functions, this specification proposes improvements to the account structure under the account model in the relevant technology so that it can adapt to high-throughput concurrent transactions.

[0059] Accounts in a blockchain network can include external accounts and contract accounts. External accounts are usually owned by users (individuals or organizations), while contract accounts correspond to smart contracts in the blockchain. The structures of various types of accounts are similar, for example Figure 4 As shown in the figure, it can include Nonce field, Balance field, Code field and Storage field. The value of the Nonce field of each account starts from 0, and the value of the Nonce field increases with the transaction initiated by the corresponding account, so that each transaction initiated by the account contains a different Nonce value, thereby avoiding replay attacks. The Balance field is used to store the balance. The Code field is used to store the code of the smart contract, so the Code field of the external account is usually empty. The Storage field is used to store the value of the account at the corresponding node in the state tree.

[0060] Without considering privacy protection, the value of the Balance field is the plaintext balance held by the account. In the case of privacy protection, the plaintext balance can be generated into a corresponding ciphertext commitment through a mechanism such as the Pedersen commitment mechanism, so that only the ciphertext commitment is recorded on the blockchain ledger and only the holder can decrypt the ciphertext commitment; however, in this case, due to the limitation of interval proofs, it has the problem of insufficient concurrency as mentioned above. In this specification, the structure of the Balance field is improved and the Balance field is further divided, for example, the Balance field contains the income balance and the expenditure balance, where the income balance is recorded as the ciphertext amount in the blockchain ledger and the payment balance is recorded as the plaintext amount in the blockchain ledger.

[0061] Based on the improved account structure, when the first account is used as the remitting account to transfer funds to the second account as the receiving account, the relevant transfer process will be combined with Figure 5 Make an introduction. Figure 5 This is a flowchart of a blockchain transaction method provided by an exemplary embodiment. Figure 5 As shown, the method is applied to a remitter device, and the method includes:

[0062] Step 502, determining the corresponding deduction amount according to the limited public transaction amount to be remitted from the remitter's account to the recipient's account; wherein the remitter's account includes an income balance of a committed amount and an expenditure balance of a plain text amount.

[0063] In one embodiment, the present specification provides a limited disclosure type transfer transaction model, in which a transfer transaction with privacy protection can be implemented by using a promised amount of income balance and a plain text amount of expenditure balance.

[0064] In one embodiment, the deduction amount can be any value that is not less than the limited public transaction amount. For example, the remitter account can set the alternative deduction amounts for each type of transfer scenario according to the pre-defined upper limit of the transfer amount under each type of transfer scenario, forming a set of alternative deduction amounts. Alternatively, the values ​​of each alternative deduction amount can also be determined according to other methods, and this specification does not limit this. Then, it is only necessary to select a deduction amount that is not less than the limited public transaction amount. Of course, a deduction amount can also be temporarily generated based on the value of the limited public transaction amount. The value of the deduction amount is preferably unrelated to the limited public transaction amount itself, otherwise when the algorithm for generating the deduction amount is leaked, it may lead to criminals to reversely deduce the value of the limited public transaction amount based on the value of the deduction amount.

[0065] Step 504: submit a limited public transfer transaction to the blockchain, wherein the limited public transfer transaction includes a limited public transaction amount commitment corresponding to the limited public transaction amount, the deduction amount, and an interval proof for proving that the transaction amount is non-negative and the deduction amount is not less than the limited public transaction amount.

[0066] In one embodiment, when the limited public transfer transaction is completed, the deduction amount can be deducted from the expenditure balance after the transaction is completed, the deduction amount can be increased from the income balance after the transaction is completed and the limited public transaction amount can be deducted (i.e., the change amount is increased, and the value of the change amount is the difference between the deduction amount and the limited public transaction amount), and the limited public transaction amount can be increased from the recipient account after the transaction is completed. Then, when the deduction amount is deducted from the expenditure balance, since the expenditure balance and the deduction amount are both in plain text, it is not necessary to generate a sufficient balance interval certificate (the plain text amount can be directly compared), thereby achieving unbinding between the transfer transaction and the balance of the remitter's account, so that concurrent transactions can be realized under the account model. At the same time, since the income balance is in the form of a committed amount, the change amount added to the income balance is also recorded in the form of a committed amount, and since the limited public transaction amount is also expressed as the corresponding committed amount, only the plain text deduction amount is exposed during the entire transaction process, and the remaining amounts are all expressed as the committed amount in ciphertext, so that sufficient privacy protection can be ensured while realizing concurrent transactions.

[0067] In one embodiment, when the recipient account increases the limited public transaction amount after the transaction is completed, if the recipient account adopts the account structure of this specification, the limited public transaction amount can be added to the income balance of the recipient account. Specifically, since the income balance of the recipient account is in the form of a commitment amount, the limited public transaction amount will also be added to the income balance of the recipient account in the form of the corresponding commitment amount. Similarly, when the remitter balance of the remitter account increases, for example, when a certain account transfers money to the remitter account, the corresponding amount is added to the income balance of the remitter account.

[0068] It can be seen that by setting the income balance of the committed amount and the expenditure balance of the plain text amount respectively in the account structure, it is not only possible to achieve concurrent transactions under the account model while ensuring transaction privacy, but also to decouple the outbound transactions and inbound transactions in which the same account participates, ensuring that the remitting account can participate in both outbound and inbound transactions at the same time, thereby improving transaction throughput.

[0069] The following describes the implementation process of limited public trading by taking user A as the remitting party and user B as the receiving party as an example. Figure 6 is a flowchart of a limited disclosure remittance transaction based on a spending balance provided by an exemplary embodiment; Figure 6As shown, the interaction process between the remitter, the receiver and the blockchain node may include the following steps:

[0070] Step 601: The remitting party determines the transfer amount t.

[0071] In one embodiment, the remitter refers to the role that remits money or other resources in a remittance transaction, and the receiver refers to the role that receives money or other resources in a remittance transaction. For example, the user device used by user A can be configured as the remitter, and the user device used by user B can be configured as the receiver.

[0072] In one embodiment, when drafting a remittance transaction, the remittance amount t can be negotiated between the remitter and the receiver. Of course, the remitter can also determine the remittance amount t on its own, and the receiver will confirm it in subsequent steps.

[0073] Step 602: The remitter determines a random number r corresponding to the remittance amount t.

[0074] In one embodiment, the remitter may generate a random number r for the remittance amount t based on the Pedersen commitment mechanism, and the remittance commitment T corresponding to the remittance amount t is T=PC(t,r), where PC() is a preset algorithm.

[0075] Step 603: The sender sends (r, t, T) to the receiver through the off-chain channel.

[0076] In one embodiment, by sending (r, t, T) through an off-chain channel rather than a blockchain network, the remittance random number r and the remittance amount t can be prevented from being recorded in the blockchain ledger, ensuring that the remittance amount t is unknown except to the remitter and the recipient.

[0077] Step 604: The receiver verifies the received (r, t, T).

[0078] In one embodiment, the recipient may verify the remittance amount t to determine the remittance amount that the recipient wishes to receive.

[0079] In one embodiment, the recipient may verify the remittance commitment T, that is, the recipient may calculate the random number r and the remittance amount t through the Perdersen commitment mechanism to verify whether the remittance commitment T = PC (t, r) is correct. If it is correct, it indicates that the verification is passed, otherwise the verification fails.

[0080] Step 605: After verification, the recipient generates a signature and returns it to the sender.

[0081] In one embodiment, after verification, the recipient can sign (A, B: T) with the recipient's private key, generate a signature SigB and return it to the sender. The signature SigB indicates that the recipient agrees to implement a remittance transaction with a commitment of T from user A's blockchain account 1 to user B's blockchain account 2.

[0082] Step 606, after receiving the signature SigB, the remitter generates a range certificate PR based on the deduction amount L.

[0083] In one embodiment, the deduction amount L is determined by the remitter according to the transfer amount t. For example, the remitter may maintain several deduction amounts L1~Ln in advance, and the remitter may select a deduction amount L at will, as long as t≤L≤w is ensured, where w is the value of the expenditure balance in the blockchain account 1 of user A.

[0084] In one embodiment, the remitter may determine the deduction amount L at any time before generating the interval proof PR, and this specification does not limit this.

[0085] In one embodiment, in order to ensure the smooth completion of the remittance transaction, the blockchain node needs to determine whether the remittance amount t and the deduction amount L meet the following conditions: 0≤t≤L; and the interval proof technology can enable the blockchain node to verify whether the transaction meets the preset conditions in the ciphertext state. For example, the Bulletproofs scheme and Borromean ring signature scheme in the relevant technology can be used in this specification, and this specification does not limit this. The remitter can use the interval proof technology to generate an interval proof PR for the blockchain node to verify whether 0≤t≤L is satisfied in the subsequent process.

[0086] Step 607: The remitter signs the transaction content (A, B: T, L, PR; SigB) to generate a signature SigA.

[0087] In one embodiment, the remitter may use the remitter's private key to sign the transaction content (A, B: T, L, PR; SigB) to generate a signature SigA.

[0088] Step 608: The sender submits the transaction to the blockchain.

[0089] In one embodiment, the remitter is configured as a client of the blockchain and can submit the remittance transaction to a blockchain node in the blockchain network, which is then transmitted to all blockchain nodes in the blockchain network, and each blockchain node verifies the remittance transaction respectively, so as to execute the remittance operation when the verification passes and reject the remittance when the verification fails.

[0090] Step 609: The blockchain node checks whether the transaction has been executed.

[0091] In one embodiment, the blockchain node here can represent any blockchain node in the blockchain network, that is, each blockchain node in the blockchain network will receive the above-mentioned remittance transaction and implement verification and other operations through steps 609 to 612.

[0092] In one embodiment, after receiving the above remittance transaction, the blockchain node can use the anti-double-spending or anti-replay mechanism in the relevant technology to verify whether the remittance transaction has been executed; if it has been executed, the remittance transaction can be refused to be executed, otherwise it proceeds to step 610.

[0093] Step 610, the blockchain node checks the signature.

[0094] In one embodiment, the blockchain node may check whether the signatures SigA and SigB included in the remittance transaction are correct; if not, the remittance transaction may be refused to be executed, otherwise the process proceeds to step 611.

[0095] Step 611, the blockchain node checks the interval proof PR.

[0096] In one embodiment, the blockchain node may check the interval proof PR included in the remittance transaction based on the interval proof technology to determine whether 0≤t≤L is satisfied. If not, the remittance transaction may be rejected, otherwise the process proceeds to step 612.

[0097] Step 612, the blockchain node checks whether the expenditure balance is sufficient.

[0098] In one embodiment, since the expenditure balance w of blockchain account 1 is recorded in plain text in the blockchain ledger, the blockchain node can directly read the expenditure balance w of blockchain account 1 and compare the expenditure balance w with the deduction amount L, thereby determining that the expenditure balance is sufficient when w≥L.

[0099] Therefore, in step 606, the remitter only needs to generate the above-mentioned interval proof PR for the transaction amount t and the deduction amount L, and does not need to generate corresponding interval proofs for the deduction amount L and the expenditure balance w. This can not only save the generation process of the interval proof and improve the transaction generation efficiency, but also save the verification process of the interval proof and improve the transaction execution efficiency.

[0100] In step 613, the blockchain node updates the blockchain accounts corresponding to user A and user B in the maintained blockchain ledger.

[0101] In one embodiment, after passing the verification of steps 609 to 612, the blockchain node can update the blockchain account 1 and the blockchain account 2 recorded in the blockchain ledger respectively, such as Figure 7 As shown:

[0102] In user A's blockchain account 1, the income balance before the transaction is v, which is recorded as the corresponding commitment amount PC(v,y) in the blockchain ledger, and the expenditure balance before the transaction is w, which is recorded as the plain text amount w in the blockchain ledger. After the transaction is completed, the expenditure balance is deducted by the above-mentioned deduction amount L, and is therefore recorded as the plain text amount wL in the blockchain ledger, while the income balance is increased by the change amount, that is, the difference between the deduction amount L and the remittance amount t, and is therefore recorded as the corresponding commitment amount PC(v,y)+PC(L,0)-PC(t,r) in the blockchain ledger, where PC(L,0) is the commitment value corresponding to the deduction amount L (the random number agreed in advance is 0; of course, other agreed values ​​can also be used).

[0103] In user B's blockchain account 2, the income balance before the transaction is v', which is recorded as the corresponding commitment amount PC(v',y') in the blockchain ledger, and the expenditure balance before the transaction is w', which is recorded as the plain text amount w' in the blockchain ledger. After the transaction is completed, the expenditure balance w' remains unchanged, while the income balance increases by the remittance amount t, and is therefore recorded in the blockchain ledger as the corresponding commitment amount PC(v',y')+PC(t,r).

[0104] As mentioned above, when an account contains the above-mentioned income balance and expenditure balance, high-concurrency transfers under the account model can be achieved while ensuring transaction privacy. However, since the funds remitted into the account are recorded in the income balance and the funds remitted are deducted from the expenditure balance, the amount of the expenditure balance is constantly decreasing. In order to ensure that the amount of the expenditure balance is always sufficient to complete the transaction, you can recharge the expenditure balance regularly or at any time.

[0105] Although it is possible to recharge the expenditure balance from the income balance, since the expenditure balance itself exists in plain text, it actually exposes some privacy to a limited extent (indicating that the balance in the relevant account is not less than the value of the expenditure balance), so users often do not want the amount of the expenditure balance to be too high in order to control and limit the scope of privacy exposure. Then, when the account's foreign exchange transactions are frequent and the transaction amount is large, it is necessary to frequently recharge the expenditure balance, resulting in frequent participation of the income balance in the remittance and remittance of funds (recharge), and even causing corresponding impacts between the remittance transaction and the recharge transaction, which in turn causes a decrease in efficiency.

[0106] Therefore, this manual is aimed at Figure 4 The account structure shown suggests further improvements. For example Figure 8As shown, a main balance can be further added to the Balance field, so that the Balance field contains a total of three balances: main balance, income balance and expenditure balance. Among them, the income balance is dedicated to collecting the transaction amount of the incoming transaction, the expenditure balance is dedicated to participating in the outgoing transaction, and the main balance is used to recharge the expenditure balance, thereby avoiding the income balance from taking on the recharge task and preventing the above-mentioned impact.

[0107] Fig. 9 FIG. 1 is an interactive diagram of a main balance recharging a spending balance provided by an exemplary embodiment. Fig. 9 As shown, the interaction process may include the following steps:

[0108] Step 901: The remitting party determines the recharge amount m.

[0109] In one embodiment, the recharge amount m can be any amount as long as the amount of the main balance of the remitter is sufficient. For example, a maximum water level can be set for the expenditure balance, and the recharge amount m can be the difference between the maximum water level and the remaining value of the expenditure balance.

[0110] Step 902: The remitter generates a range certificate RF.

[0111] In one embodiment, since the value u of the main balance is recorded in the blockchain ledger as the corresponding commitment amount PC(u,x), where x is the random number corresponding to u, it is necessary to generate an interval proof RF to verify that the value u≥m of the main balance.

[0112] Step 903: The sender signs the transaction Topup(A:m,RF) and submits it to the blockchain.

[0113] In one embodiment, taking the blockchain account 1 of the above-mentioned user A as an example, "A" in the above-mentioned transaction represents the account address of the blockchain account 1, indicating that the expenditure balance of the blockchain account 1 needs to be recharged, and the recharge amount is m.

[0114] In one embodiment, a type field may be added to the transaction, and when creating each transaction, the remitter may assign a value to the type field to mark the type of the submitted transaction, thereby distinguishing the limited public transfer transactions, top-up transactions, and the merged transactions, main balance transfer transactions, and public transfer transactions mentioned below. Figure 6 In the illustrated embodiment, a limited public transfer transaction may be marked by taking the value "Transfer", while a top-up transaction may be marked by taking the value "Topup" here.

[0115] Step 904, the blockchain node verifies the transaction.

[0116] In one embodiment, the blockchain node can verify whether the signature of the transaction Topup(A:m,RF) is correct; if it is incorrect, the transaction can be refused to be executed.

[0117] In one embodiment, the blockchain node can verify whether the recharge amount m of the transaction Topup(A:m,RF) satisfies m≥0; if it is incorrect, the transaction can be refused to be executed.

[0118] In one embodiment, the blockchain node may verify the interval proof RF contained in the transaction Topup (A: m, RF) to determine whether 0≤m≤u is satisfied; if incorrect, the transaction may be refused to be executed.

[0119] When all verifications are passed, the process proceeds to step 905 .

[0120] Step 905: The blockchain node updates the account.

[0121] In one embodiment, after passing the verification in step 904, the blockchain node may update the blockchain account 1 recorded in the blockchain ledger, such as Fig.10 As shown:

[0122] In user A's blockchain account 1, the main balance before the transaction is u, which is recorded in the blockchain ledger as the corresponding commitment amount PC(u,x); the income balance before the transaction is v, which is recorded in the blockchain ledger as the corresponding commitment amount PC(v,y); the expenditure balance before the transaction is w, which is recorded in the blockchain ledger as the plaintext amount w.

[0123] After the transaction is completed, the main balance is deducted by the above-mentioned recharge amount m, and is therefore recorded in the blockchain ledger as the corresponding commitment amount PC(u,x)-PC(m,0), while the expenditure balance w is increased by the recharge amount m, and is therefore recorded in the blockchain ledger as the plain text amount w+m; at the same time, the value of the income balance remains unchanged.

[0124] As the expenditure balance in the account continues to participate in outward remittance transactions, and the main balance continues to recharge the expenditure balance, the main balance will gradually decrease; when the main balance decreases to a certain level or to 0, it will be impossible to continue to maintain the expenditure balance in outward remittance transactions, so the funds obtained from the income balance can be transferred to the main balance to maintain the account's continuous participation in outward remittance transactions.

[0125] Fig.11 FIG. 1 is an interactive diagram of a merging operation provided by an exemplary embodiment. Fig.11 As shown, the interaction process may include the following steps:

[0126] Step 1101, the remitting party determines the withdrawal amount n.

[0127] In one embodiment, the merge operation is used to transfer all funds of the income balance and designated funds of the expenditure balance in the account into the main balance, and the amount of the designated funds can be specified by the above-mentioned withdrawal amount n. If the withdrawal amount n is 0, it is equivalent to transferring only the funds of the income amount into the main balance, or n can be set to any other value, which is not limited by this specification.

[0128] Step 1102: The sender signs the transaction Merge(A:n) and submits it to the blockchain.

[0129] In one embodiment, taking the blockchain account 1 of user A as an example, the "A" in the above transaction represents the account address of the blockchain account 1, indicating that a merge operation needs to be performed on the blockchain account 1, specifically transferring all the income balance to the main balance and transferring the funds n in the expenditure balance to the main balance. Merge indicates that the current transaction type is a merge transaction, which is used to perform a merge operation on the blockchain account 1.

[0130] In one embodiment, since the income balance is transferred in full to the main balance rather than partially, there is no need to generate an interval certificate for part of the income balance; and the withdrawal amount n and the expenditure balance are both in plain text, and there is no need to generate an interval certificate.

[0131] Step 1103, the blockchain node verifies the transaction.

[0132] In one embodiment, the blockchain node may verify whether the signature of the transaction Merge(A:n) is correct; if it is incorrect, the transaction may be refused to be executed.

[0133] In one embodiment, the blockchain node can verify whether the withdrawal amount n of the transaction Merge(A:n) satisfies 1≤n≤w, where w is the value of the expenditure balance; if it is incorrect, the transaction can be refused to be executed.

[0134] When all verifications are passed, the process proceeds to step 1104 .

[0135] Step 1104, the blockchain node updates the account.

[0136] In one embodiment, after passing the verification in step 1103, the blockchain node may update the blockchain account 1 recorded in the blockchain ledger, such as Fig.12 As shown:

[0137] In user A's blockchain account 1, the main balance before the transaction is u, which is recorded in the blockchain ledger as the corresponding commitment amount PC(u,x); the income balance before the transaction is v, which is recorded in the blockchain ledger as the corresponding commitment amount PC(v,y); the expenditure balance before the transaction is w, which is recorded in the blockchain ledger as the plaintext amount w.

[0138] After the transaction is completed, the income balance becomes 0; the main balance increases by all the funds of the income balance and the above-mentioned withdrawal amount n, and is therefore recorded in the blockchain ledger as the corresponding commitment amount PC(u,x)+PC(v,y)+PC(n,0), while the expenditure balance w decreases by the withdrawal amount n, and is therefore recorded in the blockchain ledger as the plaintext amount wn.

[0139] Although in the embodiments provided in this specification, for the main balance, income balance, and expenditure balance contained in the account, the expenditure balance can participate in the remittance transaction, the income balance can participate in the remittance transaction (the income balance also receives the change amount in the remittance transaction), and the main balance can participate in the above-mentioned recharge transaction and merge transaction, it does not mean that each balance can only participate in the above-mentioned types of transactions. For example, the account structure of this specification can also be compatible with: the main balance participates in the main balance transfer transaction of the remitted funds, and the expenditure balance participates in the public transfer transaction, etc., which are introduced below.

[0140] Fig.13 FIG. 1 is a flowchart of another blockchain transaction method provided by an exemplary embodiment. Fig.13 As shown, the method is applied to a remitter device, and the method includes:

[0141] Step 1302, determine the transaction amount to be remitted from the remitter's account to the receiver's account, the remitter's account includes the remitter's main balance using the committed amount, the remitter's income balance using the committed amount, and the remitter's expenditure balance using the plain text amount, and the receiver's account includes the receiver's main balance using the committed amount, the receiver's income balance using the committed amount, and the receiver's expenditure balance using the plain text amount.

[0142] In one embodiment, both the remitting party account and the receiving party account are in the following form: Figure 8 The account structure shown is the remitting party's main balance, remitting party's income balance and remitting party's expenditure balance in the remitting party's account, and the receiving party's main balance, receiving party's income balance and receiving party's expenditure balance in the receiving party's account.

[0143] Step 1304, submitting a main balance transfer transaction to the blockchain, wherein the main balance transfer transaction includes a transaction amount commitment corresponding to the transaction amount and an interval proof for proving that the transaction amount is non-negative and that the main balance of the remitting party is not less than the transaction amount, so that the main balance of the remitting party is deducted from the transaction amount after the transaction is completed, and the income balance of the receiving party is increased by the transaction amount after the transaction is completed.

[0144] In one embodiment, since the main balance of the remitting party and the income balance of the receiving party are both recorded in the blockchain ledger in the form of committed amounts, the main balance transfer transaction described above can ensure that no data leakage occurs during the transaction, thereby ensuring the privacy and security of the data.

[0145] In one embodiment, the remitter may compare the transaction amount with the alternative deduction amounts included in the above-mentioned alternative deduction amount set; if all the alternative deduction amounts are less than the transaction amount, the remitter creates and submits the above-mentioned main balance transfer transaction; if there is any alternative deduction amount that is not less than the transaction amount, the remitter may create and submit a limited public transfer transaction, thereby Figure 5 In the illustrated embodiment, the limited disclosure type transfer operation is implemented by the outgoing party's expenditure balance and the incoming party's remittance balance, which helps to achieve high concurrency.

[0146] In one embodiment, the remitting party may determine to select the above-mentioned main balance transfer transaction, limited public transfer transaction or other types of transfer transactions according to the setting operation of the user.

[0147] In one embodiment, since the remitter's main balance and the remitter's expenditure balance are two independent parts, the remitter can even initiate different transactions through the remitter's main balance and the remitter's expenditure balance at the same time. For example, the remitter's expenditure balance can be used to participate in a limited public transfer transaction with a smaller amount, and the remitter's main balance can be used to participate in a main balance transfer transaction with a larger amount, so as to improve transaction efficiency.

[0148] The following describes the implementation process of limited public trading by taking user A as the remitting party and user B as the receiving party as an example. Fig.14 is a flowchart of a fully private remittance transaction based on a master balance provided by an exemplary embodiment; Fig.14 As shown, the interaction process between the remitter, the receiver and the blockchain node may include the following steps:

[0149] Step 1401, the remitting party determines the transfer amount t.

[0150] In one embodiment, the remitter refers to the role that remits money or other resources in a remittance transaction, and the receiver refers to the role that receives money or other resources in a remittance transaction. For example, the user device used by user A can be configured as the remitter, and the user device used by user B can be configured as the receiver.

[0151] In one embodiment, when drafting a remittance transaction, the remittance amount t can be negotiated between the remitter and the receiver. Of course, the remitter can also determine the remittance amount t on its own, and the receiver will confirm it in subsequent steps.

[0152] Step 1402: The remitter determines a random number r corresponding to the remittance amount t.

[0153] In one embodiment, the remitter may generate a random number r for the remittance amount t based on the Pedersen commitment mechanism, and the remittance commitment T corresponding to the remittance amount t is T=PC(t,r), where PC() is a preset algorithm.

[0154] Step 1403: The sender sends (r, t, T) to the receiver through the off-chain channel.

[0155] In one embodiment, by sending (r, t, T) through an off-chain channel rather than a blockchain network, the remittance random number r and the remittance amount t can be prevented from being recorded in the blockchain ledger, ensuring that the remittance amount t is unknown except to the remitter and the recipient.

[0156] Step 1404: The receiver verifies the received (r, t, T).

[0157] In one embodiment, the recipient may verify the remittance amount t to determine the remittance amount that the recipient wishes to receive.

[0158] In one embodiment, the recipient may verify the remittance commitment T, that is, the recipient may calculate the random number r and the remittance amount t through the Perdersen commitment mechanism to verify whether the remittance commitment T = PC (t, r) is correct. If it is correct, it indicates that the verification is passed, otherwise the verification fails.

[0159] Step 1405: After verification, the recipient generates a signature and returns it to the sender.

[0160] In one embodiment, after verification, the recipient can sign (A, B: T) with the recipient's private key, generate a signature SigB and return it to the sender. The signature SigB indicates that the recipient agrees to implement a remittance transaction with a commitment of T from user A's blockchain account 1 to user B's blockchain account 2.

[0161] Step 1406, after receiving the signature SigB, the remitter generates an interval proof RP based on the main balance u.

[0162] In one embodiment, in order to ensure the smooth completion of the remittance transaction, the blockchain node needs to determine whether the remittance amount t and the main balance u meet the following conditions: 0≤t≤u; and the interval proof technology can enable the blockchain node to verify whether the transaction meets the preset conditions in the ciphertext state, for example, the Bulletproofs scheme and Borromean ring signature scheme in the relevant technology can be used in this specification, and this specification does not limit this. The remitter can use the interval proof technology to generate an interval proof RP for the blockchain node to verify whether 0≤t≤u is satisfied in the subsequent process.

[0163] Step 1407, the remitter signs the transaction content PrimaryTransfer(A,B:T,RP;SigB) and generates the signature SigA.

[0164] In one embodiment, the remitter may use the remitter's private key to sign the transaction content PrimaryTransfer (A, B: T, RP; SigB) to generate a signature SigA.

[0165] Among them, PrimaryTransfer is used to indicate that the transaction type is a primary balance transfer transaction (or primary balance remittance transaction).

[0166] Step 1408, the sender submits the transaction to the blockchain.

[0167] In one embodiment, the remitter is configured as a client of the blockchain and can submit the remittance transaction to a blockchain node in the blockchain network, which is then transmitted to all blockchain nodes in the blockchain network, and each blockchain node verifies the remittance transaction respectively, so as to execute the remittance operation when the verification passes and reject the remittance when the verification fails.

[0168] Step 1409, the blockchain node checks whether the transaction has been executed.

[0169] In one embodiment, the blockchain node here can represent any blockchain node in the blockchain network, that is, each blockchain node in the blockchain network will receive the above-mentioned remittance transaction and implement verification and other operations through steps 1409~1411.

[0170] In one embodiment, after receiving the above-mentioned remittance transaction, the blockchain node can use the anti-double-spending or anti-replay mechanism in the relevant technology to verify whether the remittance transaction has been executed; if it has been executed, the remittance transaction can be refused to be executed, otherwise it proceeds to step 1410.

[0171] Step 1410, the blockchain node checks the signature.

[0172] In one embodiment, the blockchain node may check whether the signatures SigA and SigB included in the remittance transaction are correct; if not, the remittance transaction may be refused to be executed, otherwise the process proceeds to step 1411.

[0173] Step 1411, the blockchain node checks the interval proof RP.

[0174] In one embodiment, the blockchain node may check the interval proof RP included in the remittance transaction based on the interval proof technology to determine whether 0≤t≤u is satisfied. If not, the remittance transaction may be refused to be executed, otherwise the process proceeds to step 1412.

[0175] In step 1412, the blockchain node updates the blockchain accounts corresponding to user A and user B in the maintained blockchain ledger.

[0176] In one embodiment, after passing the verification of steps 1409 to 1411, the blockchain node can update the blockchain account 1 and the blockchain account 2 recorded in the blockchain ledger respectively, such as Fig.15 As shown:

[0177] In user A's blockchain account 1, the main balance before the transaction is u, which is recorded as the corresponding commitment amount PC(u,x) in the blockchain ledger, the income balance before the transaction is v, which is recorded as the corresponding commitment amount PC(v,y) in the blockchain ledger, and the expenditure balance before the transaction is w, which is recorded as the plain text amount w in the blockchain ledger. After the transaction is completed, the main balance is deducted from the above transaction amount t, and is therefore recorded in the blockchain ledger as the corresponding commitment amount PC(u,x)-PC(t,r), while the income balance v and expenditure balance w remain unchanged.

[0178] In user B's blockchain account 2, the main balance before the transaction is u', which is recorded as the corresponding commitment amount PC(u',x') in the blockchain ledger, the income balance before the transaction is v', which is recorded as the corresponding commitment amount PC(v',y') in the blockchain ledger, and the expenditure balance before the transaction is w', which is recorded as the plain text amount w' in the blockchain ledger. After the transaction is completed, the main balance is u', the expenditure balance w' remains unchanged, and the income balance increases the remittance amount t, so it is recorded in the blockchain ledger as the corresponding commitment amount PC(v',y')+PC(t,r).

[0179] Fig.16 This is a flowchart of another blockchain transaction method provided by an exemplary embodiment. Fig.16 As shown, the method is applied to a remitter device, and the method includes:

[0180] Step 1602, determine the transaction amount to be remitted from the remitter's account to the receiver's account, the remitter's account includes the remitter's main balance using the committed amount, the remitter's income balance using the committed amount and the remitter's expenditure balance using the plain text amount, and the receiver's account includes the receiver's main balance using the committed amount, the receiver's income balance using the committed amount and the receiver's expenditure balance using the plain text amount.

[0181] In one embodiment, both the remitting party account and the receiving party account are in the following form: Figure 8 The account structure shown is the remitting party's main balance, remitting party's income balance and remitting party's expenditure balance in the remitting party's account, and the receiving party's main balance, receiving party's income balance and receiving party's expenditure balance in the receiving party's account.

[0182] Step 1604, submitting a public transfer transaction to the blockchain, wherein the public transfer transaction includes a public transaction amount corresponding to the public transaction amount, so that the remitter's expenditure balance is deducted from the public transaction amount after the transaction is completed, and the recipient's expenditure balance is increased by the public transaction amount after the transaction is completed.

[0183] In one embodiment, when the value of the remitter's expenditure balance is recorded as a plain text value, the high concurrency of the transfer transaction can be obtained by sacrificing this plain text value. When the remitter receives the above setting, it indicates that the remitter allows to sacrifice some privacy in exchange for higher transaction efficiency between privacy protection and transaction efficiency. Therefore, in some scenarios, such as for some independent and small amount transfers, the transfer can be directly implemented between the remitter's expenditure balance and the receiver's expenditure balance by submitting the above public transfer transaction. This process is similar to the transfer operation in the related art without implementing privacy protection scenarios. Since there is no need to implement multiple complex processing operations such as encryption, generating interval proofs, and verifying interval proofs, it can greatly improve transaction efficiency.

[0184] In one embodiment, privacy type setting information can be obtained, and the privacy type setting information can be temporarily set by the user according to actual needs, or set to be effective for a long time. When the privacy type setting information is a non-private type, it indicates that the user is relatively more concerned about transaction efficiency, and thus the public transfer transaction can be submitted to the blockchain based on the above. When the privacy type setting information is a private type, it indicates that the user is relatively more concerned about privacy, and thus the public transfer transaction can be submitted to the blockchain based on the above. Figure 5 or Fig.13 In the illustrated embodiment, a limited public transfer transaction or a master balance transfer transaction is submitted to the blockchain.

[0185] Among them, for private scenarios, users can further set to use limited public transfer transactions or main balance transfer transactions; or as mentioned above, limited public transfer transactions can be used first, and when the remitter's spending balance is less than the transaction amount, the main balance transfer transaction can be used. Fig.13 The embodiments shown will not be described in detail here.

[0186] The following describes the implementation process of limited public trading by taking user A as the remitting party and user B as the receiving party as an example. Fig.17 is a flowchart of a public remittance transaction based on a spending balance provided by an exemplary embodiment; Fig.17As shown, the interaction process between the remitter, the receiver and the blockchain node may include the following steps:

[0187] Step 1701, the remitting party determines the transfer amount t.

[0188] In one embodiment, the remitter refers to the role that remits money or other resources in a remittance transaction, and the receiver refers to the role that receives money or other resources in a remittance transaction. For example, the user device used by user A can be configured as the remitter, and the user device used by user B can be configured as the receiver.

[0189] In one embodiment, when drafting a remittance transaction, the remittance amount t can be negotiated between the remitter and the receiver. Of course, the remitter can also determine the remittance amount t on its own.

[0190] Step 1702, the remitter signs the transaction content OpenTransfer(A,B:t), generates the signature SigA, and submits the transaction.

[0191] In one embodiment, the remitter may use the remitter's private key to sign the transaction content OpenTransfer(A, B:t) to generate a signature SigA.

[0192] Among them, OpenTransfer is used to indicate that the transaction type is an open transfer transaction (or open remittance transaction).

[0193] Step 1703, the blockchain node verifies the transaction.

[0194] In one embodiment, after receiving the above-mentioned remittance transaction, the blockchain node can use the anti-double-spending or anti-replay mechanism in the relevant technology to verify whether the remittance transaction has been executed; if it has been executed, the remittance transaction can be refused to be executed, otherwise it proceeds to step 1704.

[0195] In one embodiment, the blockchain node may check whether the signature SigA included in the remittance transaction is correct; if it is incorrect, the remittance transaction may be refused to be executed, otherwise the process proceeds to step 1704.

[0196] Step 1704: The blockchain node updates the blockchain accounts corresponding to user A and user B in the maintained blockchain ledger.

[0197] In one embodiment, after passing the verification in step 1703, the blockchain node can update the blockchain account 1 and the blockchain account 2 recorded in the blockchain ledger respectively, such as Fig.18 As shown:

[0198] In user A's blockchain account 1, the main balance before the transaction is u, which is recorded as the corresponding commitment amount PC(u,x) in the blockchain ledger, the income balance before the transaction is v, which is recorded as the corresponding commitment amount PC(v,y) in the blockchain ledger, and the expenditure balance before the transaction is w, which is recorded as the plaintext amount w in the blockchain ledger. After the transaction is completed, the expenditure balance w is deducted from the above transaction amount t, and is therefore recorded as the corresponding plaintext amount wt in the blockchain ledger, while the income balance v and the main balance u remain unchanged.

[0199] In user B's blockchain account 2, the main balance before the transaction is u', which is recorded as the corresponding commitment amount PC(u',x') in the blockchain ledger, the income balance before the transaction is v', which is recorded as the corresponding commitment amount PC(v',y') in the blockchain ledger, and the expenditure balance before the transaction is w', which is recorded as the plain text amount w' in the blockchain ledger. After the transaction is completed, the main balance is u', the income balance is v', which remains unchanged, and the expenditure balance w' is increased by the remittance amount t, so it is recorded as the corresponding plain text amount w'+t in the blockchain ledger.

[0200] Fig.19 is a schematic structural diagram of a device provided by an exemplary embodiment. Fig.19 , at the hardware level, the device includes a processor 1902, an internal bus 1904, a network interface 1906, a memory 1908, and a non-volatile memory 1910, and may also include hardware required for other services. The processor 1902 reads the corresponding computer program from the non-volatile memory 1910 into the memory 1908 and then runs it, forming a blockchain transaction device at the logical level. Of course, in addition to the software implementation, one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0201] Please refer to Fig. 20 In a software implementation, the blockchain transaction device may include:

[0202] The determining unit 2001 determines the transaction amount to be remitted from the remitter's account to the receiver's account, wherein the remitter's account includes the remitter's main balance using the committed amount, the remitter's income balance using the committed amount, and the remitter's expenditure balance using the plain text amount, and the receiver's account includes the receiver's main balance using the committed amount, the receiver's income balance using the committed amount, and the receiver's expenditure balance using the plain text amount;

[0203] The submitting unit 2002 submits a public transfer transaction to the blockchain, wherein the public transfer transaction includes a public transaction amount corresponding to the public transaction amount, so that the remitter's expenditure balance is deducted from the public transaction amount after the transaction is completed, and the recipient's expenditure balance is increased by the public transaction amount after the transaction is completed.

[0204] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.

[0205] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0206] Memory may include non-permanent storage in a computer-readable medium, in the form of random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0207] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0208] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0209] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0210] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0211] It should be understood that although the terms first, second, third, etc. may be used to describe various information in one or more embodiments of this specification, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0212] The above description is merely a preferred embodiment of one or more embodiments of the present specification and is not intended to limit one or more embodiments of the present specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present specification shall be included in the scope of protection of one or more embodiments of the present specification.

Claims

1. A blockchain transaction method, applied to a remitter device, the method include: Determine the transaction amount to be remitted from the remitting party's account to the receiving party's account, the remitting party's account includes the remitting party's income balance using the committed amount and the remitting party's expenditure balance using the plain text amount, and the receiving party's account includes the receiving party's income balance using the committed amount and the receiving party's expenditure balance using the plain text amount; Get privacy type setting information; When the initiation conditions of the limited public transfer transaction are met, the limited public transfer transaction is submitted to the blockchain, wherein the limited public transfer transaction includes a transaction amount commitment corresponding to the transaction amount, a deduction amount, and an interval proof for proving that the transaction amount is non-negative and the deduction amount is not less than the transaction amount, so that the remitter's expenditure balance is deducted from the deduction amount after the transaction is completed, the remitter's income balance is increased by the difference between the deduction amount and the transaction amount after the transaction is completed, and the recipient's income balance is increased by the transaction amount after the transaction is completed. The initiation conditions of the limited public transfer transaction include that the privacy type setting information is private type.

2. According to the method of claim 1, the initiation conditions of the limited public transfer transaction further include at least one of the following: The user sets a limited public transfer transaction, the limited public transfer transaction is set as a priority, the remitter's expenditure balance is not less than the transaction amount, and any predetermined value of the alternative deduction amount set corresponding to the remitter's account is not less than the transaction amount.

3. The method according to claim 2, wherein the remitter account includes a remitter main balance using a committed amount, and the recipient account includes a recipient main balance using a committed amount; the method further include: When the privacy type setting information is a private type and the initiation condition of the main balance transfer transaction is met, the main balance transfer transaction is submitted to the blockchain, the main balance transfer transaction includes a transaction amount commitment corresponding to the transaction amount and an interval proof used to prove that the transaction amount is non-negative and the main balance of the remitter is not less than the transaction amount, so that the main balance of the remitter is deducted from the transaction amount after the transaction is completed, and the income balance of the recipient is increased by the transaction amount after the transaction is completed. The initiation condition of the main balance transfer transaction includes at least one of the following: the user sets the main balance transfer transaction to be selected, the main balance transfer transaction is set as a priority and the remitter's expenditure balance is less than the transaction amount, and the alternative deduction amounts of several predetermined values ​​in the alternative deduction amount set corresponding to the remitter's account are all less than the transaction amount.

4. The method according to claim 1, further comprising: include: When the privacy type setting information is a non-private type, a public transfer transaction is submitted to the blockchain, and the public transfer transaction includes a public transaction amount corresponding to the transaction amount, so that the remitter's expenditure balance is deducted from the public transaction amount after the transaction is completed, and the recipient's expenditure balance is increased by the public transaction amount after the transaction is completed.

5. The method according to claim 1, further comprising: include: Obtaining a set of candidate deduction amounts corresponding to the remitter account, wherein the set of candidate deduction amounts includes a plurality of predetermined value candidate deduction amounts; Any alternative deduction amount that is not less than the transaction amount is selected as the deduction amount.

6. According to the method of claim 3, the transaction amount commitment is calculated by a preset encryption algorithm based on the transaction amount and the transaction random number; the method also include: Before submitting the main balance transfer transaction or the limited public transfer transaction, the transaction amount, the transaction amount commitment and the transaction random number are sent to the recipient device through an off-chain channel, so that the recipient device verifies the correspondence between the transaction amount commitment, the transaction random number and the transaction amount; and receiving a recipient signature returned by the recipient device to add to the main balance transfer transaction or the limited public transfer transaction; wherein the recipient signature is generated by the recipient device after the corresponding relationship is verified.

7. The method according to claim 1, when the remitter balance of the remitter account increases, the corresponding amount is added to the remitter income balance.

8. The method according to claim 1, wherein the remitter account includes a remitter main balance using a committed amount, and the recipient account includes a recipient main balance using a committed amount; the method further include: Submit a recharge transaction to the blockchain, wherein the recharge transaction includes a recharge amount and an interval proof for proving that the remitter's main balance is not less than the recharge amount, so that the remitter's main balance is deducted by the recharge amount after the transaction is completed, and the remitter's expenditure balance is increased by the recharge amount after the transaction is completed.

9. The method according to claim 8, further comprising: include: Submitting a merge transaction to the blockchain, wherein the merge transaction includes a merge amount; Among them, after the transaction is completed, the expenditure balance of the remitter is deducted by the combined amount, the main balance of the remitter is increased by the combined amount after the transaction is completed, and / or the income balance of the remitter is cleared after the transaction is completed, and the main balance of the remitter is increased by the income balance after the transaction is completed.

10. A blockchain transaction method, applied to a blockchain node, the method include: receiving a limited public transfer transaction, the limited public transfer transaction being submitted by a remitter device when an initiation condition of the limited public transfer transaction is met, the initiation condition of the limited public transfer transaction comprising: the privacy type setting information being a private type; and the remitter device being used to determine a transaction amount to be remitted from a remitter account to a recipient account, the remitter account comprising a remitter income balance in a committed amount and a remitter expenditure balance in a plain text amount, and the recipient account comprising a recipient income balance in a committed amount and a recipient expenditure balance in a plain text amount; Execute the limited public transfer transaction, which includes a transaction amount commitment corresponding to the transaction amount, a deduction amount, and an interval proof for proving that the transaction amount is non-negative and the deduction amount is not less than the transaction amount, so that the remitter's expenditure balance is deducted by the deduction amount after the transaction is completed, the remitter's income balance is increased by the difference between the deduction amount and the transaction amount after the transaction is completed, and the recipient's income balance is increased by the transaction amount after the transaction is completed.

11. The method according to claim 10, wherein the initiation conditions of the limited public transfer transaction further include at least one of the following: The user sets a limited public transfer transaction, the limited public transfer transaction is set as a priority, the remitter's expenditure balance is not less than the transaction amount, and any predetermined value of the alternative deduction amount set corresponding to the remitter's account is not less than the transaction amount.

12. The method according to claim 11, wherein the remitter account includes a remitter main balance using a committed amount, and the recipient account includes a recipient main balance using a committed amount; the method further include: receiving a master balance transfer transaction, the master balance transfer transaction being submitted by the remitter device when the privacy type setting information is a private type and an initiation condition of the master balance transfer transaction is satisfied, the initiation condition of the master balance transfer transaction comprising at least one of the following: the user sets the master balance transfer transaction to be selected, the master balance transfer transaction is set as a priority and the remitter's expenditure balance is less than the transaction amount, and a plurality of predetermined values ​​of alternative deduction amounts in a set of alternative deduction amounts corresponding to the remitter's account are all less than the transaction amount; The main balance transfer transaction is executed, and the main balance transfer transaction includes a transaction amount commitment corresponding to the transaction amount and an interval proof for proving that the transaction amount is non-negative and the main balance of the remitting party is not less than the transaction amount, so that the main balance of the remitting party is deducted from the transaction amount after the transaction is completed, and the income balance of the receiving party is increased by the transaction amount after the transaction is completed.

13. The method according to claim 10, further comprising: include: receiving a public transfer transaction, wherein the public transfer transaction is submitted by the remitter device when the privacy type setting information is a non-private type; The public transfer transaction is executed, wherein the public transfer transaction includes a public transaction amount corresponding to the transaction amount, so that the remitter's expenditure balance is deducted from the public transaction amount after the transaction is completed, and the recipient's expenditure balance is increased by the public transaction amount after the transaction is completed.

14. The method according to claim 10, wherein the remitter account includes a remitter main balance using a committed amount, and the recipient account includes a recipient main balance using a committed amount; the method further include: receiving a recharge transaction submitted by the remitter device, wherein the recharge transaction includes a recharge amount and a range certificate for proving that the remitter main balance is not less than the recharge amount; The recharge transaction is executed so that the remitter's main balance is deducted by the recharge amount after the transaction is completed, and the remitter's expenditure balance is increased by the recharge amount after the transaction is completed.

15. The method according to claim 14, further comprising: include: receiving a combined transaction submitted by the remitter device, wherein the combined transaction includes a combined amount; The merge transaction is executed so that the expenditure balance of the remitting party is deducted from the merged amount after the transaction is completed, the main balance of the remitting party is increased by the merged amount after the transaction is completed, and / or the income balance of the remitting party is cleared after the transaction is completed, and the main balance of the remitting party is increased by the income balance after the transaction is completed.

16. A blockchain transaction device, applied to a remitter device, the device include: a determination unit, determining a transaction amount to be remitted from a remitter's account to a receiver's account, wherein the remitter's account includes a remitter's income balance in a committed amount and a remitter's expenditure balance in a plain text amount, and the receiver's account includes a receiver's income balance in a committed amount and a receiver's expenditure balance in a plain text amount; A submission unit obtains privacy type setting information; when the initiation condition of the limited public transfer transaction is met, the limited public transfer transaction is submitted to the blockchain, the limited public transfer transaction includes a transaction amount commitment corresponding to the transaction amount, a deduction amount, and an interval proof for proving that the transaction amount is non-negative and the deduction amount is not less than the transaction amount, so that the remitter's expenditure balance is deducted by the deduction amount after the transaction is completed, the remitter's income balance is increased by the difference between the deduction amount and the transaction amount after the transaction is completed, and the recipient's income balance is increased by the transaction amount after the transaction is completed, and the initiation condition of the limited public transfer transaction includes that the privacy type setting information is a private type.

17. An electronic device, include: processor; a memory for storing processor-executable instructions; The processor implements the method according to any one of claims 1 to 15 by running the executable instructions.

18. A computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 15.