CN112184450A - Block chain-based transaction settlement method, transaction node, device and medium - Google Patents

Block chain-based transaction settlement method, transaction node, device and medium Download PDF

Info

Publication number
CN112184450A
CN112184450A CN202011091654.1A CN202011091654A CN112184450A CN 112184450 A CN112184450 A CN 112184450A CN 202011091654 A CN202011091654 A CN 202011091654A CN 112184450 A CN112184450 A CN 112184450A
Authority
CN
China
Prior art keywords
change
amount
settlement
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.)
Granted
Application number
CN202011091654.1A
Other languages
Chinese (zh)
Other versions
CN112184450B (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)
  • Theoretical Computer Science (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (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 block chain 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 acquires a first change amount recorded on a block chain by the user; the transaction node determining whether a change portion of the first settlement amount is less than or equal to the first change amount, and if so, settling the account to the user based on the change portion of the first settlement amount; the transaction node subtracts the change part of the first settlement amount from the first change 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 block chain technology to settle the transaction, and can at least solve the problems that change is difficult to be redeemed and the like.

Description

Block chain-based transaction settlement method, transaction node, device and medium
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a transaction settlement method based on a block chain, a transaction node, a terminal device, and a computer-readable storage medium.
Background
At present, in a transaction settlement mode, a plurality of stores, particularly retail supermarkets, unilaterally implement a rounded change making regulation, for example, the lowest price of the commodity settlement is more than or equal to 5 minutes and is collected according to an angle of 1, and the change is directly erased when the lowest price is less than 5 minutes. Thus, while it is possible for the store to be generally balanced and to have no customers who benefit from it, this approach is not fair to most customers and compromises the customers' benefits, and as the number of fractional coins in circulation on the market does become progressively smaller, there are practical difficulties faced in cashing or paying out the fractional coins in cash transactions, whether to the merchant or the customer.
Although electronic payment is becoming popular and the above problems rarely occur during transaction settlement, some customer groups still have cash payment or preference, so it is an urgent problem to provide a solution for effectively solving change and redemption in cash transaction settlement.
Disclosure of Invention
The present disclosure provides a block chain-based transaction settlement method, a transaction node, a terminal device, and a computer-readable storage medium to at least solve the above-mentioned problems.
According to an aspect of an embodiment of the present disclosure, there is provided a method for clearing a transaction based on a blockchain, 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 acquires a first change amount recorded on a block chain by the user;
the transaction node determining whether a change portion of the first settlement amount is less than or equal to the first change amount, and if so, settling the account to the user based on the change portion of the first settlement amount;
the transaction node subtracts the change part of the first settlement amount from the first change amount to obtain a second change amount; and the number of the first and second groups,
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 a numerical range for the change portion.
In one embodiment, before the transaction node obtains the first change amount credited by the user on the blockchain, the method further comprises:
the transaction node acquires the identity information of the user;
the transaction node inquires whether a change account of the user exists in a block chain or not based on the identity information of the user;
if the change account of the user exists in the block chain, the transaction node executes the step of acquiring the first change amount recorded on the block chain by the user;
the transaction node acquires a first change amount recorded on a blockchain by the user, and the method comprises the following steps:
the transaction node obtains a first change amount credited by the user on a blockchain based on a change account of the user.
In one embodiment, after the transaction node queries whether a change account of the user exists in a blockchain based on the identity information of the user, the method further comprises:
if the change account of the user does not exist in the block chain, the transaction node creates the change account of the user based on the identity information of the user; and the number of the first and second groups,
the transaction node synchronizes the change account of the user into a blockchain.
In one embodiment, after the transaction node determines whether the change portion of the first calculated amount is less than or equal to the first change amount, further comprising:
if the change portion of the first settlement amount is greater than the first change amount, the transaction node derives a second settlement amount based on the money 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 money portion and the money portion greater than the first settlement amount;
the transaction node calculating a third change amount based on the second settlement amount, the first settlement amount, and the first change amount; and the number of the first and second groups,
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, the method further comprises:
the transaction node generating a transaction log, the transaction log including the third change amount and node information of the transaction node marked as an actual payer; and the number of the first and second groups,
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 transacts with other transaction nodes in a block chain based on the identity information of the user;
if the user transacts with other transaction nodes, after a preset change settlement opportunity is reached, the transaction nodes and the other transaction nodes respectively and independently calculate the total amount difference between the payee and the actual payer, and perform actual fund settlement based on the total amount difference;
and the transaction node generates a settlement log after the actual fund settlement is finished and records the settlement log into the block chain.
According to another aspect of the embodiments of the present disclosure, there is provided a transaction node, including:
a first calculation module configured to calculate a first settlement amount of a current transaction of a user, the first settlement amount including a whole money portion and a change portion;
an acquisition module configured to acquire a first change amount credited by the user on a blockchain;
a determining module configured to determine whether a change portion of the first calculated amount is less than or equal to the first change amount;
a first settlement module configured to settle to the user based on the change 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 change portion of the first calculated amount from the first change amount to obtain a second change amount; and the number of the first and second groups,
an update module configured to replace the first change amount in the blockchain with the second change amount and to log in to 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 having a computer program stored therein, and the processor executing the block chain based transaction settlement method when the processor executes the computer program stored in the memory.
According to still another aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the processor performs the block chain based transaction settlement method.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
according to the transaction settlement method based on the block chain, the change amount is stored in the block chain, and the change settlement is realized in a sharing mode, so that the problems that the change is less and less in circulation quantity on the market, and the change is difficult to make by a merchant, the contradiction between the merchant and a user and the like can be solved, the rights and benefits of consumers are guaranteed, the user consumption experience is improved, and meanwhile, unnecessary troubles caused by the change making and redemption problem in the transaction settlement are 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 obvious from the description, or may be learned by the practice of the disclosure. The objectives and other advantages of the disclosure may 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 example serve to explain the principles of the disclosure and not to limit the disclosure.
Fig. 1 is a schematic flow chart of a transaction settlement method based on a blockchain according to an embodiment of the present disclosure;
fig. 2 is a schematic flow chart of a transaction settlement method based on a blockchain according to another embodiment of the present disclosure;
fig. 3 is a schematic flow chart of a transaction settlement method based on a blockchain according to 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
To make the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, specific embodiments of the present disclosure are described below in detail with reference to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present disclosure, are given by way of illustration and explanation only, not limitation.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order; also, the embodiments and features of the embodiments in the present disclosure may be arbitrarily combined with each other without conflict.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for the convenience of explanation of the present disclosure, and have no specific meaning in themselves. Thus, "module", "component" or "unit" may be used mixedly.
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating a transaction settlement method based on a blockchain according to an embodiment of the present disclosure, where the method includes steps S101 to S106.
In step S101, the transaction node calculates a first settlement amount of the current transaction of the user, where the first settlement amount includes a whole money portion and a change portion.
In this embodiment, the transaction node is an intelligent device for transaction settlement at the merchant end, the transaction node is registered as a block chain link point, and different merchants share transaction settlement information and change amount through a block chain. Specifically, after the user purchases in the store, the transaction node calculates a first settlement amount to be settled for the current transaction based on the purchased goods of the user.
Before this, the transaction node sets a numerical range of the change part in the settlement amount in advance, and uploads the numerical range to the block chain, and in some embodiments, the numerical range of the change part in the settlement amount may be negotiated through all nodes in the block chain together, for example, 0 to 9 minutes, where the upper limit of the change amount is 9 minutes, where the amount greater than or equal to 1 is the whole money part, for example, the settlement amount is 42.67 yuan, where 42.6 is the whole money part, and 0.07 is the change part. In some embodiments, the value range of the change part may also be set as an angle, a member, a ten member, etc., and this embodiment does not limit this.
In some embodiments, in order to improve the efficiency of transaction settlement, the transaction node first calculates a first settlement amount, and determines whether the change part of the first settlement amount is 0, if so, the process is ended, and the user can be settled based on the total settlement amount directly by using the prior art, otherwise, step S102 is executed.
In step S102, the transaction node obtains a first change amount credited by the user on the blockchain.
Specifically, the transaction node may query, based on the identity token of the user, a first change amount recorded by the user on the block chain, as an optimization, and when it is determined that the change portion of the first change amount is not 0, may prompt the toll collector to enter the 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 block chain, so as to obtain the change amount state corresponding to the identity information of the user.
In an embodiment, the change part generated by the user in each transaction settlement is recorded in a block chain, and a corresponding balance entry (transaction log) is generated, where the balance entry records the user identity information, the change amount and the merchant information, and can mark the merchant as the payee of the change amount, that is, as the actual payer in the change settlement day for performing the change settlement, where the content of the change settlement is detailed in the following embodiments, and is not described herein.
In step S103, the transaction node determines whether the change portion of the first calculated amount is less than or equal to the first change amount, if so, executes step S104, otherwise, ends the process.
In step S104, the transaction node settles to the user based on the 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 deducted by change information recorded by the user in the blockchain, so that the transaction settlement is completed between the merchant and the user, and the subsequent step is to update the change information of the user in the blockchain, so that the change of the user can be settled in the subsequent transaction.
In step S105, the transaction node subtracts the change portion of the first settlement amount from the first change 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 part of the first settlement amount is subtracted from the first change amount, namely, the change part of the first settlement amount is cleared, and then the change balance of the user on the block chain is updated (the change balance is updated from the first change amount to the second change amount), and the second change amount is the difference between the change part of the first change amount minus the first settlement amount. In addition, in order to facilitate the change settlement between subsequent merchants, a balance item may be added to the blockchain, where the merchant is the payee, the amount of the change is the amount, and the actual payer corresponding to the amount of the change is the payer, for example, the first change amount recorded in the blockchain by the user is generated when other merchants make purchases, and the other merchants are the actual change payers, so that after the settlement of the transaction, the actual payer is still the other merchants at this time because the first change amount has not been used or just been used. Of course, the first change amount may also be an amount deposited in advance by the user, and if the first change amount is an amount deposited by the user, the actual payment party may be marked as the user.
It should be noted that, this embodiment may also be applied to an electronic payment scenario, that is, the first change amount may be settled and used in combination with other electronic payments, for example, a micro-message number used by a user is entered, when using the micro-message payment, it may be first queried on a block chain whether there is a change balance (i.e., the first change amount) temporarily stored in the same micro-message account, and if so, the change balance may be preferentially paid.
Therefore, the transaction settlement method based on the embodiment can effectively solve the problems that change is less and less in circulation quantity on the market, change is difficult to make by merchants, and contradictions between merchants and users are generated, guarantees the rights of consumers, improves the consumption experience of the users, and avoids unnecessary troubles brought by change making problems in transaction settlement for the merchants.
Referring to fig. 2, fig. 2 is a schematic flow chart of a transaction settlement method based on a block chain according to another embodiment of the present disclosure, where this embodiment further proposes a solution that a change portion of a settlement amount is larger than a change recorded in the block chain by a user, and 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 to 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 derives a second settlement amount based on the change 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 change portion and the change portion greater than the first settlement amount.
For example, the user needs to pay 52.58 yuan (first settlement amount) for the settlement of the transaction, the change amount recorded in the block chain by the user is 0.06 yuan (first change amount), the transaction node obtains 52.6 of second settlement amount according to the whole money part 52.5, and the settlement is carried out to the user, and the user needs to pay 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 firstly clears the first change amount, that is, after the change part of the first change amount and the first settlement amount is subtracted, the first change amount is zero, the user only needs to pay 52.52 actually, then the third change amount is obtained from the second settlement amount 52.6-52.52 for 0.08 point, and the change amount of the user is updated in the block chain to be 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 still be calculated based on the above-mentioned manner, and will not be described herein.
Further, in order to avoid the problems that change redemption information is ambiguous and change settlement is difficult to achieve when the user purchases at a plurality of stores, the present embodiment further includes the following steps after the transaction node settles the user based on the second settlement amount (i.e., step S201):
the transaction node generating a transaction log, the transaction log including the third change amount and node information of the transaction node marked as an actual payer; and logging the transaction log into the blockchain.
Further, since the user may shop in multiple stores, multiple change settlements may be generated, and a certain merchant in the transaction log is a payer and a certain merchant is a payee, the present embodiment optimizes the change settlement process by determining whether the user conducts multiple transactions for different merchants, 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 transacts with other transaction nodes in a block chain based on the identity information of the user; if the user transacts with other transaction nodes, after a preset change settlement opportunity is reached, the transaction nodes and the other transaction nodes respectively and independently calculate the total amount difference between the payee and the actual payer, and perform actual fund settlement based on the total amount difference;
and the transaction node generates a settlement log after the actual fund settlement is finished and records the settlement log into the block chain.
In practical application, two or more transaction nodes are arranged according to a predetermined time point or time period or other triggering conditions; or as an optimization, when the block chain system automatically determines the optimal settlement time, the two transaction nodes respectively and independently calculate the total amount difference between the payee and the actual payer, and perform actual fund settlement on the difference, which may be through a bank system, or through a block chain or other payment systems, which is not limited in this embodiment. As optimization, the total difference which is mutually a payer can be carried out among a plurality of merchants, then actual fund settlement is carried out, and a settlement log is generated on a block chain after settlement is finished, so that when a settlement day comes, the merchants can rapidly receive and pay related change amount based on the settlement log.
It can be understood that other transaction nodes in this embodiment are also block chain nodes, the preset change settlement day may be agreed by all transaction nodes, or the transaction node in this embodiment may automatically calculate the optimal change settlement day, broadcast the optimal change settlement day to the block chain, and be authenticated by the common signature of other transaction nodes, so as to determine the optimal change settlement day, and the optimal change settlement day may reach the minimum value through the actual settlement amount of the bank system, so as to maximally save the settlement procedure cost. For example, the block chain is automatically optimized once per month, but the optimal 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 block chain according to another embodiment of the present disclosure, and in order to facilitate management and settlement of the change amount of the user, the present embodiment creates a change account of the user, and queries, obtains, and settles the change amount of the user based on the change account of the user, and is particularly suitable for a multi-merchant and multi-user purchase scenario to avoid problems such as incorrect settlement, and on the basis of the previous embodiment, before the transaction node obtains the first change amount (i.e., step S102) that the user has logged in the block chain, steps S301 to S304 are further included.
In step S301, the transaction node obtains identity information of the user.
The user identity information can be acquired by any one of the following technologies: for example, the face recognition, the fingerprint recognition, the mobile phone number, the WeChat code, the Paibao account number, the WeChat identity two-dimensional code even and the like can be realized as long as the convenience and the practicability are realized. The embodiment also does not require that all users input identities in a uniform mode, and only needs to adopt the identity information of the users every time the change balance on the used blockchain is used.
In step S302, the transaction node queries whether a change account of the user exists in a block chain based on the identity information of the user, if the change account of the user exists in the block chain, step S203 is executed, otherwise, step S204 is executed.
The transaction node obtains a first change amount that the user has logged on the blockchain (i.e., step S102), specifically, the following step S102':
in step S102', the transaction node obtains a first change amount credited by the user on a blockchain based on a change account of the user.
In step S303, the transaction node creates a change account for the user based on the identity information of the user.
Specifically, the user change account may include the following: the user's identity, the initialized change amount (the initialized balance amount may be zero, or the corresponding change amount may be pre-deposited by the user), and the transaction log and other information generated after the user transacts with a certain transaction node may also be stored in the change account, so as to facilitate the settlement and management of the change amount of the user.
In step S304, the transaction node synchronizes the user' S change account into the blockchain.
To further understand the present embodiment, assuming that the preset blockchain change amount is 9 minutes, the following operation can ensure that the balance of the amount of any customer on the blockchain does not exceed 9 minutes.
(1) The first to A supermarkets purchase products with a settlement amount of 6 points and 5 points.
(2) The A supermarket inquires that the first has no change balance on the block chain according to the identity information input by the first.
(3) When the settlement is made, the money is paid to 7 corner money of A supermarket. While a balance of 5 cents is generated on the blockchain. And the actual payer of the 5-minute balance is a supermarket.
(4) The supermarket from the first to the second purchases commodities with the settlement amount of 8 degrees and 4 points.
(5) B, the supermarket inquires that the first has a balance of 5 cents on the block chain according to the identity information recorded by the first, so that:
a) the balance of the first on the blockchain becomes 1 minute
b) The first needs to pay only 8 horns of supermarket B
c) And meanwhile, a payee is added to the block chain as a supermarket B, the amount is 4 minutes, and the payer is the record of the supermarket A.
(6) And on the third day, the first supermarket and the second supermarket buy the commodities with the settlement amount of 1 yuan, 5 degrees and 5 points.
(7) C, the supermarket inquires that the balance of the first on the block chain is 1 minute according to the identity information recorded by the first, so that:
a) clearing the amount of the first on the block chain
b) Adding a record that the payee is supermarket C, the sum is 1 point and the payer is supermarket A on the block chain
c) The recalculated settlement amount is 1 yuan, 5 jiaos and 4 minutes
d) Paying first to C supermarket 1 balance 6 corner
e) Adding a first with a balance of 6 minutes on the block chain, and the actual payer is the record of supermarket C
(8) The fourth day from the first to the supermarket A, the commodity with the settlement amount of 5 degrees and 9 minutes is purchased
(9) The A supermarket inquires that the balance of the first on the blockchain is 6 cents according to the identity information recorded by the first, so that:
a) clearing the amount of the first on the block chain
b) Adding a record of the super market A as the payee, 6 cents as the amount and C as the payer on the block chain
c) The recalculated settlement amount is 5 degrees and 3 points
d) Pay A to 6 corner of supermarket
e) Adding a record that a first has a balance of 7 minutes and the actual payer is A supermarket on the blockchain
Further, assume that the fifth day is a settlement day agreed in advance. And no other statement of the transaction to be settled. From the transaction settlement records of the previous four days, there are the following settlement items:
a) on day 2, a record was made that supermarket A and supermarket B were due for 4 points
b) On day 3, a record of 1 point of supermarket C due to supermarket A is generated
c) On day 4, a record of 6 points due to supermarket A of supermarket C was generated
(2) The supermarket A directly pays 4 minutes of money to the supermarket B
(3) C supermarket pays 5 minutes to A supermarket
(4) After the settlement is finished, writing a settlement log in the block chain
Based on the same technical concept, the embodiment of the present disclosure also provides a transaction node, as shown in fig. 4, the transaction node includes a first calculating module 41, an obtaining module 42, a judging module 43, a first calculating module 44, a second calculating module 45, and an updating module 46, wherein,
the first calculating module 41 is configured to calculate 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 obtaining module 42, configured to obtain a first change amount credited to the blockchain by the user;
the judging module 43 configured to judge whether the change portion of the first calculated amount is less than or equal to the first change amount;
the first settlement module 44 configured to settle the money to the user based on the whole part of the first settlement amount when the judgment module judges that the change part of the first settlement amount is less than or equal to the first change amount;
the second calculating module 45 is configured to subtract the change portion of the first change amount from the first change amount to obtain a second change amount; and the number of the first and second groups,
an update module 46 arranged 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 preset a numerical range of the change part.
In one embodiment, the transaction node further comprises:
the obtaining module is further configured to obtain the identity information of the user before the obtaining module obtains the first change amount recorded by the user on the block chain;
a query module configured to query whether a change account of the user exists in a blockchain based on the identity information of the user;
the obtaining module is further configured to obtain a first change amount recorded on the block chain by the user when the inquiring module inquires that the change account of the user exists in the block chain;
the obtaining module is specifically configured to obtain a first change amount recorded on the block chain by the user based on the change account of the user.
In one embodiment, the transaction node further comprises:
the creating module is set to create the change account of the user based on the identity information of the user when the inquiring module inquires that the change account of the user does not exist in the block chain; and the number of the first and second groups,
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 part of the first settlement amount when the judgment module judges that the change part of the first settlement amount is greater than the first change amount, wherein the second settlement amount includes only the whole part and is greater than the whole part of the first settlement amount;
a second settlement module configured to settle to 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; and the number of the first and second groups,
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 after a second calculation module settles to the user based on the second settlement amount, the transaction log including the third change amount and node information of the transaction node marked as an actual payer; and logging the transaction log into the blockchain.
In an embodiment, the obtaining module is further configured to obtain identity information of the user;
the query module is further configured to query whether the user has transacted with other transaction nodes in a blockchain based on the identity information of the user;
and the settlement module is arranged for calculating the sum of money differences between the payee and the actual payer independently by the transaction node and the other transaction nodes respectively after a preset change settlement opportunity is reached when the inquiry module inquires that the user transacts with the other transaction nodes, performing actual fund settlement based on the sum of money differences, generating a settlement log after the actual fund settlement is finished, and recording the settlement log into the block chain.
Based on the same technical concept, the embodiment of the present disclosure correspondingly provides a terminal device, as shown in fig. 5, 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 transaction settlement method based on the blockchain.
Based on the same technical concept, embodiments of the present disclosure also provide a computer-readable storage medium having a computer program stored thereon, where when the computer program is executed by a processor, the processor executes the blockchain-based transaction settlement method.
It will be understood by those of ordinary skill in the art that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between 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 by several physical components in cooperation. 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 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 is well known to those of ordinary skill 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 accessed by a computer. In addition, 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 as known to those skilled in the art.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present disclosure, and not for limiting the same; while the present disclosure has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding 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 acquires a first change amount recorded on a block chain by the user;
the transaction node determining whether a change portion of the first settlement amount is less than or equal to the first change amount, and if so, settling the account to the user based on the change portion of the first settlement amount;
the transaction node subtracts the change part of the first settlement amount from the first change amount to obtain a second change amount; and the number of the first and second groups,
the transaction node replaces the first change amount in the blockchain with the second change amount.
2. The method of claim 1, further comprising:
the transaction node presets a numerical range for the change portion.
3. The method of claim 1, further comprising, prior to the transaction node obtaining the first change amount credited by the user on the 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 block chain or not based on the identity information of the user;
if the change account of the user exists in the block chain, the transaction node executes the step of acquiring the first change amount recorded on the block chain by the user;
the transaction node acquires a first change amount recorded on a blockchain by the user, and the method comprises the following steps:
the transaction node obtains a first change amount credited by the user on a blockchain based on a change account of the user.
4. The method of claim 3, wherein after the transaction node querying whether a change account exists for the user in a blockchain based on the identity information of the user, further comprising:
if the change account of the user does not exist in the block chain, the transaction node creates the change account of the user based on the identity information of the user; and the number of the first and second groups,
the transaction node synchronizes the change account of the user into a blockchain.
5. The method of claim 1, wherein after the transaction node determines whether the change portion of the first settlement amount is less than or equal to the first change amount, further comprising:
if the change portion of the first settlement amount is greater than the first change amount, the transaction node derives a second settlement amount based on the money 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 money portion and the money portion greater than the first settlement amount;
the transaction node calculating a third change amount based on the second settlement amount, the first settlement amount, and the first change amount; and the number of the first and second groups,
the transaction node replaces the first change amount in the blockchain with the third change amount.
6. The method of claim 5, after the transaction node settles to the user based on the second settlement amount, further comprising:
the transaction node generating a transaction log, the transaction log including the third change amount and node information of the transaction node marked as an actual payer; and the number of the first and second groups,
the transaction node logs the transaction log into the blockchain.
7. The method of claim 6, further comprising:
the transaction node acquires the identity information of the user;
the transaction node inquires whether the user transacts with other transaction nodes in a block chain based on the identity information of the user;
if the user transacts with other transaction nodes, after a preset change settlement opportunity is reached, the transaction nodes and the other transaction nodes respectively and independently calculate the total amount difference between the payee and the actual payer, and perform actual fund settlement based on the total amount difference;
and the transaction node generates a settlement log after the actual fund settlement is finished and records the settlement log into the block chain.
8. A trading node, comprising:
a first calculation module configured to calculate a first settlement amount of a current transaction of a user, the first settlement amount including a whole money portion and a change portion;
an acquisition module configured to acquire a first change amount credited by the user on a blockchain;
a determining module configured to determine whether a change portion of the first calculated amount is less than or equal to the first change amount;
a first settlement module configured to settle to the user based on the change 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 change portion of the first calculated amount from the first change amount to obtain a second change amount; and the number of the first and second groups,
an update module configured to replace the first change amount in the blockchain with the second change amount.
9. A terminal device comprising a memory in which a computer program is stored and a processor that executes the blockchain based transaction settlement method according to any one of claims 1 to 7 when the processor executes the computer program stored in the memory.
10. A computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, performs the blockchain based transaction settlement method according to any one 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 true CN112184450A (en) 2021-01-05
CN112184450B 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
CN112184450B (en) 2023-06-20

