CN112184450B - Transaction settlement method, transaction node, device and medium based on blockchain - Google Patents

Transaction settlement method, transaction node, device and medium based on blockchain Download PDF

Info

Publication number
CN112184450B
CN112184450B CN202011091654.1A CN202011091654A CN112184450B CN 112184450 B CN112184450 B CN 112184450B CN 202011091654 A CN202011091654 A CN 202011091654A CN 112184450 B CN112184450 B CN 112184450B
Authority
CN
China
Prior art keywords
change
settlement
amount
user
transaction
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
CN202011091654.1A
Other languages
Chinese (zh)
Other versions
CN112184450A (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.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group Co 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 United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN202011091654.1A priority Critical patent/CN112184450B/en
Publication of CN112184450A publication Critical patent/CN112184450A/en
Application granted granted Critical
Publication of CN112184450B publication Critical patent/CN112184450B/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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • 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/363Payment architectures, schemes or protocols characterised by the use of specific devices or networks using electronic wallets or electronic money safes with the personal data of a user
    • 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

Landscapes

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

Abstract

The present disclosure provides a blockchain-based transaction settlement method, comprising: the transaction node calculates a first settlement amount of the current transaction of the user, wherein the first settlement amount comprises a whole money part and a change part; the transaction node obtains a first change amount which is recorded by the user on a blockchain; the transaction node judges whether the change part of the first settlement amount is smaller than or equal to the first change amount, and if the change part of the first settlement amount is smaller than or equal to the first change amount, the transaction node settles the money to the user based on the whole change part of the first settlement amount; the transaction node is used for reducing the first change amount by the change part of the first settlement amount to obtain a second change amount; and the transaction node replacing the first change amount in the blockchain with the second change amount. The embodiment of the disclosure utilizes the blockchain technology to settle transactions, and can at least solve the problems that change is difficult to be redeemed and the like.

Description

Transaction settlement method, transaction node, device and medium based on blockchain
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a blockchain-based transaction settlement method, a transaction node, a terminal device, and a computer-readable storage medium.
Background
In the transaction settlement mode, a plurality of shops, especially retail supermarkets, unilaterally implement rounding-up change regulations, for example, commodity settlement prices are collected at an angle of 1 when the lowest commodity settlement price is more than or equal to 5 and are directly zero when the commodity settlement price is less than 5. While this may be balanced overall for the store and without depleting customers benefiting therefrom, this approach is unfair to most customers and compromises the benefits of the customers, and as the number of zero coin passes through the market does gradually decrease, there are practical difficulties in redeeming or dispensing zero coins in cash transactions, whether by the upper merchant or the customer.
Although electronic payment is becoming popular and the above problems are rarely generated during transaction settlement, there are still cases where a part of customer groups can only pay cash or prefer cash payment, so it is a current urgent problem to be solved to propose a solution that can effectively solve the change redemption in cash transaction settlement.
Disclosure of Invention
The present disclosure provides a blockchain-based transaction settlement method, a transaction node, a terminal device, and a computer-readable storage medium to solve at least the above problems.
According to an aspect of the disclosed embodiments, there is provided a blockchain-based transaction settlement method including:
the transaction node calculates a first settlement amount of the current transaction of the user, wherein the first settlement amount comprises a whole money part and a change part;
the transaction node obtains a first change amount which is recorded by the user on a blockchain;
the transaction node judges whether the change part of the first settlement amount is smaller than or equal to the first change amount, and if the change part of the first settlement amount is smaller than or equal to the first change amount, the transaction node settles the money to the user based on the whole change part of the first settlement amount;
the transaction node is used for reducing the first change amount by the change part of the first settlement amount to obtain a second change amount; the method comprises the steps of,
the transaction node replaces the first change amount in the blockchain with the second change amount.
In one embodiment, the method further comprises:
the transaction node presets the numerical range of the change part.
In one embodiment, before the transaction node obtains the first change amount posted by the user on the blockchain, further comprising:
the transaction node acquires the identity information of the user;
the transaction node inquires whether a change account of the user exists in a blockchain based on the identity information of the user;
if the change account of the user exists in the blockchain, the transaction node executes the step of acquiring a first change amount of the user, which is posted on the blockchain;
the transaction node obtaining a first change amount posted by the user on a blockchain, comprising:
the transaction node obtains a first change amount posted by the user on a blockchain based on the change account of the user.
In one embodiment, after the transaction node queries whether there is a change account for the user in the blockchain based on the identity information of the user, further comprising:
if the change account of the user does not exist in the blockchain, the transaction node creates the change account of the user based on the identity information of the user; the method comprises the steps of,
the transaction node synchronizes the user's change account into a blockchain.
In one embodiment, after the transaction node determines whether the change portion of the first settlement amount is less than or equal to the first change amount, the method further comprises:
if the change part of the first settlement amount is larger than the first change amount, the transaction node obtains a second settlement amount based on the whole part of the first settlement amount and settles to the user based on the second settlement amount, wherein the second settlement amount only comprises the whole part and the whole part larger than the first settlement amount;
the transaction node calculates a third change amount based on the second settlement amount, the first settlement amount and the first change amount; the method comprises the steps of,
the transaction node replaces the first change amount in the blockchain with the third change amount.
In one embodiment, after the transaction node settles to the user based on the second settlement amount, further comprising:
the transaction node generates a transaction log, wherein the transaction log comprises node information of the transaction node marked as an actual payer and the third change amount; the method comprises the steps of,
the transaction node logs the transaction log into the blockchain.
In one embodiment, the method further comprises:
the transaction node acquires the identity information of the user;
the transaction node inquires whether the user carries out transaction with other transaction nodes in a blockchain based on the identity information of the user;
if the user carries out transactions with other transaction nodes, after reaching a preset change settlement time, the transaction node and the other transaction nodes respectively and independently calculate the sum total difference of money which is a payee and an actual payer, and carry out actual fund settlement based on the sum total difference;
and the transaction node generates a settlement log after the actual funds are settled, and records the settlement log into the blockchain.
According to another aspect of the disclosed embodiments, there is provided a transaction node comprising:
a first calculation module configured to calculate a first settlement amount of a current transaction of the user, the first settlement amount including a whole money portion and a change portion;
an acquisition module configured to acquire a first change amount posted by the user on a blockchain;
a judging module configured to judge whether the change portion of the first settlement amount is less than or equal to the first change amount;
a first settlement module configured to perform settlement to the user based on the whole money portion of the first settlement amount when the judgment module judges that the change portion of the first settlement amount is less than or equal to the first change amount;
a second calculation module configured to subtract the first change amount from the change portion of the first settlement amount to obtain a second change amount; the method comprises the steps of,
an update module configured to replace a first change amount in the blockchain with the second change amount and to credit the blockchain.
According to still another aspect of the embodiments of the present disclosure, there is provided a terminal device including a memory and a processor, the memory storing a computer program therein, the processor executing the blockchain-based transaction settlement method when the processor runs the computer program stored in the memory.
According to yet another aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the blockchain-based transaction settlement method.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
according to the transaction settlement method based on the blockchain, the change amount is stored in the blockchain, and the change settlement is realized in a sharing mode, so that the problems of contradiction between merchants and users caused by the fact that the change amount is smaller and smaller in circulation quantity on the market and the merchant is difficult to change are at least solved, consumer benefits are guaranteed, user consumption experience is improved, and unnecessary trouble caused by the change redemption problem in the transaction settlement is avoided for the merchant.
Additional features and advantages of the disclosure will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the disclosure. The objectives and other advantages of the disclosure will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
The accompanying drawings are included to provide a further understanding of the disclosed embodiments and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain, without limitation, the disclosed embodiments.
Fig. 1 is a schematic flow chart of a transaction settlement method based on blockchain according to an embodiment of the present disclosure;
FIG. 2 is a flow chart of a blockchain-based transaction settlement method according to another embodiment of the present disclosure;
FIG. 3 is a flow chart of a blockchain-based transaction settlement method according to yet another embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a transaction node according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a terminal device according to an embodiment of the present disclosure.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the following detailed description of the specific embodiments of the present disclosure will be given with reference to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating and illustrating the disclosure, are not intended to limit the disclosure.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and the above-described figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order; moreover, embodiments of the present disclosure and features of embodiments may be arbitrarily combined with each other without conflict.
In the following description, suffixes such as "module", "component", or "unit" for representing elements are used only for facilitating the description of the present disclosure, and are not of specific significance per se. Thus, "module," "component," or "unit" may be used in combination.
Referring to fig. 1, fig. 1 is a flowchart of a blockchain-based transaction settlement method according to an embodiment of the disclosure, where the method includes steps S101 to S106.
In step S101, the transaction node calculates a first settlement amount of a current transaction of the user, the first settlement amount including a whole money part and a change part.
In this embodiment, the transaction node is an intelligent device for performing transaction settlement at a merchant, and the transaction node is registered as a blockchain node, and transaction settlement information and change amount are shared between different merchants through blockchains. Specifically, after the user makes a shop purchase, the transaction node calculates a first settlement amount to be settled for the current transaction based on the shopping item of the user.
Before this, the transaction node presets the value range of the change part in the settlement amount and uploads the value range to the blockchain, in some embodiments, all nodes in the blockchain may negotiate the value range of the change part in the settlement amount together, for example, 0 to 9 minutes, where the upper limit of the change amount is 9 minutes, where the amount is greater than or equal to 1 corner is the change part, for example, the settlement amount is 42.67 yuan, where 42.6 is the change part, and 0.07 is the change part. In some embodiments, the numerical range of the change portion may be set as an angle, a member, a ten member, or the like, which is not limited thereto by the present embodiment.
In some embodiments, in order to improve the transaction settlement efficiency, the transaction node first calculates a first settlement amount, and determines whether the change portion of the first settlement amount is 0, if so, ends the flow, and may directly adopt the prior art to perform settlement to the user based on the total settlement amount, otherwise, step S102 is performed.
In step S102, the transaction node obtains a first change amount posted by the user on a blockchain.
Specifically, the transaction node may query, as optimization, a first change amount of money posted by the user on the blockchain based on an identity information of the user, and when it is determined that the change portion of the first settlement amount is not 0, prompt a toll collector to enter identity information of the user or directly prompt the user to enter the identity information, so as to obtain the identity information of the user, and submit the identity information of the user to the blockchain to obtain a change amount state corresponding to the identity information of the user.
In one embodiment, the user logs into the blockchain in the change portion generated by each transaction settlement and generates a corresponding balance item (transaction log) that records the user identity information, the change amount, and merchant information, and can mark the merchant as the payee of the change amount, i.e., as the actual payer of the change settlement day, for change settlement, wherein details regarding change settlement are described in the following examples and are not repeated herein.
In step S103, the transaction node determines whether the change portion of the first settlement amount is less than or equal to the first change amount, and if so, step S104 is executed, otherwise, the flow is ended.
In step S104, the transaction node settles to the user based on the whole money portion of the first settlement amount.
Specifically, the transaction node prompts the user to pay the amount of the whole money part, the change part is offset by change information recorded by the user in the blockchain, transaction settlement is completed between the merchant and the user, and the follow-up step is to update the change information of the user in the blockchain so as to facilitate settlement of the change of the user in the later transaction.
In step S105, the transaction node subtracts the first change amount from the change portion of the first settlement amount to obtain a second change amount.
In step S106, the transaction node replaces the first change amount in the blockchain with the second change amount.
Specifically, the change portion of the first settlement amount is subtracted from the first change amount, i.e., the change portion of the first settlement amount is cleared, and the change balance of the user on the blockchain is updated (updated from the first change amount to a second change amount), which is the difference between the first change amount minus the change portion of the first settlement amount. And, in order to facilitate the settlement of the change between the following merchants, a balance item with the merchant as the payee, the amount of the change to be reduced as the payment amount, and the actual payment party corresponding to the amount to be reduced as the payment party can be added on the blockchain, for example, the first change amount written by the user in the blockchain is generated when other merchants make shopping, and the other merchants are the actual change payment parties, so after the settlement of the transaction, the actual payment party is still the other merchants because the first change amount is not used up or just used up. Of course, the first change amount may be a pre-paid amount by the user, and if the first change amount is a self-paid amount by the user, the actual payer may be marked as the user.
It should be noted that the embodiment may be applied to an electronic payment scenario as well, that is, the settlement of the first change amount may be used in combination with other electronic payments, for example, a micro-letter code used by a user may be entered, and when using micro-letter payment, whether there is a change balance (i.e., the first change amount) registered with the same micro-letter account number may be first queried on the blockchain, and if there is any, the payment may be prioritized with the change balance.
Therefore, according to the transaction settlement mode based on the embodiment, the problems that change circulation quantity is smaller and smaller in the market, change is difficult to find by merchants, and the generated merchants contradict users can be effectively solved, consumer benefits are guaranteed, user consumption experience is improved, and unnecessary troubles caused by change finding in transaction settlement are avoided for the merchants.
Referring to fig. 2, fig. 2 is a flow chart of a transaction settlement method based on a blockchain according to another embodiment of the present disclosure, and the present embodiment further provides a solution in which a change portion of a settlement amount is larger than a change posted by a user in the blockchain based on the previous embodiment, specifically, after the transaction node determines whether the change portion of the settlement amount is smaller than or equal to the first change amount (i.e. step S103), steps S201-S203 are further included.
In step S201, if the change portion of the first settlement amount is greater than the first change amount, the transaction node obtains a second settlement amount based on the whole portion of the first settlement amount, and settles to the user based on the second settlement amount, wherein the second settlement amount includes only the whole portion and the whole portion greater than the first settlement amount.
For example, the user pays 52.58 yuan (first settlement amount) for this transaction settlement, the change amount of the user in the blockchain is 0.06 yuan (first change amount), the transaction node calculates the second settlement amount to be 52.6 according to the whole money part 52.5, and settles to the user, and the user pays 52.6 yuan.
In step S202, the transaction node calculates a third change amount based on the second settlement amount, the first settlement amount, and the first change amount.
In step S203, the transaction node replaces the first change amount in the blockchain with the third change amount.
Specifically, the transaction node clears the first change amount, that is, the first change amount is zero after the first change amount is subtracted from the change portion of the first settlement amount, the user only needs to pay 52.52 actually, the third change amount is obtained by the second settlement amount 52.6-52.52 to be 0.08 point, and the change amount of the user updated in the blockchain is the third change amount.
It should be noted that if the change amount of the user is 0, the second settlement amount and the third change amount can be calculated based on the above manner, which will not be described herein.
Further, in order to avoid the problems that the change redemption information is not clear and the change settlement is difficult to be achieved when the user makes shopping in a plurality of shops, the present embodiment further includes the following steps after the transaction node settles the settlement to the user based on the second settlement amount (i.e. step S201):
the transaction node generates a transaction log, wherein the transaction log comprises node information of the transaction node marked as an actual payer and the third change amount; and logging the transaction log into the blockchain.
Further, since the user may shop at a plurality of shops, a plurality of change settlement may be generated, and a certain merchant in the transaction log is a payer and a certain merchant is a payee, the embodiment optimizes the change settlement process by determining whether the user performs transactions for different merchants a plurality of times, and specifically, the method further includes the following steps:
the transaction node acquires the identity information of the user;
the transaction node inquires whether the user carries out transaction with other transaction nodes in a blockchain based on the identity information of the user; if the user carries out transactions with other transaction nodes, after reaching a preset change settlement time, the transaction node and the other transaction nodes respectively and independently calculate the sum total difference of money which is a payee and an actual payer, and carry out actual fund settlement based on the sum total difference;
and the transaction node generates a settlement log after the actual funds are settled, and records the settlement log into the blockchain.
In practical application, two or more transaction nodes are connected according to a preset time point or time period or other triggering conditions; or as an optimization, when the blockchain system automatically determines the best settlement time, the two transaction nodes respectively and independently calculate the sum total difference of the money amounts of the payee and the actual payer, and the actual funds settlement is carried out on the difference, which can be performed by a banking system, a blockchain or other payment systems, but the embodiment is not limited to this. As optimization, the total difference of the payers among the merchants can be carried out, then the actual fund settlement is carried out, and after the settlement is finished, a settlement log is generated on a blockchain, so that when the settlement date arrives, the merchants can rapidly pay and pay the related change amount based on the settlement log.
It can be understood that other transaction nodes in the embodiment are also blockchain nodes, the preset change settlement date can be agreed by all transaction nodes, or the transaction node in the embodiment can automatically calculate the optimal change settlement date, and the optimal change settlement date is broadcasted to the blockchain and is signed and authenticated by other transaction nodes together to determine the optimal change settlement date, and the optimal change settlement date can reach the minimum value through the amount actually settled by the banking system so as to maximally save the settlement procedure cost. For example, the settlement algorithm is automatically optimized once per month blockchain, but the best settlement opportunity is not necessarily on the end of the month.
Referring to fig. 3, fig. 3 is a schematic flow chart of a transaction settlement method based on a blockchain according to another embodiment of the present disclosure, in order to facilitate the management and settlement of the user change amount, the present embodiment is configured to implement the inquiry, acquisition and settlement of the user change amount by creating a change account of the user and based on the change account of the user, and is particularly suitable for multi-merchant and multi-user purchase scenarios, so as to avoid the problem of incorrect settlement, and the like, and further includes steps S301-S304 before the transaction node acquires the first change amount (i.e. step S102) of the user posted on the blockchain.
In step S301, the transaction node obtains identity information of the user.
Wherein, the user identity information can be obtained by adopting any one of the following technologies: for example, face recognition, fingerprint recognition, mobile phone number, micro-letter number, payment treasured account number, even show micro-letter identity two-dimensional code, etc., as long as convenient and practical. The embodiment also does not require that the user used enter the identity in a unified form, as long as the change balance on the blockchain used each time adopts the identity information of the user.
In step S302, the transaction node queries whether a change account of the user exists in the blockchain based on the identity information of the user, if the change account of the user exists in the blockchain, step S203 is executed, otherwise, step S204 is executed.
The transaction node obtains a first change amount (i.e. step S102) posted by the user on a blockchain, specifically the following step S102':
in step S102', the transaction node obtains a first change amount posted by the user on a blockchain based on the user' S change account.
In step S303, the transaction node creates a change account of the user based on the identity information of the user.
Specifically, the user change account may include the following: the user identity, the initialized change amount (the initialized balance amount can be zero or the corresponding amount of change amount can be pre-stored by the user), and the information such as transaction log generated after the user transacts with a certain transaction node can be stored in the change account, so that the settlement and management of the change amount of the user are facilitated.
In step S304, the transaction node synchronizes the user' S change account into the blockchain.
To further understand the present embodiment, assuming that the predetermined blockchain change amount is 9 credits, the following operation may ensure that the balance of any one customer on the blockchain does not exceed 9 credits.
(1) The first to a super market purchased the commodity with a settlement amount of 6 corner 5 minutes.
(2) The A supermarket inquires that the A has no change balance on the blockchain according to the identity information recorded by the A.
(3) At settlement, the first pays 7 money to a supermarket. While a balance of 5 cents is produced on the blockchain. And the actual payer of the 5-point balance is a supermarket.
(4) The next day, a first to B supermarket, purchased the commodity with the settlement amount of 8 corner 4 minutes.
(5) B, inquiring that the first supermarket has 5 money balance on the blockchain according to the identity information recorded by the first supermarket, thereby:
a) The balance of the first on the blockchain becomes 1 minute
b) The first person only needs to pay 8 money to B supermarket
c) Meanwhile, a payoff party is added to the block chain to be a B supermarket, the amount of money is 4 minutes, and a payoff party is a record of A supermarket.
(6) And purchasing commodity with settlement amount of 1 yuan 5 corner and 5 minutes from the third day A to the supermarket C.
(7) C, inquiring that the balance of the first market on the blockchain is 1 minute according to the identity information recorded by the first market, thereby:
a) Clearing the amount of nail on the blockchain
b) Adding a record of C supermarket, 1 minute of money and A supermarket as payor on the blockchain
c) The recalculated settlement amount is 1 yuan 5 angle 4 minutes
d) First pay C supermarket 1 balance 6 angle
e) Adding a first card on the blockchain with a balance of 6 points and the actual payer is the record of C supermarket
(8) The commodity with settlement amount of 5 corners and 9 minutes is purchased from the first to the supermarket A on the fourth day
(9) The A supermarket inquires that the balance of the A on the blockchain is 6 money according to the identity information recorded by the A, and therefore:
a) Clearing the amount of nail on the blockchain
b) Adding a record of the payor being A supermarket, the amount of money being 6 minutes and the payor being C supermarket to the blockchain
c) The recalculated settlement amount is 5-angle 3 minutes
d) Alpha-payment to the A-Chao 6 corner
e) Adding a first record with a balance of 7 points on the blockchain and the actual payer being A-means
Further, it is assumed that the fifth day is a settlement day agreed in advance. And there are no other records of the transaction for the statement. According to transaction settlement records of the first four days, the following settlement matters are included:
a) On day 2 a record of 4 points in B supermarket was generated for A supermarket
b) On day 3 a record of 1 minute C supermarket payable by A supermarket was generated
c) On day 4 a record was generated of 6 points of A supermarket payable by C supermarket
(2) A supermarket directly pays 4-point money to B supermarket
(3) C supermarket directly pays 5 minutes to A supermarket
(4) After settlement, writing a settlement log on the blockchain
Based on the same technical concept, the embodiments of the present disclosure correspondingly further provide a transaction node, as shown in fig. 4, where the transaction node includes a first calculation module 41, an acquisition module 42, a judgment module 43, a first settlement module 44, a second calculation module 45, and an update module 46, where,
the first calculating module 41 is configured to calculate a first settlement amount of a current transaction of the user, wherein the first settlement amount comprises a whole money part and a change part;
the obtaining module 42 is configured to obtain a first change amount posted by the user on a blockchain;
the judging module 43 is configured to judge whether the change portion of the first settlement amount is less than or equal to the first change amount;
the first settlement module 44 is configured to perform settlement to the user based on the whole money portion of the first settlement amount when the determination module determines that the change portion of the first settlement amount is less than or equal to the first change amount;
the second calculation module 45 is configured to reduce the first change amount by the change portion of the first settlement amount to obtain a second change amount; the method comprises the steps of,
an updating module 46 configured to replace the first change amount in the blockchain with the second change amount.
In one embodiment, the transaction node further comprises:
a setting module configured to set a numerical range of the change portion in advance.
In one embodiment, the transaction node further comprises:
the acquisition module is further configured to acquire identity information of the user before the acquisition module acquires the first change amount posted by the user on the blockchain;
a query module configured to query a blockchain for the presence of a change account for the user based on the identity information of the user;
the acquisition module is further configured to acquire a first change amount posted by the user on the blockchain when the inquiry module inquires that the change account of the user exists in the blockchain;
the acquisition module is specifically configured to acquire a first change amount posted by the user on a blockchain based on the change account of the user.
In one embodiment, the transaction node further comprises:
a creation module configured to create a change account of the user based on the identity information of the user when the query module queries that the change account of the user does not exist in the blockchain; the method comprises the steps of,
an upload module configured to synchronize the user's change account into a blockchain.
In one embodiment, the transaction node further comprises:
a third calculation module configured to derive a second settlement amount based on the whole money portion of the first settlement amount when the determination module determines that the change portion of the first settlement amount is greater than the first change amount, wherein the second settlement amount includes only the whole money portion and the whole money portion greater than the first settlement amount;
a second settlement module configured to settle the user based on the second settlement amount;
a fourth calculation module configured to calculate a third change amount based on the second settlement amount, the first settlement amount, and the first change amount; the method comprises the steps of,
the update module is further configured to replace the first change amount in the blockchain with the third change amount.
In one embodiment, the transaction node further comprises:
a generation module configured to generate a transaction log including the third change amount and node information of the transaction node marked as an actual payer after the second calculation module settles the user based on the second settlement amount; and logging the transaction log into the blockchain.
In one embodiment, the obtaining module is further configured to obtain identity information of the user;
the query module is further configured to query a blockchain for whether the user has transacted with other transaction nodes based on the identity information of the user;
and the settlement module is arranged to calculate the sum total difference of money which is the payee and the actual payer respectively and independently from other transaction nodes after reaching the preset change settlement time when the inquiry module inquires that the user carries out transactions with other transaction nodes, carry out actual fund settlement based on the sum total difference, generate a settlement log after the actual fund settlement is completed and record the settlement log into the blockchain.
Based on the same technical concept, the embodiment of the present disclosure correspondingly provides a terminal device, as shown in fig. 5, where the terminal device includes a memory 51 and a processor 52, the memory 51 stores a computer program, and when the processor 52 runs the computer program stored in the memory 51, the processor 52 executes the blockchain-based transaction settlement method.
Based on the same technical concept, the embodiments of the present disclosure correspondingly further provide a computer readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the processor executes the blockchain-based transaction settlement method.
Those of ordinary skill in the art will appreciate that all or some of the steps, systems, functional modules/units in the apparatus, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between the functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed cooperatively by several physical components. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as known to those skilled in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Furthermore, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present disclosure, and not for limiting the same; although the present disclosure has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present disclosure.

