CN113222567B - Prepaid card management method and device based on block chain technology and block chain link points - Google Patents

Prepaid card management method and device based on block chain technology and block chain link points Download PDF

Info

Publication number
CN113222567B
CN113222567B CN202110551282.4A CN202110551282A CN113222567B CN 113222567 B CN113222567 B CN 113222567B CN 202110551282 A CN202110551282 A CN 202110551282A CN 113222567 B CN113222567 B CN 113222567B
Authority
CN
China
Prior art keywords
account
consumer
prepaid
contract account
prepaid contract
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202110551282.4A
Other languages
Chinese (zh)
Other versions
CN113222567A (en
Inventor
窦兴
张亮轩
张一锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhongchao Credit Card Industry Development Co ltd
China Banknote Printing and Minting Group Co Ltd
Original Assignee
Zhongchao Credit Card Industry Development Co ltd
Zhongchao Creditcard Industry Development Co Ltd Hangzhou Blockchain Technology Research Institute
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 Zhongchao Credit Card Industry Development Co ltd, Zhongchao Creditcard Industry Development Co Ltd Hangzhou Blockchain Technology Research Institute filed Critical Zhongchao Credit Card Industry Development Co ltd
Priority to CN202110551282.4A priority Critical patent/CN113222567B/en
Publication of CN113222567A publication Critical patent/CN113222567A/en
Application granted granted Critical
Publication of CN113222567B publication Critical patent/CN113222567B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • G06Q20/065Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash
    • 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
    • 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/28Pre-payment schemes, e.g. "pay before"
    • 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/3821Electronic credentials
    • G06Q20/38215Use of certificates or encrypted proofs of transaction rights

Abstract

The application discloses a prepaid card management method based on a block chain technology, which is applied to block chain nodes with prepaid contracts. The payment contract account is not directly associated with the consumer, and the anonymity of the consumer is guaranteed. Moreover, the amount of the prepaid contract account is in an encrypted form in the block chain nodes, so that the privacy of the consumer is guaranteed. In addition, the method can ensure the consumption rights and interests of the consumers, on one hand, each transaction needs the authorization of the consumers, and the merchants can not actively deduct the account amount of the consumers; on the other hand, after a certain time limit is exceeded, the locking relationship is automatically released, and the consumer can retrieve the account balance. The application also provides a prepaid card management device based on the block chain technology, a block chain node and a prepaid card management system based on the block chain technology, and the technical effect corresponds to that of the method.

Description

Prepaid card management method and device based on block chain technology and block chain link points
Technical Field
The present application relates to the field of computer technologies, and in particular, to a prepaid card management method and apparatus based on a block chain technology, a block chain node, and a prepaid card management system based on a block chain technology.
Background
The prepaid card refers to a creditor certificate issued by an issuer and used in the field of commercial service industry, and is embodied as a shopping coupon or a consumption card, which represents the creditor's right shared by the issuer as a consumer. Merchants can delay providing goods or services by having consumers add value to prepaid cards, advance revenue, and provide delayed service.
At present, prepaid card management solutions have the following drawbacks:
1. the prepaid card has the problems of damage to fair transaction right, damage to right of awareness, overlord terms, difficulty in terminating consumption and card return, difficulty in closing and compensation in closing industries, difficulty in facilitating human consumption in storefronts, difficulty in guaranteeing quality of commodity service, difficulty in transfer, difficulty in right maintenance and proof lifting and the like.
2. The relevant data of the prepaid card can be accessed by anyone, and the anonymity and privacy of the consumer are difficult to guarantee.
In summary, it is an urgent need for those skilled in the art to provide a prepaid card management scheme that satisfies the privacy of consumers while ensuring the benefits of consumers.
Disclosure of Invention
The present application provides a prepaid card management method and apparatus based on a block chain technology, a block chain node, and a prepaid card management system based on a block chain technology, so as to solve the problem that the current prepaid card management scheme cannot guarantee the rights and benefits of consumers and cannot meet the privacy requirements of consumers. The specific scheme is as follows:
in a first aspect, the present application provides a prepaid card management method based on a block chain technology, applied to a block chain node deployed with a prepaid contract, the method including;
transferring the target amount to a prepaid contract account of the consumer according to an amount transfer request sent by the consumer;
according to a locking request sent by the consumer, locking a prepaid contract account of the consumer to a blockchain account of a merchant, and setting a locking period as a target locking period;
receiving a transaction request sent by the merchant, wherein the transaction request is a request initiated by the consumer and signed by a private key of a blockchain account of the merchant, and the transaction request comprises a prepaid contract account of the consumer as an transferred-out account, a prepaid contract account of the merchant as an transferred-in account, the consumption amount and zero knowledge proof;
performing signature verification on the transaction request; verifying a locked relationship between the consumer's prepaid contract account and the merchant's blockchain account; verifying the zero knowledge proof;
if the three items of verification are passed, transferring the consumption amount of the time from the prepaid contract account of the consumer to the prepaid contract account of the merchant;
releasing the locking relationship between the consumer's prepaid contract account and the merchant's blockchain account when the actual locking period reaches the target locking period;
wherein the amount of the prepaid contract account is in encrypted form in the blockchain node.
Preferably, the transferring the target amount to the prepaid contract account of the consumer according to the amount transfer request sent by the consumer includes:
transferring an external recharging amount from an external asset contract account of a consumer to a pre-paid contract account of the consumer according to an external recharging request sent by the consumer;
and/or the presence of a gas in the gas,
transferring an internal transfer amount from a first prepaid contract account of a consumer to a second prepaid contract account of the consumer according to an internal transfer request sent by the consumer.
Preferably, the method further comprises the following steps:
judging whether a prepaid contract account of a consumer to be charged is locked or not according to an external charging request sent by the consumer;
if yes, rejecting the external recharging request;
if not, transferring the external recharging amount from the external asset contract account of the consumer to the pre-paid contract account of the consumer.
Preferably, the transferring the target amount to the prepaid contract account of the consumer according to the amount transfer request sent by the consumer includes:
determining a prepaid contract account of the consumer to be transferred with the amount according to the amount transfer request sent by the consumer;
determining whether the consumer's prepaid contract account is a registered account;
if yes, judging whether the sum of all the accounts of the prepaid contract exceeds the maximum sum after the sum is transferred;
if not, the target amount is transferred to the consumer's prepaid contract account.
Preferably, the transferring the target amount to the prepaid contract account of the consumer according to the amount transfer request sent by the consumer includes:
extracting a target amount as an in-transit fund of a pre-paid contract account of a consumer according to an amount transfer request sent by the consumer;
transferring the in-transit funds to the consumer's pre-paid contract account at the end of the current operational period.
Preferably, the method further comprises the following steps:
receiving an account registration request sent by a consumer or a merchant, wherein the account registration request comprises a public key and a signature;
judging whether the public key is registered to a prepaid contract account;
if not, verifying the signature;
and if the verification is passed, determining that the registration of the account of the prepaid contract is successful, and feeding back a registration success message to the consumer or the merchant.
Preferably, the method further comprises the following steps:
and when the actual locking period does not reach the target locking period, if an unlocking request sent by the merchant is received, releasing the locking relationship between the prepaid contract account of the consumer and the blockchain account of the merchant.
In a second aspect, the present application provides a prepaid card management apparatus based on a block chain technology, applied to a block chain node where prepaid contracts are deployed, the apparatus including;
the amount transfer module is used for transferring the target amount to the prepaid contract account of the consumer according to the amount transfer request sent by the consumer;
the locking module is used for locking the prepaid contract account of the consumer to the block chain account of the merchant according to the locking request sent by the consumer and setting the locking term as a target locking term;
the transaction request receiving module is used for receiving a transaction request sent by the merchant, wherein the transaction request is a request initiated by the consumer and signed by a private key of a blockchain account of the merchant, and the transaction request comprises a prepaid contract account of the consumer as an roll-out account, a prepaid contract account of the merchant as a roll-in account, the consumption amount and zero knowledge proof;
the verification module is used for performing signature verification on the transaction request; verifying a locked relationship between the consumer's prepaid contract account and the merchant's blockchain account; verifying the zero knowledge proof;
the consumption module is used for transferring the consumption amount to the pre-paid contract account of the merchant from the pre-paid contract account of the consumer if the three items of verification are passed;
an unlocking module for unlocking the locking relationship between the consumer's prepaid contract account and the merchant's blockchain account when the actual locking period reaches the target locking period;
wherein the amount of the prepaid contract account is in encrypted form in the blockchain node.
In a third aspect, the present application provides a block-link point deployed with pre-paid contracts, the block-link point comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the prepaid card management method based on the block chain technology as described above.
In a fourth aspect, the present application provides a prepaid card management system based on a block chain technology, comprising: a consumer, a merchant, and a blockchain node deployed with a prepaid contract;
the consumer is used for sending a money transfer request and a locking request to the block chain node;
the blockchain node is used for transferring a target amount to the prepaid contract account of the consumer according to the amount transfer request, locking the prepaid contract account of the consumer to the blockchain account of the merchant, and setting a locking period as a target locking period;
the merchant is used for sending a transaction request to the blockchain node, wherein the transaction request is a request initiated by the consumer and signed by a private key of a blockchain account of the merchant, and comprises a prepaid contract account of the consumer as a roll-out account, a prepaid contract account of the merchant as a roll-in account, the consumption amount and zero knowledge proof;
the block chain node is used for performing signature verification on the transaction request; verifying a locking relationship between the consumer's prepaid contract account and the merchant's blockchain account; verifying the zero knowledge proof; if the three items of verification are passed, transferring the consumption amount of the time from the prepaid contract account of the consumer to the prepaid contract account of the merchant;
the blockchain node is further used for unlocking the locking relation between the prepaid contract account of the consumer and the blockchain account of the merchant when the actual locking period reaches the target locking period;
wherein the amount of the prepaid contract account is in encrypted form in the blockchain node.
In summary, the present application provides a prepaid card management method based on a blockchain technology, which is applied to a blockchain node where prepaid contracts are deployed, wherein specific amounts of prepaid contract accounts of consumers and merchants are in an encrypted form in the blockchain node, and the method comprises the following steps: transferring the target amount to a prepaid contract account of the consumer according to the amount transfer request sent by the consumer; according to a locking request sent by a consumer, locking a prepaid contract account of the consumer to a blockchain account of a merchant, and setting a locking period as a target locking period; receiving a transaction request sent by a merchant, wherein the transaction request is a request initiated by a consumer and signed by a private key of a blockchain account of the merchant, and the transaction request comprises a prepaid contract account of the consumer as an export account, a prepaid contract account of the merchant as an import account, the consumption amount of the time and a zero knowledge proof; performing signature verification on the transaction request; verifying a locking relationship between a consumer's prepaid contract account and a merchant's blockchain account; verifying the zero knowledge proof; if the three items of verification are passed, transferring the consumption amount from the prepaid contract account of the consumer to the prepaid contract account of the merchant; and releasing the locking relation between the pre-paid contract account of the consumer and the block chain account of the merchant when the actual locking period reaches the target locking period.
Therefore, the method takes the block chain nodes as a trusted third party, and realizes a prepaid card mechanism on the premise of ensuring the anonymity and privacy of consumers. Based on the blockchain technology, a consumer's prepaid contract account can be locked to a merchant's blockchain account for a period of time, after which all authorized transactions for the prepaid contract account are performed by the locked merchant blockchain account, which is automatically unlocked after expiration of the lock. Thus, the prepaid contract account is not directly associated with the consumer, and the consumer authorizes the transaction, and the real transaction operation is handed to the blockchain account for execution, which ensures the anonymity of the consumer. Moreover, the amount of the prepaid contract account is in an encrypted form in the block link points and is completely hidden, and only a controller of the prepaid contract account can read the account amount, so that the privacy of a consumer is guaranteed.
In addition, the method can ensure various consumption rights and interests of the consumer, and is particularly shown in the following steps that on one hand, each transaction needs the authorization of the consumer, a merchant only can passively accept the transaction, and the account amount of the consumer cannot be actively deducted; on the other hand, after a certain time limit is exceeded, the locking relationship is automatically released, and the consumer can retrieve the account balance.
The application also provides a prepaid card management device based on the block chain technology, a block chain node and a prepaid card management system based on the block chain technology, and the technical effects correspond to those of the method, and are not described again here.
Drawings
For a clearer explanation of the embodiments or technical solutions of the prior art of the present application, the drawings needed for the description of the embodiments or prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a flowchart of a prepaid card management method based on a block chain technology provided in the present application;
FIG. 2 is a timing diagram illustrating a prepaid card management method based on block chain technology according to the present application;
FIG. 3 is a block chain system architecture diagram provided herein;
FIG. 4 is a diagram of an account registration process provided herein;
FIG. 5 is a schematic diagram of a transfer process provided herein;
FIG. 6 is a functional block diagram of a prepaid card management device based on block chain technology provided herein;
fig. 7 is a schematic structural diagram of a blockchain node provided in the present application;
fig. 8 is a block chain technology-based prepaid card management system according to the present application.
Detailed Description
In order that those skilled in the art will better understand the disclosure, the following detailed description is given with reference to the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The application aims to provide a prepaid card management method and device based on a block chain technology, a block chain node and a prepaid card management system based on the block chain technology. On the basis, the anonymity and the privacy of the consumers are guaranteed.
Example one
The prepaid card management method based on the block chain technology provided by the present application is described below. The method is applied to a blockchain node deployed with prepaid contracts, as shown in fig. 1 and 2, and comprises the following steps;
s11, transferring the target amount to a prepaid contract account of the consumer according to the amount transfer request sent by the consumer;
s12, locking the prepaid contract account of the consumer to the block chain account of the merchant according to the locking request sent by the consumer, and setting the locking term as a target locking term;
s13, receiving a transaction request sent by a merchant, wherein the transaction request is a request initiated by a consumer and signed by a private key of a block chain account of the merchant, and the transaction request comprises a prepaid contract account of the consumer as an export account, a prepaid contract account of the merchant as an import account, the current consumption amount and zero knowledge proof;
s14, signature verification is carried out on the transaction request; verifying a locking relationship between a consumer's prepaid contract account and a merchant's blockchain account; verifying the zero knowledge proof;
s15, if the three items of verification are passed, transferring the consumption amount from the prepaid contract account of the consumer to the prepaid contract account of the merchant;
and S16, when the actual locking period reaches the target locking period, releasing the locking relation between the prepaid contract account of the consumer and the block chain account of the merchant.
First, a Pre-paid Contract (PPC) is deployed on a block link point, similar to an issuer, for managing and holding all Pre-paid Contract accounts. Both the merchant and the consumer register an account in the prepaid contract.
Accounts in the block chain can be divided into two types, one type is an external account controlled by a private key, and a controller of the private key is a controller of the external account; the other type is a contract account controlled by logic, the contract account can only be executed according to the logic of the intelligent contract, the contracts can be mutually called, but the execution must be triggered by an external account initially. The pre-paid contract account is distinguished from the blockchain account and is controlled by an independent pre-paid contract account private key, and the controller of the pre-paid contract account private key is the controller of the pre-paid contract account. The operations of prepaid contract account money transfer, account locking and the like all need to be authorized by a controller in a signature mode.
The consumer's prepaid contract account may be locked to the merchant-controlled blockchain account for a period of time. Locking means that the current account can only pay for a specific account, which is equivalent to the consumer's prepaid contract account signing up with the merchant's blockchain account, targeting the consumer's blockchain account for consumption. After locking, all authorized transactions for the prepaid contract account can only be executed via the locked merchant blockchain account. And automatically unlocking after the locking is finished.
The prepaid contract account is not directly related to the actual user, and after the consumer authorizes the transactions such as transfer and account locking, the real transactions are handed to the actually executed blockchain account in an offline mode, so that the anonymity and privacy of the consumer are guaranteed. Moreover, in the block chain node, the amount of the prepaid contract account is in an encrypted form, whether the consumer or the merchant, and particularly can be realized in an encrypted manner through an ElGamal algorithm, and only the controller of the prepaid contract account can read the amount of the prepaid contract account.
Locking achieves the effect of prepayment, that is, locking ensures that the consumer's prepaid contract account only transacts with the locked merchant blockchain account, and no other action is available. Moreover, the specific service is determined by the locked blockchain account, and the separation of transfer authorization and service logic is realized, wherein the service logic refers to preset transaction rules, such as 20 benefits per consumption 100, and the transfer authorization and the service logic are separated in the embodiment. Meanwhile, the consumer can keep the authorization of each transaction, namely that the account holder of the prepaid contract needs to initiate each transaction actively, and the merchant can only accept passively but cannot deduct the amount of the prepaid contract actively. Finally, the lock is automatically unlocked after the lock is finished by a certain period of time, so that the consumer can finally take out the balance of the prepaid card.
It should be noted that, the consumers and the merchants mentioned in this embodiment refer to not only the user or the organization but also the computer products such as the client and the computer device.
According to the prepaid card management method based on the blockchain technology, the blockchain is used for replacing a trusted third party, and on the premise that the anonymity and privacy of the consumer are guaranteed, various consumption rights and interests of the consumer are fully guaranteed. In addition, the separation of transfer authorization and business logic is realized. In theory, any business logic can be designed to meet various consumption needs.
Example two
Another method for managing prepaid cards based on block chain technology provided in the present application is described in detail below.
The prepaid contract is first deployed and instantiated, and the subsequent operations of this embodiment are all implemented in the prepaid contract. One possible block chain technology-based prepaid card management process is as follows: both the consumer and the merchant register a prepaid contract account in the prepaid contract; the consumer transfers a sum of money to the pre-paid contract account controlled by the consumer, locks the sum of money to the blockchain account controlled by the merchant, and sets a locking term; during each transaction, the consumer generates a zero knowledge certificate for the account balance of the pre-paid contract and the consumption amount of the consumer, signs the certificate and sends the certificate to the merchant; signing the private key of the local blockchain account of the merchant, generating a transaction request and submitting blockchain nodes; verifying the transaction request by the block chain link points, verifying the locking relation between the merchant block chain account and the consumer pre-paid contract account, and verifying zero knowledge proof; and completing transfer consumption after the three verification items are passed, and transferring the consumption amount from the prepaid contract account of the consumer to the prepaid contract account of the merchant. After the locking period expires, the locking relationship is released and the consumer is free to control the balance therein.
In this embodiment, the consumer and the merchant both interact with the prepaid contracts on the block link points through the client, and the functions of the client mainly include:
1. a user's blockchain account private key is generated and managed, and transactions are signed with the blockchain account private key when needed, such as when a blockchain transaction is to be initiated.
2. The user's private key of the prepaid contract account is generated and managed, and if necessary, a proof is generated and signed with the private key of the prepaid contract account, for example, the balance of the prepaid contract account is proved, and a transaction with a variable amount is initiated.
3. Interacting with block link points;
4. and interacting with other clients.
The algorithms involved in the client and prepaid contracts are described below. In the description of the embodiments below, Z represents a set of non-negative integers; zp represents a set of non-negative integers less than p; zp denotes a set of positive integers smaller than p; g represents a group formed by midpoints of elliptic curves on a finite field Zp, G represents a generator in G, the points in G support addition and quantity multiplication operations (x · G, namely x G additions), and a unit cell 0 in G is 0 · G; address represents a block chain Address type; x represents that X is an element in the set X or an element of X type; = denotes assigned value, = = denotes equal.
The process of transferring the sum of money to the pre-paid contract account controlled by the consumer can be specifically transferring the sum of money from an external asset contract account to the pre-paid contract account or transferring the sum of money from one pre-paid contract account to another pre-paid contract account. In this embodiment, the external asset contract Mint is a conventional ERC20 contract, and two functions are mainly used for it:
transfer from (from Address: address, toAddress: address, b: Z): in the external property contract Mint, the property is transferred from fromAddr to toAddr with the quota b.
transfer (toAddr: address, b: Z): in Mint, the asset is transferred out of the external asset contract account to toAddr with a quota of b.
In the embodiment, the proof is generated by the save function in a zero knowledge proof mode and is verified by verifyprofo; the Sign function generates a signature by means of zero knowledge proof and is verified by a VerifySign function.
In the implementation process, the present embodiment mainly involves seven processes: contract deployment, account registration, recharging, extraction, locking, transfer and unlocking, and the implementation processes and the adopted algorithms of the processes are respectively described below.
Contract deployment:
the prepaid contract includes global variables that are determined at deployment and cannot be changed thereafter, and instance variables that can be modified after deployment. The prepaid contract is described in detail as follows:
global variables:
z represents the cycle length, and the same account can only execute one operation in the same cycle;
z, which represents the maximum value of the sum of all account balances.
Example variables:
coin, the address of an external asset contract;
mapping (G = > [ G, G ]), account balance, initially empty;
mapping (G = > [ G, G ]), fund in transit, and is empty initially;
mapping (G = > Z), cycle number of last rolover operation, initially empty;
mapping (G = > [ Address, Z ]), the locked blockchain Address and expiration time (in block height), initially empty;
mapping (G = > Z), account operation count, initially empty;
z, the sum of the balances of all accounts is initially 0 and does not exceed MAX at most.
The prepaid contracts are deployed on the blockchain nodes, the contractor method is run to initialize the prepaid contracts, and the subsequent operations are performed based on the prepaid contracts previously deployed. The account assets in the prepaid contract are mutually redeemable with account assets of other asset contracts, including but not limited to the external asset contracts described above.
The constractor method is as follows:
inputting: the coin _ Address is Address;
and (3) outputting: air conditioner
The method comprises the following steps:
1. coin = Mint (coin _ addr)// import and save external asset contract addresses in the coin variable, followed by both the in and out transfer of assets, is the interaction with the contract
After deployment, the system architecture of the blockchain is shown in fig. 3.
And (3) account registration:
the client runs the register method to create a public-private key pair and registers the account in the prepaid contract using the public key as an address. And then, the account registration result is confirmed by inquiring the block chain node.
The client-side register method is as follows:
inputting: adress is the Address of the prepaid contract
And (3) outputting: g, public key, signature sig
The method comprises the following steps: generating a public and private key pair (x, y), randomly selecting a private key x from Zp, and calculating a public key y = x · g; generating a signature sig = Sign (x, (addr, y)); the client encrypts the management private key x and returns (y, sig).
The client then sends the public key y G and signature sig to the blockchain node. On the block link point side, the register method for the prepaid contract is as follows:
1. require (| registered (y), "" registered |)// determine whether public key y has registered an account, if yes, directly stop registering and prompt registered, otherwise continue the subsequent steps
2. require (VerifySign (y, (addr, y), sig), "invalid signature!.)// determine if the signature is valid
3. acc [ y ] = [0,0]// initializing account balance
4. pending [ y ] = [ y, g ]// initializing funds in transit
5. lock y = null// initializing lock state
6. ctr [ y ] =0// initialize counter
In summary, the account registration process is shown in FIG. 4.
Recharging:
assets are transferred from the external asset contract account to the prepaid contract account. Specifically, the user calls a fund method of the prepaid contract through the client to charge the account of the prepaid contract. The client can then query the blockchain system to confirm the recharge results.
The fund method is as follows:
inputting: public key y: G, transferred amount b: Z
And (3) outputting: is free of
The method comprises the following steps:
1. required (y), "unregistered!.// determining whether prepaid contract account y is a registered account, it is guaranteed that it is a registered account
2. Acquire (y, msg. Sender), "no operation authority |)// determine whether prepaid contract account y is locked, only unlocked account has authority to recharge
3. require (btotal + b < = MAX, "Total overrun!")// determine whether the asset is redeemed for excess
4、rollOver(y)
5. pending [ y ] = pending [ y ] [0] + b · g// increase in funds in transit b
6. requirement (core. Transfer from (msg. Sender, address, b), "asset transfer error!")// deduction of b from an external asset contract account
7. btotal = btotal + b// prepaid contract account increase b
As shown in fig. 5, when transferring the amount from account a to account B, the actual implementation process is: first, the amount of money is extracted from account A and used as the in-transit fund of account B; when a certain condition is reached, for example, when the operation cycle is ended, a rolover operation is executed, and the funds in transit are transferred into the account B. The rolover method will be described in detail below and will not be expanded here.
Extraction:
transferring assets from the prepaid contract account to the external asset contract account. The client runs a burn method to request that its own controlled prepaid contract account be transferred out of assets to an external asset contract account. And the block chain node runs a burn method to execute real asset transferring operation.
The burn method at the client side is as follows:
inputting: private key x Zp
And (3) outputting: signature sig
1. let b = readBalance (x)// determine transfer amount
2. let y = x · g// calculating public key
3. let [ CL, CR ] = acc [ y ]// get account balance
4. let proof = pro (st _ burn [ y, CL, CR, b, g ], (x))// proof of generation
5. let sig = Sign (x, (b, proof, ctr [ y ]))// generate signature and return
When generating proof, st _ burn [ y, CL, CR, b, g ] is public parameter, (x) is private parameter, proof proposition: { y = = x · g and CL = = g · b + x · CR }.
Accordingly, on the block link point side, the burn method of the advance contract is as follows:
inputting: g is the public key, b is the transfer amount, Z is the proof, sig is signed
And (3) outputting: is composed of
1. required (y), "unregistered!.// determine whether account y is a registered account
2. Acquire (checkLock (y, msg. Sender), "No operation Authority!")// determine if account y is locked and locked account cannot transfer money
3、rollOver(y)
4. require (st _ burn [ y, CL, CR, b, g ], proof of invalidity!)/proof of verification
5. require (VerifySign (y, (b, proof, ctr [ y ]), sig), "invalid signature!.)// verify signature
6. acc [ y ] = [ acc [ y ] [0] -CL, acc [ y ] [1] -CR ]// deduct account balance
7. ctr [ y ] = ctr [ y ] +1// counter plus one
8. require (core. Transfer (msg. Sender, b), "asset transfer error |)// transfer balance out to external asset contract
9. btotal = btotal-b// prepaid contract overall balance reduction
Locking:
the consumer requests the prepaid contract account to be locked to the blockchain account using the lock method while setting a lock period, and the blockchain linked point executes the lock method to perform a true locking operation when the prepaid contract account is identical in form to the prepaid card.
The customer-side lock method is as follows:
inputting: the private key x is Zp, the block chain Address is addr and Address, and the height n of the unlocked block chain is Z
And (3) outputting: signature sig
The method comprises the following steps:
1. let y = x · g// calculating public key
2. let sig = Sign (x, (addr, n, ctr [ y ]))// generate signature and return sig
The client may then invoke the lock method of the prepaid contract directly, or the signature may be handed over to a lock method that is authorized by other clients to invoke the prepaid contract.
On one side of the block chain link points, the lock method of the prepay contract is as follows:
inputting: g is a public key, the Address is a block chain account, Z is an unlocking block height, and sig is a signature
And (3) outputting: is free of
The method comprises the following steps:
1. required (y), "unregistered |)// determining whether account y is a registered account
2. Acquire (checkLock (y, msg. Sender), "No operation Authority!")// determine whether Account y is locked
3、rollOver(y)
4. require (VerifySign (y, (addr, n, ctr [ y ]), sig), "invalid signature!.)// verify signature
5. lock [ y ] = [ addr, n ]// locked account y
6. ctr [ y ] = ctr [ y ] +1// counter plus one
Transferring accounts:
a user (typically a consumer) transfers assets from his prepaid contract account to another prepaid contract account (typically a merchant) using the transfer method.
The user can generate the transfer certificate through a transfer method of the client side, wherein the transfer method of the client side comprises the following steps:
inputting: private key of transfer-out party x: zp, public key of transfer-in party y _ to: G, transfer amount b: Z (requirement is greater than zero, with upper limit)
And (3) outputting: returning (y _ from: G, y _ to: G, C _ from: G, C _ to: G, D: G, proof, sig), if the input is invalid, returning an error
The method comprises the following steps:
1. let bal = readBalance (x)// read roll-out account balance
2. If (b > bal) returns an error// transfer amount b cannot be greater than the account balance
3. let y _ from = x · g// calculate the roll-out account public key y
4. Simulating rolover (y _ from); let [ CL, CR ] = acc [ y _ from ]// simulate transfer operation, read transfer account balance after transfer
5. Randomly selecting r in Zp
6、let C_from=b·g+r·y_from
7、let C_to=b·g+r·y_to
8. let D = r.g// (C _ from, D) is an encrypted form of the amount transferred from the account, and (C _ to, D) is an encrypted form of the amount transferred from the account
9. proof of production = pro (st _ transfer [ y _ to, y _ from, CL, CR, C _ from, C _ to, D, g ], (x, b, bal, r))// proof of generation
10. sig = Sign (x, (y _ to, C _ from, C _ to, D, proof, ctr [ y ]))// generating signature
11. (y _ from, y _ to, C _ from, C _ to, D, proof, sig)// return transfer voucher
And the return value of the transfer method at the client side is the transfer certificate. If the prepaid contract account is locked to a blockchain account, the transfer credentials may be delivered to the client controlling the private key of the blockchain account, authorizing it to invoke the transfer. If the prepaid contract account is not locked, the transfer credentials may be delivered to any client (including itself) authorizing it to perform the transfer. The transfer is executed by calling a transfer method of the prepaid contract, and the parameters are transfer certificates generated by the transfer method of the client.
In generating the proof, st _ transfer [ y _ to, y _ from, CL, CR, C _ from, C _ to, D, g ] is a public parameter, (x, b, bal, r) is a private parameter, proof proposition: { C _ from = = b · g + r · y _ from and C _ to = = b · g + r · y _ to and D = = r · g and CL-C = = (bal-b) · g + x · g (CR-D) and y = = x · g and b and bal-b are between [0, max }.
On the block link point side, the transfer method of the prepaid contract is as follows:
inputting: y _ from: G, y _ to: G, C _ from: G, C _ to: G, D: G, proof, sig
And (3) outputting: is composed of
1. required (y _ from), "transfer out account unregistered |)// whether transfer out account is registered
2. required (y _ to), "transfer account unregistered |)// whether the transfer account is registered
3. Acquire (checkLock (y _ from, msg. Sender), "No operation Authority!")// check Lock relationship
4、rollOver(y_from);rollOver(y_to)
5. require (st _ transfer [ y _ to, y _ from, CL, CR, C _ from, C _ to, D, g ], proof of invalidity!)/proof of verification
6. require (VerifySign (y _ from, (y _ to, C _ from, C _ to, D, proof, ctr [ y _ from ]), sig), "invalid signature!")// verify signature
7. acc [ y _ from ] = [ acc [ y _ from ] [0] -C _ from, acc [ y _ from ] [1] -D ]// extract amount from roll-out account
8. pending [ y _ to ] = [ pending [ y _ to ] [0] + C _ to, pending [ y _ to ] [1] + D ]// pick-up amount as the funds in transit to the account
9. ctr [ y _ from ] = ctr [ y _ from ] +1// roll-out account counter plus one
Unlocking:
after the locking is finished, the locking relation is automatically released, and no additional operation is needed. Specifically, the user can directly call the unlock method of the prepaid contract through the client to unlock the prepaid contract account, provided that the client possesses the private key of the blockchain account to which the prepaid contract account is locked. In addition, if the consumer wishes to unlock in advance, the locked blockchain account can be actively unlocked.
The Unlock method is as follows:
inputting: public key y G
And (3) outputting: is free of
1. required (y), "unregistered!.// check if the account is a registered account
2. Acquire (checkLock (y, msg. Sender), "No operation Authority!")// check the locked status of the account
3、rollOver(y)
4. lock [ y ] = empty/unlocked
The above procedure also calls four methods: the rolOver method, the checkLock method, the registered method, and the readBalance method, which are described below.
rollOver method:
the function is as follows: the balance is transferred from the in-transit funds to the actual account.
Inputting: g is the public key y.
And (3) outputting: none.
The method comprises the following steps:
1. the current block height is divided by the cycle length and then rounded down to obtain the current cycle number E, i.e. E = rounded down (block.
2. If the y account does not have a roll over during this period, the balance of the in-transit account is transferred to the real account. That is, if (lastrolover [ y ] < e), the following update operation is performed:
acc[y]=[acc[y][0]+pending[y][0],acc[y][1]+pending[y][1]]
pending[y]=[0,0]
lastRollOver[y]=e
the checkLock method:
the function is as follows: check if the account is locked, where 1 indicates true and 0 indicates not true.
Inputting: g is the public key, and the Address of the block chain is the Address.
And (3) outputting: if addr has operation authority to y, 1 is output, otherwise 0 is output.
The method comprises the following steps:
1. if (lock [ y ] = = null), return 1// if there is no lock, return 1
2. let [ locker, ts ] = lock [ y ]// get locked account locker and unlock block number ts
3. If (addr = = lock or ts < block.number), return 1, otherwise return 0// if locked account lock equals input account number addr, or unlock block number ts exceeds lock block number (equivalent to reaching target lock deadline), return 1, otherwise return 0
registered method:
the function is as follows: it is checked whether the account is already registered.
Inputting: g is the public key.
And (3) outputting: if the public key is registered, 1 is output, otherwise 0 is output.
The method comprises the following steps:
1. if (acc [ y ] [0] = =0 and acc [ y ] [1] = =0 and pending [ y ] [0] = =0 and pending [ y ] [1] = = 0), return 0, otherwise return 1// user use tool to generate a new account, then register in the prepaid contract. Here it is checked whether it is already registered. If a return 1 is registered, otherwise a return 0 is returned.
The readBalance method comprises the following steps:
the function is as follows: reading balance of corresponding account
Inputting: private key x Zp
And (3) outputting: account balance
The method comprises the following steps:
1、let y=x·g
2. simulating rolOver (y); let [ CL, CR ] = acc [ y ]
3. Find b by cycling from 0 to MAX such that b · g = = CL-x · CR, return b · g =
EXAMPLE III
The prepaid card management apparatus based on the blockchain technology provided in the present application is described below, and the prepaid card management apparatus based on the blockchain technology described below and the prepaid card management method based on the blockchain technology described above may be referred to in correspondence.
As shown in fig. 6, the prepaid card management apparatus based on the block chain technology is applied to a block chain node where prepaid contracts are deployed, including;
the amount transfer module 61 is used for transferring the target amount to the prepaid contract account of the consumer according to the amount transfer request sent by the consumer;
a locking module 62, configured to lock the prepaid contract account of the consumer to the blockchain account of the merchant according to the locking request sent by the consumer, and set the locking term as a target locking term;
the transaction request receiving module 63 is configured to receive a transaction request sent by a merchant, where the transaction request is a request initiated by a consumer and signed by a private key of a blockchain account of the merchant, and the transaction request includes a prepaid contract account of the consumer as an account transferred out, a prepaid contract account of the merchant as an account transferred in, the current consumption amount, and a zero knowledge proof;
a verification module 64 for performing signature verification on the transaction request; verifying a locking relationship between a consumer's prepaid contract account and a merchant's blockchain account; verifying the zero knowledge proof;
the consumption module 65 is used for transferring the consumption amount to the pre-paid contract account of the merchant from the pre-paid contract account of the consumer if the three items of verification are passed;
an unlocking module 66, configured to unlock the locking relationship between the consumer's prepaid contract account and the merchant's blockchain account when the actual locking period reaches the target locking period;
wherein the amount of the pre-paid contract account is in encrypted form in the block link points.
The prepaid card management apparatus based on the blockchain technology of the present embodiment is used to implement the aforementioned prepaid card management method based on the blockchain technology, and therefore, the specific implementation of the apparatus can be seen in the foregoing parts of the embodiment of the prepaid card management method based on the blockchain technology, for example, the money transfer module 61, the locking module 62, the transaction request receiving module 63, the verification module 64, the consumption module 65, and the unlocking module 66 are respectively used to implement steps S11, S12, S13, S14, S15, and S16 in the aforementioned prepaid card management method based on the blockchain technology. Therefore, specific embodiments thereof may be referred to in the description of the corresponding respective partial embodiments, and will not be described herein.
In addition, since the prepaid card management apparatus based on the blockchain technology of the present embodiment is used for implementing the foregoing prepaid card management method based on the blockchain technology, the role thereof corresponds to the role of the method described above, and details thereof are omitted here.
Example four
Further, the present application provides a block link point deployed with a prepaid contract, as shown in fig. 7, the block link point including:
a memory 100 for storing a computer program;
a processor 200 for executing the computer program to implement the prepaid card management method based on block chain technology as described above.
EXAMPLE five
The present application also provides a prepaid card management system based on the block chain technology, as shown in fig. 8, including: a consumer, a merchant, and a blockchain node deployed with a prepaid contract;
the consumer is used for sending a money transfer request and a locking request to the block chain nodes;
the block chain node is used for transferring the target amount to the prepaid contract account of the consumer according to the amount transfer request, locking the prepaid contract account of the consumer to the block chain account of the merchant, and setting the locking period as a target locking period;
the merchant is used for sending a transaction request to the blockchain nodes, the transaction request is a request which is initiated by a consumer and is signed by a private key of a blockchain account of the merchant, and the transaction request comprises a prepaid contract account of the consumer as an export account, a prepaid contract account of the merchant as an import account, the current consumption amount and zero knowledge proof;
the block chain nodes are used for signature verification of the transaction request; verifying a locking relationship between a consumer's prepaid contract account and a merchant's blockchain account; verifying the zero knowledge proof; if the three items of verification are passed, transferring the consumption amount from the prepaid contract account of the consumer to the prepaid contract account of the merchant;
the blockchain node is also used for releasing the locking relation between the prepaid contract account of the consumer and the blockchain account of the merchant when the actual locking period reaches the target locking period;
wherein the amount of the prepaid contract account is in encrypted form in the block link point.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The above detailed descriptions of the solutions provided in the present application, and the specific examples applied herein are set forth to explain the principles and implementations of the present application, and the above descriptions of the examples are only used to help understand the method and its core ideas of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A prepaid card management method based on block chain technology is characterized in that the method is applied to block chain nodes with prepaid contracts and comprises the following steps;
transferring the target amount to a prepaid contract account of the consumer according to an amount transfer request sent by the consumer; wherein the prepaid contract account is an account registered on the prepaid contract and controlled by an independent prepaid contract account private key, the controller of the prepaid contract account private key is the controller of the prepaid contract account, and the transfer-in of the amount of the prepaid contract account and the account locking operation are authorized by the controller by means of signature;
according to the locking request sent by the consumer, locking the prepaid contract account of the consumer to the blockchain account of the merchant, and setting the locking term as a target locking term; the locking can ensure that the consumer's prepaid contract account number only transacts with the locked merchant blockchain account;
receiving a transaction request sent by the merchant, wherein the transaction request is a request initiated by the consumer and signed by a private key of a blockchain account of the merchant, and the transaction request comprises a prepaid contract account of the consumer as an export account, a prepaid contract account of the merchant as an import account, a consumption amount and a zero-knowledge proof; the zero knowledge proof is a zero knowledge proof generated by using the account balance of the prepaid contract of the consumer and the consumption amount at each transaction;
performing signature verification on the transaction request; verifying a locked relationship between the consumer's prepaid contract account and the merchant's blockchain account; verifying the zero knowledge proof;
if the three items of verification are passed, transferring the consumption amount of the time from the prepaid contract account of the consumer to the prepaid contract account of the merchant;
releasing the locking relationship between the consumer's prepaid contract account and the merchant's blockchain account when the actual locking period reaches the target locking period, so that the consumer is free to dominate the balance in the consumer's prepaid contract account;
wherein the amount of the prepaid contract account is in encrypted form in the blockchain node.
2. The method as set forth in claim 1, wherein said transferring a target amount to the consumer's prepaid contract account in response to an amount transfer request sent by the consumer comprises:
transferring an external recharging amount from an external asset contract account of a consumer to a pre-paid contract account of the consumer according to an external recharging request sent by the consumer;
and/or the presence of a gas in the gas,
transferring an internal transfer amount from a first prepaid contract account of a consumer to a second prepaid contract account of the consumer in accordance with an internal transfer request sent by the consumer.
3. The method of claim 1, further comprising:
judging whether a prepaid contract account of a consumer to be charged is locked or not according to an external charging request sent by the consumer;
if yes, rejecting the external recharging request;
if not, transferring the external recharging amount from the external asset contract account of the consumer to the pre-paid contract account of the consumer.
4. The method of claim 1, wherein said transferring a target amount to a prepaid contract account of a consumer in response to an amount transfer request sent by the consumer comprises:
determining a prepaid contract account of the consumer to be transferred with the amount according to the amount transfer request sent by the consumer;
determining whether the consumer's prepaid contract account is a registered account;
if yes, judging whether the sum of all the accounts of the prepaid contract exceeds the maximum sum after the sum is transferred;
if not, the target amount is transferred to the consumer's prepaid contract account.
5. The method of claim 1, wherein said transferring a target amount to a prepaid contract account of a consumer in response to an amount transfer request sent by the consumer comprises:
extracting a target amount as an in-transit fund of a pre-paid contract account of a consumer according to an amount transfer request sent by the consumer;
transferring the in-transit funds to the consumer's pre-paid contract account at the end of the current operational period.
6. The method of claim 1, further comprising:
receiving an account registration request sent by a consumer or a merchant, wherein the account registration request comprises a public key and a signature;
determining whether the public key has registered a prepaid contract account;
if not, verifying the signature;
and if the verification is passed, determining that the registration of the account of the prepaid contract is successful, and feeding back a registration success message to the consumer or the merchant.
7. The method of any one of claims 1 to 6, further comprising:
and when the actual locking period does not reach the target locking period, if an unlocking request sent by the merchant is received, releasing the locking relationship between the prepaid contract account of the consumer and the blockchain account of the merchant.
8. A prepaid card management arrangement based on block chain technology, for use in a block chain node having prepaid contracts deployed, the arrangement comprising;
the money transfer module is used for transferring the target money to a prepaid contract account of the consumer according to a money transfer request sent by the consumer; wherein the prepaid contract account is an account registered on the prepaid contract and controlled by an independent prepaid contract account private key, the controller of the prepaid contract account private key is the controller of the prepaid contract account, and the transfer-in of the amount of the prepaid contract account and the account locking operation are authorized by the controller by means of signature;
the locking module is used for locking the prepaid contract account of the consumer to the block chain account of the merchant according to the locking request sent by the consumer and setting the locking term as a target locking term; the locking can ensure that the consumer's prepaid contract account number only transacts with the locked merchant blockchain account;
the transaction request receiving module is used for receiving a transaction request sent by the merchant, wherein the transaction request is a request initiated by the consumer and signed by a private key of a blockchain account of the merchant, and the transaction request comprises a prepaid contract account of the consumer as an roll-out account, a prepaid contract account of the merchant as a roll-in account, the consumption amount and zero knowledge proof; the zero knowledge proof is a zero knowledge proof generated by using the prepaid contract account balance of the consumer and the consumption amount at each transaction;
the verification module is used for performing signature verification on the transaction request; verifying a locking relationship between the consumer's prepaid contract account and the merchant's blockchain account; verifying the zero knowledge proof;
the consumption module is used for transferring the consumption amount to the prepaid contract account of the merchant from the prepaid contract account of the consumer if the three items of verification are passed;
an unlocking module for unlocking the locking relationship between the consumer's prepaid contract account and the merchant's blockchain account when the actual locking period reaches the target locking period, so that the consumer is free to dominate the balance in the consumer's prepaid contract account;
wherein the amount of the prepaid contract account is in encrypted form in the blockchain node.
9. A block-link point deployed with prepaid contracts, the block-link point comprising:
a memory for storing a computer program;
processor for executing said computer program to implement a method for prepaid card management based on blockchain technology according to any one of claims 1 to 7.
10. A prepaid card management system based on block chain technology, comprising: a consumer, a merchant, and a blockchain node deployed with a prepaid contract;
the consumer is used for sending a money transfer request and a locking request to the block chain node;
the blockchain node is used for transferring a target amount to the prepaid contract account of the consumer according to the amount transfer request, locking the prepaid contract account of the consumer to the blockchain account of the merchant, and setting a locking period as a target locking period; wherein the prepaid contract account is an account registered on the prepaid contract and controlled by an independent prepaid contract account private key, the controller of the prepaid contract account private key is the controller of the prepaid contract account, and the transfer-in of the amount of the prepaid contract account and the account locking operation are authorized by the controller by means of signature; the locking can ensure that the consumer's prepaid contract account number only transacts with the locked merchant blockchain account;
the merchant is used for sending a transaction request to the blockchain node, wherein the transaction request is a request initiated by the consumer and signed by a private key of a blockchain account of the merchant, and comprises a prepaid contract account of the consumer as a roll-out account, a prepaid contract account of the merchant as a roll-in account, the consumption amount and zero knowledge proof; the zero knowledge proof is a zero knowledge proof generated by using the account balance of the prepaid contract of the consumer and the consumption amount at each transaction;
the block chain node is used for performing signature verification on the transaction request; verifying a locking relationship between the consumer's prepaid contract account and the merchant's blockchain account; verifying the zero knowledge proof; if the three items of verification are passed, transferring the consumption amount from the consumer's prepaid contract account to the merchant's prepaid contract account;
the blockchain node is further used for releasing the locking relation between the consumer's prepaid contract account and the merchant's blockchain account when the actual locking period reaches the target locking period so that the consumer freely controls the balance in the consumer's prepaid contract account;
wherein the amount of the prepaid contract account is in encrypted form in the blockchain node.
CN202110551282.4A 2021-05-20 2021-05-20 Prepaid card management method and device based on block chain technology and block chain link points Active CN113222567B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110551282.4A CN113222567B (en) 2021-05-20 2021-05-20 Prepaid card management method and device based on block chain technology and block chain link points

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110551282.4A CN113222567B (en) 2021-05-20 2021-05-20 Prepaid card management method and device based on block chain technology and block chain link points

Publications (2)

Publication Number Publication Date
CN113222567A CN113222567A (en) 2021-08-06
CN113222567B true CN113222567B (en) 2022-11-18

Family

ID=77093239

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110551282.4A Active CN113222567B (en) 2021-05-20 2021-05-20 Prepaid card management method and device based on block chain technology and block chain link points

Country Status (1)

Country Link
CN (1) CN113222567B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114707983A (en) * 2022-06-02 2022-07-05 武汉智可信科技有限公司 Consumption credible prepayment method and device based on block chain
CN115456619B (en) * 2022-09-27 2024-02-20 山东鲁商通科技有限公司 Virtual prepaid card issuing system and method based on blockchain technology

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111090626A (en) * 2019-11-05 2020-05-01 西安西电链融科技有限公司 File storage processing method based on block chain distributed file transaction system

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090254484A1 (en) * 2008-04-03 2009-10-08 Forero Julio C Anon virtual prepaid internet shopping card
WO2012115960A1 (en) * 2011-02-22 2012-08-30 Marqeta, Inc. System and method for providing a user with a single payment card on which prepaid/or reward balances are tracked for multiple merchants
CN104574046B (en) * 2013-10-29 2017-03-08 腾讯科技(深圳)有限公司 A kind of payment system and the management method of pair pre- charge information
US20160267472A1 (en) * 2015-03-13 2016-09-15 Gyft, Inc. Securing digital gift cards with a public ledger
CN108520413B (en) * 2018-04-19 2020-07-28 北京航空航天大学 Efficient safe virtual pre-payment method and device
US11366910B2 (en) * 2018-12-27 2022-06-21 Eli Talmor Method and system for secure applications using blockchain
CN109727037A (en) * 2018-12-29 2019-05-07 南京维盟网络科技有限公司 Member based on two class account of bank handles and management system and business model
CN110163595B (en) * 2019-04-24 2022-12-06 吉林大学珠海学院 Prepaid consumption management method, system and storage medium based on block chain
US11388010B2 (en) * 2019-10-18 2022-07-12 Arcblock, Inc. Blockchain account migration
CN112232792A (en) * 2020-10-20 2021-01-15 长城计算机软件与系统有限公司 Prepaid card transaction system and method based on block chain
CN112785292B (en) * 2021-01-29 2024-02-27 湖南大学 Prepaid card management method and system based on blockchain, equipment and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111090626A (en) * 2019-11-05 2020-05-01 西安西电链融科技有限公司 File storage processing method based on block chain distributed file transaction system

Also Published As

Publication number Publication date
CN113222567A (en) 2021-08-06

Similar Documents

Publication Publication Date Title
CN106952094B (en) Electronic bill management method and device
KR100289956B1 (en) Trustee agencies for the open distribution of electronic money
CN103975352B (en) The stored value card that can be supplemented with money safely
US7996325B2 (en) Microbilling using a trust management system
US6868408B1 (en) Security systems and methods applicable to an electronic monetary system
US8346668B2 (en) Electronic money system and electronic money transaction method
CN113222567B (en) Prepaid card management method and device based on block chain technology and block chain link points
JPH11504144A (en) Electronic money system
AU2017212501A1 (en) Digital asset conversion
Blaze et al. Offline micropayments without trusted hardware
US9165297B2 (en) Virtual account and token-based digital cash protocols
Zongkai et al. A new fair micropayment system based on hash chain
CN110503429B (en) Decentralized content interaction method and system
CN112182640B (en) Automobile time-sharing lease transaction method based on block chain
WO2016051259A1 (en) Transferable value or rights token
CN112513907A (en) Apparatus and method for providing digital asset exchange protocol
Jin et al. A utxo-based sharding method for stablecoin
KR102103473B1 (en) Operating Apparatus for Community Money Platform and Method of Providing Service thereof
TWM599433U (en) Inter-bank point conversion system
Yang et al. Fair micropayment system based on hash chains
JP3599493B2 (en) Electronic cash method and user device with separate issuing agency number registration type
Payeras-Capellà et al. Transferable Channels for Fair Micropurchases
Amirian Probabilistic Micropayments
Tsao et al. An electronic bearer check system
TW202143152A (en) Inter-bank point conversion system and inter-bank point conversion method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20230303

Address after: 102628 No.28 Shengfang Road, North Industrial Development Zone, Daxing District, Beijing

Patentee after: ZHONGCHAO CREDIT CARD INDUSTRY DEVELOPMENT Co.,Ltd.

Patentee after: China Banknote Printing and Minting Group Co.,Ltd.

Address before: 310013 Room 903, South Building, ad building, Lingyin street, Xihu District, Hangzhou City, Zhejiang Province

Patentee before: ZHONGCHAO CREDITCARD INDUSTRY DEVELOPMENT CO., LTD. HANGZHOU BLOCKCHAIN TECHNOLOGY Research Institute

Patentee before: ZHONGCHAO CREDIT CARD INDUSTRY DEVELOPMENT Co.,Ltd.

TR01 Transfer of patent right