CN112488678A - User transaction method, device and storage medium - Google Patents

User transaction method, device and storage medium Download PDF

Info

Publication number
CN112488678A
CN112488678A CN202011275804.4A CN202011275804A CN112488678A CN 112488678 A CN112488678 A CN 112488678A CN 202011275804 A CN202011275804 A CN 202011275804A CN 112488678 A CN112488678 A CN 112488678A
Authority
CN
China
Prior art keywords
user
token
bank
account
amount
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.)
Pending
Application number
CN202011275804.4A
Other languages
Chinese (zh)
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.)
China Citic Bank Corp Ltd
Original Assignee
China Citic Bank Corp Ltd
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 China Citic Bank Corp Ltd filed Critical China Citic Bank Corp Ltd
Priority to CN202011275804.4A priority Critical patent/CN112488678A/en
Publication of CN112488678A publication Critical patent/CN112488678A/en
Pending legal-status Critical Current

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
    • G06Q20/102Bill distribution or payments
    • 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/36Payment architectures, schemes or protocols characterised by the use of specific devices or networks using electronic wallets or electronic money safes
    • G06Q20/367Payment architectures, schemes or protocols characterised by the use of specific devices or networks using electronic wallets or electronic money safes involving electronic purses or money safes
    • 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/403Solvency checks
    • 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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/03Credit; Loans; Processing thereof

Landscapes

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

Abstract

The embodiment of the invention provides a user transaction method, which comprises the following steps: receiving a borrowing request sent by a first user, wherein the borrowing request carries a borrowing amount; receiving a guarantee request and a guarantee token provided by a second user for the first user, wherein the guarantee token corresponds to the debit amount; providing the token corresponding to the borrowing request and the borrowing to the first user.

Description