Claims (10)

1. A blockchain-based transaction settlement method, comprising:
the transaction node calculates a first settlement amount of the current transaction of the user, wherein the first settlement amount comprises a whole money part and a change part;
the transaction node obtains a first change amount which is recorded by the user on a blockchain;
the transaction node judges whether the change part of the first settlement amount is smaller than or equal to the first change amount, and if the change part of the first settlement amount is smaller than or equal to the first change amount, the transaction node settles the money to the user based on the whole change part of the first settlement amount;
the transaction node is used for reducing the first change amount by the change part of the first settlement amount to obtain a second change amount; the method comprises the steps of,
the transaction node replaces the first change amount in the blockchain with the second change amount.
2. The method as recited in claim 1, further comprising:
the transaction node presets the numerical range of the change part.
3. The method of claim 1, further comprising, prior to the transaction node obtaining the first change amount posted by the user on a blockchain:
the transaction node acquires the identity information of the user;
the transaction node inquires whether a change account of the user exists in a blockchain based on the identity information of the user;
if the change account of the user exists in the blockchain, the transaction node executes the step of acquiring a first change amount of the user, which is posted on the blockchain;
the transaction node obtaining a first change amount posted by the user on a blockchain, comprising:
the transaction node obtains a first change amount posted by the user on a blockchain based on the change account of the user.
4. The method of claim 3, further comprising, after the transaction node queries a blockchain for the presence of the user's change account based on the user's identity information:
if the change account of the user does not exist in the blockchain, the transaction node creates the change account of the user based on the identity information of the user; the method comprises the steps of,
the transaction node synchronizes the user's change account into a blockchain.
5. The method of claim 1, further comprising, after the transaction node determines whether the change portion of the first settlement amount is less than or equal to the first change amount:
if the change part of the first settlement amount is larger than the first change amount, the transaction node obtains a second settlement amount based on the whole part of the first settlement amount and settles to the user based on the second settlement amount, wherein the second settlement amount only comprises the whole part and the whole part larger than the first settlement amount;
the transaction node calculates a third change amount based on the second settlement amount, the first settlement amount and the first change amount; the method comprises the steps of,
the transaction node replaces the first change amount in the blockchain with the third change amount.
6. The method of claim 5, further comprising, after the transaction node settles to the user based on the second settlement amount:
the transaction node generates a transaction log, wherein the transaction log comprises node information of the transaction node marked as an actual payer and the third change amount; the method comprises the steps of,
the transaction node logs the transaction log into the blockchain.
7. The method as recited in claim 6, further comprising:
the transaction node acquires the identity information of the user;
the transaction node inquires whether the user carries out transaction with other transaction nodes in a blockchain based on the identity information of the user;
if the user carries out transactions with other transaction nodes, after reaching a preset change settlement time, the transaction node and the other transaction nodes respectively and independently calculate the sum total difference of money which is a payee and an actual payer, and carry out actual fund settlement based on the sum total difference;
and the transaction node generates a settlement log after the actual funds are settled, and records the settlement log into the blockchain.
8. A transaction node, comprising:
a first calculation module configured to calculate a first settlement amount of a current transaction of the user, the first settlement amount including a whole money portion and a change portion;
an acquisition module configured to acquire a first change amount posted by the user on a blockchain;
a judging module configured to judge whether the change portion of the first settlement amount is less than or equal to the first change amount;
a first settlement module configured to perform settlement to the user based on the whole money portion of the first settlement amount when the judgment module judges that the change portion of the first settlement amount is less than or equal to the first change amount;
a second calculation module configured to subtract the first change amount from the change portion of the first settlement amount to obtain a second change amount; the method comprises the steps of,
an update module configured to replace a first change amount in the blockchain with the second change amount.
9. A terminal device comprising a memory and a processor, the memory having stored therein a computer program, which when executed by the processor performs the blockchain-based transaction settlement method according to any of claims 1 to 7.
10. A computer readable storage medium having stored thereon a computer program, wherein the computer program, when executed by a processor, performs the blockchain-based transaction settlement method according to any of claims 1 to 7.
CN202011091654.1A 2020-10-13 2020-10-13 Transaction settlement method, transaction node, device and medium based on blockchain Active CN112184450B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011091654.1A CN112184450B (en) 2020-10-13 2020-10-13 Transaction settlement method, transaction node, device and medium based on blockchain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011091654.1A CN112184450B (en) 2020-10-13 2020-10-13 Transaction settlement method, transaction node, device and medium based on blockchain

