WO2020082877A1 - Blockchain-based remittance method and device - Google Patents

Blockchain-based remittance method and device Download PDF

Info

Publication number
WO2020082877A1
WO2020082877A1 PCT/CN2019/101938 CN2019101938W WO2020082877A1 WO 2020082877 A1 WO2020082877 A1 WO 2020082877A1 CN 2019101938 W CN2019101938 W CN 2019101938W WO 2020082877 A1 WO2020082877 A1 WO 2020082877A1
Authority
WO
WIPO (PCT)
Prior art keywords
reserve
balance
remittance
list
transaction
Prior art date
Application number
PCT/CN2019/101938
Other languages
French (fr)
Chinese (zh)
Inventor
马宝利
刘正
张文彬
李漓春
殷山
Original Assignee
阿里巴巴集团控股有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2020082877A1 publication Critical patent/WO2020082877A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/10Payment architectures specially adapted for electronic funds transfer [EFT] systems; specially adapted for home banking systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3825Use of electronic signatures

Definitions

  • One or more embodiments of this specification relate to the field of blockchain technology, and in particular, to a blockchain-based remittance method and device.
  • Blockchain is a tamper-proof, shared digital ledger used to record transactions in public or private peer-to-peer networks.
  • the ledger is distributed to all member nodes in the network, and the historical records of asset transactions occurring in the network are permanently recorded in the block. Since the ledger is completely public, the blockchain ledger itself has no privacy protection function, and additional technology is needed to protect the privacy of asset transactions.
  • the existing privacy protection schemes all use zero-knowledge proof technology to ensure that the transaction amount is within a reasonable range.
  • the application of zero-knowledge proof technology under the account model will cause serious transaction concurrency problems, because the above zero-knowledge proof technology is closely related to the existing balance of the account, and the account balance will be sent in a certain transaction concurrently After being verified, it changes, causing other transactions that have not been verified and sent in parallel with the original account balance as a zero-knowledge proof to fail verification, thus seriously hindering the actual landing application of the privacy protection scheme under the account model.
  • An existing solution is to generate a reserve list containing multiple reserve amounts based on the account balance of the blockchain user, and assign the multiple reserve amounts available in the reserve list to multiple remittance transactions; block The nodes of the chain verify whether each remittance transaction is sufficient for the amount of reserves included in each remittance exchange, and verify each remittance transaction independently without affecting each other, so that the blockchain based on the account model can be sent in parallel Multiple remittance transactions.
  • the above technical solution has a problem: the user's account transaction needs to be suspended when the reserve list is initialized, and subsequent transactions cannot be performed until the initialization is completed, which still affects the concurrency of remittance transactions to a certain extent.
  • one or more embodiments of this specification provide a blockchain-based remittance method and apparatus, electronic equipment, and computer-readable storage medium.
  • a blockchain-based remittance method is proposed, which is applied to the user equipment of the blockchain, and the account balance of the user account is divided into at least a reserve balance and A reserve balance; wherein, the user account includes a dynamically updated reserve list; the reserve list includes multiple reserve amounts;
  • the method includes:
  • a corresponding reserve amount is allocated to the remittance amount submitted by the user according to the current reserve list;
  • a remittance transaction is constructed based on the remittance amount and the allocated reserve amount, and the remittance transaction is transferred Post to the blockchain to deduct the remittance amount from both the account balance and the reserve balance after the remittance transaction is verified by the node device in the blockchain;
  • the process of creating and updating the reserve list includes:
  • Step A Obtain the current reserve balance and obtain a reserve list according to the current reserve balance
  • Step B dynamically monitor whether the amount of reserves available for allocation in the current reserve list is lower than a preset threshold, and if so, after switching the current reserve balance to the reserve balance, perform step A.
  • a blockchain-based remittance device which is applied to the user equipment of the blockchain, and the account balance of the user account is divided into at least a reserve balance and A reserve balance; wherein, the user account includes a dynamically updated reserve list; the reserve list includes multiple reserve amounts;
  • the device includes:
  • the reserve amount allocation unit in response to the remittance operation initiated by the user, allocates the corresponding reserve amount to the remittance amount submitted by the user according to the current reserve list provided by the reserve list creation unit;
  • the remittance transaction construction and release unit constructs a remittance transaction based on the remittance amount and the allocated reserve amount, and publishes the remittance transaction to the blockchain, so that the remittance transaction is used by the node device in the blockchain After the verification is passed, the remittance amount is deducted from both the account balance and the reserve balance;
  • the reserve fund list creation unit includes:
  • the reserve list generation module obtains the current reserve balance and obtains the reserve list according to the current reserve balance
  • the reserve list monitoring module dynamically monitors whether the amount of reserves available for distribution in the current reserve list is lower than a preset threshold.
  • a computer device including: a memory and a processor; a computer program executable by the processor is stored on the memory; the processor runs the computer During the procedure, the above-mentioned blockchain-based remittance method is executed.
  • a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned blockchain-based remittance method is executed The steps described.
  • the blockchain-based remittance method and device provided in this manual divide the account balance of the user account into at least a reserve balance and a reserve balance, generate a reserve list based on the reserve balance, and the reserve list can include multiple The reserve amount is allocated to multiple remittance transactions and supports multiple concurrent remittance transactions; when the reserve amount available for distribution in the reserve list is lower than the preset threshold, the client device switches the above reserve balance to a reserve balance and A new reserve list is generated based on the switched reserve balance. After the new reserve list is generated, the original reserve list is updated and replaced, and a new remittance transaction can be initiated based on the reserve amount in the new reserve list.
  • the above-mentioned reserve balance can start the initialization operation of the new reserve list when the reserve amount in the original reserve list is consumed to a preset threshold, after the new reserve list is generated , Can immediately switch to generate remittance transactions based on the new reserve list; remittance transactions sent by users during the generation of the new reserve list (or verified by the blockchain consensus) are still generated based on the amount of reserves available for allocation in the original reserve list ;
  • the above process of switching the reserve balance and initializing the new reserve list may follow the use of the existing reserve list (whether the amount of reserve available for distribution is below the preset threshold), or the new reserve that should be received
  • the gold list construction instruction is executed cyclically, so there is no need to suspend the transaction of sending remittances throughout the process, improve the concurrency of the transaction, and avoid transaction interruption, maximizing the throughput of blockchain transactions.
  • FIG. 1 is a flowchart of a blockchain-based remittance method provided by an exemplary embodiment.
  • FIG. 2 is a flowchart of a process of creating and updating a reserve list provided by an exemplary embodiment.
  • FIG. 3 is a schematic diagram of implementing a remittance transaction in a blockchain network provided by an exemplary embodiment.
  • FIG. 4 is a flowchart of implementing an updated reserve list and remittance transaction in a blockchain network provided by an exemplary embodiment.
  • FIG. 5 is a schematic diagram of a user ’s account status on a blockchain provided by an exemplary embodiment.
  • FIG. 6 is a schematic diagram of a blockchain-based user equipment provided by an exemplary embodiment.
  • FIG. 7 is a schematic diagram of a blockchain-based remittance device provided by an exemplary embodiment.
  • the steps of the corresponding method are not necessarily performed in the order shown and described in this specification.
  • the method may include more or fewer steps than described in this specification.
  • the single step described in this specification may be decomposed into multiple steps for description in other embodiments; and the multiple steps described in this specification may also be combined into a single step in other embodiments description.
  • FIG. 1 is a flowchart of a blockchain-based remittance method provided by an exemplary embodiment, which is applied to a user terminal device of a blockchain, and the account balance of a user account is divided into at least a reserve balance and a reserve balance ; Wherein the user account includes a dynamically updated reserve list; the reserve list includes multiple reserve amounts.
  • the blockchain described in the above embodiment may specifically refer to a P2P network system with distributed data storage structure reached by each node device through a consensus mechanism, and the data distribution in the blockchain is connected one by one in time.
  • the latter block contains the data summary of the previous block, and according to the specific consensus mechanism (such as POW, POS, DPOS or PBFT, etc.), all or part of the data of the node is reached. Backup.
  • the specific consensus mechanism such as POW, POS, DPOS or PBFT, etc.
  • the blockchain using Pow consensus requires at least the entire network Only an attack of 51% of the computing power is possible to tamper with the existing data, so the blockchain system has the characteristics of ensuring data security and preventing attack and tampering that other centralized database systems cannot match. It can be seen that in the embodiments provided in this specification, the remittance transactions and other transactions included in the distributed database of the blockchain are not easy to be attacked or tampered, so that they are distributed to the distributed database of the blockchain The transaction was deposited.
  • the client device that executes the blockchain-based remittance method described in this embodiment may be the node device of the above-mentioned blockchain, or a client device connected to the node device of the above-mentioned blockchain, in this specification Not limited.
  • user accounts are stateful objects, and the content included in the user account can be the content included in the state of the above user account.
  • the user account contains account balance information and a list of reserves to support remittance transactions.
  • a dynamically updated reserve list is included in the user account, and the reserve list includes multiple reserve amounts.
  • the above multiple reserve amounts can be allocated to different remittance transactions, providing each remittance transaction with sufficient proof of payment of the remittance amount. It is worth noting that the "account” described in this specification is not limited to all external accounts (EOA) and contract accounts (Contract), and does not limit the specific manifestation of the above reserve list, as long as it contains or manages the above multiple reserves
  • EOA external accounts
  • Contract contract accounts
  • the value of the reserve balance and reserve balance described in this specification may not be displayed in the user account status of the blockchain, but as content that can be displayed or managed by the user client; of course, the value of the reserve balance and reserve balance mentioned above It can be displayed in the user account status of the blockchain, and is not limited in this specification.
  • the above remittance method may include the following steps:
  • Step 102 in response to the remittance operation initiated by the user, allocate a corresponding reserve amount to the remittance amount submitted by the user according to the current reserve list;
  • Step 104 Construct a remittance transaction based on the remittance amount and the allocated reserve amount, and publish the remittance transaction to the blockchain, so that after the remittance transaction is verified by the node device in the blockchain, The remittance amount is deducted from both the account balance and the reserve balance.
  • the amount of the reserve fund corresponding to the remittance amount is at least one, and the sum of the amount of the reserve fund corresponding to the remittance amount should not be less than the remittance amount of the transaction, thereby providing sufficient proof for the remittance transaction.
  • the current reserve list contains ⁇ 5,10,15,20 ⁇ four reserve amounts.
  • the client device can select one reserve from the above four reserve amounts Amount of 10 (or 15 or 20), the above one reserve amount of 10 (or 15 or 20) is allocated to the above remittance transaction; corresponding to the remittance transaction of the remittance amount of 12, the user equipment can choose from the above four reserve amounts Select a reserve amount of 15 (or 20), allocate the above reserve amount of 15 (or 20) to the above remittance transaction, or you can choose two reserve amounts of 5 and 10 from the above four reserve amounts (Or 5 and 15), allocate the above two reserve amounts 15 (or 20) to the above remittance transaction, and use the sum of the two reserve amounts to provide sufficient proof of payment for the remittance transaction.
  • the remittance user and the recipient user may agree to transfer (or referred to as transfer) an asset certificate corresponding to the remittance amount from the remittance blockchain account to the recipient blockchain account.
  • Asset certificates can correspond to smart assets such as tokens and digital assets in the blockchain.
  • Asset certificates can also correspond to off-chain assets such as cash, securities, coupons, and real estate outside the blockchain. This manual is not correct. This is restricted.
  • the remittance transaction After the construction of the remittance transaction is completed, it is sent to the blockchain by the user terminal device and receives the verification of the node device in the blockchain. Since the blockchain-based remittance method provided in this specification can be applied to blockchains based on multiple types of consensus mechanisms, this specification does not limit the number and types of blockchain nodes that perform verification on the above remittance transactions , Does not limit the content or process included in the above verification. However, those skilled in the art should know that the above verification includes at least verifying whether the sum of the reserves in the remittance transaction is greater than or equal to the remittance amount of the remittance transaction, to verify whether the user account has sufficient balance to pay the remittance transaction. After the above remittance transaction is verified by the node device of the blockchain, the remittance amount is deducted from the user's account balance and reserve balance.
  • FIG. 2 illustrates the process of creating and updating the reserve list in the above embodiment. As shown in FIG. 2, the process can be summarized as two loop steps connected to each other:
  • Step A Obtain the current reserve balance and obtain a reserve list according to the current reserve balance
  • Step B dynamically monitor whether the amount of reserves available for allocation in the current reserve list is lower than a preset threshold, and if so, after switching the current reserve balance to the reserve balance, perform step A.
  • the user may divide the account balance into at least an initialized reserve balance and an initialized reserve balance.
  • the user equipment first performs the above-mentioned step A based on the initialized reserve balance process.
  • the above current reserve balance can generate the reserve amount in the new reserve list after switching; optionally, before being triggered to generate a new reserve list, the reserve balance can be used as a remittance balance to support user initiation Separate (not concurrent) remittance transactions can also be used as a collection balance to receive remittances from other accounts to this user account; and, when the account balance includes two or more backup balances, some of the backup balances You can not participate in remittances or collections, but only as a static balance, at a suitable time (such as the amount of reserves available for distribution in the reserve list generated based on the original reserve balance is lower than the preset threshold, or received by the user The new reserve list construction instruction sent is triggered to divide the reserve amount in the new reserve list.
  • the process of obtaining a reserve list according to the current reserve balance described in step A includes:
  • the current reserve balance can be divided to obtain multiple reserve amounts.
  • the reserve list creation exchange includes, based on The sum of the multiple reserve funds obtained by dividing the current reserve balance should not be greater than the reserve balance. Since the blockchain-based remittance method provided in this specification can be applied to blockchains based on multiple types of consensus mechanisms, this specification does not limit the blockchain nodes that perform verification on the above-mentioned reserve list creation transactions. The number and type also do not limit the content or process included in the above verification.
  • the above verification includes at least verifying whether the sum of the reserves in the reserve list creation transaction is less than or equal to the current reserve balance (or when the user ’s account status does not display the reserve balance, at least It should be verified whether the sum of the reserve amount in the reserve list creation transaction is less than or equal to the current account balance) to verify the validity of the above reserve balance.
  • a reserve fund list is constructed in the user account based on the multiple reserve fund amounts included in the exchange created by the reserve fund list creation.
  • the above-mentioned obtaining of the reserve fund list according to the current reserve fund balance includes:
  • the current reserve balance may be divided to obtain a plurality of reserve amounts, a reserve list is constructed based on the plurality of reserve amounts, and the above includes a plurality of reserves obtained based on the current reserve balance division
  • the reserve list of the gold amount is included in the above reserve list creation transaction.
  • the sum of the multiple reserve amounts included in the reserve list creation exchange based on the current reserve balance division should not be greater than the reserve balance. Since the blockchain-based remittance method provided in this specification can be applied to blockchains based on multiple types of consensus mechanisms, this specification does not limit the blockchain nodes that perform verification on the above-mentioned reserve list creation transactions.
  • the number and type also do not limit the content or process included in the above verification.
  • the above verification includes at least verifying whether the sum of the reserves in the reserve list creation transaction is less than or equal to the current reserve balance (or when the user ’s account status does not display the reserve balance, at least It should be verified whether the sum of the reserve amount in the reserve list creation transaction is less than or equal to the current account balance) to verify the validity of the above reserve balance.
  • the reserve fund list included in the reserve fund list creation exchange is updated to the user account.
  • each reserve amount in the reserve list is to provide a balance certificate sufficient for payment for the remittance transaction, and the remittance transaction that is repeatedly allocated based on the same reserve amount cannot pass the verification of the blockchain node.
  • the amount of reserves available for allocation in the current reserve list in the user's account is decreasing.
  • This threshold can be the total threshold of the reserve amount (ie The maximum remittance threshold that can be paid for the remaining available reserve amount), or it can be the threshold of the amount of the reserve amount (that is, the remaining available reserve balance can be used for the maximum number of remittance transactions sent), on the user side
  • the device dynamically detects that the amount of reserves available for distribution in the existing reserve list is lower than the preset threshold, the current reserve balance is switched to the reserve balance, and then the step A in the above embodiment is executed. process.
  • the above step of switching the current reserve balance to the reserve balance can also be triggered in response to an instruction issued by the user.
  • the process of the release of node devices (including user equipment) of the blockchain, consensus verification, and updating of the new reserve list in the state of the user account usually require a certain amount of time.
  • the remittance transaction can still be constructed based on the amount of reserve available for allocation in the current reserve list.
  • the new reserve fund list can be used as the current reserve fund list in the user account, and the user can construct a remittance transaction based on the current reserve fund list, and submit to the blockchain
  • the remittance transaction is issued; accordingly, after the above remittance transaction is verified by the node device in the blockchain, the remittance amount is deducted from both the account balance and the switched reserve balance.
  • the usage status of the amount of reserves in the reserve list may be marked.
  • a remittance transaction including the reserve amount is verified by the node device in the blockchain, and the remittance transaction is included in the distributed database of the blockchain, and the account balance of the remittance user of the remittance transaction is updated.
  • the amount of reserves included in the remittance exchange should be marked as used in the reserve list of the remittance account (state 3), as those skilled in the art are familiar with, the above remittances included in the distributed database of the blockchain
  • the transaction may be referred to as "a completed remittance transaction".
  • the node device in the blockchain can verify whether the status of the reserve amount in the new unfinished remittance transaction in the remittance user account's reserve list is used: If it is in the used state, the verification fails, and the corresponding new outstanding remittance transaction can be returned; if it is not in the used state, the verification is passed.
  • the blockchain node should also reserve the amount of the reserve included in the new remittance transaction in the remittance user account.
  • the gold list is updated to "used status".
  • the client device can also mark the unused reserve amount that has not been allocated to any remittance transaction as unused in the reserve list (state 1); a reserve amount Once allocated to a remittance transaction, the amount of the reserve can be immediately marked as used in the reserve list of the user account (state 2), that is, the above reserve amount in the current reserve list saved on the user side Calibration is used (state 2). Therefore, the client device can only allocate the reserve amount in the unused state (state 1) for new remittance transactions, and after the allocation, the allocated reserve amount is immediately changed to the used state locally (state 2) ) To prevent double allocation of the same reserve amount.
  • the reserve balance before switching is switched to a reserve balance.
  • the original reserve list can be used as a remittance transaction.
  • the original reserve balance can be switched to a standby balance, so that the reserve amount in the current current reserve list is lower than the preset threshold or a new reserve list construction instruction is received At this time, a new reserve list is constructed based on the current reserve balance.
  • the standby balance described in this specification can be used as the collection balance.
  • the remittance transaction initiated by the other user to the user account is verified by the node device of the blockchain, The amount of remittance in this remittance transaction will be added to the balance of the payment and the balance of the account.
  • the user's account balance and the transaction amount of the remittance transaction are encrypted; the remittance method provided in this manual can also be used in the privacy mode In the blockchain.
  • the account balance of the blockchain user account, the amount of reserves in the reserve list, and the amount of remittance in the remittance transaction initiated by the user device are all encrypted in advance. Since the remittance amount and reserve amount included in the remittance exchange are encrypted, in order to ensure that the blockchain node can verify that the above reserve amount allocated to the remittance transaction is sufficient to pay for the remittance, the above remittance transaction should also include The proof is the first zero-knowledge proof that the sum of the reserves included in the remittance transaction is greater than or equal to the remittance amount of the remittance transaction.
  • the exchange included in the creation of the exchange The sum of the reserve amount does not exceed the user's account balance.
  • the above reserve list creation transaction should also include a proof that the sum of the multiple reserve amounts divided based on the switched reserve balance is less than or equal to the user's account balance The second zero knowledge proof.
  • Zero-knowledge proof usually refers to that the prover (verified person) can make the verifier believe that an argument is correct without providing the verifier with any useful information.
  • the user equipment can provide the first zero-knowledge proof, so that the node (verifier) in the blockchain can believe that it is a remittance transaction without knowing the specific value of the remittance amount and reserve amount
  • a zero-knowledge certificate performs zero-knowledge verification to confirm whether the sum of the reserve funds allocated to the remittance exchange is greater than or equal to the remittance amount.
  • the client device can provide the second zero-knowledge proof so that the nodes (verifiers) in the blockchain do not know the account balance of the user account and the actual value of the reserve amount included in the reserve list.
  • the client device can provide the second zero-knowledge proof so that the nodes (verifiers) in the blockchain do not know the account balance of the user account and the actual value of the reserve amount included in the reserve list.
  • (clear text) it can be believed whether the sum of the amount of multiple reserves included in the reserve list creation transaction is not greater than the account balance of the above user account.
  • the reserve balance and reserve balance in the user account are also displayed in the status of the user account, that is, other nodes on the blockchain can learn the status of the user device by querying the status of the user account
  • the reserve balance and reserve balance of the user account are also encrypted in advance.
  • the above second zero knowledge proof can be used to prove the preparation based on the switch
  • the sum of the multiple reserve funds divided by the gold balance is less than or equal to the reserve balance after the switching. Since the reserve balance after the switch is based on the account balance, the reserve balance must be smaller than the account balance, so the above second zero knowledge proof can also be used for blockchain nodes to verify the reserve list and create an exchange.
  • the sum of the gold amount is not greater than the account balance provides valid proof.
  • This specification does not limit the types of cryptographic encryption algorithms mentioned above, and can include addition homomorphic encryption algorithms or fully homomorphic encryption algorithms, and can also include homomorphic commitment algorithms (such as Pederson Commitment, etc.), as long as the encryption algorithm can meet the addition homology It can also support zero-knowledge proof that a plaintext data belongs to a certain range, so that the account balance (or reserve balance) of the encrypted sender user can be directly deducted from the encrypted remittance amount, and the account balance of the encrypted receiver user can be Directly increase the amount of encrypted remittances.
  • the above-mentioned blockchain can support the Pedersen Commitment Commitment Algorithm based on elliptic curves to ensure that the encrypted amount in the blockchain can be verified in the encrypted state, and the addition homomorphism can be achieved.
  • Range Proof technology in related technologies, such as the Bulletproofs scheme or the “zksnark” universal zero-knowledge proof technology, can be used.
  • the above remittance transaction may also include a third zero knowledge proof to prove that the remittance amount is greater than or equal to zero,
  • the above third zero-knowledge proof can be generated based on the encrypted remittance amount, so that the node (verifier) in the blockchain can verify the remittance amount of the remittance transaction without knowing the actual value of the remittance amount (clear text) Less than zero.
  • the reserve list creation transaction may also include each provision included in the reserve list creation exchange to prove The fourth zero knowledge proof that the gold amount is greater than or equal to zero.
  • the above fourth zero knowledge proof can be generated based on each reserve amount, so that the nodes (verifiers) in the blockchain do not know the actual value of each reserve amount (clear text) ), You can verify that each reserve amount included in the reserve list creation transaction is greater than or equal to zero.
  • the above-mentioned remittance transaction and reserve list creation transaction may further include a digital signature made by the user terminal device based on the private key of the user account to be used by the blockchain node to perform the electronic signature Verification to prevent other nodes from pretending to be the remittance party and publishing the above first transaction, publishing wrong information, and maliciously disturbing the order of the transaction.
  • the blockchain-based remittance method provided in this manual divides the account balance of the user account into at least a reserve balance and a reserve balance, and builds a reserve list containing multiple reserve amounts based on the reserve balance, which is a user account Concurrent remittance transactions provide proof of payment; when the available reserve amount in the above reserve list is lower than the preset threshold, or when a new reserve list construction instruction is received, the above reserve balance is switched to the reserve month, based on The above-mentioned switched reserve balance builds a new reserve list containing multiple reserve amounts; after the new reserve list is verified by the blockchain node and the new reserve list is updated to the user account, the user account Build new remittance transactions based on the new reserve list.
  • the remittance transaction can still be constructed based on the original reserve list without suspension; and the process of switching the reserve balance and creating a new reserve list can be used according to the current use of the reserve list ( Whether the amount of reserves available for distribution is lower than the preset threshold), or the new reserve list construction instructions that should be received are executed cyclically, so there is no need to suspend the transaction of sending remittances throughout the process, improve the concurrency of transactions, and avoid transaction interruptions Maximized the throughput of blockchain transactions.
  • FIG. 3 is a schematic diagram of implementing a remittance transaction and a reserve list transaction in a blockchain network provided by an exemplary embodiment.
  • the exporter device used by user A is user device 1, for example, a user account corresponding to user A is registered on user device 1; similarly, the receiver device used by user B is user device 2.
  • the user device 1 may run a client program of the blockchain, so that the user device 1 has a corresponding blockchain node in the blockchain network, such as the node 1 shown in FIG. 2.
  • the user equipment 2 may run a client program of the blockchain, so that the user equipment 2 has a corresponding blockchain node in the blockchain network, such as the node 2 shown in FIG. 3.
  • There are other blockchain nodes in the blockchain network such as the node i shown in Figure 3.
  • the remittance transaction between user A and user B, and the reserve list creation transaction sent by user A can be implemented through the blockchain network, and related transaction information can be recorded to In the blockchain ledger maintained by each blockchain node, tampering can be avoided, and it is helpful for subsequent inspections.
  • user A transfers blockchain money to user B.
  • user A After user A registers an account, he should first send a reserve list to create a transaction to initialize the reserve list in his account.
  • the "user" in this manual can be represented as the logged-in user account, and the user account can actually belong to an individual or organization, and this manual does not limit this.
  • user A's account balance s_A is divided into two sub-balances: s_A_1 and s_A_2, and user B's account balance s_B is also divided into two sub-balances: s_B_1 and s_B_2.
  • User A's account balances s_A, sub balances s_A_1 and s_A_2 and user B's account balances s_B, sub balances s_B_1 and s_B_2 are all encrypted based on the encryption algorithm:
  • the above encryption algorithm may be a Pederson Commitment homomorphic commitment algorithm.
  • the sub balance s_A_1 is the reserve balance
  • s_A_2 is the collection balance
  • the sub balance s_B_1 is the reserve balance
  • s_B_2 is the collection balance.
  • Figure 4 illustrates a user setting A M A reserve list and initiate the process of remittance transactions based on the reserve list M A.
  • the process of setting up user A's reserve list M A includes the following steps:
  • Step 401, establishing the reserve list of the user A M A, M A above the reserve list for user A includes sub-dividing the balance s_A_1 obtained is, a plurality of reserve based on the amount of M A homomorphic encryption algorithm encryption HE [1 ], M A [2], ..., M A [L A ], and the amount of the above reserves M A [1], M A [2], ..., M A [L A ]
  • the use status is marked as "unused status".
  • the user A may s_A_1 or sub-sub-balance balance balance s_A_1 portion is divided, to obtain a plurality of the above-described reserve amount plaintext m a [1], m a [2], ..., m a [L A] , And based on the above homomorphic encryption algorithm to encrypt the above multiple reserve amounts to obtain the reserve amount ciphertext M A [1], M A [2], ..., M A [L A ]; User A can also The ciphertext S_A_1 of the sub-balance s_A_1 is directly divided to obtain M A [1], M A [2], ..., M A [L A ], and based on the inverse operation of the above homomorphic encryption algorithm, the amount of the above reserve is obtained ciphertext corresponding to the plaintext m a [1], m a [2], ..., m a [L a].
  • User A may plaintext m above the reserve amount of a [1], m a [ 2], ..., m a [L A] and ciphertext M A [1], M A [2], ..., M A [ The corresponding relationship of L A ] is saved separately, so that user A can choose the appropriate reserve amount in the specific remittance transaction.
  • user A can only save the plain text of the above reserve amount on the local user terminal.
  • the user terminal periodically synchronizes the account data from the blockchain, and decrypts the encrypted data obtained from the blockchain to obtain the The amount of reserves used.
  • Step 402 the user A generates a zero-knowledge proof PF [s_A_1 ⁇ (m a [1 ] + m a [2] + ... + m a [L A])], used to demonstrate the above-described reserve list of M A M A [1], m a [2 ], ..., m a [L a] corresponding to the reserve amount m a [1], m a [2], ..., m a [L a] of less than or equal to the user a the sub-balance s_A_1, the above-described zero-knowledge proof PF [s_A_1 ⁇ (m a [1 ] + m a [2] + ...
  • the above zero-knowledge proof PF [s_A_1 ⁇ (m a [1] + m a [2] +... + m a [L A ])] can use general zero-knowledge proof technology such as zksnark or Bulletproof scheme, etc. Interval proof technology.
  • Step 403 the user A generates a zero-knowledge proof PF (m a [i] ⁇ 0 ), to prove the above-described reserve list of M A M A [1], M A [2], ..., M A [L A ] corresponding to the amount of reserve m a [1], m a [2], ..., m a [L a] is not less than zero.
  • PF zero-knowledge proof PF (m a [i] ⁇ 0 ) without the use of the reserve amount m a [i] values to the verifier believes that the m a [i] ⁇ 0.
  • the above-mentioned zero-knowledge proof PF (m a [i] ⁇ 0) may use the interval proof technique such as the Borromean ring signature scheme or the general zero-knowledge proof technical scheme such as zksnark.
  • Step 404 the user A M A, PF [s_A_1 ⁇ ( m a [1] + m a [2] + ... + m a [LA])], PF (m a [i] ⁇ 0) generating a digital signature based Sign A s.
  • Step 406 the node of the blockchain receives the above transaction T s .
  • step 407 the node of the blockchain performs the verification of the electronic signature Sign A s of the above transaction T s , and if it passes, the next step is performed.
  • the step of block chain of nodes PF [s_A_1 ⁇ (m a [1 ] + m a [2] + ... + m a [L A])] is zero-knowledge proof algorithm based on zero-knowledge proof to confirm m a [1], m a [2 ], ..., m a [L a] is less than or equal to the sum of the sub-balance s_A_1 user a; if yes, performing next step.
  • Step 410 the node of the blockchain records the verified transaction T s into the distributed database of the blockchain, and updates the reserve list M A to the account status of the user A.
  • FIG. 4 is only an embodiment of a method for setting a user's reserve list provided in this specification, and this specification is not limited to this.
  • the setting process of the reserve fund list MB in the user B account is similar to the above steps 401 to 410, and will not be repeated here.
  • the blockchain in Figure 4 performs the process of remittance and transfer from user A to user B as follows:
  • step 412 the user A selects an unused reserve ciphertext M A [k] from the reserve list M A whose plaintext m A [k] is sufficient to pay the remittance amount s_t, and transfers the reserve amount
  • the ciphertext M A [k] is marked as being used so that M A [k] can no longer be designated in other new remittance transactions.
  • Step 413 the user A generates a zero-knowledge proof Pf (m A [k] ⁇ s_t ), to prove M A [k] corresponding to the amount of reserve m A [k] is sufficient to pay remittances this S_T; above-zero-knowledge proof Pf (m A [k] ⁇ s_t) without using the values of m A [k] and s_t can convince the verifier that m A [k] ⁇ s_t.
  • Step 414 User A generates a zero-knowledge proof Pf (s_t ⁇ 0) to prove that the remittance amount s_t is not less than zero; the above-mentioned zero-knowledge proof Pf (s_t ⁇ 0) does not use the value of s_t, so that the verifier can believe s_t ⁇ 0.
  • Step 415 the user A based St, M A [k], Pf (m A [k] ⁇ s_t), Pf (s_t ⁇ 0) generating a digital signature Sign A t.
  • step 416 user A sends a transaction T t to the blockchain to transfer money to user B.
  • the transaction T t includes S t , M A [k], Pf (m A [k] ⁇ s_t), Pf (s_t ⁇ 0) and Sign a t, the foregoing state are ciphertext, thus protecting the user a, B, privacy remittance transactions.
  • step 417 the node of the blockchain receives the above transaction T t .
  • Step 418 the node performs block chain to verify the signature Sign A t T t above electronic transaction, if passed, the next steps.
  • Step 419 the node of the blockchain verifies whether the MA [k] contained in the above T t is in the used state; if not, the next step is executed.
  • Step 420 the node of the blockchain performs zero-knowledge verification on PF (m a [k] ⁇ s_t) based on the zero-knowledge proof algorithm to confirm whether the amount of reserves corresponding to M A [k] is greater than or equal to the remittance amount; If yes, go to the next step.
  • Step 421 the node of the blockchain performs zero-knowledge verification on the PF (s_t ⁇ 0) based on the zero-knowledge proof algorithm to confirm that the actual value of the remittance amount corresponding to the remittance amount cipher text S t of this remittance transaction is not less than zero; if it is To perform the next step.
  • Step 422 the node of the blockchain collects the verified transaction T t into the distributed database of the blockchain, and based on the homomorphic operation in the account balance ciphertext S_A of user A and the subaccount balance ciphertext S_A_1
  • the property deducts the remittance amount ciphertext S t , and the user B's account balance ciphertext S_B and sub-account balance ciphertext S_B_2 both increase the remittance amount ciphertext S t based on the homomorphic computing property, so that the user A's account
  • the balance is updated to (s_A-s_t)
  • the balance of the remittance sub-account of A is updated to (s_A_1-s_t)
  • the balance of the account of user B is updated to (s_B + s_t)
  • the balance of B's collection sub-account is updated to s_B_2 + s_t); and change
  • the amount of reserves available in reserve list M A gradually decreases, and device node 1 of user A monitors the sum of the amount of reserves available in reserve list M A , or monitors The sum of the amount of reserves available in the reserve list M A.
  • user A switches their sub-accounts s_A_1 and s_A_2, based on the new The reserve balance s_A_2 to generate a new reserve list M A '.
  • the construction process of the new reserve list M A ' is similar to steps 401-410, and will not be repeated here. After M A ' is updated to user A's account, it will replace the original reserve list M A as a new effective The reserve list provides proof of payment for remittance transactions.
  • Figure 2 illustrates the above process of creating and updating the reserve list in User A's account. It can be seen from Figure 2 that through the cyclic switching of sub-account balances, there is always a valid reserve list in User A's account for Concurrent remittance transactions provide multiple reserve amounts, so that user A does not need to suspend remittance transactions to update the reserve list, ensuring the maximum concurrent submission and execution of remittance transactions.
  • sub-account balance S_A_2 is initially used as a collection transaction.
  • the user device detects that the amount of the reserve in the reserve list M A is lower than the preset threshold, It is necessary to switch the functions of the sub-account balance S_A_1 and the sub-account balance S_A_2, S_A_1 as the payment balance and S_A_2 as the reserve balance.
  • the user device Before using S_A_2 as a reserve balance to execute the construction of a new reserve list, the user device needs to wait for a period of time until the transactions of the sub-account balance S_A_2 sent to user A by other users on the blockchain are updated and displayed before the above switch
  • the above-mentioned waiting time may be determined according to the block-forming frequency of the blockchain, for example, waiting for about 3-5 block-forming times.
  • FIG. 6 is a schematic structural diagram of a device provided by an exemplary embodiment. Please refer to FIG. 6.
  • the device includes a processor 602, an internal bus 604, a network interface 606, a memory 608, and a non-volatile memory 610. Of course, it may include hardware required for other services.
  • the processor 602 reads the corresponding computer program from the non-volatile memory 610 into the memory 608 and then runs it to form a blockchain transaction device at a logical level.
  • one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of hardware and software, etc., that is to say, the execution body of the following processing flow is not limited to each
  • the logic unit may also be a hardware or logic device.
  • this specification also provides a blockchain-based remittance device 70, which is applied to the user equipment of the blockchain, and the account balance of the user account is divided into at least a reserve balance and a reserve balance; ,
  • the user account includes a dynamically updated reserve list; the reserve list includes multiple reserve amounts;
  • the device 70 includes:
  • the reserve amount allocation unit 702 in response to the remittance operation initiated by the user, allocates the corresponding reserve amount to the remittance amount submitted by the user according to the current reserve list provided by the reserve list creation unit 704;
  • the remittance transaction construction and release unit 706 builds a remittance transaction based on the remittance amount and the allocated reserve amount, and publishes the remittance transaction to the blockchain, so that the remittance transaction is a node in the blockchain After the device is verified, the remittance amount is deducted from both the account balance and the reserve balance;
  • the reserve list creation unit 704 includes:
  • the reserve list generation module 7042 obtains the current reserve balance and obtains the reserve list according to the current reserve balance
  • the reserve list monitoring module 7044 dynamically monitors whether the amount of reserves available for distribution in the current reserve list is lower than a preset threshold.
  • the reserve list generation module 7042 :
  • the reserve list generation module 7042 :
  • the device 70 further includes:
  • the standby balance is a collection balance; wherein, when another user initiates a remittance transaction to the user account and is verified by the node device of the blockchain, the remittance amount in the remittance transaction Will be added to the collection balance and the account balance.
  • the account balance of the user account, the reserve amount, and the remittance amount are all encrypted in advance;
  • the remittance transaction also includes a first zero-knowledge certificate to prove that the sum of the reserves included for the remittance transaction is greater than or equal to the remittance amount of the remittance transaction;
  • the reserve list creation transaction also includes a second zero-knowledge proof to prove that the sum of the plurality of reserve amounts divided based on the switched reserve balance is less than or equal to the user's account balance.
  • the reserve balance and reserve balance of the user account are encrypted in advance, and the second zero-knowledge proof is used to prove a plurality of reserves divided based on the reserve balance after switching
  • the sum of the gold amounts is less than or equal to the reserve balance after the switch.
  • the remittance transaction further includes a third zero-knowledge proof to prove that the remittance amount is greater than or equal to zero.
  • the reserve list creation transaction further includes a fourth zero proof of knowledge to prove that a plurality of reserve amounts divided based on the switched reserve balance are all greater than or equal to zero.
  • the system, device, module or unit explained in the above embodiments may be specifically implemented by a computer chip or entity, or by a product having a certain function.
  • a typical implementation device is a computer, and the specific form of the computer may be 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 sending and receiving device, and a game control Desk, tablet computer, wearable device, or any combination of these devices.
  • the embodiments of the present specification also provide a computer device, which includes a memory and a processor.
  • a computer program that can be executed by the processor is stored on the memory; when the processor runs the stored computer program, each step of the block chain-based remittance method in the embodiment of the present specification is executed.
  • each step of the block chain-based remittance method in the embodiment of the present specification is executed.
  • the embodiments of the present specification also provide a computer-readable storage medium that stores computer programs on the storage medium.
  • the computer program is executed based on The various steps of the blockchain remittance method.
  • the various steps of the blockchain-based remittance method please refer to the previous content, and it will not be repeated.
  • the computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
  • processors CPUs
  • input / output interfaces output interfaces
  • network interfaces network interfaces
  • memory volatile and non-volatile memory
  • the memory may include non-permanent memory, random access memory (RAM) and / or non-volatile memory in computer-readable media, such as read only memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
  • RAM random access memory
  • ROM read only memory
  • flash RAM flash memory
  • Computer-readable media including permanent and non-permanent, removable and non-removable media, can store information by any method or technology.
  • the information may be computer readable instructions, data structures, modules of programs, 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 technologies, read-only compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, Magnetic tape cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices. According to the definition in this article, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
  • PRAM phase change memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • RAM random access memory
  • ROM read-only memory
  • EEPROM electrically erasable programmable read-only memory
  • flash memory or other memory technologies
  • CD-ROM compact disc read-only memory
  • DVD digital
  • the embodiments of the present specification may be provided as methods, systems, or computer program products. Therefore, the embodiments of the present specification may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of this specification may take the form of computer program products implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program code .
  • computer usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.

Abstract

Provided in one or more embodiments of the present specification are a blockchain-based remittance method and device applied to a user terminal device in a blockchain. An account balance in a user account is at least divided into a contingency balance and a reserve balance. The user account comprises a dynamically updated contingency fund list. The contingency fund list comprises multiple contingency fund amounts. The method comprises: in response to a remittance operation initiated by a user, allocating, according to a current contingency fund list, a corresponding contingency fund amount to a remittance amount indicated by the user; and constructing a remittance transaction on the basis of the contingency fund amount allocated to the remittance amount, and transmitting the remittance transaction to a blockchain, such that the remittance amount is deducted from both the account balance and the contingency balance after the remittance transaction has been authenticated by node equipment in the blockchain.

Description

基于区块链的汇款方法及装置Remittance method and device based on blockchain 技术领域Technical field
本说明书一个或多个实施例涉及区块链技术领域,尤其涉及一种基于区块链的汇款方法及装置。One or more embodiments of this specification relate to the field of blockchain technology, and in particular, to a blockchain-based remittance method and device.
背景技术Background technique
区块链是一种防篡改的、共享的数字化账本,用于记录公有或私有对等网络中的交易。账本分发给网络中的所有成员节点,在区块中永久记录网络中发生的资产交易的历史记录。由于账本是完全公开的,因此区块链账本本身无隐私保护功能,需通过额外的技术来保护资产交易的隐私。目前已有的隐私保护方案中都利用了零知识证明技术来保证交易金额在一个合理区间。不同于UTXO模型,在账户模型下应用零知识证明技术会带来严重的交易并发性问题,因为上述零知识证明技术与账户的现有余额紧密关联,账户的余额会在并发发送的某一交易被验证后发生改变,从而引起尚未验证的、以原账户余额作为零知识证明的并行发送的其他交易无法通过验证,因此严重阻碍了账户模型下隐私保护方案的实际落地应用。Blockchain is a tamper-proof, shared digital ledger used to record transactions in public or private peer-to-peer networks. The ledger is distributed to all member nodes in the network, and the historical records of asset transactions occurring in the network are permanently recorded in the block. Since the ledger is completely public, the blockchain ledger itself has no privacy protection function, and additional technology is needed to protect the privacy of asset transactions. The existing privacy protection schemes all use zero-knowledge proof technology to ensure that the transaction amount is within a reasonable range. Unlike the UTXO model, the application of zero-knowledge proof technology under the account model will cause serious transaction concurrency problems, because the above zero-knowledge proof technology is closely related to the existing balance of the account, and the account balance will be sent in a certain transaction concurrently After being verified, it changes, causing other transactions that have not been verified and sent in parallel with the original account balance as a zero-knowledge proof to fail verification, thus seriously hindering the actual landing application of the privacy protection scheme under the account model.
现有的一种解决方案为基于区块链用户的账户余额生成包含多个预备金金额的预备金列表,并将预备金列表中可用的多个预备金金额指定至多个汇款交易中;区块链的节点针对各个汇款交易所包括的预备金金额进行各个汇款交易是否足以支付的验证,对各个汇款交易的验证分别独立进行,不相互影响,从而使得基于账户模型构建的区块链可以并行发送多个汇款交易。上述技术方案存在一个问题:需要在初始化预备金列表时暂停用户的账户交易,直到初始化完成后才能进行后续的交易,在一定程度上对汇款交易的并发性仍有影响。An existing solution is to generate a reserve list containing multiple reserve amounts based on the account balance of the blockchain user, and assign the multiple reserve amounts available in the reserve list to multiple remittance transactions; block The nodes of the chain verify whether each remittance transaction is sufficient for the amount of reserves included in each remittance exchange, and verify each remittance transaction independently without affecting each other, so that the blockchain based on the account model can be sent in parallel Multiple remittance transactions. The above technical solution has a problem: the user's account transaction needs to be suspended when the reserve list is initialized, and subsequent transactions cannot be performed until the initialization is completed, which still affects the concurrency of remittance transactions to a certain extent.
发明内容Summary of the invention
有鉴于此,本说明书一个或多个实施例提供一种基于区块链的汇款方法及装置、电子设备及计算机可读存储介质。In view of this, one or more embodiments of this specification provide a blockchain-based remittance method and apparatus, electronic equipment, and computer-readable storage medium.
为实现上述目的,本说明书一个或多个实施例提供技术方案如下:To achieve the above purpose, one or more embodiments of this specification provide technical solutions as follows:
根据本说明书一个或多个实施例的第一方面,提出了一种基于区块链的汇款方法,应用于区块链的用户端设备,用户账户的账户余额至少被划分为一预备金余额和一备用余额;其中,所述用户账户包括一动态更新的预备金列表;所述预备金列表包括多个预备金金额;According to the first aspect of one or more embodiments of this specification, a blockchain-based remittance method is proposed, which is applied to the user equipment of the blockchain, and the account balance of the user account is divided into at least a reserve balance and A reserve balance; wherein, the user account includes a dynamically updated reserve list; the reserve list includes multiple reserve amounts;
所述方法包括:The method includes:
响应于用户发起的汇款操作,根据当前的预备金列表为用户提交的汇款额分配对应的预备金金额;基于所述汇款额以及分配的所述预备金金额构建汇款交易,并将所述汇款交易发布至区块链,以在所述汇款交易被区块链中的节点设备验证通过后,从所述账户余额和所述预备金余额中均扣减所述汇款额;In response to the remittance operation initiated by the user, a corresponding reserve amount is allocated to the remittance amount submitted by the user according to the current reserve list; a remittance transaction is constructed based on the remittance amount and the allocated reserve amount, and the remittance transaction is transferred Post to the blockchain to deduct the remittance amount from both the account balance and the reserve balance after the remittance transaction is verified by the node device in the blockchain;
其中,所述预备金列表的创建及更新过程包括:Among them, the process of creating and updating the reserve list includes:
步骤A,获得当前的预备金余额,根据当前的预备金余额得到预备金列表;Step A: Obtain the current reserve balance and obtain a reserve list according to the current reserve balance;
步骤B,动态监测当前预备金列表中可用于分配的预备金金额是否低于预设阈值,如果是则将当前的备用余额切换为预备金余额后,执行步骤A。Step B: dynamically monitor whether the amount of reserves available for allocation in the current reserve list is lower than a preset threshold, and if so, after switching the current reserve balance to the reserve balance, perform step A.
根据本说明书一个或多个实施例的第二方面,提出了一种基于区块链的汇款装置,应用于区块链的用户端设备,用户账户的账户余额至少被划分为一预备金余额和一备用余额;其中,所述用户账户包括一动态更新的预备金列表;所述预备金列表包括多个预备金金额;According to a second aspect of one or more embodiments of this specification, a blockchain-based remittance device is proposed, which is applied to the user equipment of the blockchain, and the account balance of the user account is divided into at least a reserve balance and A reserve balance; wherein, the user account includes a dynamically updated reserve list; the reserve list includes multiple reserve amounts;
所述装置包括:The device includes:
预备金金额分配单元,响应于用户发起的汇款操作,根据预备金列表创建单元提供的当前的预备金列表为用户提交的汇款额分配对应的预备金金额;The reserve amount allocation unit, in response to the remittance operation initiated by the user, allocates the corresponding reserve amount to the remittance amount submitted by the user according to the current reserve list provided by the reserve list creation unit;
汇款交易构建及发布单元,基于所述汇款额以及分配的所述预备金金额构建汇款交易,并将所述汇款交易发布至区块链,以在所述汇款交易被区块链中的节点设备验证通过后,从所述账户余额和所述预备金余额中均扣减所述汇款额;The remittance transaction construction and release unit, constructs a remittance transaction based on the remittance amount and the allocated reserve amount, and publishes the remittance transaction to the blockchain, so that the remittance transaction is used by the node device in the blockchain After the verification is passed, the remittance amount is deducted from both the account balance and the reserve balance;
其中,所述预备金列表创建单元包括:Wherein, the reserve fund list creation unit includes:
预备金列表生成模块,获得当前的预备金余额,根据当前的预备金余额得到预备金列表;The reserve list generation module obtains the current reserve balance and obtains the reserve list according to the current reserve balance;
预备金列表监测模块,动态监测当前预备金列表中可用于分配的预备金金额是否低于预设阈值。The reserve list monitoring module dynamically monitors whether the amount of reserves available for distribution in the current reserve list is lower than a preset threshold.
根据本说明书一个或多个实施例的第三方面,提出了一种计算机设备,包括:存储器和处理器;所述存储器上存储有可由处理器运行的计算机程序;所述处理器运行所述计算机程序时,执行如上述基于区块链的汇款方法。According to a third aspect of one or more embodiments of this specification, a computer device is proposed, including: a memory and a processor; a computer program executable by the processor is stored on the memory; the processor runs the computer During the procedure, the above-mentioned blockchain-based remittance method is executed.
根据本说明书一个或多个实施例的第四方面,提出了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器运行时,执行上述基于区块链的汇款方法所述的步骤。According to a fourth aspect of one or more embodiments of the present specification, a computer-readable storage medium is provided on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned blockchain-based remittance method is executed The steps described.
本说明书提供的基于区块链的汇款方法及装置,将用户账户的账户余额至少划分为一预备金余额和一备用余额,基于预备金余额生成预备金列表,可将预备金列表包括的多个预备金金额分配给多个汇款交易,支持并发的多个汇款交易;当预备金列表中可用于分配的预备金金额低于预设阈值时,用户端设备将上述备用余额切换为预备金余额并基于该切换后的预备金余额生成新的预备金列表,在新的预备金列表生成完毕后,更新替换原预备金列表,基于新的预备金列表中的预备金金额可发起新的汇款交易。The blockchain-based remittance method and device provided in this manual divide the account balance of the user account into at least a reserve balance and a reserve balance, generate a reserve list based on the reserve balance, and the reserve list can include multiple The reserve amount is allocated to multiple remittance transactions and supports multiple concurrent remittance transactions; when the reserve amount available for distribution in the reserve list is lower than the preset threshold, the client device switches the above reserve balance to a reserve balance and A new reserve list is generated based on the switched reserve balance. After the new reserve list is generated, the original reserve list is updated and replaced, and a new remittance transaction can be initiated based on the reserve amount in the new reserve list.
在本说明书提供的汇款方法及装置中,上述备用余额可在原预备金列表中的预备金金额消耗至预设的阈值时即开启新的预备金列表的初始化操作,待新的预备金列表生成后,可立即切换成基于新的预备金列表生成汇款交易;新预备金列表生成(或被区块链共识验证)期间用户发送的汇款交易仍基于原预备金列表中可用于分配的预备金金额生成;上述切换预备金余额并初始化新的预备金列表的过程可随着既有预备金列表的使用情况(可用于分配的预备金金额是否低于预设阈值)、或应接收到的新的预备金列表构建指令循环执行,因此全程无需暂停发送汇款的交易,提高交易的并发性,且避免交易中断,最大化了区块链交易的吞吐量。In the remittance method and device provided in this specification, the above-mentioned reserve balance can start the initialization operation of the new reserve list when the reserve amount in the original reserve list is consumed to a preset threshold, after the new reserve list is generated , Can immediately switch to generate remittance transactions based on the new reserve list; remittance transactions sent by users during the generation of the new reserve list (or verified by the blockchain consensus) are still generated based on the amount of reserves available for allocation in the original reserve list ; The above process of switching the reserve balance and initializing the new reserve list may follow the use of the existing reserve list (whether the amount of reserve available for distribution is below the preset threshold), or the new reserve that should be received The gold list construction instruction is executed cyclically, so there is no need to suspend the transaction of sending remittances throughout the process, improve the concurrency of the transaction, and avoid transaction interruption, maximizing the throughput of blockchain transactions.
附图说明BRIEF DESCRIPTION
图1是一示例性实施例提供的一种基于区块链的汇款方法的流程图。FIG. 1 is a flowchart of a blockchain-based remittance method provided by an exemplary embodiment.
图2是一示例性实施例提供的一种预备金列表的创建及更新过程的流程图。FIG. 2 is a flowchart of a process of creating and updating a reserve list provided by an exemplary embodiment.
图3是一示例性实施例提供的种在区块链网络中实施汇款交易的示意图。FIG. 3 is a schematic diagram of implementing a remittance transaction in a blockchain network provided by an exemplary embodiment.
图4是一示例性实施例提供的一种在区块链网络中实施更新预备金列表并汇款交易的流程图。FIG. 4 is a flowchart of implementing an updated reserve list and remittance transaction in a blockchain network provided by an exemplary embodiment.
图5是一示例性实施例提供的区块链上用户的账户状态示意图。FIG. 5 is a schematic diagram of a user ’s account status on a blockchain provided by an exemplary embodiment.
图6是一示例性实施例提供的一种基于区块链的用户端设备的示意图。FIG. 6 is a schematic diagram of a blockchain-based user equipment provided by an exemplary embodiment.
图7是一示例性实施例提供的一种基于区块链的汇款装置的示意图。7 is a schematic diagram of a blockchain-based remittance device provided by an exemplary embodiment.
具体实施方式detailed description
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本说明书一个或多个实施例相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本说明书一个或多个实施例的一些方面相一致的装置和方法的例子。Exemplary embodiments will be described in detail here, examples of which are shown in the drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numerals in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of this specification. Rather, 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.
需要说明的是:在其他实施例中并不一定按照本说明书示出和描述的顺序来执行相应方法的步骤。在一些其他实施例中,其方法所包括的步骤可以比本说明书所描述的更多或更少。此外,本说明书中所描述的单个步骤,在其他实施例中可能被分解为多个步骤进行描述;而本说明书中所描述的多个步骤,在其他实施例中也可能被合并为单个步骤进行描述。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 method may include more or fewer steps than described in this specification. In addition, the single step described in this specification may be decomposed into multiple steps for description in other embodiments; and the multiple steps described in this specification may also be combined into a single step in other embodiments description.
图1是一示例性实施例提供的一种基于区块链的汇款方法的流程图,应用于区块链的用户端设备,用户账户的账户余额至少被划分为一预备金余额和一备用余额;其中,所述用户账户包括一动态更新的预备金列表;所述预备金列表包括多个预备金金额。FIG. 1 is a flowchart of a blockchain-based remittance method provided by an exemplary embodiment, which is applied to a user terminal device of a blockchain, and the account balance of a user account is divided into at least a reserve balance and a reserve balance ; Wherein the user account includes a dynamically updated reserve list; the reserve list includes multiple reserve amounts.
上述实施例所述的区块链,具体可指一个各节点设备通过共识机制达成的、具有分布式数据存储结构的P2P网络系统,该区块链内的数据分布在时间上相连的一个个“区块(block)”之内,后一区块包含前一区块的数据摘要,且根据具体的共识机制(如POW、POS、DPOS或PBFT等)的不同,达成全部或部分节点的数据全备份。本领域的技术人员熟知,由于区块链系统在相应共识机制下运行,已收录至区块链数据库内的数据很难被任意的节点篡改,例如采用Pow共识的区块链,至少需要全网51%算力的攻击才有可能篡改已有数据,因此区块链系统有着其他中心化数据库系统无法比拟的保证数据安全、防攻击篡改的特性。由此可知,在本说明书所提供的实施例中,被收录至区块链的分布式数据库中的汇款交易及其他交易不易被攻击或篡改,从而为发布至所述区块链的分布式数据库的交易进行了存证。The blockchain described in the above embodiment may specifically refer to a P2P network system with distributed data storage structure reached by each node device through a consensus mechanism, and the data distribution in the blockchain is connected one by one in time. Within the "block", the latter block contains the data summary of the previous block, and according to the specific consensus mechanism (such as POW, POS, DPOS or PBFT, etc.), all or part of the data of the node is reached. Backup. Those skilled in the art are familiar with the fact that since the blockchain system operates under the corresponding consensus mechanism, the data already included in the blockchain database is difficult to be tampered with by any node. For example, the blockchain using Pow consensus requires at least the entire network Only an attack of 51% of the computing power is possible to tamper with the existing data, so the blockchain system has the characteristics of ensuring data security and preventing attack and tampering that other centralized database systems cannot match. It can be seen that in the embodiments provided in this specification, the remittance transactions and other transactions included in the distributed database of the blockchain are not easy to be attacked or tampered, so that they are distributed to the distributed database of the blockchain The transaction was deposited.
执行本实施例所述的基于区块链的汇款方法的用户端设备,可以为上述区块链的节点设备,也可为与上述区块链的节点设备连接的客户端设备,在本说明书中不作限定。The client device that executes the blockchain-based remittance method described in this embodiment may be the node device of the above-mentioned blockchain, or a client device connected to the node device of the above-mentioned blockchain, in this specification Not limited.
将上述区块链作为一个通用的管理对象状态转换的去中心化平台,用户账户就是有 状态的对象,用户账户所包括的内容可以为上述用户账户的状态所包含的内容,本说明书所提供的用户账户包含账户余额信息和用以支持汇款交易的预备金列表。在本说明书中,为了支持用户可无暂停地发送汇款交易,用户账户中包括一动态更新的预备金列表,所述预备金列表包括多个预备金金额。Using the above blockchain as a universal decentralized platform for managing object state transitions, user accounts are stateful objects, and the content included in the user account can be the content included in the state of the above user account. The user account contains account balance information and a list of reserves to support remittance transactions. In this specification, in order to support users to send remittance transactions without suspension, a dynamically updated reserve list is included in the user account, and the reserve list includes multiple reserve amounts.
上述多个预备金金额可被分配在不同的汇款交易中,为每个汇款交易提供足以支付其汇款额的证明。值得注意的是,本说明书所述的“账户”不限于外部所有账户(EOA)及合约账户(Contract),且也不限定上述预备金列表的具体表现形式,只要包含或管理上述多个预备金金额的数据组织形式,如一维表、二维表、树形数据结构等均属于本说明书所述的预备金列表。本说明书所述的预备金余额和备用余额的值可以不显示在区块链的用户账户状态中,而作为用户客户端可显示或管理的内容;当然,上述预备金余额和备用余额的值也可以显示在区块链的用户账户状态中,在本说明书中不作限定。The above multiple reserve amounts can be allocated to different remittance transactions, providing each remittance transaction with sufficient proof of payment of the remittance amount. It is worth noting that the "account" described in this specification is not limited to all external accounts (EOA) and contract accounts (Contract), and does not limit the specific manifestation of the above reserve list, as long as it contains or manages the above multiple reserves The data organization forms of amounts, such as one-dimensional tables, two-dimensional tables, tree-shaped data structures, etc., all belong to the reserve list described in this manual. The value of the reserve balance and reserve balance described in this specification may not be displayed in the user account status of the blockchain, but as content that can be displayed or managed by the user client; of course, the value of the reserve balance and reserve balance mentioned above It can be displayed in the user account status of the blockchain, and is not limited in this specification.
如图1所示,上述汇款方法可以包括以下步骤:As shown in Figure 1, the above remittance method may include the following steps:
步骤102,响应于用户发起的汇款操作,根据当前的预备金列表为用户提交的汇款额分配对应的预备金金额; Step 102, in response to the remittance operation initiated by the user, allocate a corresponding reserve amount to the remittance amount submitted by the user according to the current reserve list;
步骤104,基于所述汇款额以及分配的所述预备金金额构建汇款交易,并将所述汇款交易发布至区块链,以在所述汇款交易被区块链中的节点设备验证通过后,从所述账户余额和的预备金余额中均扣减所述汇款额。Step 104: Construct a remittance transaction based on the remittance amount and the allocated reserve amount, and publish the remittance transaction to the blockchain, so that after the remittance transaction is verified by the node device in the blockchain, The remittance amount is deducted from both the account balance and the reserve balance.
在上述实施例中,与汇款额对应的预备金金额至少为一个,且与汇款额对应的预备金金额之和应不小于交易的汇款额,从而为该汇款交易提供足以支付的凭证。例如,当前的预备金列表中包含{5,10,15,20}四个预备金金额,对于汇款额为10的汇款交易,用户端设备可从上述四个预备金金额中选出一个预备金金额10(或15或20),将上述一个预备金金额10(或15或20)分配至上述汇款交易中;对应汇款额为12的汇款交易,用户端设备可从上述四份预备金金额中选出一个预备金金额15(或20),将上述一个预备金金额15(或20)分配至上述汇款交易中,也可以从上述四个预备金金额中选出两个预备金金额5和10(或5和15),将上述两个预备金金额15(或20)分配至上述汇款交易中,利用两个预备金金额之和为汇款交易提供足以支付的验证证明。In the above embodiment, the amount of the reserve fund corresponding to the remittance amount is at least one, and the sum of the amount of the reserve fund corresponding to the remittance amount should not be less than the remittance amount of the transaction, thereby providing sufficient proof for the remittance transaction. For example, the current reserve list contains {5,10,15,20} four reserve amounts. For remittance transactions with a remittance amount of 10, the client device can select one reserve from the above four reserve amounts Amount of 10 (or 15 or 20), the above one reserve amount of 10 (or 15 or 20) is allocated to the above remittance transaction; corresponding to the remittance transaction of the remittance amount of 12, the user equipment can choose from the above four reserve amounts Select a reserve amount of 15 (or 20), allocate the above reserve amount of 15 (or 20) to the above remittance transaction, or you can choose two reserve amounts of 5 and 10 from the above four reserve amounts (Or 5 and 15), allocate the above two reserve amounts 15 (or 20) to the above remittance transaction, and use the sum of the two reserve amounts to provide sufficient proof of payment for the remittance transaction.
在一实施例中,汇出方用户与接收方用户可以约定从汇出方区块链账户向接收方区块链账户汇入(或称为转移)对应于该汇款额的资产凭证。资产凭证可以对应于区块链内的代币(token)、数字资产等智能资产,资产凭证还可以对应于区块链外的现金、证 券、优惠券、房产等链外资产,本说明书并不对此进行限制。In an embodiment, the remittance user and the recipient user may agree to transfer (or referred to as transfer) an asset certificate corresponding to the remittance amount from the remittance blockchain account to the recipient blockchain account. Asset certificates can correspond to smart assets such as tokens and digital assets in the blockchain. Asset certificates can also correspond to off-chain assets such as cash, securities, coupons, and real estate outside the blockchain. This manual is not correct. This is restricted.
汇款交易构建完毕后被用户端设备发送至区块链,并接收区块链中节点设备的验证。由于本说明书所提供的基于区块链的汇款方法可以被应用在基于多种共识机制类型的区块链中,因此本说明书既不限定对上述汇款交易执行验证的区块链节点的数量及类型,也不限制上述验证所包含的内容或流程。不过本领域技术人员应知,上述验证至少包含验证汇款交易中的预备金金额之和是否大于或等于汇款交易的汇款额,以检验用户账户是否有足够的余额支付该汇款交易。当上述汇款交易被区块链的节点设备验证通过后,从用户的账户余额和预备金余额中均扣减所述汇款额。After the construction of the remittance transaction is completed, it is sent to the blockchain by the user terminal device and receives the verification of the node device in the blockchain. Since the blockchain-based remittance method provided in this specification can be applied to blockchains based on multiple types of consensus mechanisms, this specification does not limit the number and types of blockchain nodes that perform verification on the above remittance transactions , Does not limit the content or process included in the above verification. However, those skilled in the art should know that the above verification includes at least verifying whether the sum of the reserves in the remittance transaction is greater than or equal to the remittance amount of the remittance transaction, to verify whether the user account has sufficient balance to pay the remittance transaction. After the above remittance transaction is verified by the node device of the blockchain, the remittance amount is deducted from the user's account balance and reserve balance.
图2示意了上述实施例中预备金列表的创建及更新过程,如图2所示该过程可被概括为两个彼此相连的循环步骤:FIG. 2 illustrates the process of creating and updating the reserve list in the above embodiment. As shown in FIG. 2, the process can be summarized as two loop steps connected to each other:
步骤A,获得当前的预备金余额,根据当前的预备金余额得到预备金列表;Step A: Obtain the current reserve balance and obtain a reserve list according to the current reserve balance;
步骤B,动态监测当前预备金列表中可用于分配的预备金金额是否低于预设阈值,如果是则将当前的备用余额切换为预备金余额后,执行步骤A。Step B: dynamically monitor whether the amount of reserves available for allocation in the current reserve list is lower than a preset threshold, and if so, after switching the current reserve balance to the reserve balance, perform step A.
在用户注册为上述区块链的用户后,用户可将账户余额至少划分为一初始化的预备金余额和一初始化的备用余额,用户设备首先基于该初始化的预备金余额执行上述步骤A所述的过程。After the user registers as a user of the above-mentioned blockchain, the user may divide the account balance into at least an initialized reserve balance and an initialized reserve balance. The user equipment first performs the above-mentioned step A based on the initialized reserve balance process.
上述当前的备用余额可在切换后生成新的预备金列表中的预备金金额;可选的,在未被触发以生成新的预备金列表之前,该备用余额即可以作为汇款余额以支持用户发起单独的(不并发)汇款交易,也可以作为收款余额用以接收其他账户汇至该用户账户的汇款;而且,当账户余额包括两个或两个以上的备用余额时,其中有些备用余额还可以不参与汇款或收款,仅作为静止的余额,以在合适的时机(如基于原预备金余额生成的预备金列表中可用于分配的预备金金额低于预设阈值时,或接收到用户发送的新的预备金列表构建指令时)被触发以划分得出新的预备金列表中的预备金金额。The above current reserve balance can generate the reserve amount in the new reserve list after switching; optionally, before being triggered to generate a new reserve list, the reserve balance can be used as a remittance balance to support user initiation Separate (not concurrent) remittance transactions can also be used as a collection balance to receive remittances from other accounts to this user account; and, when the account balance includes two or more backup balances, some of the backup balances You can not participate in remittances or collections, but only as a static balance, at a suitable time (such as the amount of reserves available for distribution in the reserve list generated based on the original reserve balance is lower than the preset threshold, or received by the user The new reserve list construction instruction sent is triggered to divide the reserve amount in the new reserve list.
在一个示出的实施例中,步骤A中所述的根据当前的预备金余额得到预备金列表的过程,包括:In an illustrated embodiment, the process of obtaining a reserve list according to the current reserve balance described in step A includes:
对当前预备金余额进行划分得到多个预备金金额,基于划分得到的多个预备金金额构建预备金列表创建交易;Divide the current reserve balance to obtain multiple reserve amounts, and build a reserve list creation transaction based on the divided reserve amounts;
将所述预备金列表创建交易发布至区块链,以在所述预备金列表创建交易被区块链中的节点设备验证通过后,在所述用户账户基于所述划分得到的多个预备金金额构建预 备金列表。Publish the reserve list creation transaction to the blockchain, so that after the reserve list creation transaction is verified by the node device in the blockchain, multiple reserve funds obtained based on the division in the user account Amount to build a reserve list.
在上述的实施例中,当前的预备金余额可被划分以得到多个预备金金额,为保证上述多个预备金金额得到区块链节点的共识验证,预备金列表创建交易所包含的、基于当前的预备金余额划分得到的多个预备金金额之和应不大于该预备金余额。由于本说明书所提供的基于区块链的汇款方法可以被应用在基于多种共识机制类型的区块链中,因此本说明书既不限定对上述预备金列表创建交易执行验证的区块链节点的数量及类型,也不限制上述验证所包含的内容或流程。不过本领域技术人员应知,上述验证至少包含验证预备金列表创建交易中的预备金金额之和是否小于或等于当前的预备金余额(或当用户的账户状态中不显示预备金余额时,至少应验证预备金列表创建交易中的预备金金额之和是否小于或等于当前的账户余额),以检验上述预备金余额的有效性。当上述预备金列表创建交易被区块链的节点设备验证通过后,在所述用户账户基于预备金列表创建交易所包括的、所述划分得到的多个预备金金额构建预备金列表。In the above embodiment, the current reserve balance can be divided to obtain multiple reserve amounts. To ensure that the multiple reserve amounts are verified by the consensus of the blockchain nodes, the reserve list creation exchange includes, based on The sum of the multiple reserve funds obtained by dividing the current reserve balance should not be greater than the reserve balance. Since the blockchain-based remittance method provided in this specification can be applied to blockchains based on multiple types of consensus mechanisms, this specification does not limit the blockchain nodes that perform verification on the above-mentioned reserve list creation transactions. The number and type also do not limit the content or process included in the above verification. However, those skilled in the art should know that the above verification includes at least verifying whether the sum of the reserves in the reserve list creation transaction is less than or equal to the current reserve balance (or when the user ’s account status does not display the reserve balance, at least It should be verified whether the sum of the reserve amount in the reserve list creation transaction is less than or equal to the current account balance) to verify the validity of the above reserve balance. After the above reserve fund list creation transaction is verified by the node device of the blockchain, a reserve fund list is constructed in the user account based on the multiple reserve fund amounts included in the exchange created by the reserve fund list creation.
在又一示出的实施例中,上述根据当前的预备金余额得到预备金列表,包括:In yet another illustrated embodiment, the above-mentioned obtaining of the reserve fund list according to the current reserve fund balance includes:
对当前预备金余额进行划分得到多个预备金金额,基于划分得到的多个预备金金额构建预备金列表,并基于所述预备金列表构建预备金列表创建交易;Divide the current reserve balance to obtain multiple reserve amounts, build a reserve list based on the divided reserve amounts, and construct a reserve list based on the reserve list to create a transaction;
将所述预备金列表创建交易发布至区块链,以在所述预备金列表创建交易被区块链中的节点设备验证通过后,将所述预备金列表更新至所述用户账户中。Posting the reserve list creation transaction to the blockchain to update the reserve list to the user account after the reserve list creation transaction is verified by the node device in the blockchain.
在上述实施例中,当前的预备金余额可被划分以得到多个预备金金额,基于上述多个预备金金额构建预备金列表,并将上述包括基于当前的预备金余额划分得到的多个预备金金额的预备金列表包括在上述预备金列表创建交易中。为保证上述多个预备金金额得到区块链节点的共识验证,预备金列表创建交易所包含的、基于当前的预备金余额划分得到的多个预备金金额之和应不大于该预备金余额。由于本说明书所提供的基于区块链的汇款方法可以被应用在基于多种共识机制类型的区块链中,因此本说明书既不限定对上述预备金列表创建交易执行验证的区块链节点的数量及类型,也不限制上述验证所包含的内容或流程。不过本领域技术人员应知,上述验证至少包含验证预备金列表创建交易中的预备金金额之和是否小于或等于当前的预备金余额(或当用户的账户状态中不显示预备金余额时,至少应验证预备金列表创建交易中的预备金金额之和是否小于或等于当前的账户余额),以检验上述预备金余额的有效性。当上述预备金列表创建交易被区块链的节点设备验证通过后,将预备金列表创建交易所包括的预备金列表更新至所述用户账户中。In the above embodiment, the current reserve balance may be divided to obtain a plurality of reserve amounts, a reserve list is constructed based on the plurality of reserve amounts, and the above includes a plurality of reserves obtained based on the current reserve balance division The reserve list of the gold amount is included in the above reserve list creation transaction. In order to ensure that the above multiple reserve amounts are verified by the consensus of the blockchain nodes, the sum of the multiple reserve amounts included in the reserve list creation exchange based on the current reserve balance division should not be greater than the reserve balance. Since the blockchain-based remittance method provided in this specification can be applied to blockchains based on multiple types of consensus mechanisms, this specification does not limit the blockchain nodes that perform verification on the above-mentioned reserve list creation transactions. The number and type also do not limit the content or process included in the above verification. However, those skilled in the art should know that the above verification includes at least verifying whether the sum of the reserves in the reserve list creation transaction is less than or equal to the current reserve balance (or when the user ’s account status does not display the reserve balance, at least It should be verified whether the sum of the reserve amount in the reserve list creation transaction is less than or equal to the current account balance) to verify the validity of the above reserve balance. After the above reserve fund list creation transaction is verified by the node device of the blockchain, the reserve fund list included in the reserve fund list creation exchange is updated to the user account.
本领域的技术人员应知,预备金列表中的每个预备金金额是为汇款交易提供足以支付的余额凭证,基于同一预备金金额重复分配的汇款交易无法通过区块链节点的验证。随着越来越多汇款交易的发出,用户账户中当前的预备金列表中可用于分配的预备金金额越来越少。为了在切换准备新的预备金列表时不用暂停发送汇款交易,可以为现有的预备金列表中可用于分配的预备金金额设置一阈值,该阈值既可以是预备金金额的总额度阈值(即剩余可用的预备金金额可支付的最大汇款额阈值),也可以是预备金金额的个数阈值(即剩余可用的预备金余额最多还可用于发送的汇款交易的个数阈值),在用户端设备动态监测到现有的预备金列表中的可用于分配的预备金金额低于上述预设阈值时,则将当前的备用余额切换为预备金余额后,执行上述实施例中步骤A所述的过程。可选的,上述将当前的备用余额切换为预备金余额的步骤还可应用户发出的指令而被触发。Those skilled in the art should know that each reserve amount in the reserve list is to provide a balance certificate sufficient for payment for the remittance transaction, and the remittance transaction that is repeatedly allocated based on the same reserve amount cannot pass the verification of the blockchain node. As more and more remittance transactions are issued, the amount of reserves available for allocation in the current reserve list in the user's account is decreasing. In order not to suspend sending remittance transactions when switching to prepare a new reserve list, you can set a threshold for the amount of reserves available for allocation in the existing reserve list. This threshold can be the total threshold of the reserve amount (ie The maximum remittance threshold that can be paid for the remaining available reserve amount), or it can be the threshold of the amount of the reserve amount (that is, the remaining available reserve balance can be used for the maximum number of remittance transactions sent), on the user side When the device dynamically detects that the amount of reserves available for distribution in the existing reserve list is lower than the preset threshold, the current reserve balance is switched to the reserve balance, and then the step A in the above embodiment is executed. process. Optionally, the above step of switching the current reserve balance to the reserve balance can also be triggered in response to an instruction issued by the user.
区块链的节点设备(包括用户端设备)发布、共识验证、在用户账户的状态中更新新的预备金列表的过程通常需要消耗一定的时间,具体消耗时长与该区块链的共识机制、出块频率等相关。在此期间,若用户有新的汇款交易的发送需求,由于用户账户中当前的预备金列表仍处在生效状态,可仍基于当前预备金列表中可用于分配的预备金金额构建汇款交易。在新的预备金列表被更新至用户账户后,该新的预备金列表即可作为用户账户中当前的预备金列表,用户即可基于该当前预备金金列表构建汇款交易,并向区块链发布汇款交易;相应的,在上述汇款交易被区块链中的节点设备验证通过后,从所述账户余额和所述切换后的预备金余额中均扣减所述汇款额。The process of the release of node devices (including user equipment) of the blockchain, consensus verification, and updating of the new reserve list in the state of the user account usually require a certain amount of time. The specific consumption time and the consensus mechanism of the blockchain, Block frequency and other related. During this period, if the user has a need to send a new remittance transaction, because the current reserve list in the user's account is still in effect, the remittance transaction can still be constructed based on the amount of reserve available for allocation in the current reserve list. After the new reserve fund list is updated to the user account, the new reserve fund list can be used as the current reserve fund list in the user account, and the user can construct a remittance transaction based on the current reserve fund list, and submit to the blockchain The remittance transaction is issued; accordingly, after the above remittance transaction is verified by the node device in the blockchain, the remittance amount is deducted from both the account balance and the switched reserve balance.
本说明书提供的汇款方法,由于用户账户中始终存在一生效的预备金列表,因此而无需暂停汇款交易,最大化了交易吞吐量。The remittance method provided in this manual, since there is always a valid reserve list in the user account, there is no need to suspend remittance transactions, which maximizes the transaction throughput.
在一示出的实施例中,为分辨预备金列表中可用于分配的预备金金额,可以标记预备金列表中的预备金金额的使用状态。当一包括预备金金额的汇款交易被区块链中的节点设备验证通过,并在区块链的分布式数据库内收录该汇款交易、且更新该汇款交易的汇出方用户的账户余额时,该汇款交易所包含的预备金金额应在汇出方账户的预备金列表中被标识为已使用状态(状态3),本领技术人员熟知,上述被收录在区块链的分布式数据库中的汇款交易可称为“已完成的汇款交易”。对于新的尚未完成的汇款交易,区块链中的节点设备可验证上述新的尚未完成的汇款交易中的预备金金额在汇出方用户账户的预备金列表中的状态是否为已使用状态:如果是已使用状态,则该项验证不通过,相应的新的尚未完成的汇款交易可以被退回;如果不是已使用状态,则该项验证通 过。类似地,当该新的汇款交易通过验证后在区块链的分布式数据库中更新时,区块链节点也应将该新的汇款交易中包含的预备金金额在汇出方用户账户的预备金列表中更新为“已使用状态”。In an illustrated embodiment, in order to distinguish the amount of reserves available for allocation in the reserve list, the usage status of the amount of reserves in the reserve list may be marked. When a remittance transaction including the reserve amount is verified by the node device in the blockchain, and the remittance transaction is included in the distributed database of the blockchain, and the account balance of the remittance user of the remittance transaction is updated, The amount of reserves included in the remittance exchange should be marked as used in the reserve list of the remittance account (state 3), as those skilled in the art are familiar with, the above remittances included in the distributed database of the blockchain The transaction may be referred to as "a completed remittance transaction". For new unfinished remittance transactions, the node device in the blockchain can verify whether the status of the reserve amount in the new unfinished remittance transaction in the remittance user account's reserve list is used: If it is in the used state, the verification fails, and the corresponding new outstanding remittance transaction can be returned; if it is not in the used state, the verification is passed. Similarly, when the new remittance transaction is verified and updated in the distributed database of the blockchain, the blockchain node should also reserve the amount of the reserve included in the new remittance transaction in the remittance user account. The gold list is updated to "used status".
更优的,用户端设备还可将未被使用过的、亦即还未被分配至任何汇款交易的预备金金额可在预备金列表中标记为未使用状态(状态1);一预备金金额一旦被分配于一个汇款交易,该预备金金额可在用户账户的预备金列表中即刻被标识为被使用状态(状态2),亦即在用户端保存的当前预备金列表中将上述预备金金额标定为被使用状态(状态2)。由此,用户端设备仅能分配未使用状态(状态1)的预备金金额用于新的汇款交易,且在分配后将该被分配的预备金金额随即在本地更改为被使用状态(状态2),以防止对同一预备金金额的重复分配。More preferably, the client device can also mark the unused reserve amount that has not been allocated to any remittance transaction as unused in the reserve list (state 1); a reserve amount Once allocated to a remittance transaction, the amount of the reserve can be immediately marked as used in the reserve list of the user account (state 2), that is, the above reserve amount in the current reserve list saved on the user side Calibration is used (state 2). Therefore, the client device can only allocate the reserve amount in the unused state (state 1) for new remittance transactions, and after the allocation, the allocated reserve amount is immediately changed to the used state locally (state 2) ) To prevent double allocation of the same reserve amount.
在一示出的实施例中,在根据当前的预备金余额得到预备金列表之后,将切换前的预备金余额切换为备用余额。In an illustrated embodiment, after the reserve list is obtained according to the current reserve balance, the reserve balance before switching is switched to a reserve balance.
在用户端设备根据上述实施例所述的过程根据当前的预备金金额得到预备金列表之后,此时,由于新的预备金列表已经作为当前预备金列表可用于新的汇款交易,原预备金列表可以停止用作汇款交易,相应的,原预备金余额可被切换为备用余额,以在现有当前的预备金列表中的预备金金额低于预设阈值或接收到新的预备金列表构建指令时,基于该当前的预备余额构建新的预备金列表。After the user equipment obtains the reserve list according to the current reserve amount according to the process described in the above embodiment, at this time, since the new reserve list has been used as the current reserve list for new remittance transactions, the original reserve list Can be used as a remittance transaction. Correspondingly, the original reserve balance can be switched to a standby balance, so that the reserve amount in the current current reserve list is lower than the preset threshold or a new reserve list construction instruction is received At this time, a new reserve list is constructed based on the current reserve balance.
更优地,为优化管理用户账户中的各余额,本说明书所述的备用余额可用作收款余额,当其他用户发起对上述用户账户的汇款交易被区块链的节点设备验证通过后,该汇款交易中的汇款额将被增加至所述收款余额和所述账户余额。More preferably, in order to optimize the management of each balance in the user account, the standby balance described in this specification can be used as the collection balance. When the remittance transaction initiated by the other user to the user account is verified by the node device of the blockchain, The amount of remittance in this remittance transaction will be added to the balance of the payment and the balance of the account.
为保护区块链用户的账户隐私安全,在现有的一些区块链中,用户的账户余额、及汇款交易的交易额均被加密;本说明书所提供的汇款方法也可以用于隐私模式的区块链中。In order to protect the privacy of the blockchain user's account, in some existing blockchains, the user's account balance and the transaction amount of the remittance transaction are encrypted; the remittance method provided in this manual can also be used in the privacy mode In the blockchain.
在一示出的实施例中,区块链用户账户的账户余额、预备金列表中的预备金金额、用户设备发起的汇款交易中的汇款额均被预先进行了加密处理。由于汇款交易所包括的汇款额及预备金金额均为加密状态,为保证区块链节点可以验证上述被分配至汇款交易的预备金金额足以支付本次汇款,上述汇款交易中还应包括用以证明为所述汇款交易包括的预备金金额之和大于或等于所述汇款交易的汇款额的第一零知识证明。In an illustrated embodiment, the account balance of the blockchain user account, the amount of reserves in the reserve list, and the amount of remittance in the remittance transaction initiated by the user device are all encrypted in advance. Since the remittance amount and reserve amount included in the remittance exchange are encrypted, in order to ensure that the blockchain node can verify that the above reserve amount allocated to the remittance transaction is sufficient to pay for the remittance, the above remittance transaction should also include The proof is the first zero-knowledge proof that the sum of the reserves included in the remittance transaction is greater than or equal to the remittance amount of the remittance transaction.
相应地,由于用户账户的账户余额及用户基于切换后的预备金余额划分得到的多个 预备金金额均被预先进行了加密处理,为保证区块链节点可以验证预备金列表创建交易所包含的预备金金额之和没有超出用户的账户余额,上述预备金列表创建交易还应包括用以证明基于切换后的预备金余额划分出的多个预备金金额之和小于或等于所述用户的账户余额的第二零知识证明。Correspondingly, since the account balance of the user account and the multiple reserve amounts obtained by the user based on the switched reserve balance are encrypted in advance, in order to ensure that the blockchain node can verify the reserve list, the exchange included in the creation of the exchange The sum of the reserve amount does not exceed the user's account balance. The above reserve list creation transaction should also include a proof that the sum of the multiple reserve amounts divided based on the switched reserve balance is less than or equal to the user's account balance The second zero knowledge proof.
零知识证明,通常指的是证明者(被验证者)能够在不向验证者提供任何有用的信息的情况下,使验证者相信某个论断是正确的。在本说明书中,用户端设备可通过提供第一零知识证明,使得区块链中的节点(验证者)在不获知汇款额、及预备金金额的具体值的情况下,可以相信为汇款交易所分配的预备金金额的具体值之和大于或者等于所述汇款额的具体值,足以支付上述汇款交易,亦即使得区块链中的节点(验证者)基于零知识证明算法针对所述第一零知识证明进行零知识验证,以确认为所述汇款交易所分配的预备金金额之和是否大于或者等于所述汇款额。同理,用户端设备可通过提供第二零知识证明,使得区块链中的节点(验证者)在不获知用户账户的账户余额、及预备金列表创建交易所包含的预备金金额的实际值(明文)情况下,可以相信预备金列表创建交易中所包含的多个预备金金额之和是否不大于上述用户账户的账户余额。Zero-knowledge proof usually refers to that the prover (verified person) can make the verifier believe that an argument is correct without providing the verifier with any useful information. In this specification, the user equipment can provide the first zero-knowledge proof, so that the node (verifier) in the blockchain can believe that it is a remittance transaction without knowing the specific value of the remittance amount and reserve amount The sum of the specific value of the allocated reserve amount is greater than or equal to the specific value of the remittance amount, which is sufficient to pay for the above remittance transaction, that is, the node (verifier) in the blockchain is based on the zero-knowledge proof algorithm for the first A zero-knowledge certificate performs zero-knowledge verification to confirm whether the sum of the reserve funds allocated to the remittance exchange is greater than or equal to the remittance amount. In the same way, the client device can provide the second zero-knowledge proof so that the nodes (verifiers) in the blockchain do not know the account balance of the user account and the actual value of the reserve amount included in the reserve list. In the case of (clear text), it can be believed whether the sum of the amount of multiple reserves included in the reserve list creation transaction is not greater than the account balance of the above user account.
在一示出的实施例中,当用户账户中的预备金余额、备用余额也被显示在用户账户的状态中,即区块链上的其他节点可通过查询用户账户状态,获知本用户设备的预备金余额和备用余额时,为保护用户的账户隐私安全,用户账户的预备金余额和备用余额也被预先进行了加密处理,此时上述的第二零知识证明可用于证明基于切换后的预备金余额划分出的多个预备金金额之和小于或等于所述切换后的预备金余额。由于上述切换后的预备金余额是基于账户余额划分得到的,该预备金余额必定小于账户余额,所以上述的第二零知识证明也可为区块链节点验证预备金列表创建交易所包含的预备金金额之和不大于账户余额提供了有效的证明。In the illustrated embodiment, when the reserve balance and reserve balance in the user account are also displayed in the status of the user account, that is, other nodes on the blockchain can learn the status of the user device by querying the status of the user account In the case of reserve balance and reserve balance, in order to protect the privacy of the user's account, the reserve balance and reserve balance of the user account are also encrypted in advance. At this time, the above second zero knowledge proof can be used to prove the preparation based on the switch The sum of the multiple reserve funds divided by the gold balance is less than or equal to the reserve balance after the switching. Since the reserve balance after the switch is based on the account balance, the reserve balance must be smaller than the account balance, so the above second zero knowledge proof can also be used for blockchain nodes to verify the reserve list and create an exchange. The sum of the gold amount is not greater than the account balance provides valid proof.
本说明书并不限定上述密码学加密算法的类型,可以包括加法同态加密算法或全同态加密算法,还可包括同态承诺算法(如Pederson Commitment等),只要确保该加密算法能够满足加法同态并且能够支持验证一明文数据属于某个区间的零知识证明,使得加密的汇出方用户的账户余额(或预备金余额)可直接扣除加密的汇款额,加密的接收方用户的账户余额可直接增加加密的汇款额。This specification does not limit the types of cryptographic encryption algorithms mentioned above, and can include addition homomorphic encryption algorithms or fully homomorphic encryption algorithms, and can also include homomorphic commitment algorithms (such as Pederson Commitment, etc.), as long as the encryption algorithm can meet the addition homology It can also support zero-knowledge proof that a plaintext data belongs to a certain range, so that the account balance (or reserve balance) of the encrypted sender user can be directly deducted from the encrypted remittance amount, and the account balance of the encrypted receiver user can be Directly increase the amount of encrypted remittances.
例如,上述区块链可以支持基于椭圆曲线的Pedersen Commitment承诺算法,用以保证区块链中被加密的数额可以在加密状态被验证数额范围、且可实现加法同态。For example, the above-mentioned blockchain can support the Pedersen Commitment Commitment Algorithm based on elliptic curves to ensure that the encrypted amount in the blockchain can be verified in the encrypted state, and the addition homomorphism can be achieved.
本说明书并不限定上述第一零知识证明、第二零知识证明的具体类型,例如可以采 用相关技术中的区间证明(Range Proof)技术,譬如Bulletproofs方案或“zksnark”通用零知识证明技术等。This specification does not limit the specific types of the first zero-knowledge proof and the second zero-knowledge proof. For example, Range Proof technology in related technologies, such as the Bulletproofs scheme or the “zksnark” universal zero-knowledge proof technology, can be used.
在又一示出的实施例中,为防止区块链中用户节点作恶对区块链进行攻击,上述汇款交易中还可包括用以证明所述汇款额大于或等于零的第三零知识证明,上述第三零知识证明可基于所述被加密的汇款额生成,使得区块链中的节点(验证者)在不获知汇款额的实际值(明文)情况下,可以验证汇款交易的汇款额不小于零。In yet another illustrated embodiment, in order to prevent user nodes in the blockchain from maliciously attacking the blockchain, the above remittance transaction may also include a third zero knowledge proof to prove that the remittance amount is greater than or equal to zero, The above third zero-knowledge proof can be generated based on the encrypted remittance amount, so that the node (verifier) in the blockchain can verify the remittance amount of the remittance transaction without knowing the actual value of the remittance amount (clear text) Less than zero.
在又一示出的实施例中,为防止区块链中用户节点作恶生成无效的预备金金额,预备金列表创建交易中还可包括用以证明上述预备金列表创建交易所包含的每个预备金金额均大于或等于零的第四零知识证明,上述第四零知识证明可基于各个预备金金额生成,使得区块链中的节点(验证者)在不获知各个预备金金额的实际值(明文)情况下,可以验证预备金列表创建交易中包含的每个预备金金额均大于或等于零。In another embodiment shown, in order to prevent user nodes in the blockchain from generating an invalid reserve amount, the reserve list creation transaction may also include each provision included in the reserve list creation exchange to prove The fourth zero knowledge proof that the gold amount is greater than or equal to zero. The above fourth zero knowledge proof can be generated based on each reserve amount, so that the nodes (verifiers) in the blockchain do not know the actual value of each reserve amount (clear text) ), You can verify that each reserve amount included in the reserve list creation transaction is greater than or equal to zero.
在本说明书又一示出的实施例中,上述汇款交易及预备金列表创建交易还可包括用户端设备基于用户账户的私钥所作的数字签名,用以供区块链的节点对电子签名进行验证,防止其他节点冒充汇出方而发布上述第一交易,发布错误信息、恶意扰乱交易秩序。In another embodiment shown in this specification, the above-mentioned remittance transaction and reserve list creation transaction may further include a digital signature made by the user terminal device based on the private key of the user account to be used by the blockchain node to perform the electronic signature Verification to prevent other nodes from pretending to be the remittance party and publishing the above first transaction, publishing wrong information, and maliciously disturbing the order of the transaction.
本说明书提供的基于区块链的汇款方法,通过将用户账户的账户余额至少划分为一预备金余额和一备用余额,基于预备金余额构建包含多个预备金金额的预备金列表,为用户账户并发汇款交易提供可支付证明;在上述预备金列表中的可用预备金金额低于预设阈值时,或接到新的预备金列表构建指令时,再将上述备用余额切换为预备金月,基于上述切换后的预备金余额构建包含多个预备金金额的新的预备金列表;在新的预备金列表被区块链节点验证通过、新的预备金列表被更新至用户账户后,用户账户再基于新的预备金列表构建新的汇款交易。上述预备金列表切换的过程中,汇款交易可仍基于原预备金列表构建而无需暂停;且而上述切换预备金余额并创建新的预备金列表的过程可随着当前预备金列表的使用情况(可用于分配的预备金金额是否低于预设阈值)、或应接收到的新的预备金列表构建指令循环执行,因此全程无需暂停发送汇款的交易,提高交易的并发性,且避免交易中断,最大化了区块链交易的吞吐量。The blockchain-based remittance method provided in this manual divides the account balance of the user account into at least a reserve balance and a reserve balance, and builds a reserve list containing multiple reserve amounts based on the reserve balance, which is a user account Concurrent remittance transactions provide proof of payment; when the available reserve amount in the above reserve list is lower than the preset threshold, or when a new reserve list construction instruction is received, the above reserve balance is switched to the reserve month, based on The above-mentioned switched reserve balance builds a new reserve list containing multiple reserve amounts; after the new reserve list is verified by the blockchain node and the new reserve list is updated to the user account, the user account Build new remittance transactions based on the new reserve list. In the process of switching the reserve list, the remittance transaction can still be constructed based on the original reserve list without suspension; and the process of switching the reserve balance and creating a new reserve list can be used according to the current use of the reserve list ( Whether the amount of reserves available for distribution is lower than the preset threshold), or the new reserve list construction instructions that should be received are executed cyclically, so there is no need to suspend the transaction of sending remittances throughout the process, improve the concurrency of transactions, and avoid transaction interruptions Maximized the throughput of blockchain transactions.
为了便于理解,下面以区块链网络中的汇款交易为例,对本说明书的技术方案进行详细说明。图3是一示例性实施例提供的一种在区块链网络中实施汇款交易和预备金列表交易的示意图。假定用户A使用的汇出方设备为用户设备1,譬如该用户设备1上登录有对应于用户A的用户账号;类似地,用户B使用的接收方设备为用户设备2。用户设备1上可以运行有区块链的客户端程序,使得该用户设备1在区块链网络中存在对应 的区块链节点,比如图2所示的节点1。类似地,用户设备2上可以运行有区块链的客户端程序,使得该用户设备2在区块链网络中存在对应的区块链节点,比如图3所示的节点2。区块链网络中还存在其他区块链节点,比如图3所示的节点i等。通过上述的节点1、节点2、节点i等,使得用户A与用户B之间的汇款交易、及用户A发送的预备金列表创建交易可以经由区块链网络实施,相关交易信息可以被记录至各个区块链节点分别维护的区块链账本中,可以避免发生篡改,并有助于后续查验。In order to facilitate understanding, the following uses the remittance transaction in the blockchain network as an example to describe the technical solution of this specification in detail. FIG. 3 is a schematic diagram of implementing a remittance transaction and a reserve list transaction in a blockchain network provided by an exemplary embodiment. Assume that the exporter device used by user A is user device 1, for example, a user account corresponding to user A is registered on user device 1; similarly, the receiver device used by user B is user device 2. The user device 1 may run a client program of the blockchain, so that the user device 1 has a corresponding blockchain node in the blockchain network, such as the node 1 shown in FIG. 2. Similarly, the user equipment 2 may run a client program of the blockchain, so that the user equipment 2 has a corresponding blockchain node in the blockchain network, such as the node 2 shown in FIG. 3. There are other blockchain nodes in the blockchain network, such as the node i shown in Figure 3. Through the above node 1, node 2, node i, etc., the remittance transaction between user A and user B, and the reserve list creation transaction sent by user A can be implemented through the blockchain network, and related transaction information can be recorded to In the blockchain ledger maintained by each blockchain node, tampering can be avoided, and it is helpful for subsequent inspections.
例如,由用户A向用户B进行区块链汇款。用户A在注册账户后,首先应发送预备金列表创建交易以初始化其账户中的预备金列表。其中,本说明书中的“用户”可以表现为所登录的用户账号,而该用户账号实际可以归属于个人或组织,本说明书并不对此进行限制。For example, user A transfers blockchain money to user B. After user A registers an account, he should first send a reserve list to create a transaction to initialize the reserve list in his account. Among them, the "user" in this manual can be represented as the logged-in user account, and the user account can actually belong to an individual or organization, and this manual does not limit this.
如图5所示,在上述区块链中,用户A的账户余额s_A被分为两个子余额:s_A_1和s_A_2,用户B的账户余额s_B也被分为两个子余额:s_B_1和s_B_2。用户A的账户余额s_A、子余额s_A_1和s_A_2及用户B的账户余额s_B、子余额s_B_1和s_B_2均基于加密算法被加密:As shown in FIG. 5, in the above blockchain, user A's account balance s_A is divided into two sub-balances: s_A_1 and s_A_2, and user B's account balance s_B is also divided into two sub-balances: s_B_1 and s_B_2. User A's account balances s_A, sub balances s_A_1 and s_A_2 and user B's account balances s_B, sub balances s_B_1 and s_B_2 are all encrypted based on the encryption algorithm:
S_A=HE(s_A),S_A_1=HE(s_A_1),S_A_2=HE(s_A_2);S_A = HE (s_A), S_A_1 = HE (s_A_1), S_A_2 = HE (s_A_2);
S_B=HE(s_B),S_B_1=HE(s_B_1),S_B_2=HE(s_B_2)。S_B = HE (s_B), S_B_1 = HE (s_B_1), S_B_2 = HE (s_B_2).
在一实施例中,上述加密算法可以为Pederson Commitment同态承诺算法。In an embodiment, the above encryption algorithm may be a Pederson Commitment homomorphic commitment algorithm.
初始时,子余额s_A_1作为预备金余额,s_A_2作为收款余额,子余额s_B_1作为预备金余额,s_B_2作为收款余额。Initially, the sub balance s_A_1 is the reserve balance, s_A_2 is the collection balance, the sub balance s_B_1 is the reserve balance, and s_B_2 is the collection balance.
图4示意了用户A设置预备金列表M A并基于预备金列表M A发起汇款交易的过程。设置用户A的预备金列表M A的过程包括以下步骤: Figure 4 illustrates a user setting A M A reserve list and initiate the process of remittance transactions based on the reserve list M A. The process of setting up user A's reserve list M A includes the following steps:
步骤401,用户A建立预备金列表M A,上述预备金列表M A包括用户A针对子余额s_A_1划分得到的、被基于上述的同态加密算法HE加密的、多个预备金金额M A[1],M A[2],…,M A[L A],并在上述预备金列表中将上述预备金金额M A[1],M A[2],…,M A[L A]的使用状态标记为“未使用状态”。 Step 401, establishing the reserve list of the user A M A, M A above the reserve list for user A includes sub-dividing the balance s_A_1 obtained is, a plurality of reserve based on the amount of M A homomorphic encryption algorithm encryption HE [1 ], M A [2], ..., M A [L A ], and the amount of the above reserves M A [1], M A [2], ..., M A [L A ] The use status is marked as "unused status".
具体实现时,用户A可对子余额s_A_1或子余额s_A_1的部分余额进行划分,得到上述多个预备金金额的明文m a[1],m a[2],…,m a[L A],并基于上述同态加密算法对上述多个预备金金额加密,以得到预备金金额密文M A[1],M A[2],…,M A[L A];用户A也可以对子余额s_A_1的密文S_A_1直接进行划分以得到M A[1],M A[2],…,M A[L A], 并基于上述同态加密算法的进行逆运算,获知上述预备金金额密文对应的明文m a[1],m a[2],…,m a[L A]。用户A可将上述预备金金额的明文m a[1],m a[2],…,m a[L A]与密文M A[1],M A[2],…,M A[L A]的对应关系独自保存,以方便用户A在具体的汇款交易中选取合适的预备金金额。或者,用户A可仅在本地用户端保存上述预备金金额的明文,用户端周期性地从区块链上同步账户数据,将从区块链上获取的加密数据解密后,即可得到已被使用的预备金金额。 In specific implementation, the user A may s_A_1 or sub-sub-balance balance balance s_A_1 portion is divided, to obtain a plurality of the above-described reserve amount plaintext m a [1], m a [2], ..., m a [L A] , And based on the above homomorphic encryption algorithm to encrypt the above multiple reserve amounts to obtain the reserve amount ciphertext M A [1], M A [2], ..., M A [L A ]; User A can also The ciphertext S_A_1 of the sub-balance s_A_1 is directly divided to obtain M A [1], M A [2], ..., M A [L A ], and based on the inverse operation of the above homomorphic encryption algorithm, the amount of the above reserve is obtained ciphertext corresponding to the plaintext m a [1], m a [2], ..., m a [L a]. User A may plaintext m above the reserve amount of a [1], m a [ 2], ..., m a [L A] and ciphertext M A [1], M A [2], ..., M A [ The corresponding relationship of L A ] is saved separately, so that user A can choose the appropriate reserve amount in the specific remittance transaction. Alternatively, user A can only save the plain text of the above reserve amount on the local user terminal. The user terminal periodically synchronizes the account data from the blockchain, and decrypts the encrypted data obtained from the blockchain to obtain the The amount of reserves used.
步骤402,用户A生成零知识证明PF[s_A_1≥(m a[1]+m a[2]+…+m a[L A])],用于证明上述预备金列表M A中的M A[1],M A[2],…,M A[L A]对应的预备金金额m a[1],m a[2],…,m a[L A]之和小于或者等于用户A的子余额s_A_1,上述零知识证明PF[s_A_1≥(m a[1]+m a[2]+…+m a[L A])]不使用预备金金额m a[1],m a[2],…,m a[L-A]及s_A_1的值,即可使验证者相信m a[1],m a[2],…,m a[L A]之和小于或者等于s_A_1。在一实施例中,上述零知识证明PF[s_A_1≥(m a[1]+m a[2]+…+m a[L A])]可使用zksnark等通用零知识证明技术或Bulletproof方案等区间证明技术。 Step 402, the user A generates a zero-knowledge proof PF [s_A_1≥ (m a [1 ] + m a [2] + ... + m a [L A])], used to demonstrate the above-described reserve list of M A M A [1], m a [2 ], ..., m a [L a] corresponding to the reserve amount m a [1], m a [2], ..., m a [L a] of less than or equal to the user a the sub-balance s_A_1, the above-described zero-knowledge proof PF [s_A_1≥ (m a [1 ] + m a [2] + ... + m a [L a])] without the use of the reserve amount m a [1], m a [ 2], ..., m a [ LA] and the value of s_A_1 can verifier believes m a [1], m a [2], ..., m a [L a] is less than or equal to the sum of s_A_1. In an embodiment, the above zero-knowledge proof PF [s_A_1≥ (m a [1] + m a [2] +… + m a [L A ])] can use general zero-knowledge proof technology such as zksnark or Bulletproof scheme, etc. Interval proof technology.
步骤403,用户A生成零知识证明PF(m a[i]≥0),用以证明上述预备金列表M A中的M A[1],M A[2],…,M A[L A]对应的预备金金额m a[1],m a[2],…,m a[L A]均不小于零。上述零知识证明PF(m a[i]≥0)不使用预备金金额m a[i]的值即可使验证者相信m a[i]≥0。在一实施例中,上述零知识证明PF(m a[i]≥0)可使用Borromean环签名方案或zksnark等通用零知识证明技术方案等区间证明技术。 Step 403, the user A generates a zero-knowledge proof PF (m a [i] ≥0 ), to prove the above-described reserve list of M A M A [1], M A [2], ..., M A [L A ] corresponding to the amount of reserve m a [1], m a [2], ..., m a [L a] is not less than zero. Above zero-knowledge proof PF (m a [i] ≥0 ) without the use of the reserve amount m a [i] values to the verifier believes that the m a [i] ≥0. In an embodiment, the above-mentioned zero-knowledge proof PF (m a [i] ≥0) may use the interval proof technique such as the Borromean ring signature scheme or the general zero-knowledge proof technical scheme such as zksnark.
步骤404,用户A基于M A、PF[s_A_1≥(m a[1]+m a[2]+…+m a[L-A])]、PF(m a[i]≥0)生成数字签名Sign A s。 Step 404, the user A M A, PF [s_A_1≥ ( m a [1] + m a [2] + ... + m a [LA])], PF (m a [i] ≥0) generating a digital signature based Sign A s.
步骤405,用户A向所述区块链发送交易T s以确定上述的预备金列表M A,上述交易T s包括M A、PF[s_A_1≥(m a[1]+m a[2]+…+m a[L A])]、PF(m a[i]≥0),其中1<=i<=L_A,和Sign A sIn step 405, user A sends a transaction T s to the blockchain to determine the above reserve list M A , and the above transaction T s includes M A and PF [s_A_1≥ (m a [1] + m a [2] + … + M a [L A ])], PF (m a [i] ≥ 0), where 1 <= i <= L_A, and Sign A s .
步骤406,区块链的节点接收上述交易T sStep 406, the node of the blockchain receives the above transaction T s .
步骤407,区块链的节点执行对上述交易T s的电子签名Sign A s验证,如果通过,执行下个步骤。 In step 407, the node of the blockchain performs the verification of the electronic signature Sign A s of the above transaction T s , and if it passes, the next step is performed.
步骤408,区块链的节点基于零知识证明算法对PF[s_A_1≥(m a[1]+m a[2]+…+m a[L A])]进行零知识验证,以确认m a[1],m a[2],…,m a[L A]之和是否小于或者等于所述用户A的子余额s_A_1;如果是,执行下个步骤。 408, the step of block chain of nodes PF [s_A_1≥ (m a [1 ] + m a [2] + ... + m a [L A])] is zero-knowledge proof algorithm based on zero-knowledge proof to confirm m a [1], m a [2 ], ..., m a [L a] is less than or equal to the sum of the sub-balance s_A_1 user a; if yes, performing next step.
步骤409,区块链的节点基于零知识证明算法对PF(m a[i]≥0)进行零知识验证,以确认(m a[i]≥0均不小于零,其中1<=i<=L_A;如果是,执行下个步骤。 Step 409, the nodes of the blockchain perform zero-knowledge verification on PF (m a [i] ≥0) based on the zero-knowledge proof algorithm to confirm that (m a [i] ≥0 is not less than zero, where 1 <= i < = L_A; if yes, go to the next step.
步骤410,区块链的节点将通过验证的交易T s收录至所述区块链的分布式数据库,并将预备金列表M A更新至所述用户A的账户状态。 Step 410, the node of the blockchain records the verified transaction T s into the distributed database of the blockchain, and updates the reserve list M A to the account status of the user A.
至此,区块链的节点完成了对用户A的预备金列表M A的更新,本领域的技术人员熟知,在设置或更新用户A的预备金列表M A的实际实施过程中,还可包括许多其他的验证步骤,例如防重放的验证等,在此不做限定;而且本说明书并不限定生成各个证明或电子签名的先后顺序,也不限定区块链中的节点对汇出方提出的交易Ts中各项证明或电子签名的验证的先后顺序,图4仅仅是本说明书提供的设置用户的预备金列表的方法的一种实施例,本说明书不限于此。用户B账户中的预备金列表MB的设置过程与上述步骤401至410的过程相似,在此不再赘述。 At this point, the node of the blockchain has completed the update of user A's reserve list M A. Those skilled in the art are familiar with the fact that in the actual implementation process of setting or updating user A's reserve list M A , there may be many Other verification steps, such as anti-replay verification, etc., are not limited here; and this specification does not limit the sequence of generating each certificate or electronic signature, nor does it limit the nodes in the blockchain to the exporter. The sequence of verification of various certificates or electronic signatures in the transaction Ts. FIG. 4 is only an embodiment of a method for setting a user's reserve list provided in this specification, and this specification is not limited to this. The setting process of the reserve fund list MB in the user B account is similar to the above steps 401 to 410, and will not be repeated here.
图4中的区块链执行用户A向用户B汇款转账的过程如下:The blockchain in Figure 4 performs the process of remittance and transfer from user A to user B as follows:
步骤411,用户A基于上述同态加密算法生成汇款额密文S t=HE(s_t),其中s_t为用户A向用户B转账的汇款额。 Step 411: User A generates a remittance amount ciphertext S t = HE (s_t) based on the above homomorphic encryption algorithm, where s_t is the amount of remittance transferred from user A to user B.
步骤412,用户A从预备金列表M A中选取一个未使用过的、且其明文m A[k]足以支付汇款额s_t的预备金金额密文M A[k],并将该预备金金额密文M A[k]标记为被使用状态,以使M A[k]不可再被指定在其他新的汇款交易中。 In step 412, the user A selects an unused reserve ciphertext M A [k] from the reserve list M A whose plaintext m A [k] is sufficient to pay the remittance amount s_t, and transfers the reserve amount The ciphertext M A [k] is marked as being used so that M A [k] can no longer be designated in other new remittance transactions.
步骤413,用户A生成零知识证明Pf(m A[k]≥s_t),用以证明M A[k]对应的预备金金额m A[k]足以支付本次汇款额s_t;上述零知识证明Pf(m A[k]≥s_t)不使用m A[k]及s_t的值,即可使验证者相信m A[k]≥s_t。 Step 413, the user A generates a zero-knowledge proof Pf (m A [k] ≥s_t ), to prove M A [k] corresponding to the amount of reserve m A [k] is sufficient to pay remittances this S_T; above-zero-knowledge proof Pf (m A [k] ≥s_t) without using the values of m A [k] and s_t can convince the verifier that m A [k] ≥s_t.
步骤414,用户A生成零知识证明Pf(s_t≥0),用以证明汇款额s_t不小于零;上述上述零知识证明Pf(s_t≥0)不使用s_t的值,即可使验证者相信s_t≥0。Step 414: User A generates a zero-knowledge proof Pf (s_t≥0) to prove that the remittance amount s_t is not less than zero; the above-mentioned zero-knowledge proof Pf (s_t≥0) does not use the value of s_t, so that the verifier can believe s_t ≥0.
步骤415,用户A基于St、M A[k]、Pf(m A[k]≥s_t)、Pf(s_t≥0)生成数字签名Sign A tStep 415, the user A based St, M A [k], Pf (m A [k] ≥s_t), Pf (s_t≥0) generating a digital signature Sign A t.
步骤416,用户A向所述区块链发送交易T t以向用户B汇款转账,交易T t包括S t、M A[k]、Pf(m A[k]≥s_t)、Pf(s_t≥0)及Sign A t,上述内容均为密文状态,因此保护了用户A、B的汇款交易隐私性。 In step 416, user A sends a transaction T t to the blockchain to transfer money to user B. The transaction T t includes S t , M A [k], Pf (m A [k] ≥s_t), Pf (s_t≥ 0) and Sign a t, the foregoing state are ciphertext, thus protecting the user a, B, privacy remittance transactions.
步骤417,区块链的节点接收上述交易T tIn step 417, the node of the blockchain receives the above transaction T t .
步骤418,区块链的节点执行对上述交易T t的电子签名Sign A t验证,如果通过,执行下个步骤。 Step 418, the node performs block chain to verify the signature Sign A t T t above electronic transaction, if passed, the next steps.
步骤419,区块链的节点验证上述T t所包含的M A[k]是否为已使用状态;如果否,执行下个步骤。 Step 419, the node of the blockchain verifies whether the MA [k] contained in the above T t is in the used state; if not, the next step is executed.
步骤420,区块链的节点基于零知识证明算法对PF(m a[k]≥s_t)进行零知识验证,以确认M A[k]对应的预备金金额是否大于或者等于所述汇款额;如果是,执行下个步骤。 Step 420, the node of the blockchain performs zero-knowledge verification on PF (m a [k] ≥s_t) based on the zero-knowledge proof algorithm to confirm whether the amount of reserves corresponding to M A [k] is greater than or equal to the remittance amount; If yes, go to the next step.
步骤421,区块链的节点基于零知识证明算法对PF(s_t≥0)进行零知识验证,以确认本次汇款交易的汇款额密文S t对应的汇款额实际值不小于零;如果是,执行下个步骤。 Step 421, the node of the blockchain performs zero-knowledge verification on the PF (s_t≥0) based on the zero-knowledge proof algorithm to confirm that the actual value of the remittance amount corresponding to the remittance amount cipher text S t of this remittance transaction is not less than zero; if it is To perform the next step.
步骤422,区块链的节点将通过验证的交易T t收录至所述区块链的分布式数据库,并在用户A的账户余额密文S_A、和子账户余额密文S_A_1中均基于同态运算性质扣除所述汇款额密文S t,在用户B的账户余额密文S_B和子账户余额密文S_B_2中均基于同态运算性质增加所述汇款额密文S t,以使上述用户A的账户余额更新为(s_A-s_t),A的汇款子账户余额s_A_1更新为(s_A_1-s_t),用户B的账户余额更新为(s_B+s_t),B的收款子账户余额s_B_2更新为(s_B_2+s_t);并将用户A的预备金列表M A中M A[k]对应的状态更改为已使用状态。 Step 422, the node of the blockchain collects the verified transaction T t into the distributed database of the blockchain, and based on the homomorphic operation in the account balance ciphertext S_A of user A and the subaccount balance ciphertext S_A_1 The property deducts the remittance amount ciphertext S t , and the user B's account balance ciphertext S_B and sub-account balance ciphertext S_B_2 both increase the remittance amount ciphertext S t based on the homomorphic computing property, so that the user A's account The balance is updated to (s_A-s_t), the balance of the remittance sub-account of A is updated to (s_A_1-s_t), the balance of the account of user B is updated to (s_B + s_t), and the balance of B's collection sub-account is updated to s_B_2 + s_t); and change the state corresponding to M A [k] in the reserve list M A of user A to the used state.
另外,本领域的技术人员熟知,在汇款交易的实际实施过程中,还可包括许多其他的验证步骤,例如防重放的验证等,在此不做限定;而且本说明书并不限定生成各个证明或电子签名的先后顺序,也不限定区块链中的节点对汇出方提出的交易T t中各项证明或电子签名的验证的先后顺序,图4仅仅是本说明书提供的基于区块链的汇款方法的一种实施例,本说明书不限于此。 In addition, those skilled in the art are well aware that in the actual implementation of the remittance transaction, many other verification steps, such as anti-replay verification, etc., may also be included, which are not limited here; and this specification does not limit the generation of each certificate Or the sequence of electronic signatures, nor does it limit the sequence of nodes in the blockchain to the verification of the various certificates or electronic signatures in the transaction T t proposed by the exporter. Figure 4 is only based on the blockchain provided in this specification. An embodiment of the remittance method, this description is not limited to this.
虽然图4中使用连续的编号表示了用户A初始化设置预备金列表及用户A向用户B汇款的过程,但是这并不表示用户A在每次发起汇款交易之前均需设置其账户中的预备金列表。本领域技术人员熟知,用户在注册成为该区块链的用户后的第一次汇款交易之前,需要初始化设置其账户中的预备金列表;当上述预备金列表中的被加密的预备金金额被使用完毕、或剩余的被加密的预备金金额对应的预备金金额已经不再足以支付下一汇款交易,用户才需重新设置其账户中的预备金列表;用户还根据自身的具体需求可周期性更新上述预备金列表。Although the continuous numbers in Figure 4 indicate the process of user A initializing the reserve list and user A's remittance to user B, this does not mean that user A needs to set up a reserve in his account before each remittance transaction is initiated. List. Those skilled in the art are familiar with the fact that before registering as a blockchain user for the first remittance transaction, users need to initialize the reserve list in their account; when the encrypted reserve amount in the above reserve list is After use, or the remaining encrypted reserve amount corresponding to the reserve amount is no longer enough to pay for the next remittance transaction, the user needs to reset the reserve list in his account; the user can also periodically according to their specific needs Update the above reserve list.
随着用户A发送的汇款交易的增多,预备金列表M A中可用的预备金金额逐渐变少,用户A的设备节点1监控预备金列表M A中可用的预备金金额的数值总和、或监控预备金列表M A中可用的预备金金额的个数之和,当上述数值总和、或个数之和低于设定的阈值时,用户A将其子账户s_A_1与s_A_2互相切换,基于新的预备金余额s_A_2来生成新的预备金列表M A'。新的预备金列表M A'的构建过程与步骤401-410类似,在此不再赘述,M A'被更新至用户A的账户后,将替代原预备金列表M A以作为新的有效的预备金列表为汇款交易提供可支付证明。 As the amount of remittance transactions sent by user A increases, the amount of reserves available in reserve list M A gradually decreases, and device node 1 of user A monitors the sum of the amount of reserves available in reserve list M A , or monitors The sum of the amount of reserves available in the reserve list M A. When the sum of the above values, or the sum of the numbers is lower than the set threshold, user A switches their sub-accounts s_A_1 and s_A_2, based on the new The reserve balance s_A_2 to generate a new reserve list M A '. The construction process of the new reserve list M A 'is similar to steps 401-410, and will not be repeated here. After M A ' is updated to user A's account, it will replace the original reserve list M A as a new effective The reserve list provides proof of payment for remittance transactions.
图2示意了上述的用户A账户中的预备金列表的创建及更新过程,由图2可以看出,通过子账户余额的循环切换,用户A的账户中始终存在一个有效的预备金列表可为并发的汇款交易提供多个预备金金额,从而使得用户A无需暂停汇款交易以更新预备金列表,保证了汇款交易的最大化并发提交和执行。而且,在本实施例提供的汇款交易方法中,由于分别设置了用于汇款和用于收款的两个子账户余额,假设在用户A向B执行汇款交易时,有其他用户C也在向用户A发起汇款交易,这些所有的交易可以同时被提交和执行;因为整个交易的执行过程中利用到的零知识证明只和相关的预备金金额有关,账户的余额可以随意的增加或扣减。Figure 2 illustrates the above process of creating and updating the reserve list in User A's account. It can be seen from Figure 2 that through the cyclic switching of sub-account balances, there is always a valid reserve list in User A's account for Concurrent remittance transactions provide multiple reserve amounts, so that user A does not need to suspend remittance transactions to update the reserve list, ensuring the maximum concurrent submission and execution of remittance transactions. Moreover, in the remittance transaction method provided in this embodiment, since two sub-account balances for remittance and remittance are separately set, it is assumed that when user A performs a remittance transaction to B, another user C is A initiates a remittance transaction, and all of these transactions can be submitted and executed at the same time; because the zero-knowledge proof used during the execution of the entire transaction is only related to the relevant reserve amount, the account balance can be increased or deducted at will.
值得注意的是,如图5所示,用户A的子账户余额S_A_2在初始时用作收款交易,当用户设备监测到预备金列表M A中的预备金金额低于预设的阈值时,需将子账户余额S_A_1与子账户余额S_A_2的功能互相切换,S_A_1作为收款余额,S_A_2作为预备金余额。在将S_A_2作为预备金余额以执行新的预备金列表的构建之前,用户设备需等待一段时间,直至上述切换之前区块链上其他用户发往用户A的子账户余额S_A_2的交易均被更新显示在用户A的账户余额S_A和子账户余额S_A_2之后,子账户余额S_A_2的值不再变化后,再基于S_A_2构建新的预备金列表,以防由于S_A_2的值的变化导致基于S_A_2的值生成的PF[s_A_2≥(m a[1]+m a[2]+…+m a[L A])]无法通过区块链节点的验证。上述等待时间可依区块链的成块频率而定,例如,约等待3-5个成块时间。 It is worth noting that, as shown in FIG. 5, user A ’s sub-account balance S_A_2 is initially used as a collection transaction. When the user device detects that the amount of the reserve in the reserve list M A is lower than the preset threshold, It is necessary to switch the functions of the sub-account balance S_A_1 and the sub-account balance S_A_2, S_A_1 as the payment balance and S_A_2 as the reserve balance. Before using S_A_2 as a reserve balance to execute the construction of a new reserve list, the user device needs to wait for a period of time until the transactions of the sub-account balance S_A_2 sent to user A by other users on the blockchain are updated and displayed before the above switch After user A's account balance S_A and sub-account balance S_A_2, after the value of sub-account balance S_A_2 no longer changes, then build a new reserve list based on S_A_2 to prevent the PF generated based on the value of S_A_2 due to the change of S_A_2 [s_A_2≥ (m a [1] + m a [2] +… + m a [L A ])] Cannot pass the verification of blockchain nodes. The above-mentioned waiting time may be determined according to the block-forming frequency of the blockchain, for example, waiting for about 3-5 block-forming times.
图6是一示例性实施例提供的一种设备的示意结构图。请参考图6,在硬件层面,该设备包括处理器602、内部总线604、网络接口606、内存608以及非易失性存储器610,当然还可能包括其他业务所需要的硬件。处理器602从非易失性存储器610中读取对应的计算机程序到内存608中然后运行,在逻辑层面上形成区块链交易装置。当然,除了软件实现方式之外,本说明书一个或多个实施例并不排除其他实现方式,比如逻辑 器件抑或软硬件结合的方式等等,也就是说以下处理流程的执行主体并不限定于各个逻辑单元,也可以是硬件或逻辑器件。FIG. 6 is a schematic structural diagram of a device provided by an exemplary embodiment. Please refer to FIG. 6. At the hardware level, the device includes a processor 602, an internal bus 604, a network interface 606, a memory 608, and a non-volatile memory 610. Of course, it may include hardware required for other services. The processor 602 reads the corresponding computer program from the non-volatile memory 610 into the memory 608 and then runs it to form a blockchain transaction device at a 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 hardware and software, etc., that is to say, the execution body of the following processing flow is not limited to each The logic unit may also be a hardware or logic device.
请参考图7,本说明书还提供了一种基于区块链的汇款装置70,应用于区块链的用户端设备,用户账户的账户余额至少被划分为一预备金余额和一备用余额;其中,所述用户账户包括一动态更新的预备金列表;所述预备金列表包括多个预备金金额;Please refer to FIG. 7, this specification also provides a blockchain-based remittance device 70, which is applied to the user equipment of the blockchain, and the account balance of the user account is divided into at least a reserve balance and a reserve balance; , The user account includes a dynamically updated reserve list; the reserve list includes multiple reserve amounts;
所述装置70包括:The device 70 includes:
预备金金额分配单元702,响应于用户发起的汇款操作,根据预备金列表创建单元704提供的当前的预备金列表为用户提交的汇款额分配对应的预备金金额;The reserve amount allocation unit 702, in response to the remittance operation initiated by the user, allocates the corresponding reserve amount to the remittance amount submitted by the user according to the current reserve list provided by the reserve list creation unit 704;
汇款交易构建及发布单元706,基于所述汇款额以及分配的所述预备金金额构建汇款交易,并将所述汇款交易发布至区块链,以在所述汇款交易被区块链中的节点设备验证通过后,从所述账户余额和所述预备金余额中均扣减所述汇款额;The remittance transaction construction and release unit 706 builds a remittance transaction based on the remittance amount and the allocated reserve amount, and publishes the remittance transaction to the blockchain, so that the remittance transaction is a node in the blockchain After the device is verified, the remittance amount is deducted from both the account balance and the reserve balance;
其中,所述预备金列表创建单元704包括:Wherein, the reserve list creation unit 704 includes:
预备金列表生成模块7042,获得当前的预备金余额,根据当前的预备金余额得到预备金列表;The reserve list generation module 7042 obtains the current reserve balance and obtains the reserve list according to the current reserve balance;
预备金列表监测模块7044,动态监测当前预备金列表中可用于分配的预备金金额是否低于预设阈值。The reserve list monitoring module 7044 dynamically monitors whether the amount of reserves available for distribution in the current reserve list is lower than a preset threshold.
在一示出的实施例中,所述预备金列表生成模块7042:In an illustrated embodiment, the reserve list generation module 7042:
对当前预备金余额进行划分得到多个预备金金额,基于划分得到的多个预备金金额构建预备金列表创建交易;Divide the current reserve balance to obtain multiple reserve amounts, and build a reserve list creation transaction based on the divided reserve amounts;
将所述预备金列表创建交易发布至区块链,以在所述预备金列表创建交易被区块链中的节点设备验证通过后,在所述用户账户基于所述划分得到的多个预备金金额构建预备金列表。Publish the reserve list creation transaction to the blockchain, so that after the reserve list creation transaction is verified by the node device in the blockchain, multiple reserve funds obtained based on the division in the user account Amount to build a reserve list.
在一示出的实施例中,所述预备金列表生成模块7042:In an illustrated embodiment, the reserve list generation module 7042:
对当前预备金余额进行划分得到多个预备金金额,基于划分得到的多个预备金金额构建预备金列表,并基于所述预备金列表构建预备金列表创建交易;Divide the current reserve balance to obtain multiple reserve amounts, build a reserve list based on the divided reserve amounts, and construct a reserve list based on the reserve list to create a transaction;
将所述预备金列表创建交易发布至区块链,以在所述预备金列表创建交易被区块链中的节点设备验证通过后,将所述预备金列表更新至所述用户账户中。Posting the reserve list creation transaction to the blockchain to update the reserve list to the user account after the reserve list creation transaction is verified by the node device in the blockchain.
在一示出的实施例中,所述装置70还包括:In an illustrated embodiment, the device 70 further includes:
切换单元708,在根据当前的预备金余额得到预备金列表之后,将切换前的预备金余额切换为备用余额。The switching unit 708, after obtaining the reserve list based on the current reserve balance, switches the reserve balance before switching to the reserve balance.
在一示出的实施例中,所述备用余额为收款余额;其中,当其他用户发起对所述用户账户的汇款交易被区块链的节点设备验证通过后,该汇款交易中的汇款额将被增加至所述收款余额和所述账户余额。In an illustrated embodiment, the standby balance is a collection balance; wherein, when another user initiates a remittance transaction to the user account and is verified by the node device of the blockchain, the remittance amount in the remittance transaction Will be added to the collection balance and the account balance.
在一示出的实施例中,所述用户账户的账户余额、所述预备金金额和所述汇款额均被预先进行了加密处理;In an illustrated embodiment, the account balance of the user account, the reserve amount, and the remittance amount are all encrypted in advance;
所述汇款交易还包括第一零知识证明,用以证明为所述汇款交易包括的预备金金额之和大于或等于所述汇款交易的汇款额;The remittance transaction also includes a first zero-knowledge certificate to prove that the sum of the reserves included for the remittance transaction is greater than or equal to the remittance amount of the remittance transaction;
所述预备金列表创建交易还包括第二零知识证明,用以证明基于切换后的预备金余额划分出的多个预备金金额之和小于或等于所述用户的账户余额。The reserve list creation transaction also includes a second zero-knowledge proof to prove that the sum of the plurality of reserve amounts divided based on the switched reserve balance is less than or equal to the user's account balance.
在一示出的实施例中,所述用户账户的预备金余额和备用余额被预先进行了加密处理,所述第二零知识证明用以证明基于切换后的预备金余额划分出的多个预备金金额之和小于或等于所述切换后的预备金余额。In an illustrated embodiment, the reserve balance and reserve balance of the user account are encrypted in advance, and the second zero-knowledge proof is used to prove a plurality of reserves divided based on the reserve balance after switching The sum of the gold amounts is less than or equal to the reserve balance after the switch.
在一示出的实施例中,所述汇款交易还包括第三零知识证明,用以证明所述汇款额大于或等于零。In an illustrated embodiment, the remittance transaction further includes a third zero-knowledge proof to prove that the remittance amount is greater than or equal to zero.
在一示出的实施例中,所述预备金列表创建交易还包括第四零知识证明,用以证明基于切换后的预备金余额划分出的多个预备金金额均大于或等于零。In an illustrated embodiment, the reserve list creation transaction further includes a fourth zero proof of knowledge to prove that a plurality of reserve amounts divided based on the switched reserve balance are all greater than or equal to zero.
上述装置中各个单元和模块的功能和作用的实现过程具体详见上述方法中对应步骤的实现过程,相关之处参见方法实施例的部分说明即可,在此不再赘述。For the implementation process of the functions and functions of each unit and module in the above device, please refer to the implementation process of the corresponding steps in the above method for specific details. For the relevant parts, please refer to the partial description of the method embodiment, which will not be repeated here.
上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机,计算机的具体形式可以是个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件收发设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任意几种设备的组合。The system, device, module or unit explained in the above embodiments may be specifically implemented by a computer chip or entity, or by a product having a certain function. A typical implementation device is a computer, and the specific form of the computer may be 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 sending and receiving device, and a game control Desk, tablet computer, wearable device, or any combination of these devices.
与上述方法实施例相对应,本说明书的实施例还提供了一种计算机设备,该计算机设备包括存储器和处理器。其中,存储器上存储有能够由处理器运行的计算机程序; 处理器在运行存储的计算机程序时,执行本说明书实施例中基于区块链的汇款方法的各个步骤。对基于区块链的汇款方法的各个步骤的详细描述请参见之前的内容,不再重复。Corresponding to the above method embodiments, the embodiments of the present specification also provide a computer device, which includes a memory and a processor. Among them, a computer program that can be executed by the processor is stored on the memory; when the processor runs the stored computer program, each step of the block chain-based remittance method in the embodiment of the present specification is executed. For a detailed description of the various steps of the blockchain-based remittance method, please refer to the previous content, and it will not be repeated.
与上述方法实施例相对应,本说明书的实施例还提供了一种计算机可读存储介质,该存储介质上存储有计算机程序,这些计算机程序在被处理器运行时,执行本说明书实施例中基于区块链的汇款方法的各个步骤。对基于区块链的汇款方法的各个步骤的详细描述请参见之前的内容,不再重复。Corresponding to the above method embodiments, the embodiments of the present specification also provide a computer-readable storage medium that stores computer programs on the storage medium. When these computer programs are executed by the processor, the computer program is executed based on The various steps of the blockchain remittance method. For a detailed description of the various steps of the blockchain-based remittance method, please refer to the previous content, and it will not be repeated.
以上所述仅为本说明书的较佳实施例而已,并不用以限制本说明书,凡在本说明书的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本说明书保护的范围之内。The above are only the preferred embodiments of this specification and are not intended to limit this specification. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of this specification should be included in this specification Within the scope of protection.
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, the computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。The memory may include non-permanent memory, random access memory (RAM) and / or non-volatile memory in computer-readable media, such as read only memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。Computer-readable media, including permanent and non-permanent, removable and non-removable media, can store information by any method or technology. The information may be computer readable instructions, data structures, modules of programs, or other data.
计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。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 technologies, read-only compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, Magnetic tape cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices. According to the definition in this article, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。It should also be noted that the terms "include", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device that includes a series of elements not only includes those elements, but also includes Other elements not explicitly listed, or include elements inherent to such processes, methods, goods, or equipment. Without more restrictions, the element defined by the sentence "include one ..." does not exclude that there are other identical elements in the process, method, commodity, or equipment that includes the element.
本领域技术人员应明白,本说明书的实施例可提供为方法、系统或计算机程序产品。因此,本说明书的实施例可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本说明书的实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present specification may be provided as methods, systems, or computer program products. Therefore, the embodiments of the present specification may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of this specification may take the form of computer program products implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program code .

Claims (20)

  1. 一种基于区块链的汇款方法,应用于区块链的用户端设备,用户账户的账户余额至少被划分为一预备金余额和一备用余额;其中,所述用户账户包括一动态更新的预备金列表;所述预备金列表包括多个预备金金额;A blockchain-based remittance method is applied to the user equipment of the blockchain. The account balance of the user account is divided into at least a reserve balance and a reserve balance; wherein, the user account includes a dynamically updated reserve Gold list; the reserve fund list includes multiple reserve fund amounts;
    所述方法包括:The method includes:
    响应于用户发起的汇款操作,根据当前的预备金列表为用户提交的汇款额分配对应的预备金金额;基于所述汇款额以及分配的所述预备金金额构建汇款交易,并将所述汇款交易发布至区块链,以在所述汇款交易被区块链中的节点设备验证通过后,从所述账户余额和所述预备金余额中均扣减所述汇款额;In response to the remittance operation initiated by the user, a corresponding reserve amount is allocated to the remittance amount submitted by the user according to the current reserve list; a remittance transaction is constructed based on the remittance amount and the allocated reserve amount, and the remittance transaction is transferred Post to the blockchain to deduct the remittance amount from both the account balance and the reserve balance after the remittance transaction is verified by the node device in the blockchain;
    其中,所述预备金列表的创建及更新过程包括:Among them, the process of creating and updating the reserve list includes:
    步骤A,获得当前的预备金余额,根据当前的预备金余额得到预备金列表;Step A: Obtain the current reserve balance and obtain a reserve list according to the current reserve balance;
    步骤B,动态监测当前预备金列表中可用于分配的预备金金额是否低于预设阈值,如果是则将当前的备用余额切换为预备金余额后,执行步骤A。Step B: dynamically monitor whether the amount of reserves available for allocation in the current reserve list is lower than a preset threshold, and if so, after switching the current reserve balance to the reserve balance, perform step A.
  2. 根据权利要求1所述的方法,所述根据当前的预备金余额得到预备金列表,包括:The method according to claim 1, the obtaining a reserve list according to the current reserve balance includes:
    对当前预备金余额进行划分得到多个预备金金额,基于划分得到的多个预备金金额构建预备金列表创建交易;Divide the current reserve balance to obtain multiple reserve amounts, and build a reserve list creation transaction based on the divided reserve amounts;
    将所述预备金列表创建交易发布至区块链,以在所述预备金列表创建交易被区块链中的节点设备验证通过后,在所述用户账户基于所述划分得到的多个预备金金额构建预备金列表。Publish the reserve list creation transaction to the blockchain, so that after the reserve list creation transaction is verified by the node device in the blockchain, multiple reserve funds obtained based on the division in the user account Amount to build a reserve list.
  3. 根据权利要求1所述的方法,所述根据当前的预备金余额得到预备金列表,包括:The method according to claim 1, the obtaining a reserve list according to the current reserve balance includes:
    对当前预备金余额进行划分得到多个预备金金额,基于划分得到的多个预备金金额构建预备金列表,并基于所述预备金列表构建预备金列表创建交易;Divide the current reserve balance to obtain multiple reserve amounts, build a reserve list based on the divided reserve amounts, and construct a reserve list based on the reserve list to create a transaction;
    将所述预备金列表创建交易发布至区块链,以在所述预备金列表创建交易被区块链中的节点设备验证通过后,将所述预备金列表更新至所述用户账户中。Posting the reserve list creation transaction to the blockchain to update the reserve list to the user account after the reserve list creation transaction is verified by the node device in the blockchain.
  4. 根据权利要求1所述的方法,还包括:The method of claim 1, further comprising:
    在根据当前的预备金余额得到预备金列表之后,将切换前的预备金余额切换为备用余额。After obtaining the reserve list according to the current reserve balance, the reserve balance before switching is switched to the reserve balance.
  5. 根据权利要求4所述的方法,所述备用余额为收款余额;其中,当其他用户发起对所述用户账户的汇款交易被区块链的节点设备验证通过后,该汇款交易中的汇款额 将被增加至所述收款余额和所述账户余额。The method according to claim 4, wherein the standby balance is a remittance balance; wherein, when another user initiates a remittance transaction to the user account and is verified by the node device of the blockchain, the remittance amount in the remittance transaction Will be added to the collection balance and the account balance.
  6. 根据权利要求2或3所述的方法,所述用户账户的账户余额、所述预备金金额和所述汇款额均被预先进行了加密处理;According to the method of claim 2 or 3, the account balance of the user account, the reserve amount and the remittance amount are all encrypted in advance;
    所述汇款交易还包括第一零知识证明,用以证明为所述汇款交易包括的预备金金额之和大于或等于所述汇款交易的汇款额;The remittance transaction also includes a first zero-knowledge certificate to prove that the sum of the reserves included for the remittance transaction is greater than or equal to the remittance amount of the remittance transaction;
    所述预备金列表创建交易还包括第二零知识证明,用以证明基于切换后的预备金余额划分出的多个预备金金额之和小于或等于所述用户的账户余额。The reserve list creation transaction also includes a second zero-knowledge proof to prove that the sum of the plurality of reserve amounts divided based on the switched reserve balance is less than or equal to the user's account balance.
  7. 根据权利要求2或3所述的方法,所述用户账户的预备金余额和备用余额被预先进行了加密处理,第二零知识证明用以证明基于切换后的预备金余额划分出的多个预备金金额之和小于或等于所述切换后的预备金余额。The method according to claim 2 or 3, the reserve balance and reserve balance of the user account are encrypted in advance, and the second zero-knowledge proof is used to prove a plurality of reserves divided based on the reserve balance after switching The sum of the gold amounts is less than or equal to the reserve balance after the switch.
  8. 根据权利要求6所述的方法,所述汇款交易还包括第三零知识证明,用以证明所述汇款额大于或等于零。According to the method of claim 6, the remittance transaction further includes a third zero-knowledge proof to prove that the remittance amount is greater than or equal to zero.
  9. 根据权利要求6所述的方法,所述预备金列表创建交易还包括第四零知识证明,用以证明基于切换后的预备金余额划分出的多个预备金金额均大于或等于零。According to the method of claim 6, the reserve list creation transaction further includes a fourth zero proof of knowledge to prove that a plurality of reserve amounts divided based on the switched reserve balance are all greater than or equal to zero.
  10. 一种基于区块链的汇款装置,应用于区块链的用户端设备,用户账户的账户余额至少被划分为一预备金余额和一备用余额;其中,所述用户账户包括一动态更新的预备金列表;所述预备金列表包括多个预备金金额;A blockchain-based remittance device is applied to the user equipment of the blockchain. The account balance of the user account is divided into at least a reserve balance and a reserve balance; wherein, the user account includes a dynamically updated reserve Gold list; the reserve fund list includes multiple reserve fund amounts;
    所述装置包括:The device includes:
    预备金金额分配单元,响应于用户发起的汇款操作,根据预备金列表创建单元提供的当前的预备金列表为用户提交的汇款额分配对应的预备金金额;The reserve amount allocation unit, in response to the remittance operation initiated by the user, allocates the corresponding reserve amount to the remittance amount submitted by the user according to the current reserve list provided by the reserve list creation unit;
    汇款交易构建及发布单元,基于所述汇款额以及分配的所述预备金金额构建汇款交易,并将所述汇款交易发布至区块链,以在所述汇款交易被区块链中的节点设备验证通过后,从所述账户余额和所述预备金余额中均扣减所述汇款额;The remittance transaction construction and release unit, constructs a remittance transaction based on the remittance amount and the allocated reserve amount, and publishes the remittance transaction to the blockchain, so that the remittance transaction is used by the node device in the blockchain After the verification is passed, the remittance amount is deducted from both the account balance and the reserve balance;
    其中,所述预备金列表创建单元包括:Wherein, the reserve fund list creation unit includes:
    预备金列表生成模块,获得当前的预备金余额,根据当前的预备金余额得到预备金列表;The reserve list generation module obtains the current reserve balance and obtains the reserve list according to the current reserve balance;
    预备金列表监测模块,动态监测当前预备金列表中可用于分配的预备金金额是否低于预设阈值。The reserve list monitoring module dynamically monitors whether the amount of reserves available for distribution in the current reserve list is lower than a preset threshold.
  11. 根据权利要求10所述的装置,所述预备金列表生成模块:The apparatus according to claim 10, the reserve fund list generation module:
    对当前预备金余额进行划分得到多个预备金金额,基于划分得到的多个预备金金额构建预备金列表创建交易;Divide the current reserve balance to obtain multiple reserve amounts, and build a reserve list creation transaction based on the divided reserve amounts;
    将所述预备金列表创建交易发布至区块链,以在所述预备金列表创建交易被区块链中的节点设备验证通过后,在所述用户账户基于所述划分得到的多个预备金金额构建预备金列表。Publish the reserve list creation transaction to the blockchain, so that after the reserve list creation transaction is verified by the node device in the blockchain, multiple reserve funds obtained based on the division in the user account Amount to build a reserve list.
  12. 根据权利要求10所述的装置,所述预备金列表生成模块:The apparatus according to claim 10, the reserve fund list generation module:
    对当前预备金余额进行划分得到多个预备金金额,基于划分得到的多个预备金金额构建预备金列表,并基于所述预备金列表构建预备金列表创建交易;Divide the current reserve balance to obtain multiple reserve amounts, build a reserve list based on the divided reserve amounts, and construct a reserve list based on the reserve list to create a transaction;
    将所述预备金列表创建交易发布至区块链,以在所述预备金列表创建交易被区块链中的节点设备验证通过后,将所述预备金列表更新至所述用户账户中。Posting the reserve list creation transaction to the blockchain to update the reserve list to the user account after the reserve list creation transaction is verified by the node device in the blockchain.
  13. 根据权利要求10所述的装置,还包括:The apparatus according to claim 10, further comprising:
    切换单元,在根据当前的预备金余额得到预备金列表之后,将切换前的预备金余额切换为备用余额。The switching unit, after obtaining the reserve list according to the current reserve balance, switches the reserve balance before switching to the reserve balance.
  14. 根据权利要求13所述的装置,所述备用余额为收款余额;其中,当其他用户发起对所述用户账户的汇款交易被区块链的节点设备验证通过后,该汇款交易中的汇款额将被增加至所述收款余额和所述账户余额。The device according to claim 13, wherein the standby balance is a remittance balance; wherein, when another user initiates a remittance transaction to the user account and is verified by the node device of the blockchain, the remittance amount in the remittance transaction Will be added to the collection balance and the account balance.
  15. 根据权利要求11或12所述的装置,所述用户账户的账户余额、所述预备金金额和所述汇款额均被预先进行了加密处理;The apparatus according to claim 11 or 12, the account balance of the user account, the reserve amount and the remittance amount are all encrypted in advance;
    所述汇款交易还包括第一零知识证明,用以证明为所述汇款交易包括的预备金金额之和大于或等于所述汇款交易的汇款额;The remittance transaction also includes a first zero-knowledge certificate to prove that the sum of the reserves included for the remittance transaction is greater than or equal to the remittance amount of the remittance transaction;
    所述预备金列表创建交易还包括第二零知识证明,用以证明基于切换后的预备金余额划分出的多个预备金金额之和小于或等于所述用户的账户余额。The reserve list creation transaction also includes a second zero-knowledge proof to prove that the sum of the plurality of reserve amounts divided based on the switched reserve balance is less than or equal to the user's account balance.
  16. 根据权利要求11或12所述的装置,所述用户账户的预备金余额和备用余额被预先进行了加密处理,第二零知识证明用以证明基于切换后的预备金余额划分出的多个预备金金额之和小于或等于所述切换后的预备金余额。The apparatus according to claim 11 or 12, the reserve balance and the reserve balance of the user account are encrypted in advance, and the second zero-knowledge proof is used to prove a plurality of reserves divided based on the reserve balance after switching The sum of the gold amounts is less than or equal to the reserve balance after the switch.
  17. 根据权利要求15所述的装置,所述汇款交易还包括第三零知识证明,用以证明所述汇款额大于或等于零。According to the apparatus of claim 15, the remittance transaction further includes a third zero-knowledge proof to prove that the remittance amount is greater than or equal to zero.
  18. 根据权利要求15所述的装置,所述预备金列表创建交易还包括第四零知识证明,用以证明基于切换后的预备金余额划分出的多个预备金金额均大于或等于零。According to the apparatus of claim 15, the reserve list creation transaction further includes a fourth zero proof of knowledge to prove that a plurality of reserve amounts divided based on the switched reserve balance are all greater than or equal to zero.
  19. 一种计算机设备,包括:存储器和处理器;所述存储器上存储有可由处理器运行的计算机程序;所述处理器运行所述计算机程序时,执行如权利要求1到9任意一项所述的方法。A computer device comprising: a memory and a processor; a computer program executable by the processor is stored on the memory; when the processor runs the computer program, the computer program according to any one of claims 1 to 9 is executed method.
  20. 一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器 运行时,执行如权利要求1到9任意一项所述的方法。A computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, executes the method according to any one of claims 1 to 9.
PCT/CN2019/101938 2018-10-26 2019-08-22 Blockchain-based remittance method and device WO2020082877A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811259006.5 2018-10-26
CN201811259006.5A CN109508970B (en) 2018-10-26 2018-10-26 Remittance method and device based on block chain

Publications (1)

Publication Number Publication Date
WO2020082877A1 true WO2020082877A1 (en) 2020-04-30

Family

ID=65746853

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/101938 WO2020082877A1 (en) 2018-10-26 2019-08-22 Blockchain-based remittance method and device

Country Status (3)

Country Link
CN (2) CN111899012B (en)
TW (1) TWI723357B (en)
WO (1) WO2020082877A1 (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111899012B (en) * 2018-10-26 2024-04-05 创新先进技术有限公司 Block chain-based money transfer method and device
CN110349021B (en) * 2019-06-26 2020-08-25 阿里巴巴集团控股有限公司 Method and device for realizing confidential transaction in block chain
US10797887B2 (en) 2019-06-26 2020-10-06 Alibaba Group Holding Limited Confidential blockchain transactions
CN110473104B (en) * 2019-08-20 2023-11-17 深圳市迅雷网络技术有限公司 Transaction processing method and related equipment
CN110648234B (en) * 2019-09-12 2022-08-19 广州蚁比特区块链科技有限公司 Block generation method and device
CN113132078B (en) * 2019-12-31 2023-07-14 航天信息股份有限公司 Block chain privacy protection method and block chain system based on homomorphism promise
CN111383008B (en) * 2020-05-29 2021-07-30 支付宝(杭州)信息技术有限公司 Block chain transfer method and device based on account model
CN112017050B (en) * 2020-10-27 2021-04-23 浙江甲骨文超级码科技股份有限公司 Block chain-based account intelligent contract method and system supporting high-concurrency scene
CN113222574B (en) * 2021-05-11 2023-07-25 支付宝(杭州)信息技术有限公司 Money transfer method and device based on blockchain system
CN115456612B (en) * 2022-10-28 2023-03-24 深圳市小赢信息技术有限责任公司 Accounting method, system, terminal and storage medium for balance base table

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170310653A1 (en) * 2016-04-22 2017-10-26 Sony Corporation Client, server, method and identity verification system
CN108600301A (en) * 2018-03-08 2018-09-28 青岛墨客区块链有限公司 A kind of across chain method between block chain and main block chain
CN109508970A (en) * 2018-10-26 2019-03-22 阿里巴巴集团控股有限公司 Money transfer method and device based on block chain

Family Cites Families (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014052750A2 (en) * 2012-09-27 2014-04-03 Interdigital Patent Holdings, Inc. End-to-end architecture, api framework, discovery, and access in a virtualized network
US20150046337A1 (en) * 2013-08-06 2015-02-12 Chin-hao Hu Offline virtual currency transaction
CA2981511C (en) * 2015-03-31 2018-08-28 Nasdaq, Inc. Systems and methods of blockchain transaction recordation
US20180191503A1 (en) * 2015-07-14 2018-07-05 Fmr Llc Asynchronous Crypto Asset Transfer and Social Aggregating, Fractionally Efficient Transfer Guidance, Conditional Triggered Transaction, Datastructures, Apparatuses, Methods and Systems
US10649429B2 (en) * 2015-10-13 2020-05-12 LO3 Energy Inc. Use of blockchain based distributed consensus control
CN106549749B (en) * 2016-12-06 2019-12-24 杭州趣链科技有限公司 Block chain privacy protection method based on addition homomorphic encryption
CN107077675A (en) * 2016-12-30 2017-08-18 深圳前海达闼云端智能科技有限公司 Block chain based currency management method and system
CN106982205B (en) * 2017-03-01 2020-05-19 中钞信用卡产业发展有限公司杭州区块链技术研究院 Block chain-based digital asset processing method and device
CN107248074A (en) * 2017-03-29 2017-10-13 阿里巴巴集团控股有限公司 A kind of method for processing business and equipment based on block chain
CN107358525B (en) * 2017-06-26 2021-05-25 中国人民银行数字货币研究所 Account transaction method and device
CN107563889A (en) * 2017-08-29 2018-01-09 中国银行股份有限公司 Account balance information processing method and processing device
CN107657528A (en) * 2017-10-27 2018-02-02 夏烬楚 A kind of business factoring management system of combination risk management
CN107977837A (en) * 2017-11-10 2018-05-01 中国银行股份有限公司 The remaining sum control method and device of hot spot account
CN107871281A (en) * 2017-11-24 2018-04-03 丰德金融平台有限公司 The debt-credit match system and method for air control are realized based on network platform circle of friends credit
CN108183959B (en) * 2017-12-29 2021-09-07 深圳市轱辘车联数据技术有限公司 Vehicle sharing method based on block chain, server and readable storage medium
CN108182970B (en) * 2018-01-03 2021-11-05 北京厚普聚益科技有限公司 Medical crowd funding system management method, device and system
CN112330447A (en) * 2018-01-19 2021-02-05 创新先进技术有限公司 Capital transfer method and device and electronic equipment
CN108364229B (en) * 2018-01-19 2020-04-24 阿里巴巴集团控股有限公司 Capital transfer method and device and electronic equipment
CN111612446A (en) * 2018-01-19 2020-09-01 阿里巴巴集团控股有限公司 Block chain balance adjusting method and device and electronic equipment
CN108647523B (en) * 2018-04-28 2020-01-17 华南理工大学 Block chain-based electronic certification system and certificate storage and file recovery method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170310653A1 (en) * 2016-04-22 2017-10-26 Sony Corporation Client, server, method and identity verification system
CN108600301A (en) * 2018-03-08 2018-09-28 青岛墨客区块链有限公司 A kind of across chain method between block chain and main block chain
CN109508970A (en) * 2018-10-26 2019-03-22 阿里巴巴集团控股有限公司 Money transfer method and device based on block chain

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CUI, GAOYING ET AL.: "Application of Block Chain in Multi-level Demand Response Reliable Mechanism", 3RD INTERNATIONAL CONFERENCE ON INFORMATION MANAGEMENT, 31 December 2017 (2017-12-31), XP055709251 *

Also Published As

Publication number Publication date
TW202016822A (en) 2020-05-01
CN109508970A (en) 2019-03-22
CN111899012A (en) 2020-11-06
CN111899012B (en) 2024-04-05
TWI723357B (en) 2021-04-01
CN109508970B (en) 2020-07-10

Similar Documents

Publication Publication Date Title
WO2020082877A1 (en) Blockchain-based remittance method and device
TWI733091B (en) Remittance method and device based on blockchain
KR101835520B1 (en) Method for providing united point service using updated status of balance database with blockchain and server using the same
ES2932500T3 (en) Select and secure test delegates for cryptographic functions
JP7244537B2 (en) Computer-implemented systems and methods suitable for enhancing the security of instant offline blockchain transactions
JP2022166214A (en) System and method for controlling asset-related actions via blockchain
CN106339939B (en) Non-tamper-able distributed bill system based on secure hardware and transaction processing method
US11283865B2 (en) Service meshes and smart contracts for zero-trust systems
WO2020125218A1 (en) Claim settlement method and apparatus employing blockchain technology
US20190164150A1 (en) Using Blockchain Ledger for Selectively Allocating Transactions to User Accounts
KR101835521B1 (en) Method for providing united point service using updated status of balance database by respective blocks in blockchain and server using the same
Li et al. Healthchain: Secure EMRs management and trading in distributed healthcare service system
TW202029086A (en) Block chain-based evidence storage method and device
WO2020119298A1 (en) Event processing method and apparatus based on blockchain, and electronic device
KR101835519B1 (en) Method for providing united point service in use of merkle tree structure on the basis of unspent transaction output protocol and server using the same
TW202107457A (en) Blockchain-based bill number allocation method and apparatus, and electronic device
US11316933B2 (en) Service meshes and smart contracts for zero-trust systems
Bhattacharya et al. A blockchain based peer-to-peer framework for exchanging leftover foreign currency
TWI705691B (en) Block chain-based event processing method and device, and electronic equipment
WO2021017425A1 (en) Method and apparatus for realizing confidential transaction in blockchain network
TW202016819A (en) Block-chain transaction method and device and electronic device
KR101835518B1 (en) Method for providing united point service in use of unspent transaction output based protocol and server using the same
WO2020107033A1 (en) Methods, systems, and devices for on-chain stable transaction in decentralized cryptocurrencies
WO2018192931A1 (en) Delivery versus payment mechanism
WO2023074878A1 (en) Information processing system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19875412

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19875412

Country of ref document: EP

Kind code of ref document: A1