User transaction method, device and storage medium
Technical Field
The invention relates to the technical field of information, in particular to a user transaction method, a user transaction device and a storage medium.
Background
At present, the liquidity of deposit in a bank is poor for a user, and the time value of currency cannot be realized. How to implement the time value of money by digital monetization of user deposits becomes a problem.
Disclosure of Invention
The invention provides a user transaction method, a device and a storage medium, which can realize the time value of money through digital monetization of user deposit.
The embodiment of the invention provides a user transaction method, which comprises the following steps: receiving a borrowing request sent by a first user, wherein the borrowing request carries a borrowing amount; receiving a wager request and a wager token provided by a second user for the first user, wherein the wager token corresponds to the debit amount; providing the first user with tokens corresponding to the borrowing request and a loan.
Optionally, after providing the token corresponding to the borrowing request and the borrowing to the first user, the method further comprises: when the first user pays due, transferring the token of the first user to an account of a bank providing the debit according to the debit amount and interest corresponding to the debit amount; returning the vouching token to the second user.
Optionally, after providing the token corresponding to the borrowing request and the borrowing to the first user, the method further comprises: transferring an offline asset of the second user to an account of a bank providing the loan in the event that the first user's loan is overdue and not yet cleared, wherein the offline asset corresponds to the vouching token.
Optionally, the receiving a vouching request and a vouching token provided by a second user for the first user includes: under the condition that a guarantee request sent by the second user is received, judging whether the account address of the second user is legal or not; if the judgment result is yes, judging whether the token value in the account of the second user is larger than or equal to the token value corresponding to the debit amount; and receiving the guarantee token provided by the second user if the judgment result is yes.
Optionally, before receiving the borrowing request sent by the first user, the method further includes: converting assets of the first user and the second user into tokens.
The embodiment of the invention also provides a user transaction method, which comprises the following steps: receiving a first token conversion request sent by a user, wherein the first token conversion request carries a quota of a first token to be converted; transferring the first token to a second bank; transferring a second token of the second bank to the first user, wherein an amount of the second token corresponds to an amount of the first token.
Optionally, the transferring the first token to a second bank includes: judging whether the account address of the second bank is legal or not; if the judgment result is yes, judging whether the money amount of the token in the account of the second bank is larger than or equal to the money amount of the first token to be converted; and in the case that the judgment result is yes, transferring the first coin to a second bank.
Optionally, before receiving the first coin conversion request sent by the user, the method further includes: converting the user's assets into tokens.
Embodiments of the present invention further provide a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements any one of the methods in the embodiments of the present invention.
The embodiment of the present invention further provides an electronic device, which includes a memory and a processor, and the processor implements any one of the methods in the embodiments of the present invention by executing a program in the memory.
By the user transaction method provided by the embodiment of the invention, the time value of the money can be realized by digital monetization of deposit of the user.
Drawings
Fig. 1 is a flowchart of a user transaction method according to an embodiment of the present invention;
FIG. 2 is a flow chart of another method of user transaction provided by an embodiment of the invention;
FIG. 3 is a block diagram of a user transaction device according to an embodiment of the present invention;
FIG. 4 is a block diagram of another user transaction device according to an embodiment of the present invention;
FIG. 5 is a diagram of a transaction system framework according to an embodiment of the invention;
figure 6 is a flow chart of a method of issuing bank tokens according to an embodiment of the present invention;
FIG. 7 is a timing diagram of a method of lending bank tokens according to an embodiment of the invention;
FIG. 8 is a flow chart of a method of inter-bank token interchange according to an embodiment of the present invention;
FIG. 9 is a flow diagram of a method for loan overdue clearance, according to an embodiment of the invention;
figure 10 is a schematic diagram of a method of issuing bank tokens according to an embodiment of the present invention;
FIG. 11 is a schematic diagram of a credit guarantee borrowing method according to an embodiment of the present invention;
FIG. 12 is a diagram illustrating a method of exchanging currency between digital currency accounts, in accordance with an embodiment of the present invention.
Detailed description of the invention
To make the objects, technical solutions and advantages of the present application more apparent, embodiments of the present application will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
In addition, in the embodiments of the present invention, the words "optional" or "exemplary" are used to mean serving as an example, instance, or illustration. Any embodiment or design described as "optional" or "exemplary" in embodiments of the invention is not to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the terms "optional" or "exemplary" are intended to present relevant concepts in a concrete fashion.
The embodiment of the invention provides a user transaction method. Fig. 1 is a flowchart of a user transaction method according to an embodiment of the present invention, and as shown in fig. 1, the method may include the following steps:
s102, receiving a borrowing request sent by a first user, wherein the borrowing request carries a borrowing amount;
s104, receiving a guarantee request and a guarantee token provided by a second user for the first user, wherein the guarantee token corresponds to the debit amount;
s106, providing the token corresponding to the borrowing request and the borrowing to the first user.
In the related technology, a user is difficult to provide guarantees for others through deposits in an electronic banking system, and by the method provided by the embodiment of the invention, the user assets can be tokenized, the time value of the user assets is released, and profits are obtained by substituting other users for loan guarantees.
Optionally, after providing the token corresponding to the borrowing request and the borrowing to the first user, the method further comprises: transferring the token of the first user to an account of a bank providing the debit according to the debit amount and interest corresponding to the debit amount under the condition that the first user pays due; the vouched-for token is returned to the second user.
Optionally, after providing the token corresponding to the borrowing request and the borrowing to the first user, the method further comprises: and in the case that the first user's overdue loan is not yet cleared, transferring the second user's offline asset to an account of a bank providing the loan, wherein the offline asset corresponds to the secured token. The offline asset here refers to the second user's real bank account asset.
Optionally, the receiving a vouching request and a vouching token provided by a second user for the first user includes: under the condition of receiving a guarantee request sent by the second user, judging whether the account address of the second user is legal or not; if the judgment result is yes, judging whether the token value in the account of the second user is larger than or equal to the token value corresponding to the debit amount; and receiving the guarantee token provided by the second user if the judgment result is yes.
Optionally, before receiving the borrowing request sent by the first user, the method further includes: converting the assets of the first user and the second user into tokens.
The embodiment of the invention also provides another user transaction method. Fig. 2 is a flowchart of another user transaction method provided in an embodiment of the present invention, and as shown in fig. 2, the method may include the following steps:
s202, receiving a first token conversion request sent by a user, wherein the first token conversion request carries the amount of a first token to be converted;
s204, transferring the first currency to a second bank;
s206, transferring the second money of the second bank to the first user, wherein the amount of the second token corresponds to the amount of the first token.
The method provided by the embodiment of the invention can tokenize the user assets and release the time value of the user assets, and in addition, the user assets can be converted and circulated among different banks after tokenization, thereby improving the liquidity of the assets.
Optionally, the transferring the first token to the second bank includes: judging whether the account address of the second bank is legal or not; if the judgment result is yes, judging whether the money amount of the token in the account of the second bank is larger than or equal to the money amount of the first token to be converted; and in the case that the judgment result is yes, transferring the first coin to a second bank.
Optionally, before receiving the first coin conversion request sent by the user, the method further includes: the user's assets are converted into tokens.
The embodiment of the invention also provides a user transaction device. Fig. 3 is a block diagram of a user transaction apparatus according to an embodiment of the present invention, as shown in fig. 3, the apparatus includes a first receiving module 32, a second receiving module 34, and a providing module 36, wherein,
the first receiving module 32 is configured to receive a borrowing request sent by a first user, where the borrowing request carries a borrowing amount;
a second receiving module 34, configured to receive a guarantee request and a guarantee token provided by a second user for the first user, where the guarantee token corresponds to the debit amount;
a providing module 36 is configured to provide the token and the loan corresponding to the borrowing request to the first user.
In the related technology, the user is difficult to guarantee others by depositing money in the current electronic banking system, and the device provided by the embodiment of the invention can tokenize the user assets, release the time value of the user assets and obtain benefits by substituting other users for loan guarantee.
Optionally, the apparatus further includes a first transfer module and a return module, where the first transfer module is configured to transfer the token of the first user to an account of a bank providing the debit according to the debit amount and an interest corresponding to the debit amount when the first user pays due; a refund module for refunding the vouching token to the second user.
Optionally, the apparatus further comprises a second transfer module, wherein the second transfer module is configured to transfer an offline asset of the second user to an account of a bank providing the loan if the loan of the first user is overdue and not yet cleared, wherein the offline asset corresponds to the secured token.
Optionally, the second receiving module 34 includes a first determining submodule, a second determining submodule, and a receiving submodule, where the first determining submodule is configured to determine whether an account address of the second user is legal or not when receiving a guarantee request sent by the second user; the second judgment submodule is used for judging whether the token value in the account of the second user is more than or equal to the token value corresponding to the debit amount or not under the condition that the judgment result is yes; and a receiving submodule for receiving the guarantee token provided by the second user if the judgment result is yes.
Optionally, the apparatus further comprises a conversion module, wherein the conversion module is configured to convert the assets of the first user and the second user into tokens.
The embodiment of the invention also provides another user transaction device. Fig. 4 is a block diagram of another user transaction arrangement according to an embodiment of the present invention, as shown in fig. 4, the arrangement including a receiving module 42, a first transfer module 44, and a second transfer module 46, wherein,
the receiving module 42 is configured to receive a first token conversion request sent by a user, where the first token conversion request carries a quota of a first token to be converted;
a first transfer module 44 for transferring the first token to a second bank;
a second transfer module 46 for transferring the second money of the second bank to the first user, wherein the amount of the second token corresponds to the amount of the first token.
Optionally, the first transfer module 44 includes a first determining sub-module, a second determining sub-module and a transfer sub-module, where the first determining sub-module is configured to determine whether the account address of the second bank is legal; the second judgment submodule is used for judging whether the money amount of the token in the account of the second bank is more than or equal to the money amount of the first token to be converted or not under the condition that the judgment result is yes; and the transfer sub-module is used for transferring the first coin to a second bank under the condition that the judgment result is yes.
Optionally, the apparatus further comprises a conversion module, wherein the conversion module is configured to convert the asset of the user into tokens.
The following describes embodiments of the present invention with reference to specific scenarios.
Fig. 5 is a block diagram of a transaction system according to an embodiment of the present invention, as shown in fig. 5, the system including a plurality of module functions of a bank, a digital money wallet, a token issuing intelligent contract, a token lending intelligent contract, and a token converting intelligent contract.
Wherein, the bank is used for generating a public and private key pair and constructing own intelligent contract of the token, thereby issuing the intelligent contract of the token onto the blockchain network. The bank is used as the token issuer, the token of the bank is issued by the token issuing intelligent contract, and the asset of the user can be tokenized according to the asset scale of the user by the contract, so that the client has the token of the bank on the block chain network.
A debit and credit request is sent to a token debit and credit intelligent contract by a digital currency wallet, and a bank transfers tokens of a guarantor from a guarantor account to a bank account (account on a block chain) and then from the bank account (account on the block chain) to a borrower account through the token debit and credit intelligent contract; when the borrower is not paid for due, the bank calls the off-line clearing system to transfer the off-line account assets of the security policy into the bank account, so that the loan balance is ensured (the off-line assets are consistent with the on-line tokens), and the loan security transaction system of the whole block chain network is realized.
The conversion interface of the intelligent contract for converting the token is called by the digital currency wallet, then the transfer interface of the intelligent contract for issuing the token is called by the intelligent contract for converting the token, and the type of the token in other lines is converted into the type of the token in the current line, thereby realizing the token conversion transaction system of the whole block chain network.
The following describes some of the functional modules specifically:
1) bank token issuing intelligent contracts:
the bank as the issuer of the token issues the token itself by the token issuing intelligent contract, and the user's asset can be tokenized according to the user's asset scale by this contract.
2) Intelligent contract for borrowing bank tokens:
borrowing: the user A is used as a guarantee party, the user B is used as a borrower, and a loan interface borrow () of a token loan intelligent contract is called to apply for loan to a bank; the user A calls a guarantee interface guarantee () of the intelligent token loan contract to confirm a guarantee application and transfers the token required by self guarantee to a bank; the bank calls the offer loan interface loan () of the intelligent contract for loan of tokens to transfer the token to the account of user B.
Repayment: and the borrower pays due, the user calls a repayment interface repayment () of the intelligent token borrowing contract, a transfer interface transfer () is triggered through the repayment interface, the token (total borrowed sum and interest) is transferred into a bank account from the borrower account, and then the security token is transferred into the security account from the bank account. If there is a commission fee remaining for the wager, the token (total debit + interest + wager amount) is transferred from the borrower account to the bank account, and the token (wager amount + wager amount) is transferred from the bank account back to the sponsor account.
Clearing: interacting with a token borrowing intelligent contract, calling a borrowing list to inquire a local query interface, inquiring non-repayment borrowing transaction records in the borrowing list, calling an offline clearing system by a bank when a borrower is not repayment due to overdue, and transferring offline assets of a guarantee party account to the bank account, so that borrowing balance is guaranteed (online tokens and offline assets of the bank are kept consistent), and meanwhile removing the corresponding borrowing records from the token borrowing intelligent contract.
3) Intelligent contract for converting bank token
The method comprises the steps of converting a token A of a user A into a token B by calling a conversion interface Exchange () of a token conversion intelligent contract, calling a transfer interface transfer () of the token A issuing an intelligent contract by the token conversion intelligent contract, transferring the token A of the user A to a bank B, calling a transfer interface transfer () of the token B issuing an intelligent contract by the bank B after the bank B receives a token conversion event prompt of the user A, transferring the token B of the bank B to an address of the user A, and successfully converting the token A into the token B.
4) Bank client
And (3) message notification: interacting with a digital money wallet, receiving/sending transaction information notifications, comprising: account fund change notification, loan due notification, loan overdue repayment and other message notifications.
And (3) user loan management: interacting with the intelligent contract, the bank completes settlement by calling the intelligent contract of the block chain, and can also call the intelligent contract of the block chain to inquire the debit account and the information related to the balance of the guarantee account.
User token initialization and update: interacting with the digital currency wallet, chaining user assets and updating user token related information.
5) Digital money wallet
The system is used as an initiator of a business process and interacts with a block chain intelligent contract, a user initiates a borrowing request to a token borrowing intelligent contract, and borrowing is completed through the token borrowing intelligent contract; the user initiates a token conversion request to a token conversion intelligent contract, and the token conversion is completed through the token conversion intelligent contract. Interacting with the bank client, chaining the user assets and completing asset tokenization.
Fig. 6 is a flowchart of a method of issuing a bank token according to an embodiment of the present invention, as shown in fig. 6, the method including the steps of:
1) a bank generates a public and private key pair for encrypting a management account;
generating a 256-bit account private key (256-bit, 32bytes in 16) from the pseudorandom number;
mapping the private key (32bytes) to the public key (65 bytes) by an elliptic curve digital signature algorithm;
an address is generated by performing a hash operation on the public key (taking the last 20bytes of the result after the hash operation as the address).
2) The bank constructs an intelligent contract for issuing the token;
the bank creates new intelligent contracts, such as: sol is named as bankccredit;
the interface standard defined by the ERC20 protocol is as follows:
Figure BDA0002778998190000071
in the constructor of the contract, totalSupply number is specified and all initial tokens are assigned to the msg.
3) And compiling contract codes according to the defined interface, selecting an account number for deploying the contract after the contract codes are compiled successfully, executing contract deployment transaction, and issuing a token to issue an intelligent contract successfully.
Fig. 7 is a timing diagram of a method for lending bank tokens according to an embodiment of the present invention, as shown in fig. 7, the method including the steps of:
1) a user B (borrower) applies for loan from a bank A and calls a loan interface Borrow () in a intelligent loan contract of the token A;
the loan application information includes: transaction date, account address of user B, total loan amount s, loan term and loan interface name;
2) the intelligent loan contract verification method includes the steps that a token A verifies loan application information of a user B through a loan intelligent contract;
and verifying whether the account address of the lender is legal or not, if the verification is passed, continuing to execute the next step, and if the verification is not passed, returning failure information to the user B.
3) A user A (a guarantor) calls a guaranty interface guarantee () in the token A lending intelligent contract to confirm the guaranty information;
confirming the warranty information includes: transaction date, user a account address, loan total s, loan term, guarantee status, and confirmation guarantee interface name.
4) The token A lending intelligent contract receives guarantee confirmation information of the user A, verifies that the guarantee confirmation information is completely passed, calls a transfer interface transfer () of the token A lending intelligent contract, and transfers the token of the user A to an account of a bank A;
verifying whether the guarantee state is the agreement guarantee or not, and if so, continuing to perform the next verification; otherwise, the transaction is ended;
verifying whether the account address of the user A is legal or not, and if so, continuing to perform the next verification; otherwise, the transaction is ended;
verifying whether the total amount of the token corresponding to the account of the user A is larger than or equal to the total amount of the token borrowed by the user B, and if so, continuing to execute the next step; otherwise, the transaction is ended;
5) and calling a transfer interface transfer () of the intelligent debit and credit contract of the token A by the bank, transferring the token A from a bank account to an account of the user B (the total amount is s), and completing the debit and credit. When the user borrows due repayment, a repayment interface repayment () of the intelligent loan contract is called, a transfer interface transfer () is triggered through the repayment interface, the token (total loan sum and interest) is transferred to a bank account from a borrower account, and then the security token is transferred to a security account from the bank account. If there is a commission fee remaining for the wager, the token (total debit + interest + wager amount) is transferred from the borrower account to the bank account, and the token (wager amount + wager amount) is transferred from the bank account back to the sponsor account.
Figure 8 is a flow chart of a method for inter-bank token interchange according to an embodiment of the present invention, as shown in figure 8, the method comprising the steps of:
1) the user A calls a token conversion interface Exchange () in the token conversion intelligent contract to apply for converting the token A into the token B in a ratio of 1: 1;
the conversion information includes: user A account address, bank B address, conversion sum z and conversion interface name.
2) Verifying whether the address of the bank B is legal or not, and if so, continuing to perform the next verification; otherwise, the transaction is ended;
3) verifying whether the total amount of the token A of the user A is larger than or equal to the conversion total amount z, and if the verification is passed, continuing to perform the next verification; if the verification is not passed, the transaction is ended;
4) verifying whether the total amount of the token B of the bank B is larger than or equal to the conversion total amount z, if the verification is passed, calling a transfer interface transfer () of the token A issuing an intelligent contract, and if the verification is not passed, finishing the transaction.
5) The intelligent contract for token conversion calls a transfer interface transfer () of the intelligent contract issued by the token A, and transfers the token A of the user A to the bank B (the total conversion amount is z);
6) the intelligent contract for token conversion calls a transfer interface transfer () of the intelligent contract issued by the token B, and transfers the token B of the bank to the address of the user A (the total conversion amount is z);
7) the conversion is complete and the total amount of tokens B for user a is z.
Fig. 9 is a flowchart of a method for loan overdue clearance according to an embodiment of the invention, as shown in fig. 9, the method comprising the steps of:
1) the bank calls a loan list of the intelligent token loan contract to query a local query interface, and queries unpaid loan transaction records in the loan list;
2) according to the query result return information (transaction date, loan term, guarantor and loan amount), judging whether the user is overdue and not paid, if yes, executing the next step; if not, finishing the execution;
3) the bank calls an offline clearing system to transfer the offline assets (principal + interest) of the guarantor account to the bank account, so as to ensure the balance of the loan (the online token and the offline asset are consistent), and delete the loan transaction record in the loan list.
An embodiment of the present invention also provides a method for issuing a bank token, and fig. 10 is a schematic view of a method for issuing a bank token according to an embodiment of the present invention.
A block chain-based loan guarantee system between banks is realized, so that guarantee loans can be carried out among users of different banks. The bank will then issue the money based on the consolidated standard and the embodiment of the invention selects the ERC-20 standard. The bank currency issuing process comprises the following steps:
(1) bank a constructs token accounts:
generating a private key: 256bit private key example of pseudo random number generation (256bit 16 bytes)
18e14a7b6a307f426a94f8114701e7c8e774e7f9a47e2c2035db29a206321725
Calculating a public key:
the private key (32bytes) is mapped to the public key (65 bytes) by using an elliptic curve digital signature algorithm ECDSA-secp256k1 (prefix 04+ X public key + Y public key):
0450863ad64a87ae8a2fe83c1af1a8403cb53f53e486d8511dad8a04887e5b23522cd470243453a299fa9e77237716103abc11a1df38855ed6f2ee187e9c582ba6
generating an address:
taking the public key to hash, computing the Keccak-256 hash value (32bytes) of the public key:
fc12ad814631ba689f7abe670x1016f75c54c607f082ae6b0881fac0abeda21781
taking the result of the last step, and then taking 20bytes, namely the address:
0x1016f75c54c607f082ae6b0881fac0abeda21781
(2) bank a constructs issuing token intelligent contracts:
the function of the intelligent contracts of the Bank token is as follows:
defining an ERC-20 standard interface;
the Bank token contract realizes the standard interface of ERC-20:
1) initializing the attribute: specifying the name of a token, Bank token, abbreviation symbol-BKT of a token, the minimum unit of tradeable at the decimal point, 0.000000000000000001decimals-18, total amount of tokens issued, totalSupply-100000000, and the account that initializes the token will have all tokens;
2) token transfer transaction transfer for transferring tokens from one address to another:
a. checking whether the to address of the receiver is legal;
b. checking whether the sender's from balance is sufficient;
c. checking whether the balance of the to address of the receiver is overflowed;
d. calculating the sum of the sender from balance and the balance of the recipient to address previousBalances;
e. deducting the sender account balance;
f. increasing the account balance of the receiver;
g. triggering a token transfer transaction event;
h. and comparing whether the sum of the balance of the sender from and the balance of the receiver to address after the dynamic account is consistent with the balance before the dynamic account and previousBalances or not, if not, the transaction fails, and terminating the transaction.
3) Authorizing transfer transaction transfer from, token holding account authorizing, target account to may obtain authorized amount of tokens from authorized person from:
a. checking whether the address of the authorized person and the address of the target person are legal;
b. checking whether the account balance of the authorized person is sufficient;
c. checking whether the amount of the authorized person is enough;
d. checking whether the balance of the target account is overflowed;
e. deducting the amount of the authorized person;
f. deducting the account balance of the authorized person;
g. adding the balance of the target account;
h. triggering a transfer event of the token transfer transaction, and monitoring by a contract monitor;
4) authorizing an account may obtain the balance of the token holding account:
a. setting an authorized accessible token number;
b. triggering an Approval event, and waiting for a contract monitor to monitor;
5) and inquiring the authorized surplus amount.
(3) A contract creation transaction is performed, deploying the token issuance contract to a blockchain network.
An embodiment of the present invention further provides a credit guarantee borrowing method, and fig. 11 is a schematic diagram of a credit guarantee borrowing method according to an embodiment of the present invention.
(1) The user B of the bank B applies for a loan of 5000 to the bank A, and invokes a loan interface in a token loan intelligent contract in the blockchain network: borrow (), initiates a loan request onto the blockchain:
transaction ID, transaction date, user B account address, loan amount, loan term-month, loan interface name {0000462812,20190722, 0x14723a09acff6d2a60dcdf7aa4aff308fddc160c,5000, 12, borlow }
(2) The block chain node receives a loan request of a user B, analyzes the request information, and verifies the request information by the loan intelligent contract:
checking whether the account address of the borrower is legal;
(3) a user A of a bank A calls a guarantee interface guarantee () in a token lending intelligent contract to confirm a lending request initiated by a user B;
transaction ID, transaction date, user A account address, 1-consent guarantee, confirmation interface name
{0000462813,20190722,0xca35b7d915458ef540ade6068dfe2f44e8fa733c,1,guarantee}
(4) After the token lending intelligent contract receives the guarantee confirmation request of the user A, analyzing the confirmation request information:
checking whether the guarantee state is 1-agreement guarantee, if yes, the transaction continues;
checking whether the account address of the guarantor is legal;
checking whether the token in the account of the guarantor is enough and is more than or equal to 5000;
and fourthly, the intelligent debit and credit contract calls a transfer (account sending, account receiving and transfer amount) transfer interface of the intelligent token contract, and 5000 tokens of the user A are transferred to the bank A.
jda=0xca35b7d915458ef540ade6068dfe2f44e8fa733c
jdbank=0x1016f75c54c607f082ae6b0881fac0abeda21781
stdtranamt=5000
ret=transfer(jda,jdbank,stdtranamt)
Fifthly, calling a transfer interface of the intelligent token contract by the intelligent loan contract, and transferring 5000 tokens to the user B by the bank A.
jdb=0x14723a09acff6d2a60dcdf7aa4aff308fddc160c
stdtranamt=5000
ret=transfer(jdbank,jdb,stdtranamt)
(5) Token loan intelligent contract record loan list:
Figure BDA0002778998190000111
Figure BDA0002778998190000121
(6) expiration after 12 months: and the user B repays on time and calls a repayment interface of the intelligent contract, and the operation is as follows:
the method comprises the following steps: 5000 guarantee handling fee: 50 loan interest: 5000 x 8% ═ 400
The total amount stdtranamt is 5000+50+400 5450 (token), and the user B calls a transfer interface of the intelligent loan contract to repay the money to the bank a.
ret=transfer(jdb,jdbank,stdtranamt)
The bank A calls a transfer interface of the intelligent loan contract to transfer the security commission charge stdtranamt of 50+5000 to 5050 (token) to the user A.
ret=transfer(jdbank,jda,stdtranamt)
Clearing the transaction record in the loan list.
(7) Expiration after 12 months: and the user B does not pay on time, and the bank periodically calls a debit and credit list of the intelligent token debit and credit contract to inquire a lonquryy interface:
first, the transaction information in the loan list is queried:
transaction IDtranid, transaction date stdlocdate, loan term loaner, guarantor, loan amount guamount
ret=loanqurery(tranid,stdlocdate,loanterm,guarantor,guamount)
And step two, circularly judging each piece of transaction information:
judging whether the loan transaction is overdue or not according to the transaction date stdlockate and the loan term loaner returned by the query transaction:
1) transaction ID 0000462812, transaction date 20190722, loan term 12 months, so the repayment date should be 20200722;
2) the current date is 20200723>20200722, so the transaction is judged to be overdue and not paid.
Secondly, according to the address a of the guarantor: 0xca35b7d915458ef540ade6068dfe2f44e8fa733c queries the corresponding account card number b of the guarantor: 6226123412341111, respectively;
③ for the transaction of overdue payment: transaction ID is processed for 0000462812:
1) the bank transfers principal and loan interest on user B's loan (5000.00+400.00 ═ 5400.00) offline from the guarantor account a to bank a's account;
the guarantor user a:
a. before loan guarantee:
token address a: 5000 token account b balance: 5000.00 (yuan)
b. After the warranty is cleared overdue:
token address a: 0 token account b balance: 5000+ 5400-400.00 yuan
(3) The transaction record in the loan list is cleared.
Fig. 12 is a schematic diagram illustrating a method for exchanging money between digital money accounts according to an embodiment of the present invention.
Curra, a token issued by Bank A
Token B issued by bank B: currb
User a token account information: token a (curra) balance: 35000 token b (currb) balance: 0
Bank B token account information: token a (curra) balance: 100000 token b (currb) balance: 35000000
User a needs to convert 30000 tokens B with token a, as follows:
(1) the user A calls a token conversion interface exchange () in the token conversion intelligent contract and puts forward a token conversion application request to the bank B;
the conversion request information includes:
user a address adda: 0x1016f75c54c607f082ae6b0881fac0abeda21781
Bank B address addb: 0xdd870fa1b7c4700f2bd7f44238821c26f7392148
Conversion limit stdtranamt: 30000
Converting the interface name: exchange
{0x1016f75c54c607f082ae6b0881fac0abeda21781,0xdd870fa1b7c4700f2bd7f44238821c26f7392148,30000,exchange}
(2) The intelligent token conversion contract receives the conversion request and analyzes the request, and performs the following operations:
firstly, verifying whether the address of the bank B is legal or not;
verifying whether the total amount of the token B of the bank B is enough and is more than or equal to the conversion amount 30000, and if the verification is not passed, ending the transaction; if the verification passes, the transaction continues.
Thirdly, the intelligent contract converted by the token calls a transfer interface for issuing the intelligent contract by the token A, and 30000 tokens A of the user A are transferred to the bank B:
ret=transfer(adda,addb,stdtranamt)
after the user A successfully transfers the account to the bank B:
user A has a token A (curra) balance of 5000 and a token B (currb) balance of 0
Bank B has token A (curra) balance of 130000 and token B (currb) balance of 35000000
Transferring transfer interfaces of intelligent contracts issued by the tokens B by the token conversion intelligent contracts, and transferring 30000 tokens B of the bank to the address adda of the user A;
ret=transfer(addb,adda,stdtranamt)
after the conversion is successful:
user A has a token A (curra) balance of 5000 and a token B (currb) balance of 30000
Bank B has a token a (curra) balance of 130000 and a token B (currb) balance of 34970000.
The embodiment of the invention also provides an electronic device, which comprises a processor and a memory; the number of processors in the electronic device may be one or more, and the memory, which is a computer-readable storage medium, may be used to store a computer-executable program. The processor executes various functional applications of the electronic device and data processing by executing software programs and instructions stored in the memory, namely, the method in any one of the above embodiments is realized.
Embodiments of the present application also provide a storage medium containing computer-executable instructions, which when executed by a computer processor implement the method in any of the above embodiments.
Optionally, the processor executes the instructions to implement a user transaction method, the method comprising:
s1, receiving a borrowing request sent by a first user, wherein the borrowing request carries a borrowing amount;
s2, receiving a guarantee request and a guarantee token provided by a second user for the first user, wherein the guarantee token corresponds to the debit amount;
s3, providing the token and the loan corresponding to the borrowing request to the first user.
Optionally, the processor executes the instructions to implement another user transaction method, the method comprising:
s1, receiving a first token conversion request sent by a user, wherein the token conversion request carries the amount of a first token to be converted;
s2, transferring the first coin to a second bank;
s3, transferring the second money of the second bank to the first user, wherein the amount of the second token corresponds to the amount of the first token.
The above are merely exemplary embodiments of the present application, and are not intended to limit the scope of the present application.
In general, the various embodiments of the application may be implemented in hardware or special purpose circuits, software, logic or any combination thereof. For example, some aspects may be implemented in hardware, while other aspects may be implemented in firmware or software which may be executed by a controller, microprocessor or other computing device, although the application is not limited thereto.
Embodiments of the application may be implemented by a data processor of a mobile device executing computer program instructions, for example in a processor entity, or by hardware, or by a combination of software and hardware. The computer program instructions may be assembly instructions, Instruction Set Architecture (ISA) instructions, machine related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages.
Any logic flow block diagrams in the figures of this application may represent program steps, or may represent interconnected logic circuits, modules, and functions, or may represent a combination of program steps and logic circuits, modules, and functions. The computer program may be stored on a memory. The memory may be of any type suitable to the local technical environment and may be implemented using any suitable data storage technology, such as, but not limited to, Read Only Memory (ROM), Random Access Memory (RAM), optical storage devices and systems (digital versatile disks, DVDs, or CD discs), etc. The computer readable medium may include a non-transitory storage medium. The data processor may be of any type suitable to the local technical environment, such as but not limited to general purpose computers, special purpose computers, microprocessors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), programmable logic devices (FGPAs), and processors based on a multi-core processor architecture.
The foregoing has provided by way of exemplary and non-limiting examples a detailed description of exemplary embodiments of the present application. Various modifications and adaptations to the foregoing embodiments may become apparent to those skilled in the relevant arts in view of the following drawings and the appended claims without departing from the scope of the invention. Therefore, the proper scope of the invention is to be determined according to the claims.

