WO2021008453A1 - 一种基于标识认证的区块链离线交易方法和*** - Google Patents

一种基于标识认证的区块链离线交易方法和*** Download PDF

Info

Publication number
WO2021008453A1
WO2021008453A1 PCT/CN2020/101304 CN2020101304W WO2021008453A1 WO 2021008453 A1 WO2021008453 A1 WO 2021008453A1 CN 2020101304 W CN2020101304 W CN 2020101304W WO 2021008453 A1 WO2021008453 A1 WO 2021008453A1
Authority
WO
WIPO (PCT)
Prior art keywords
transaction
information
virtual card
payee
payer
Prior art date
Application number
PCT/CN2020/101304
Other languages
English (en)
French (fr)
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 WO2021008453A1 publication Critical patent/WO2021008453A1/zh

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/22Payment schemes or models
    • G06Q20/223Payment schemes or models based on the use of peer-to-peer networks
    • 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/22Payment schemes or models
    • G06Q20/29Payment schemes or models characterised by micropayments
    • 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/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/34Payment architectures, schemes or protocols characterised by the use of specific devices or networks using cards, e.g. integrated circuit [IC] cards or magnetic cards
    • G06Q20/351Virtual cards
    • 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/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification
    • G06Q20/4014Identity check for transactions

Definitions

  • the present invention relates to the field of computers, in particular to a blockchain offline transaction method and system based on identification authentication.
  • Blockchain is a combination of Internet protocols and technologies about trust. The purpose is to build a distributed deployment and real-time synchronization system, in which data can only be added but cannot be tampered with, while allowing multiple parties to participate in the establishment of data according to the consensus mechanism And maintenance to ensure that each valid node on the chain has completely consistent data.
  • a blockchain offline transaction method based on identification authentication includes:
  • the payee virtual card generates first initial information, and sends the first initial information to the payer virtual card;
  • the first initial information includes at least the payee identifier and the first transaction amount;
  • the virtual card of the payer generates first transaction information based on the verified first initial information, and the first transaction information includes at least the first transaction between the virtual card of the payer and the first initial information Transaction information of the same amount of assets;
  • the payee virtual card Based on the verified first transaction verification information, the payee virtual card adds an asset of the same amount as the first transaction.
  • the method before the first initial information is generated by the payee virtual card, the method further includes:
  • the payer's virtual card generates second initial information based on the payer's account; the second initial information includes at least the payer's identification and the second transaction amount;
  • the offline transaction smart contract on the blockchain generates recharge information based on the verified second initial information.
  • the recharge information is used to record the first target transaction initiated by the offline transaction smart contract based on the initial information.
  • a target transaction is used to transfer the asset corresponding to the second transaction amount from the payer account to the address of the offline transaction smart contract, and the offline transaction smart contract updates its total amount;
  • the virtual card of the payer adds an asset with the same amount of the second transaction based on the verified recharge information.
  • the method further includes:
  • the payee virtual card generates third initial information based on the payee account; the third initial information includes at least the payee identifier and the third transaction amount;
  • the offline transaction smart contract on the blockchain transfers the asset corresponding to the third transaction amount from the offline transaction smart contract to the payee account based on the verified third initial information.
  • the method further includes:
  • the payee virtual card generates transaction result information, where the transaction result information includes at least the payee identifier, the payer identifier, transaction amount information, transaction time information, and transaction validity period information;
  • the virtual card of the payer records the transaction result information based on the verified transaction result information.
  • the virtual card of the payee generates third initial information based on the account of the payee, including:
  • the virtual card of the payee is based on the third transaction amount to be received by the account of the payee, from which the assets corresponding to the third transaction amount are reduced;
  • the payee virtual card generates third initial information based on the payee account and the third transaction amount.
  • the offline transaction smart contract on the blockchain is based on the verified second initial information.
  • the method further includes:
  • the payer virtual card signs the second initial information based on the private key of the payer virtual card and the private key of the payer account;
  • the offline transaction smart contract verifies the second initial information based on the signature of the second initial information.
  • the offline transaction smart contract on the blockchain transfers an asset corresponding to the third transaction amount from the offline transaction smart contract to the third initial information after verification.
  • the method also includes:
  • the payee virtual card signs the third initial information based on the private key of the virtual card
  • the offline transaction smart contract verifies the third initial information based on the signature of the third initial information.
  • the offline transaction smart contract on the blockchain transfers the asset corresponding to the third transaction amount from the offline transaction smart contract to the collection based on the verified third initial information Before the party account, the method also includes:
  • transferring the asset corresponding to the third transaction amount from the offline transaction smart contract to the payee account is specifically:
  • the asset corresponding to the third transaction amount is transferred from the offline transaction smart contract to the payee account.
  • a blockchain offline transaction system based on identification authentication includes:
  • Offline transaction smart contract on the blockchain used to verify the initial information generated by the virtual card, store the assets participating in the offline transaction, and complete the transaction with the account on the chain based on the transaction information.
  • Payer’s on-chain account used to store the payer’s on-chain assets
  • Recipient's on-chain account used to store the recipient’s on-chain assets
  • Payer’s virtual card used to initiate the process of asset off-chain recharge, perform offline transactions with the payee’s virtual card, and store the payer’s off-chain assets;
  • Payee's virtual card used to initiate offline transactions with the payer's virtual card, initiate the asset on-chain process to recharge the payee's on-chain account, and store the payee's off-chain assets;
  • the offline transaction smart contract further includes:
  • Contract virtual machine used to process and execute contract instructions
  • Security module used to calculate the public key of the virtual card, verify the signature of the virtual card, verify the initial information, generate recharge information, and generate transaction success information;
  • Account module used to store balance information, transaction information, offline transaction smart contract identification ID and public key matrix, etc., update balance, check whether the balance is sufficient, etc.;
  • Interface module used to communicate with the payer’s chain account, the payee’s chain account, the payer’s virtual card, and the payee’s virtual card.
  • the on-chain account of the payer further includes:
  • Security module used to verify on-chain transactions initiated by offline transaction smart contracts
  • Account module used to store balance information and transaction information, used to update the balance and verify whether the balance is sufficient;
  • Communication module used to communicate with offline transaction smart contracts
  • Consensus module Participate in consensus on the blockchain.
  • the on-chain account of the payee also includes:
  • Security module used to verify on-chain transactions initiated by offline transaction smart contracts
  • Account module used to store balance information and transaction information, used to update the balance and verify whether the balance is sufficient;
  • Communication module used to communicate with offline transaction smart contracts
  • Consensus module Participate in consensus on the blockchain.
  • the payer's virtual card further includes:
  • Security control module used to calculate the public key of the payee's virtual card, verify the signature of the payee's virtual card, calculate the public key of the offline transaction smart contract, verify the signature of the offline transaction smart contract, verify the recharge information, and verify offline Initial transaction information, verify transaction result information, generate virtual card recharge initial information, generate transaction verification information, set transaction amount information, check whether the transaction result information has been received within the validity period of the transaction;
  • Storage module used to store balance information, transaction information, payer's virtual card ID and public key matrix
  • Calculation module used to update the balance and check whether the balance is sufficient
  • Communication module used to communicate with offline transaction smart contracts and payee virtual cards.
  • the payer's virtual card further includes:
  • Security control module used to calculate the public key of the payer's virtual card, verify the signature of the payer's virtual card, calculate the public key of the offline transaction smart contract, verify the signature of the offline transaction smart contract, verify the successful information of the account recharge transaction on the chain, Verify transaction verification information, generate initial information for on-chain account recharge, generate initial information for offline transactions, generate transaction result information, and set transaction amount information;
  • Storage module used to store balance information, transaction information, payee virtual card ID and public key matrix
  • Calculation module used to update the balance and check whether the balance is sufficient
  • Communication module used to communicate with offline transaction smart contracts and payer's virtual card.
  • the present invention uses the blockchain offline transaction method based on identification authentication technology, and combines the point-to-point identification authentication method in the blockchain to safely and conveniently realize the transfer of assets between the virtual card on the blockchain and off-chain.
  • ID payee and payer identification
  • FIG. 1 is an overall flowchart of a blockchain offline transaction method based on identification authentication from on-chain to off-chain according to an embodiment
  • FIG. 2 is a flowchart of another embodiment of a blockchain offline transaction method based on identity authentication
  • FIG. 3 is a flowchart of a blockchain offline transaction method based on identity authentication according to another embodiment
  • FIG. 4 is a flowchart of a blockchain offline transaction method based on identity authentication according to another embodiment
  • Fig. 5 is a structural diagram of a blockchain offline transaction system based on identification authentication according to an embodiment.
  • Fig. 1 is an overall flowchart of an offline transaction method based on identification authentication on a blockchain from on-chain to off-chain according to an embodiment. As shown in Fig. 1, the above method includes:
  • Step 110 Assets are transferred from the payer's account on the chain to the virtual card of the payer off the chain.
  • the assets can be transferred from the payer's account to the offline payer's virtual card.
  • Step 120 The assets are transferred from the virtual card of the payer under the chain to the virtual card of the payee under the chain.
  • the assets of the payer's virtual card After the assets of the payer's virtual card increase, the assets can be transferred from the payer's virtual card to the payee's virtual card, thereby realizing the transfer of assets off-chain.
  • step 130 the assets are transferred from the virtual card of the payee under the chain to the account of the payee on the chain.
  • assets can be transferred from the payee’s virtual card to the payee’s account, thereby completing the entire offline transaction process from on-chain to off-chain, and realizing the entire offline transaction process safely and conveniently.
  • Fig. 2 is a flowchart of a blockchain offline transaction method based on identification authentication according to an embodiment. As shown in Figure 2, the method includes:
  • Step 210 the payee virtual card generates first initial information, and sends the first initial information to the payer virtual card; the first initial information includes at least the payee identifier and the first transaction amount;
  • Step 220 The payer's virtual card generates first transaction information based on the verified first initial information.
  • the first transaction information includes at least transaction information of the payer's virtual card deducting the same asset as the first transaction amount in the first initial information;
  • Step 230 The virtual card of the payer generates first transaction verification information based on the first transaction information
  • Step 240 Based on the verified first transaction verification information, the payee virtual card adds an asset of the same amount as the first transaction.
  • the present invention uses the blockchain offline transaction method based on identification authentication technology, and combines the point-to-point identification authentication method in the blockchain to safely and conveniently realize the transfer of assets between the virtual card on the blockchain and off-chain.
  • ID payee and payer identification
  • steps shown in FIG. 2 are the specific implementation process of step 120 in FIG. 1.
  • the payer account, the offline smart contract on the blockchain, and the payee account can be understood as being on-chain, and the payer's virtual card and the payee's virtual card can be understood as being off-chain.
  • This embodiment can realize transactions between on-chain and off-chain.
  • Both parties involved in an off-chain transaction should hold identification IDs and have off-chain transaction permissions.
  • the receiver’s virtual card first generates the first initial information and signs Then send it to the payer's virtual card.
  • the payer’s virtual card verifies the signature and verifies the first initial information. If the transaction amount information is not included, the transaction amount information needs to be set.
  • the payer's virtual card can deduct money based on the first transaction amount information, and generate the first transaction information, which is stored locally.
  • the payer's virtual card can generate the first transaction verification information according to the first transaction information, and can also use the payer's private key to sign and use the payee's public key to encrypt, and send it to the payee's virtual card.
  • the payee virtual card After receiving the first transaction verification information, the payee virtual card performs signature verification and decryption, verifies the transaction information, and increases the balance according to the first transaction amount after the verification and verification pass, and generates transaction result information.
  • the above method further includes:
  • the payee virtual card generates transaction result information, which at least includes the payee ID, payer ID, transaction amount information, transaction time information, and transaction validity period information;
  • the virtual card of the payer records the transaction result information based on the verified transaction result information.
  • the virtual card of the payee can sign the transaction result information, encrypt it with the public key of the payer, and send it to the payer virtual card.
  • the payer's virtual card receives the transaction result information, is verified and decrypted and records the transaction result information, and the transaction is completed.
  • the first initial information may include information such as the payee identification ID, transaction time and validity period, and payee signature; the first initial information may also include transaction amount information.
  • Transaction information and transaction verification information may include: payee identification ID, payer identification ID, transaction amount information, transaction time information, transaction validity information, and other required verification information, and the payer’s private key is used to sign.
  • the transaction result information may include: payee identification ID, payer identification ID, transaction amount information, transaction time information, transaction validity information, and other required verification information, and the payee’s private key is used for signature.
  • the payer's virtual card can verify the first transaction information stored locally If it is still within the validity period of the transaction, repeat the above steps until the transaction result information is received or the time exceeds the validity period of the transaction.
  • the public key and the private key of the virtual card are bound with the identification ID using identification authentication technology.
  • the private key of the virtual card is held by the virtual card, and the public key of the virtual card can be obtained through a public mapping algorithm using the identification ID of the virtual card.
  • Fig. 3 is a flowchart of a blockchain offline transaction method based on identity authentication according to another embodiment. As shown in Figure 3, in this embodiment, before the payee virtual card generates the first initial information, the above method further includes:
  • Step 310 The payer's virtual card generates second initial information based on the payer's account; the second initial information includes at least the payer's identification and the second transaction amount;
  • Step 320 The offline transaction smart contract on the blockchain generates recharge information based on the verified second initial information.
  • the recharge information is used to record the first target transaction initiated by the offline transaction smart contract based on the initial information.
  • the first target transaction is used for Transfer the asset corresponding to the second transaction amount from the payer's account to the address of the offline transaction smart contract; the offline transaction smart contract updates its total amount;
  • Step 330 The virtual card of the payer adds an asset with the same amount of the second transaction based on the verified recharge information.
  • the offline transaction smart contract updates its total amount, it adds a second transaction amount on the original basis, and updates the total amount on the original basis.
  • steps shown in FIG. 3 above are specifically the specific implementation process of step 110 in FIG. 1.
  • the offline transaction smart contract on the blockchain is based on the second initial information after verification.
  • the above method also includes:
  • the payer’s virtual card signs the second initial information based on the private key of the payer’s virtual card and the private key of the payer’s account;
  • the payer's virtual card sends the second initial information and the signature of the second initial information to the offline transaction smart contract;
  • the offline transaction smart contract verifies the second initial information based on the signature of the second initial information.
  • the payer’s virtual card when the payer’s virtual card needs to withdraw assets from a blockchain account (payer’s account), the payer’s virtual card can generate a second initial information, using the virtual card’s private key and the payer’s account.
  • the private key is used for signing, and the second initial information and its signature are sent to the blockchain.
  • the offline transaction smart contract on the blockchain verifies the second initial information. If the verification fails, the process will be terminated. If the verification is passed, the second transaction amount information and the payer's account address will be obtained. Based on the second transaction amount information and the payer’s account address, the offline transaction smart contract initiates a transaction on the blockchain (the first target transaction), and transfers the corresponding amount of assets from the payer’s account to the offline transaction smart The address of the contract.
  • the offline transaction smart contract can generate recharge information and send the recharge information to the payer's virtual card.
  • the virtual card of the payer verifies the recharge information, and if the verification is passed, a corresponding amount of assets is added to the virtual card of the payer, which is the same as the second transaction amount.
  • the second initial information may include: the payer’s virtual card identification ID, the payer’s account address, transaction amount, transaction time, transaction validity period, the payer’s virtual card ID signature, and the private key signature of the payer’s account address And other transaction-related information that needs to be verified;
  • the offline transaction smart contract on the blockchain generates recharge information based on the verified second initial information
  • the offline transaction smart contract verifies the second initial information, which specifically includes: verifying the virtual card of the payer Sign, verify the signature of the payer's account address, verify the authority of the payer's virtual card ID, verify the transaction time and validity period, verify whether the balance in the payer's account address is sufficient, and perform other required verifications.
  • the recharge information may include the payer's virtual card identification ID, the payer's account address, transaction amount, transaction time, transaction validity period, offline transaction contract signature, and other required transaction related information.
  • FIG. 4 is a flowchart of a blockchain offline transaction method based on identification authentication according to another embodiment.
  • the payee virtual card is verified based on the first transaction verification after verification.
  • Information, after adding assets with the same amount as the first transaction, the above method also includes:
  • Step 410 The payee virtual card generates third initial information based on the payee account; the third initial information includes at least the payee identifier and the third transaction amount;
  • step 420 the offline transaction smart contract on the blockchain transfers the asset corresponding to the third transaction amount from the offline transaction smart contract to the payee account based on the verified third initial information.
  • steps shown in FIG. 4 above are specifically the specific implementation process of step 130 in FIG. 1.
  • the virtual card of the payee generates third initial information based on the account of the payee, including:
  • the virtual card of the payee is based on the third transaction amount that the payee’s account needs to receive, from which the assets corresponding to the third transaction amount are reduced;
  • the payee virtual card generates third initial information based on the payee account and the third transaction amount.
  • the offline transaction smart contract on the blockchain is based on the verified third initial information, before transferring the asset corresponding to the third transaction amount from the offline transaction smart contract to the payee account .
  • the above methods also include:
  • the virtual card of the payee signs the third initial information based on the private key of the virtual card
  • the payee virtual card sends the third initial information and the signature of the third initial information to the offline transaction smart contract;
  • the offline transaction smart contract verifies the third initial information based on the signature of the third initial information.
  • the offline transaction smart contract on the blockchain is based on the verified third initial information, before transferring the asset corresponding to the third transaction amount from the offline transaction smart contract to the payee account .
  • the above methods also include:
  • the asset corresponding to the third transaction amount is transferred from the offline transaction smart contract to the payee account, specifically:
  • the asset corresponding to the third transaction amount is transferred from the offline transaction smart contract to the payee account.
  • the recipient's virtual card When the recipient's virtual card needs to transfer assets to a blockchain account (recipient's account), first deduct the balance from the recipient's virtual card. Specifically, after the recipient's virtual card can deduct the third transaction amount, the virtual card will generate a third initial message, use the recipient's virtual card private key to sign, and send the third initial information and signature to the block On the chain.
  • the offline transaction smart contract verifies the third initial information. If the verification fails, the process is terminated and the verification is successful.
  • the offline transaction smart contract verifies the balance in the offline transaction smart contract address and compares it with the third transaction amount in the third initial information.
  • the offline transaction smart contract performs a transaction on the blockchain, and the equivalent amount of assets is transferred from the offline transaction smart contract address to the payee account according to the third transaction amount in the third initial information.
  • the transaction success message is generated and signed, encrypted and sent to the payee's virtual card.
  • the payee's virtual card will verify after receiving the transaction success information, and record the transaction after the verification is passed.
  • the third initial information may include: payee's virtual card identification ID, blockchain payee account address, transaction amount, transaction time, transaction validity period, payee's virtual card signature and other required transactions Related Information.
  • the sent transaction failure information may include: the payee’s virtual card ID, blockchain Recipient's account address, transaction amount, transaction time, transaction validity period, transaction failure reason, offline transaction smart contract signature and other required transaction related information.
  • the transaction success information is generated and signed, and when the transaction success information is encrypted and sent to the payee's virtual card, the transaction success information may include: the payee's virtual card ID, block Chain payee account address, transaction amount, transaction time, transaction validity period, transaction voucher and offline transaction smart contract signature, and other required transaction-related information.
  • first initial information, second initial information, and third initial information may be independent initial information.
  • the first transaction amount, the second transaction amount, and the third transaction amount are separate transaction amounts.
  • information such as the domain, subdomain, and ID authority of the identity authentication can be stored, so that the signature of the virtual card can be verified in the offline transaction smart contract and the virtual card can perform asset off-chain and asset off-chain verification. Permission for operations such as winding.
  • the private key of the virtual card can be divided into subdomains to generate different subdomain private keys.
  • the virtual card needs to be used separately.
  • the chain subdomain private key, the off-chain sub-chain private key, and the off-chain transaction sub-domain private key are used to sign, otherwise the signature cannot be passed on the blockchain.
  • the secure container is a secure computing environment implemented by virtual machine technology, which includes not only core algorithms, but also data that needs to be stored safely.
  • the secure container uses a combination of static obfuscation and dynamic obfuscation technologies, including code obfuscation, tamper-proof signature, and sandbox or tee protection execution.
  • the stored code and data are obfuscated and encrypted, which can effectively prevent static analysis of the program by crackers.
  • the secure container uses environmental inspection, anti-debugging technology, and automatic destruction technology to prevent crackers from dynamic analysis of the core code.
  • the secure container will trigger the destruction mechanism, destroying the file in the secure container, making its content unreadable.
  • the identification ID of the virtual card can be bound by hardware to ensure that only legal operations can be performed on the designated device.
  • This embodiment combines the point-to-point identification authentication method in the blockchain, which can safely and conveniently realize the transfer of assets between virtual cards on the blockchain and off-chain, and achieve authenticity and credibility.
  • the identity authentication between the virtual cards under the chain is through the identification ID, without the participation of a third-party trusted institution, no certificate, no public key transfer, and safe and convenient offline transactions under the chain are realized.
  • the identities of both parties in the transaction are self-certified on their own terminal through a unique identification ID, and are protected by secure container technology and hardware binding technology, creating a safe and reliable offline transaction environment.
  • This embodiment adopts the blockchain offline transaction method based on the identification authentication technology to realize safe and convenient offline transactions under the chain. While ensuring the original decentralization and high security features of the blockchain, the transaction efficiency is improved. Convenience and practicality.
  • the offline transaction process there is no need for both parties to the transaction to jointly maintain an account and lock the funds in the account in advance. Instead, when the transaction does occur, the transaction is directly established from their respective accounts. There is no intermediate link between offline transactions, and no other accounts are required to connect. Only the communication between the terminals of the two parties is required. The transaction is relatively independent, which reduces the pressure of network communication and has no centralization risk.
  • the two parties involved in the transaction no longer need to confirm the transaction in real time, nor do they need to confirm the change of assets on the entire network in real time, they can complete the transaction and the assets obtained in the transaction can be immediately confirmed and used.
  • Fig. 5 is a structural diagram of a blockchain offline transaction system based on identification authentication according to an embodiment. As shown in Figure 5, the system includes:
  • Offline transaction smart contract 510 on the blockchain used to verify the initial information generated by the virtual card, store assets participating in offline transactions, and complete transactions with accounts on the chain based on the transaction information.
  • Payer’s on-chain account 520 used to store the payer’s on-chain assets;
  • Payee's on-chain account 530 used to store the payee's assets on the chain;
  • Payer’s virtual card 540 used to initiate the process of asset off-chain recharge, perform offline transactions with the payee’s virtual card, and store the payer’s off-chain assets;
  • Payee virtual card 550 used to initiate offline transactions with the payer's virtual card, initiate an asset on-chain process to recharge the payee’s on-chain account, and store the payee’s off-chain assets.
  • the present invention uses the blockchain offline transaction method based on identification authentication technology, and combines the point-to-point identification authentication method in the blockchain to safely and conveniently realize the transfer of assets between the virtual card on the blockchain and off-chain.
  • ID payee and payer identification
  • the offline transaction smart contract further includes:
  • Contract virtual machine used to process and execute contract instructions
  • Security module used to calculate the public key of the virtual card, verify the signature of the virtual card, verify the initial information, generate recharge information, and generate transaction success information;
  • Account module used to store balance information, transaction information, offline transaction smart contract identification ID and public key matrix, etc., update balance, check whether the balance is sufficient, etc.;
  • Interface module used to communicate with the payer’s chain account, the payee’s chain account, the payer’s virtual card, and the payee’s virtual card.
  • the on-chain account of the payer also includes:
  • Security module used to verify on-chain transactions initiated by offline transaction smart contracts
  • Account module used to store balance information and transaction information, used to update the balance and verify whether the balance is sufficient;
  • Communication module used to communicate with offline transaction smart contracts
  • Consensus module Participate in consensus on the blockchain.
  • the on-chain account of the payee also includes:
  • Security module used to verify on-chain transactions initiated by offline transaction smart contracts
  • Account module used to store balance information and transaction information, used to update the balance and verify whether the balance is sufficient;
  • Communication module used to communicate with offline transaction smart contracts
  • Consensus module Participate in consensus on the blockchain.
  • the payer's virtual card further includes:
  • Security control module used to calculate the public key of the payee's virtual card, verify the signature of the payee's virtual card, calculate the public key of the offline transaction smart contract, verify the signature of the offline transaction smart contract, verify the recharge information, and verify offline Initial transaction information, verify transaction result information, generate virtual card recharge initial information, generate transaction verification information, set transaction amount information, check whether the transaction result information has been received within the validity period of the transaction;
  • Storage module used to store balance information, transaction information, payer's virtual card ID and public key matrix
  • Calculation module used to update the balance and check whether the balance is sufficient
  • Communication module used to communicate with offline transaction smart contracts and payee virtual cards.
  • the payer's virtual card further includes:
  • Security control module used to calculate the public key of the payer's virtual card, verify the signature of the payer's virtual card, calculate the public key of the offline transaction smart contract, verify the signature of the offline transaction smart contract, verify the successful information of the account recharge transaction on the chain, Verify transaction verification information, generate initial information for on-chain account recharge, generate initial information for offline transactions, generate transaction result information, and set transaction amount information;
  • Storage module used to store balance information, transaction information, payee virtual card ID and public key matrix
  • Calculation module used to update the balance and check whether the balance is sufficient
  • Communication module used to communicate with offline transaction smart contracts and payer's virtual card.

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Computer Security & Cryptography (AREA)
  • Finance (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

一种基于标识认证的区块链离线交易方法和***,所述方法包括:收款方虚拟卡生成第一初始信息,并将所述第一初始信息发送至付款方虚拟卡;所述第一初始信息至少包括收款方标识和第一交易金额(210);所述付款方虚拟卡基于验证后的所述第一初始信息,生成第一交易信息,所述第一交易信息至少包括所述付款方虚拟卡扣除与所述第一初始信息中的第一交易金额相同资产的交易信息(220);所述付款方虚拟卡基于所述第一交易信息生成第一交易验证信息(230);所述收款方虚拟卡基于验证后的所述第一交易验证信息,增加与所述第一交易金额相同的资产(240)。该方法可实现安全便捷的链下离线交易。

Description

一种基于标识认证的区块链离线交易方法和*** 技术领域
本发明涉及计算机领域,特别是涉及一种基于标识认证的区块链离线交易方法和***。
背景技术
区块链是一种关于信任的互联网协议和技术的结合,目的是构建一种分布式部署并且实时同步的***,其中的数据只可以添加而不能篡改,同时允许多方根据共识机制参与数据的建立和维护,保证链上的每个有效节点具备完全一致的数据。
区块链技术中,为了保证每笔交易的安全性,即使小额的交易也需要进行全网的共识,不但给交易双方带来不便,而且耗费了大量的计算资源。因此在部分区块链中,为了解决频繁的小额交易过于繁琐的问题,通过闪电网络或者雷电网络等技术在账户之间建立特殊的交易通道,只要在中间过程中有用户同时拥有与交易双方分别建立的通道,就可以产生双向通道,连接更大范围的用户,形成支付通道网络。在支付通道中进行交易时不需要进行全网的共识,只需要在资产离开交易通道时全网络节点确认最终交易的变动。
但是这类交易通道网络在使用过程中必须满足通道相关的用户同时在线,保持通道的通畅,并不能实现离线的交易。
发明内容
基于此,有必要针对目前在区块链的交易通道网络中无法实现离线交易的问题,提供一种基于标识认证的区块链离线交易方法和***。
一种基于标识认证的区块链离线交易方法,所述方法包括:
收款方虚拟卡生成第一初始信息,并将所述第一初始信息发送至付款方虚拟卡;所述第一初始信息至少包括收款方标识和第一交易金额;
所述付款方虚拟卡基于验证后的所述第一初始信息,生成第一交易信息, 所述第一交易信息至少包括所述付款方虚拟卡扣除与所述第一初始信息中的第一交易金额相同资产的交易信息;
所述付款方虚拟卡基于所述第一交易信息生成第一交易验证信息;
所述收款方虚拟卡基于验证后的所述第一交易验证信息,增加与所述第一交易金额相同的资产。
在其中一个实施例中,所述收款方虚拟卡生成第一初始信息之前,所述方法还包括:
付款方虚拟卡基于付款方账户生成第二初始信息;所述第二初始信息至少包括付款方标识和第二交易金额;
区块链上的离线交易智能合约基于验证后的第二初始信息,生成充值信息,所述充值信息用于记录所述离线交易智能合约基于所述初始信息发起的第一目标交易,所述第一目标交易用于将与所述第二交易金额对应的资产从所述付款方账户转移到所述离线交易智能合约的地址,所述离线交易智能合约更新其总金额;
所述付款方虚拟卡基于验证后的所述充值信息,增加与所述第二交易金额相同的资产。
在其中一个实施例中,所述收款方虚拟卡基于验证后的所述第一交易验证信息,增加与所述第一交易金额相同的资产之后,所述方法还包括:
收款方虚拟卡基于收款方账户生成第三初始信息;所述第三初始信息至少包括收款方标识和第三交易金额;
区块链上的离线交易智能合约基于验证后的第三初始信息,从所述离线交易智能合约中将与所述第三交易金额对应的资产转移至所述收款方账户。
在其中一个实施例中,所述收款方虚拟卡基于验证后的所述第一交易验证信息,增加与所述第一交易金额相同的资产之后,所述方法还包括:
收款方虚拟卡生成交易结果信息,所述交易结果信息至少包括收款方标识,付款方标识、交易金额信息、交易时间信息以及交易有效期信息;
付款方虚拟卡基于验证后的交易结果信息,记录所述交易结果信息。
在其中一个实施例中,所述收款方虚拟卡基于收款方账户生成第三初始信 息,包括:
所述收款方虚拟卡基于收款方账户需要收到的第三交易金额,从中减少与所述第三交易金额相应的资产;
所述收款方虚拟卡基于所述收款方账户和所述第三交易金额生成第三初始信息。
在其中一个实施例中,所述区块链上的离线交易智能合约基于验证后的第二初始信息,生成充值信息之前,所述方法还包括:
所述付款方虚拟卡基于所述付款方虚拟卡的私钥和所述付款方账户的私钥,对所述第二初始信息进行签名;
所述付款方虚拟卡将所述第二初始信息和所述第二初始信息的签名发送至离线交易智能合约;
所述离线交易智能合约基于所述第二初始信息的签名对所述第二初始信息进行验证。
在其中一个实施例中,所述区块链上的离线交易智能合约基于验证后的第三初始信息,从所述离线交易智能合约中将与所述第三交易金额对应的资产转移至所述收款方账户之前,所述方法还包括:
所述收款方虚拟卡基于所述虚拟卡的私钥对所述第三初始信息进行签名;
所述收款方虚拟卡将所述第三初始信息和所述第三初始信息的签名发送至所述离线交易智能合约;
所述离线交易智能合约基于所述第三初始信息的签名对所述第三初始信息进行验证。
在其中一个实施例中,区块链上的离线交易智能合约基于验证后的第三初始信息,从所述离线交易智能合约中将与所述第三交易金额对应的资产转移至所述收款方账户之前,所述方法还包括:
将所述离线智能交易合约中的总金额与所述第三交易金额的大小进行比较;
其中,从所述离线交易智能合约中将与所述第三交易金额对应的资产转移至所述收款方账户,具体为:
当所述总金额大于或等于所述第三交易金额时,从所述离线交易智能合约中将与所述第三交易金额对应的资产转移至所述收款方账户。
一种基于标识认证的区块链离线交易***,所述***包括:
区块链上的离线交易智能合约:用于校验虚拟卡生成的初始信息,存储参与离线交易的资产,根据交易信息完成与链上账户的交易。
付款方链上账户:用于存储付款方在链上的资产;
收款方链上账户:用于存储收款方在链上的资产;
付款方虚拟卡:用于发起资产下链过程进行充值,执行与收款方虚拟卡的离线交易、存储付款方的链下资产;
收款方虚拟卡:用于发起与付款方虚拟卡的离线交易、发起资产上链过程对收款方链上账户进行充值、存储收款方的链下资产;
在其中一个实施例中,离线交易智能合约,还包括:
合约虚拟机:用于处理和执行合约的指令;
安全模块:用于计算虚拟卡的公钥、验证虚拟卡的签名、校验初始信息、生成充值信息、生成交易成功信息;
账户模块:用于存储余额信息、交易信息、离线交易智能合约标识ID和公钥矩阵等、更新余额、校验余额是否充足等;
接口模块:用于进行与付款方链上账户、收款方链上账户、付款方虚拟卡、收款方虚拟卡之间的通信。
在其中一个实施例中,付款方链上账户还包括:
安全模块:用于验证离线交易智能合约发起的链上交易;
账户模块:用于存储余额信息、交易信息,用于更新余额、校验余额是否充足;
通信模块:用于进行与离线交易智能合约之间的通信;
共识模块:参与区块链上的共识。
在其中一个实施例中,收款方链上账户还包括:
安全模块:用于验证离线交易智能合约发起的链上交易;
账户模块:用于存储余额信息、交易信息,用于更新余额、校验余额是否 充足;
通信模块:用于进行与离线交易智能合约之间的通信;
共识模块:参与区块链上的共识。
在其中一个实施例中,付款方虚拟卡还包括:
安全控制模块:用于计算收款方虚拟卡的公钥、验证收款方虚拟卡的签名、计算离线交易智能合约的公钥、验证离线交易智能合约的签名、校验充值信息、校验离线交易初始信息、校验交易结果信息、生成虚拟卡充值初始信息、生成交易验证信息、设置交易金额信息、在交易有效期内检查是否已收到交易结果信息;
存储模块:用于存储余额信息、交易信息、付款方虚拟卡标识ID和公钥矩阵;
计算模块:用于更新余额、校验余额是否充足;
通信模块:用于进行与离线交易智能合约、收款方虚拟卡之间的通信。
在其中一个实施例中,付款方虚拟卡还包括:
安全控制模块:用于计算付款方虚拟卡的公钥、验证付款方虚拟卡的签名、计算离线交易智能合约的公钥、验证离线交易智能合约的签名、校验链上账户充值交易成功信息、校验交易验证信息、生成链上账户充值初始信息、生成离线交易初始信息、生成交易结果信息、设置交易金额信息;
存储模块:用于存储余额信息、交易信息、收款方虚拟卡标识ID和公钥矩阵;
计算模块:用于更新余额、校验余额是否充足;
通信模块:用于进行与离线交易智能合约、付款方虚拟卡之间的通信。
本发明通过采用基于标识认证技术的区块链离线交易方法,在区块链中结合点对点标识认证方法,安全便捷地实现了资产在区块链上和链下虚拟卡之间的转移,并做到真实可信;且链下虚拟卡之间通过收款方和付款方标识(ID)进行身份的认证,无需第三方可信机构参与,无需证书,无需传递公钥,即可实现安全便捷的链下离线交易。
附图说明
图1为一实施例的从链上到链下基于标识认证的区块链离线交易方法的整体流程图;
图2为另一实施例的基于标识认证的区块链离线交易方法的流程图;
图3为再一实施例的基于标识认证的区块链离线交易方法的流程图;
图4为又一实施例的基于标识认证的区块链离线交易方法的流程图;
图5为一实施例的基于标识认证的区块链离线交易***的结构图。
具体实施方式
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
图1为一实施例的从链上到链下基于标识认证的区块链离线交易方法的整体流程图,如图1所示,以上方法包括:
步骤110,资产从链上付款方账户转移到链下付款方虚拟卡。
当付款方账户需要向收款方账户付款时,需要通过离线交易实现时,资产可以先从付款方账户转移到链下付款方虚拟卡。
步骤120,资产从链下付款方虚拟卡转移到链下收款方虚拟卡。
付款方虚拟卡的资产在增加后,资产可以从付款方虚拟卡中转移至收款方虚拟卡,从而在链下实现资产的转移。
步骤130,资产从链下收款方虚拟卡转移到链上收款方账户。
最后,资产可以从收款方虚拟卡转移至收款方账户,从而完成整个链上至链下的离线交易过程,安全便捷的实现链下离线交易的全过程。
本实施例以下结合具体的过程,对以上内容进一步详述。
图2为一实施例的基于标识认证的区块链离线交易方法的流程图。如图2所示,该方法包括:
步骤210,收款方虚拟卡生成第一初始信息,并将第一初始信息发送至付款方虚拟卡;第一初始信息至少包括收款方标识和第一交易金额;
步骤220,付款方虚拟卡基于验证后的第一初始信息,生成第一交易信息,第一交易信息至少包括付款方虚拟卡扣除与第一初始信息中的第一交易金额相同资产的交易信息;
步骤230,付款方虚拟卡基于第一交易信息生成第一交易验证信息;
步骤240,收款方虚拟卡基于验证后的第一交易验证信息,增加与第一交易金额相同的资产。
本发明通过采用基于标识认证技术的区块链离线交易方法,在区块链中结合点对点标识认证方法,安全便捷地实现了资产在区块链上和链下虚拟卡之间的转移,并做到真实可信;且链下虚拟卡之间通过收款方和付款方标识(ID)进行身份的认证,无需第三方可信机构参与,无需证书,无需传递公钥,即可实现安全便捷的链下离线交易。
本实施例中,图2所示的步骤为图1中步骤120的具体实现过程。
本实施例中,付款方账户、区块链上的离线智能合约、收款方账户可以理解为在链上,付款方虚拟卡与收款方虚拟卡可以理解为在链下。本实施例可以实现链上、链下之间的交易。
链下交易中参与双方(付款方虚拟卡与收款方虚拟卡)均应持有标识ID并且具备链下交易权限,需要进行交易时,由收款方虚拟卡首先生成第一初始信息,签名后发送给付款方虚拟卡。
付款方虚拟卡验证签名,校验第一初始信息,如果不包含交易金额信息,则需要设置交易金额信息。付款方虚拟卡可以根据第一交易金额信息进行扣款,并生成第一交易信息,在本地保存。
付款方虚拟卡根据第一交易信息可以生成第一交易验证信息,还可以使用付款方的私钥进行签名并使用收款方公钥加密,发送给收款方虚拟卡。之后,收款方虚拟卡收到第一交易验证信息后进行验签和解密,校验交易信息,验签和校验通过后根据第一交易金额增加余额,并生成交易结果信息。
本实施例中,收款方虚拟卡基于验证后的第一交易验证信息,增加与第一交易金额相同的资产之后,以上方法还包括:
收款方虚拟卡生成交易结果信息,交易结果信息至少包括收款方标识,付 款方标识、交易金额信息、交易时间信息以及交易有效期信息;
付款方虚拟卡基于验证后的交易结果信息,记录交易结果信息。
本实施例中,收款方虚拟卡在生成交易结果信息后,收款方虚拟卡可以将交易结果信息签名,并使用付款方的公钥进行加密,发送给付款方虚拟卡。付款方虚拟卡收到交易结果信息,验证通过并解密后记录下交易结果信息后,交易完成。
本实施例中,第一初始信息可以包括:收款方标识ID,交易时间和有效期以及收款方签名等信息;第一初始信息中还可以包括:交易金额信息。
交易信息及交易验证信息可以包括:收款方标识ID,付款方标识ID,交易金额信息,交易时间信息,交易有效期信息,以及其他需要的校验信息,并使用付款方私钥进行签名。
交易结果信息可以包括:收款方标识ID,付款方标识ID,交易金额信息,交易时间信息,交易有效期信息,以及其他需要的校验信息,并使用收款方私钥进行签名。
本实施例中,收款方虚拟卡生成交易结果信息后,如果经过了一个预定的响应时间,付款方仍然未能收到交易结果信息,付款方虚拟卡可以校验本地保存的第一交易信息,如果仍在交易有效期内,则重复以上步骤直至收到交易结果信息或者时间超出交易有效期。
本实施例中虚拟卡的公钥和私钥采用标识认证技术与标识ID绑定。虚拟卡的私钥由虚拟卡持有,而虚拟卡公钥可以使用虚拟卡的标识ID通过公开的映射算法得到。
图3为再一实施例的基于标识认证的区块链离线交易方法的流程图。如图3所示,本实施例中,收款方虚拟卡生成第一初始信息之前,以上方法还包括:
步骤310,付款方虚拟卡基于付款方账户生成第二初始信息;第二初始信息至少包括付款方标识和第二交易金额;
步骤320,区块链上的离线交易智能合约基于验证后的第二初始信息,生成充值信息,充值信息用于记录离线交易智能合约基于初始信息发起的第一目标交易,第一目标交易用于将与第二交易金额对应的资产从付款方账户转移到离 线交易智能合约的地址;离线交易智能合约更新其总金额;
步骤330,付款方虚拟卡基于验证后的充值信息,增加与第二交易金额相同的资产。
其中,离线交易智能合约更新其总金额时,是在原来的基础上增加第二交易金额,在原来的基础上更新总金额。
本实施例中,以上图3中所示步骤具体为图1中步骤110的具体实现过程。
其中,区块链上的离线交易智能合约基于验证后的第二初始信息,生成充值信息之前,以上方法还包括:
付款方虚拟卡基于付款方虚拟卡的私钥和付款方账户的私钥,对第二初始信息进行签名;
付款方虚拟卡将第二初始信息和第二初始信息的签名发送至离线交易智能合约;
离线交易智能合约基于第二初始信息的签名对第二初始信息进行验证。
本实施例中,当付款方虚拟卡需要从一个区块链账户(付款方账户)中取出资产时,付款方虚拟卡可以生成一个第二初始信息,分别用虚拟卡私钥和付款方账户的私钥进行签名,将第二初始信息及其签名发送至区块链上。区块链上的离线交易智能合约验证第二初始信息,验证不通过则终止流程,验证通过则获得第二交易金额信息及付款方账户地址。离线交易智能合约根据第二交易金额信息及付款方账户地址,离线交易智能合约在区块链上发起一笔交易(第一目标交易),将对应金额的资产从付款方账户转移到离线交易智能合约的地址。离线交易智能合约可以生成充值信息,将充值信息发送给付款方虚拟卡。付款方虚拟卡验证充值信息,如果验证通过,在付款方虚拟卡中增加相应数量的资产,该资产与第二交易金额相同。
本实施例中,第二初始信息中可以包括:付款方虚拟卡标识ID,付款方账户地址,交易金额,交易时间,交易有效期,付款方虚拟卡标识ID签名,付款方账户地址的私钥签名以及其他需要验证的交易相关信息;
本实施例中,区块链上的离线交易智能合约基于验证后的第二初始信息,生成充值信息时,离线交易智能合约会对第二初始信息进行验证,具体包括: 验证付款方虚拟卡的签名,验证付款方账户地址的签名,校验付款方虚拟卡标识ID的权限,校验交易时间和有效期,校验付款方账户地址中的余额是否充足,以及进行其他需要的校验。
本实施例中,充值信息可以包括付款方虚拟卡标识ID,付款方账户地址,交易金额,交易时间,交易有效期和离线交易合约签名以及其他需要的交易相关信息。
图4为又一实施例的基于标识认证的区块链离线交易方法的流程图,如图4所示,本实施例的一实现方式中,收款方虚拟卡基于验证后的第一交易验证信息,增加与第一交易金额相同的资产之后,以上方法还包括:
步骤410,收款方虚拟卡基于收款方账户生成第三初始信息;第三初始信息至少包括收款方标识和第三交易金额;
步骤420,区块链上的离线交易智能合约基于验证后的第三初始信息,从离线交易智能合约中将与第三交易金额对应的资产转移至收款方账户。
本实施例中,以上图4中所示步骤具体为图1中步骤130的具体实现过程。
其中,收款方虚拟卡基于收款方账户生成第三初始信息,包括:
收款方虚拟卡基于收款方账户需要收到的第三交易金额,从中减少与第三交易金额相应的资产;
收款方虚拟卡基于收款方账户和第三交易金额生成第三初始信息。
本实施例的另一实现方式中,区块链上的离线交易智能合约基于验证后的第三初始信息,从离线交易智能合约中将与第三交易金额对应的资产转移至收款方账户之前,以上方法还包括:
收款方虚拟卡基于虚拟卡的私钥对第三初始信息进行签名;
收款方虚拟卡将第三初始信息和第三初始信息的签名发送至离线交易智能合约;
离线交易智能合约基于第三初始信息的签名对第三初始信息进行验证。
本实施例的再一实施例中,区块链上的离线交易智能合约基于验证后的第三初始信息,从离线交易智能合约中将与第三交易金额对应的资产转移至收款方账户之前,以上方法还包括:
将离线智能交易合约中的总金额与第三交易金额的大小进行比较;
其中,从离线交易智能合约中将与第三交易金额对应的资产转移至收款方账户,具体为:
当总金额大于或等于第三交易金额时,从从离线交易智能合约中将与第三交易金额对应的资产转移至收款方账户。
收款方虚拟卡需要转移资产到一个区块链账户(收款方账户)时,先在收款方虚拟卡中将余额扣除。具体而言,收款方虚拟卡可以扣除第三交易金额后,,虚拟卡会产生一个第三初始信息,使用收款方虚拟卡私钥进行签名,将第三初始信息和签名发送到区块链上。离线交易智能合约验证第三初始信息,如果验证失败则终止流程,验证成功,离线交易智能合约则校验离线交易智能合约地址中的余额,并与第三初始信息中的第三交易金额对比,如果离线交易智能合约地址的余额高于第三初始信息中的第三交易金额,继续交易,否则终止交易并发送交易失败信息至收款方虚拟卡。如果进行继续交易,离线交易智能合约在区块链上进行一次交易,根据第三初始信息中的第三交易金额将等量的资产从离线交易智能合约地址转移到收款方账户中。离线交易智能合约成功完成链上的交易后,生成交易成功信息并签名,加密发送给收款方虚拟卡。收款方虚拟卡收到交易成功信息后进行验证,验证通过后记录下本次交易。
本实施例中,第三初始信息中可以包括:收款方虚拟卡标识ID,区块链收款方账户地址,交易金额,交易时间,交易有效期和收款方虚拟卡签名以及其他需要的交易相关信息。
本实施例中,如果离线交易智能合约地址的余额小于第三初始信息中的第三交易金额,导致交易失败时,所发送的交易失败信息可以包括:收款方虚拟卡标识ID,区块链收款方账户地址,交易金额,交易时间,交易有效期、交易失败原因和离线交易智能合约签名以及其他需要的交易相关信息。
本实施例中,离线交易智能合约成功完成链上的交易后,生成交易成功信息并签名,加密发送给收款方虚拟卡时,交易成功信息可以包括:收款方虚拟卡标识ID,区块链收款方账户地址,交易金额,交易时间,交易有效期、交易凭证和离线交易智能合约签名以及其他需要的交易相关信息。
本实施例中,以上第一初始信息、第二初始信息、第三初始信息可以为分别独立的初始信息。第一交易金额、第二交易金额、第三交易金额分别为独立的交易金额。
本实施例中,在离线交易智能合约中可以存储标识认证的域、子域以及标识ID权限等信息,从而可以在离线交易智能合约中验证虚拟卡的签名并验证虚拟卡执行资产下链、资产上链等操作的权限。
本实施例的一实现方式中,虚拟卡的私钥通过子域划分的方式可以生成不同的子域私钥,在上链、下链和链下交易三个过程中,虚拟卡分别需要使用上链子域私钥、下链子链私钥和链下交易子域私钥进行签名,否则在区块链上验签时无法通过。
其中,虚拟卡进行信息的存储和处理,以及虚拟卡之间的认证和交互,均通过安全容器进行保护。所述安全容器即为一种采用虚拟机技术实现的安全计算环境,既包括核心的算法,又包括需要安全保存的数据。安全容器综合运用了静态混淆和动态混淆的技术,既有代码的混淆,防篡改签名,又有沙箱或tee保护执行。其保存的代码和数据经过混淆与加密,能够有效的防止破解者对程序进行的静态分析。安全容器在使用时,通过环境检查、反调试技术和自动销毁技术等,防止破解者对核心代码的动态分析。当发生动态分析时,安全容器会触发销毁机制,破坏安全容器中的文件,使其内容无法被读取。
本实施例中,虚拟卡的标识ID可以进行硬件绑定,确保在指定设备上才能进行合法操作。
本实施例在区块链中结合点对点标识认证方法,可以安全便捷地实现资产在区块链上和链下虚拟卡之间的转移,并做到真实可信。链下虚拟卡之间通过标识ID进行身份的认证,无需第三方可信机构参与,无需证书,无需传递公钥,实现安全便捷的链下离线交易。
本实施例中,交易双方身份通过唯一标识ID在己方终端上自证身份,并通过安全容器技术和硬件绑定技术进行保护,创造了安全可信的离线交易环境。
本实施例通过采用基于标识认证技术的区块链离线交易方法,实现安全便捷的链下离线交易,在保证了区块链原有的去中心化、高安全的特点的同时, 提高了交易的便捷性和实用性。在离线交易过程中,不需要交易双方共同维护一个账户,把资金预先锁入账户之中,而是当交易确实发生时,直接从各自账户建立交易。离线交易之间不存在中间环节,不需要其他账户进行连接,只需要交易双方终端的通信,交易相对独立,减少了网络通信压力,没有中心化的风险。参与交易的双方不再需要对交易进行实时的确认,也不需要即时地在全网确认资产的变动,就可以完成交易并且在交易中获得的资产可以立即确认和使用。
图5为一实施例的基于标识认证的区块链离线交易***的结构图。如图5所示,该***包括:
区块链上的离线交易智能合约510:用于校验虚拟卡生成的初始信息,存储参与离线交易的资产,根据交易信息完成与链上账户的交易。
付款方链上账户520:用于存储付款方在链上的资产;
收款方链上账户530:用于存储收款方在链上的资产;
付款方虚拟卡540:用于发起资产下链过程进行充值,执行与收款方虚拟卡的离线交易、存储付款方的链下资产;
收款方虚拟卡550:用于发起与付款方虚拟卡的离线交易、发起资产上链过程对收款方链上账户进行充值、存储收款方的链下资产。
本发明通过采用基于标识认证技术的区块链离线交易方法,在区块链中结合点对点标识认证方法,安全便捷地实现了资产在区块链上和链下虚拟卡之间的转移,并做到真实可信;且链下虚拟卡之间通过收款方和付款方标识(ID)进行身份的认证,无需第三方可信机构参与,无需证书,无需传递公钥,即可实现安全便捷的链下离线交易。
本实施例一实现方式中,离线交易智能合约,还包括:
合约虚拟机:用于处理和执行合约的指令;
安全模块:用于计算虚拟卡的公钥、验证虚拟卡的签名、校验初始信息、生成充值信息、生成交易成功信息;
账户模块:用于存储余额信息、交易信息、离线交易智能合约标识ID和公钥矩阵等、更新余额、校验余额是否充足等;
接口模块:用于进行与付款方链上账户、收款方链上账户、付款方虚拟卡、收款方虚拟卡之间的通信。
本实施例一实现方式中,付款方链上账户还包括:
安全模块:用于验证离线交易智能合约发起的链上交易;
账户模块:用于存储余额信息、交易信息,用于更新余额、校验余额是否充足;
通信模块:用于进行与离线交易智能合约之间的通信;
共识模块:参与区块链上的共识。
本实施例一实现方式中,收款方链上账户还包括:
安全模块:用于验证离线交易智能合约发起的链上交易;
账户模块:用于存储余额信息、交易信息,用于更新余额、校验余额是否充足;
通信模块:用于进行与离线交易智能合约之间的通信;
共识模块:参与区块链上的共识。
本实施例一实现方式中,付款方虚拟卡还包括:
安全控制模块:用于计算收款方虚拟卡的公钥、验证收款方虚拟卡的签名、计算离线交易智能合约的公钥、验证离线交易智能合约的签名、校验充值信息、校验离线交易初始信息、校验交易结果信息、生成虚拟卡充值初始信息、生成交易验证信息、设置交易金额信息、在交易有效期内检查是否已收到交易结果信息;
存储模块:用于存储余额信息、交易信息、付款方虚拟卡标识ID和公钥矩阵;
计算模块:用于更新余额、校验余额是否充足;
通信模块:用于进行与离线交易智能合约、收款方虚拟卡之间的通信。
本实施例一实现方式中,付款方虚拟卡还包括:
安全控制模块:用于计算付款方虚拟卡的公钥、验证付款方虚拟卡的签名、计算离线交易智能合约的公钥、验证离线交易智能合约的签名、校验链上账户充值交易成功信息、校验交易验证信息、生成链上账户充值初始信息、生成离 线交易初始信息、生成交易结果信息、设置交易金额信息;
存储模块:用于存储余额信息、交易信息、收款方虚拟卡标识ID和公钥矩阵;
计算模块:用于更新余额、校验余额是否充足;
通信模块:用于进行与离线交易智能合约、付款方虚拟卡之间的通信。
以上所述***的实现方式与以上所述方法的实现方式相同,具体可以参照以上方法实施例中的具体内容,本实施例在此不再具体阐述。
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本发明的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形和改进,这些都属于本发明的保护范围。因此,本发明专利的保护范围应以所附权利要求为准。

Claims (14)

  1. 一种基于标识认证的区块链离线交易方法,其特征在于,所述方法包括:
    收款方虚拟卡生成第一初始信息,并将所述第一初始信息发送至付款方虚拟卡;所述第一初始信息至少包括收款方标识和第一交易金额;
    所述付款方虚拟卡基于验证后的所述第一初始信息,生成第一交易信息,所述第一交易信息至少包括所述付款方虚拟卡扣除与所述第一初始信息中的第一交易金额相同资产的交易信息;
    所述付款方虚拟卡基于所述第一交易信息生成第一交易验证信息;
    所述收款方虚拟卡基于验证后的所述第一交易验证信息,增加与所述第一交易金额相同的资产。
  2. 根据权利要求1所述的方法,其特征在于,所述收款方虚拟卡生成第一初始信息之前,所述方法还包括:
    付款方虚拟卡基于付款方账户生成第二初始信息;所述第二初始信息至少包括付款方标识和第二交易金额;
    区块链上的离线交易智能合约基于验证后的第二初始信息,生成充值信息,所述充值信息用于记录所述离线交易智能合约基于所述初始信息发起的第一目标交易,所述第一目标交易用于将与所述第二交易金额对应的资产从所述付款方账户转移到所述离线交易智能合约的地址,所述离线交易智能合约更新其总金额;
    所述付款方虚拟卡基于验证后的所述充值信息,增加与所述第二交易金额相同的资产。
  3. 根据权利要求2所述的方法,其特征在于,所述收款方虚拟卡基于验证后的所述第一交易验证信息,增加与所述第一交易金额相同的资产之后,所述方法还包括:
    收款方虚拟卡基于收款方账户生成第三初始信息;所述第三初始信息至少包括收款方标识和第三交易金额;
    区块链上的离线交易智能合约基于验证后的第三初始信息,从所述离线交易智能合约中将与所述第三交易金额对应的资产转移至所述收款方账户。
  4. 根据权利要求1所述的方法,其特征在于,所述收款方虚拟卡基于验证后的所述第一交易验证信息,增加与所述第一交易金额相同的资产之后,所述方法还包括:
    收款方虚拟卡生成交易结果信息,所述交易结果信息至少包括收款方标识,付款方标识、交易金额信息、交易时间信息以及交易有效期信息;
    付款方虚拟卡基于验证后的交易结果信息,记录所述交易结果信息。
  5. 根据权利要求3所述的方法,其特征在于,所述收款方虚拟卡基于收款方账户生成第三初始信息,包括:
    所述收款方虚拟卡基于收款方账户需要收到的第三交易金额,从中减少与所述第三交易金额相应的资产;
    所述收款方虚拟卡基于所述收款方账户和所述第三交易金额生成第三初始信息。
  6. 根据权利要求2所述的方法,其特征在于,所述区块链上的离线交易智能合约基于验证后的第二初始信息,生成充值信息之前,所述方法还包括:
    所述付款方虚拟卡基于所述付款方虚拟卡的私钥和所述付款方账户的私钥,对所述第二初始信息进行签名;
    所述付款方虚拟卡将所述第二初始信息和所述第二初始信息的签名发送至离线交易智能合约;
    所述离线交易智能合约基于所述第二初始信息的签名对所述第二初始信息进行验证。
  7. 根据权利要求3所述的方法,其特征在于,所述区块链上的离线交易智能合约基于验证后的第三初始信息,从所述离线交易智能合约中将与所述第三交易金额对应的资产转移至所述收款方账户之前,所述方法还包括:
    所述收款方虚拟卡基于所述虚拟卡的私钥对所述第三初始信息进行签名;
    所述收款方虚拟卡将所述第三初始信息和所述第三初始信息的签名发送至所述离线交易智能合约;
    所述离线交易智能合约基于所述第三初始信息的签名对所述第三初始信息进行验证。
  8. 根据权利要求3所述的方法,其特征在于,区块链上的离线交易智能合约基于验证后的第三初始信息,从所述离线交易智能合约中将与所述第三交易金额对应的资产转移至所述收款方账户之前,所述方法还包括:
    将所述离线智能交易合约中的总金额与所述第三交易金额的大小进行比较;
    其中,从所述离线交易智能合约中将与所述第三交易金额对应的资产转移至所述收款方账户,具体为:
    当所述总金额大于或等于所述第三交易金额时,从所述离线交易智能合约中将与所述第三交易金额对应的资产转移至所述收款方账户。
  9. 一种基于标识认证的区块链离线交易***,其特征在于,所述***包括:
    区块链上的离线交易智能合约:用于校验虚拟卡生成的初始信息,存储参与离线交易的资产,根据交易信息完成与链上账户的交易。
    付款方链上账户:用于存储付款方在链上的资产;
    收款方链上账户:用于存储收款方在链上的资产;
    付款方虚拟卡:用于发起资产下链过程进行充值,执行与收款方虚拟卡的离线交易、存储付款方的链下资产;
    收款方虚拟卡:用于发起与付款方虚拟卡的离线交易、发起资产上链过程对收款方链上账户进行充值、存储收款方的链下资产。
  10. 根据权利要求9所述的***,其特征在于,离线交易智能合约,还包括:
    合约虚拟机:用于处理和执行合约的指令;
    安全模块:用于计算虚拟卡的公钥、验证虚拟卡的签名、校验初始信息、生成充值信息、生成交易成功信息;
    账户模块:用于存储余额信息、交易信息、离线交易智能合约标识ID和公钥矩阵等、更新余额、校验余额是否充足等;
    接口模块:用于进行与付款方链上账户、收款方链上账户、付款方虚拟卡、收款方虚拟卡之间的通信。
  11. 根据权利要求9所述的***,其特征在于,付款方链上账户还包括:
    安全模块:用于验证离线交易智能合约发起的链上交易;
    账户模块:用于存储余额信息、交易信息,用于更新余额、校验余额是否充足;
    通信模块:用于进行与离线交易智能合约之间的通信;
    共识模块:参与区块链上的共识。
  12. 根据权利要求9所述的***,其特征在于,收款方链上账户还包括:
    安全模块:用于验证离线交易智能合约发起的链上交易;
    账户模块:用于存储余额信息、交易信息,用于更新余额、校验余额是否充足;
    通信模块:用于进行与离线交易智能合约之间的通信;
    共识模块:参与区块链上的共识。
  13. 根据权利要求9所述的***,其特征在于,付款方虚拟卡还包括:
    安全控制模块:用于计算收款方虚拟卡的公钥、验证收款方虚拟卡的签名、计算离线交易智能合约的公钥、验证离线交易智能合约的签名、校验充值信息、校验离线交易初始信息、校验交易结果信息、生成虚拟卡充值初始信息、生成交易验证信息、设置交易金额信息、在交易有效期内检查是否已收到交易结果信息;
    存储模块:用于存储余额信息、交易信息、付款方虚拟卡标识ID和公钥矩阵;
    计算模块:用于更新余额、校验余额是否充足;
    通信模块:用于进行与离线交易智能合约、收款方虚拟卡之间的通信。
  14. 根据权利要求9所述的***,其特征在于,付款方虚拟卡还包括:
    安全控制模块:用于计算付款方虚拟卡的公钥、验证付款方虚拟卡的签名、计算离线交易智能合约的公钥、验证离线交易智能合约的签名、校验链上账户充值交易成功信息、校验交易验证信息、生成链上账户充值初始信息、生成离线交易初始信息、生成交易结果信息、设置交易金额信息;
    存储模块:用于存储余额信息、交易信息、收款方虚拟卡标识ID和公钥矩阵;
    计算模块:用于更新余额、校验余额是否充足;
    通信模块:用于进行与离线交易智能合约、付款方虚拟卡之间的通信。
PCT/CN2020/101304 2019-07-15 2020-07-10 一种基于标识认证的区块链离线交易方法和*** WO2021008453A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910636658.4 2019-07-15
CN201910636658.4A CN110348853B (zh) 2019-07-15 2019-07-15 一种基于标识认证的区块链离线交易方法和***

Publications (1)

Publication Number Publication Date
WO2021008453A1 true WO2021008453A1 (zh) 2021-01-21

Family

ID=68175323

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/101304 WO2021008453A1 (zh) 2019-07-15 2020-07-10 一种基于标识认证的区块链离线交易方法和***

Country Status (2)

Country Link
CN (1) CN110348853B (zh)
WO (1) WO2021008453A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112906069A (zh) * 2021-03-18 2021-06-04 上海能链众合科技有限公司 一种区块链登记管理过程的可信计算方法
EP4148645A1 (en) * 2021-09-09 2023-03-15 Fluency Group Ltd Systems and methods for implementing offline protocol in cbdc networks using collateral chain
WO2023036620A1 (en) * 2021-09-09 2023-03-16 Fluency Group Ltd Systems and methods for implementing offline payment in cbdc networks using collateral chain
US11935065B2 (en) 2021-09-09 2024-03-19 Fluency Group Ltd. Systems and methods for implementing offline protocol in CBDC networks using collateral chain

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110348853B (zh) * 2019-07-15 2022-03-08 聂明 一种基于标识认证的区块链离线交易方法和***
CN111553767B (zh) * 2020-04-29 2023-04-18 天网互联科技(深圳)有限公司 基于区块链的共享房屋租赁***、方法和存储介质
CN111768192B (zh) * 2020-06-18 2023-10-20 上海交通大学 链下通道金额均衡方法及***
CN112150131A (zh) * 2020-10-01 2020-12-29 香港数拟经济技术有限公司 基于区块链去中心化点对点支付通道交易方法及***
CN113807959A (zh) * 2021-01-28 2021-12-17 刘高峰 一种防止数字资产近距离重复转移的方法及终端
CN113222588B (zh) * 2021-06-03 2023-06-20 支付宝(杭州)信息技术有限公司 基于区块链的代金卡创建、更新及查询方法、装置及设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170236121A1 (en) * 2016-02-11 2017-08-17 Mastercard International Incorporated Method and system for offline blockchain exchanges
CN108399571A (zh) * 2018-01-30 2018-08-14 厦门快商通信息技术有限公司 基于区块链智能合约的无担保交易方法及***
CN109472588A (zh) * 2018-10-29 2019-03-15 平安科技(深圳)有限公司 一种基于区块链的离线支付方法、装置、设备和存储介质
CN109493016A (zh) * 2018-10-24 2019-03-19 中国工商银行股份有限公司 基于数字货币的离线支付方法、终端及代理投放设备
CN110348853A (zh) * 2019-07-15 2019-10-18 中城智慧科技有限公司 一种基于标识认证的区块链离线交易方法和***

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106845960B (zh) * 2017-01-24 2018-03-20 上海壹账通区块链科技有限公司 基于区块链的安全交易方法及***
KR101877345B1 (ko) * 2017-04-18 2018-07-12 주식회사 코인플러그 블록체인 및 이와 연동되는 머클 트리 구조 기반의 토큰 아이디를 이용하여 카드 사용을 승인하는 방법 및 이를 이용한 서버
CN108681965B (zh) * 2018-04-24 2021-01-29 全链通有限公司 离线节点的区块链网络交易处理方法和装置
CN108764920A (zh) * 2018-05-17 2018-11-06 立旃(上海)科技有限公司 基于区块链的离线交易方法及装置
CN108764868B (zh) * 2018-05-25 2020-10-27 全链通有限公司 区块链节点代理对账方法和区块对账代理节点
CN109583868B (zh) * 2018-10-17 2020-10-27 北京瑞卓喜投科技发展有限公司 支付状态通道网络及其构建方法和***、高频交易***
CN109858910A (zh) * 2019-01-17 2019-06-07 杨俊佳 基于区块链的计算机设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170236121A1 (en) * 2016-02-11 2017-08-17 Mastercard International Incorporated Method and system for offline blockchain exchanges
CN108399571A (zh) * 2018-01-30 2018-08-14 厦门快商通信息技术有限公司 基于区块链智能合约的无担保交易方法及***
CN109493016A (zh) * 2018-10-24 2019-03-19 中国工商银行股份有限公司 基于数字货币的离线支付方法、终端及代理投放设备
CN109472588A (zh) * 2018-10-29 2019-03-15 平安科技(深圳)有限公司 一种基于区块链的离线支付方法、装置、设备和存储介质
CN110348853A (zh) * 2019-07-15 2019-10-18 中城智慧科技有限公司 一种基于标识认证的区块链离线交易方法和***

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112906069A (zh) * 2021-03-18 2021-06-04 上海能链众合科技有限公司 一种区块链登记管理过程的可信计算方法
CN112906069B (zh) * 2021-03-18 2023-08-29 上海零数众合信息科技有限公司 一种区块链登记管理过程的可信计算方法
EP4148645A1 (en) * 2021-09-09 2023-03-15 Fluency Group Ltd Systems and methods for implementing offline protocol in cbdc networks using collateral chain
WO2023036620A1 (en) * 2021-09-09 2023-03-16 Fluency Group Ltd Systems and methods for implementing offline payment in cbdc networks using collateral chain
US11935065B2 (en) 2021-09-09 2024-03-19 Fluency Group Ltd. Systems and methods for implementing offline protocol in CBDC networks using collateral chain

Also Published As

Publication number Publication date
CN110348853A (zh) 2019-10-18
CN110348853B (zh) 2022-03-08

Similar Documents

Publication Publication Date Title
WO2021008453A1 (zh) 一种基于标识认证的区块链离线交易方法和***
CN111062716B (zh) 生成区块链签名数据的方法及装置、区块链交易发起***
CN108418680B (zh) 一种基于安全多方计算技术的区块链密钥恢复方法、介质
CN107240017B (zh) 区块链交易管理***及方法
US20200127813A1 (en) Method and system for creating a user identity
RU2710897C2 (ru) Способы безопасного генерирования криптограмм
KR102621116B1 (ko) Id 기반 공개 키 암호화를 이용한 전자 지불 방법 및 전자 디바이스
US20170344983A1 (en) BIXCoin: A Secure Peer-to-Peer Payment System Based on the Public Payments Ledger
CN105900375B (zh) 用于在认证交易中保护身份的设备、***和方法
WO2018197491A1 (en) Method and system for settling a blockchain transaction
CN107609866B (zh) 基于虚拟货币的电子支付、电子收款方法及装置
US20080235513A1 (en) Three Party Authentication
CN110612547A (zh) 一种用于信息保护的***和方法
CN111418184A (zh) 基于区块链的可信保函
US10657523B2 (en) Reconciling electronic transactions
CN110634072B (zh) 一种基于多签和硬件加密的区块链交易***
US20220300962A1 (en) Authenticator App for Consent Architecture
CN102693478A (zh) 一种招投标过程中的投标保证金交易方法及***
KR20180052838A (ko) 수취인 증명 기반의 불변의 이중 기록을 이용한 안심송금 방법
CN116210199A (zh) 分布式计算***中的数据管理和加密
CN116720839A (zh) 基于区块链技术的金融信息管理方法及其监管***
CN111062833A (zh) 一种合同数据的签名认证方法及相关装置
EP4379631A1 (en) Digital wallet device and dual offline transaction method thereof
KR20180054972A (ko) 수취인 증명 기반의 모바일 안심송금 방법
JP4148465B2 (ja) 電子価値流通システムおよび電子価値流通方法

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: 20840918

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: 20840918

Country of ref document: EP

Kind code of ref document: A1