Similar Documents

Publication Publication Date Title
US20120078790A1 (en) Real-time interchange fee estimation
EP1374123A2 (en) Automated fundraising accounting system
EP3111394A1 (en) System and method for recovering refundable taxes
JP2018060300A (en) Purchase management system
KR102129495B1 (en) System for unsecured funding to credit card member store via purchase of undetermined future credit obligation
CN106097050A (en) Ecommerce financial management method and system
US20070252002A1 (en) Assistance method and apparatus for online purchases of goods or services conducted with payment card systems
US20130297398A1 (en) Systems for and methods of establishing closed-loop business payment services
CN110610247B (en) Service data processing method and device
JP2019139297A (en) Program, information processing device, information processing method and manufacturing method
CA2711254A1 (en) Merchant rate lookup
KR102160676B1 (en) Card sales win-win managing and calculating system for small business owners
CN110633966A (en) Block chain-based contract securitization method and device
CN110874795A (en) Real estate commodity related financial system and management method thereof
CN112184450B (en) Transaction settlement method, transaction node, device and medium based on blockchain
CN101742022B (en) Prepayment system and method
EP1675080A1 (en) Method and system for handling rebate-entitled credit card payment transactions
CN110599344A (en) Foundation transaction data processing method and device based on block chain
KR100475859B1 (en) A system for a petty loan and a method thereof
KR20010113307A (en) Electronic money charging system using the dummy terminal connected with personal computer and a commercial transaction method using it
KR101699106B1 (en) Loaned money redemption method, server performing the same and system performing the same
KR20030050147A (en) Method and system for providing payment by exclusive purchase card
CN114418636A (en) Policy determination method and device
JP2953840B2 (en) Postpaid prepaid card billing method
CN117649227A (en) Transaction settlement method, device, computer readable storage medium and electronic equipment

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