Claims (10)

1. A method of user transactions, the method comprising:
receiving a borrowing request sent by a first user, wherein the borrowing request carries a borrowing amount;
receiving a wager request and a wager token provided by a second user for the first user, wherein the wager token corresponds to the debit amount;
providing the first user with tokens corresponding to the borrowing request and a loan.
2. The method of claim 1, wherein after providing the first user with tokens corresponding to the borrowing request and a debit, the method further comprises:
when the first user pays due, transferring the token of the first user to an account of a bank providing the debit according to the debit amount and interest corresponding to the debit amount;
returning the vouching token to the second user.
3. The method of claim 1, wherein after providing the first user with tokens corresponding to the borrowing request and a debit, the method further comprises:
transferring an offline asset of the second user to an account of a bank providing the loan in the event that the first user's loan is overdue and not yet cleared, wherein the offline asset corresponds to the vouching token.
4. The method of any one of claims 1-3, wherein the receiving a vouching request and a vouching token provided by a second user for the first user comprises:
under the condition that a guarantee request sent by the second user is received, judging whether the account address of the second user is legal or not;
if the judgment result is yes, judging whether the token value in the account of the second user is larger than or equal to the token value corresponding to the debit amount;
and receiving the guarantee token provided by the second user if the judgment result is yes.
5. The method of any one of claims 1-3, further comprising, prior to receiving the request for borrowing sent by the first user:
converting assets of the first user and the second user into tokens.
6. A method of user transactions, the method comprising:
receiving a first token conversion request sent by a user, wherein the first token conversion request carries a quota of a first token to be converted;
transferring the first token to a second bank;
transferring a second token of the second bank to the first user, wherein an amount of the second token corresponds to an amount of the first token.
7. The method of claim 6, wherein said transferring the first token to a second bank comprises:
judging whether the account address of the second bank is legal or not;
if the judgment result is yes, judging whether the money amount of the token in the account of the second bank is larger than or equal to the money amount of the first token to be converted;
and in the case that the judgment result is yes, transferring the first coin to a second bank.
8. The method of claim 6 or 7, further comprising, before receiving the first token conversion request sent by the user:
converting the user's assets into tokens.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, implements the method of any of claims 1-5 or the method of any of claims 6-8.
10. An electronic device comprising a memory and a processor, wherein the processor implements the method of any of claims 1-5 or the method of any of claims 6-8 by executing a computer program in the memory.
CN202011275804.4A 2020-11-16 2020-11-16 User transaction method, device and storage medium Pending CN112488678A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011275804.4A CN112488678A (en) 2020-11-16 2020-11-16 User transaction method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011275804.4A CN112488678A (en) 2020-11-16 2020-11-16 User transaction method, device and storage medium