Publications (2)

Publication Number Publication Date
CN112184450A CN112184450A (en) 2021-01-05
CN112184450B true CN112184450B (en) 2023-06-20

Family

ID=73951205

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011091654.1A Active CN112184450B (en) 2020-10-13 2020-10-13 Transaction settlement method, transaction node, device and medium based on blockchain

Country Status (1)

Country Link
CN (1) CN112184450B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10302124A (en) * 1997-04-23 1998-11-13 Noboru Hayakawa Device for counting coin and issuing prepaid card
CN1704983A (en) * 2004-05-28 2005-12-07 黄金富 Electronic money system and method for deposit and payment of loose coins using smart IC card
JP2007079821A (en) * 2005-09-13 2007-03-29 Daiichikosho Co Ltd Electronic money settlement terminal and automatic deposit management device
CN101276501A (en) * 2007-03-26 2008-10-01 黄金富 System and corresponding method for small change capable of replacing coin completely
CN103577980A (en) * 2012-07-31 2014-02-12 黄金富 Wireless payment change returning system and corresponding method
CN105913255A (en) * 2016-01-22 2016-08-31 天地融科技股份有限公司 Trade method and trade system of electronic signature device, and electronic signature device
CN106682907A (en) * 2016-12-10 2017-05-17 江苏恒为信息科技有限公司 Comparison and consensus method for block chain data
CN108229948A (en) * 2017-11-23 2018-06-29 黄波 A kind of Petty paying method
CN108574617A (en) * 2017-03-08 2018-09-25 西安司坤电子科技有限公司 The change communicated using real time information looks for continuous system
WO2019200431A1 (en) * 2018-04-19 2019-10-24 Decentralised Illiteracy Organisation Pty Ltd Payment system

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10302124A (en) * 1997-04-23 1998-11-13 Noboru Hayakawa Device for counting coin and issuing prepaid card
CN1704983A (en) * 2004-05-28 2005-12-07 黄金富 Electronic money system and method for deposit and payment of loose coins using smart IC card
JP2007079821A (en) * 2005-09-13 2007-03-29 Daiichikosho Co Ltd Electronic money settlement terminal and automatic deposit management device
CN101276501A (en) * 2007-03-26 2008-10-01 黄金富 System and corresponding method for small change capable of replacing coin completely
CN103577980A (en) * 2012-07-31 2014-02-12 黄金富 Wireless payment change returning system and corresponding method
CN105913255A (en) * 2016-01-22 2016-08-31 天地融科技股份有限公司 Trade method and trade system of electronic signature device, and electronic signature device
CN106682907A (en) * 2016-12-10 2017-05-17 江苏恒为信息科技有限公司 Comparison and consensus method for block chain data
CN108574617A (en) * 2017-03-08 2018-09-25 西安司坤电子科技有限公司 The change communicated using real time information looks for continuous system
CN108229948A (en) * 2017-11-23 2018-06-29 黄波 A kind of Petty paying method
WO2019200431A1 (en) * 2018-04-19 2019-10-24 Decentralised Illiteracy Organisation Pty Ltd Payment system