Publications (1)

Publication Number Publication Date
CN112488678A true CN112488678A (en) 2021-03-12

Family

ID=74930387

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011275804.4A Pending CN112488678A (en) 2020-11-16 2020-11-16 User transaction method, device and storage medium

Country Status (1)

Country Link
CN (1) CN112488678A (en)

Similar Documents

Publication Publication Date Title
CN110009489B (en) Asset transfer method and device based on block chain and electronic equipment
US20220172201A1 (en) Controlling asset access based on payments via a distributed ledger
CN110033377B (en) Asset sorting method and device based on block chain and electronic equipment
RU2732506C1 (en) Asset transferring method and equipment and electronic device
CN110020936B (en) Asset management method and device based on block chain and electronic equipment
CA2791752C (en) Methods and systems for verifying transactions
US20170221053A1 (en) Digital asset conversion
TWI631520B (en) Clearing system based on blockchain and method thereof
CN109087190A (en) A kind of financing loan method and apparatus
JP2019523495A (en) Digital goods management in a distributed transaction consensus network
CN110020948B (en) Asset tracing method and device based on block chain and electronic equipment
US11734760B1 (en) Systems and methods for operating a math-based currency exchange
WO2021042810A1 (en) Asset settlement method and apparatus employing blockchain, and electronic device
CN113449340B (en) Stock house transaction fund supervision method and device based on alliance chain
CN112488678A (en) User transaction method, device and storage medium
CN110807698A (en) Block chain general certificate borrowing and lending application method and system
KR102291341B1 (en) Method, system and program for create virtual account for each cryptocurrency for financial transactions
KR102620003B1 (en) System for providing financial services and simple payment server therefor
KR102226305B1 (en) Method and Apparatus for intermediating a borrowing contract based on a cryptographic currency
KR20240005642A (en) System for providing financial services and simple payment server therefor
JP2001195528A (en) Account settlement system and account settlement processing method
CN114298841A (en) Investment and financing match transaction technical scheme based on block chain
KR20210067174A (en) cryptodollar currency transaction system and method performing thereof

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