Also Published As

Publication number Publication date
CN112184450A (en) 2021-01-05

Similar Documents

Publication Publication Date Title
RU2439695C2 (en) Method and system for initial and repeated credit of funds to portable consumer devices
US8463704B2 (en) Conditional balance management for non-issuer debit instruments
US20120078790A1 (en) Real-time interchange fee estimation
US20150019428A1 (en) Systems and methods for dynamic transaction-payment routing
CN108305169A (en) Prepaid card transactions data save method and device
US20020116214A1 (en) Automated fundraising accounting system
US20150248657A1 (en) System and method for recovering refundable taxes
US20160042340A1 (en) Closed prepayment program via merchant pos terminals
US20070131760A1 (en) Electronically Refunding Change from a Purchase Transaction
TWI705401B (en) Multi-currency refund service processing method and device
CN110163586A (en) The method, device and equipment of transaction payment and reimbursement processing
EP2907092A2 (en) Real-time authorization interchange surcharge
CN112215611A (en) Preference method based on block chain, seller node, terminal device and storage medium
US20110184854A1 (en) Merchant rate lookup
US7702547B2 (en) Calculating and displaying interest avoided by use of a particular interest calculation method
CN112184450B (en) Transaction settlement method, transaction node, device and medium based on blockchain
AU2018200623B2 (en) Application currency code for dynamic currency conversion transactions with contactless consumer transaction payment device
CN101375294A (en) Method and system for loading and reloading portable consumer devices
CN101742022B (en) Prepayment system and method
EP1675080A1 (en) Method and system for handling rebate-entitled credit card payment transactions
KR101759974B1 (en) Micropayment linkage based anonymous prepaid card payment assistive device and method
JP2002215896A (en) Method and system for credit card processing
KR20010113307A (en) Electronic money charging system using the dummy terminal connected with personal computer and a commercial transaction method using it
KR102428583B1 (en) Blockchain based refundable integrated point operation management system and method thereof
KR102085083B1 (en) Method for providing charge saving uby using crypto-currency and server 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
GR01 Patent grant
GR01 Patent grant