CN111539712A - Ordering and settling method and device based on block chain - Google Patents

Ordering and settling method and device based on block chain Download PDF

Info

Publication number
CN111539712A
CN111539712A CN202010422026.0A CN202010422026A CN111539712A CN 111539712 A CN111539712 A CN 111539712A CN 202010422026 A CN202010422026 A CN 202010422026A CN 111539712 A CN111539712 A CN 111539712A
Authority
CN
China
Prior art keywords
transaction
post
amount
transactions
payment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010422026.0A
Other languages
Chinese (zh)
Inventor
晏敏敏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Liangzuo Technology Co Ltd
Original Assignee
Beijing Liangzuo Technology 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 Beijing Liangzuo Technology Co Ltd filed Critical Beijing Liangzuo Technology Co Ltd
Priority to CN202010422026.0A priority Critical patent/CN111539712A/en
Publication of CN111539712A publication Critical patent/CN111539712A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/22Payment schemes or models
    • G06Q20/28Pre-payment schemes, e.g. "pay before"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/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/405Establishing or using transaction specific rules
    • 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/407Cancellation of a transaction

Landscapes

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

Abstract

The embodiment of the application discloses ordering and settling method and device based on a block chain. The client places an order to create a first transaction containing a pre-payment, the enterprise accepts the first transaction and places an order to create a second transaction to the upstream enterprise without paying the pre-payment, and only the first transaction is associated to be a front transaction, so that the upstream enterprise receives the transaction and places the order to create a new transaction, and the new transaction does not need to pay the pre-payment and only needs to be associated to be the front transaction; and directly completing the payment of the related funds of the corresponding post-transactions such as the second transaction, the third transaction and the like when the first transaction is settled. Thus, only one prepayment is needed in the supply chain activity from the client to the factory to complete one transaction, the prepayment quantity is reduced, the fund flow is accelerated, and the fund cost in the supply chain is saved.

Description

Ordering and settling method and device based on block chain
Technical Field
The application relates to the technical field of block chains, in particular to a method and a device for ordering and settling accounts based on a block chain.
Background
With the development of information technology, the block chain technology has become a technology of great interest due to its advantages such as openness, non-tamper property, and decentralization. After the terminal client creates a transaction containing the advance payment, each enterprise in the supply chain needs to pay the advance payment when purchasing upstream enterprises for the transaction, so the invention needs to ensure that the upstream enterprises in the whole supply chain activity do not need additional advance payment after the advance payment of the terminal client, reduce the advance payment amount, accelerate the flow of funds and save the fund cost in the fund chain.
Disclosure of Invention
The embodiment of the application provides a method and a device for ordering and settling accounts based on a block chain, so that only one prepayment is needed in the supply chain activities from a client to a factory when one terminal transaction is completed, the prepayment quantity is reduced, the fund flow is accelerated, and the fund cost in the supply chain is saved.
In order to solve the above technical problem, the embodiment of the present application is implemented as follows:
the method for ordering based on the block chain provided by the embodiment of the application comprises the following steps:
inquiring whether the transaction is related to at least one preposition transaction, wherein the transaction comprises an amount due, the preposition transaction is used for paying the transaction after receiving payment, the transaction is a post-transaction of the preposition transaction, the preposition amount of the preposition transaction is the amount used for paying the transaction in the amount of the preposition transaction, and the post-total amount of the preposition transaction is the sum of the amounts paid by all post-transactions of the preposition transaction by using the amount in the preposition transaction;
detecting each of said pre-transactions if said transaction is associated with at least one of said pre-transactions, said detecting including ensuring that the sum of said pre-amount and said post-total amount for said pre-transaction is not greater than its amount due, and rejecting said transaction if said detecting is erroneous;
and updating the post total sum of all the pre-transactions of the transactions simultaneously when the transactions are linked.
Wherein the preceding transaction of the transaction must be an unpaid transaction whose amount is not immediately paid to its recipient, but a subsequent checkout transaction is initiated to complete the corresponding payment.
Wherein said amount due is equal to a prepaid amount for said transaction plus said premier amount for all of said premiers of said transaction.
Preferably, the initiator of the transaction must be or obtain authorization of the recipient of the pre-transaction to use the pre-transaction.
Preferably, the initiator of the transaction must obtain authorization of the recipient of the transaction to create the transaction using the ordering method.
The checkout method based on the block chain provided by the embodiment of the application comprises the following steps:
determining whether a transaction to be settled is associated with at least one post transaction, wherein the transaction is to be paid for a payment of the post transaction, the transaction is a pre-transaction of the post transaction, and the post amount is an amount of the transaction that is used to pay for the post transaction;
if the transaction is associated with at least one post transaction, recursively searching all the post transactions of all the post transactions;
the amount of the transaction to be settled is recursively allocated, and the remainder is paid to the recipient of the transaction.
When the amount is distributed recursively, if the post-transaction is already settled, the corresponding amount does not need to be distributed to the post-transaction, and the amount is paid to the receiver of the corresponding pre-transaction.
Preferably, if all the front transactions of the back transactions are settled, the state of the back transactions is updated to be settled.
The utility model provides a device of ordering based on block chain that this application embodiment provided includes:
a first determining module, configured to determine whether the transaction is associated with at least one pre-transaction, where the transaction includes an amount due, the pre-transaction receives a payment to be used for the transaction, the transaction is a post-transaction of the pre-transaction, the pre-amount of the pre-transaction is an amount used for paying the transaction in the amount of the pre-transaction, and the post-total amount of the pre-transaction is a sum of amounts used for paying the post-transaction in all the post-transactions of the pre-transaction;
the second judgment module is used for judging that the sum of the preposed sum and the postposition total sum of the preposed transaction is not more than the sum due of the preposed transaction;
the updating module is used for updating the postposition total amount of the preposed transaction;
a first verification module for verifying that an initiator of the transaction is a recipient of the pre-transaction or is authorized by a recipient of the pre-transaction for use of the pre-transaction;
a second verification module for verifying that an initiator of the transaction is authorized by a recipient of the transaction to create the transaction using the ordering device;
a first authorization module, configured to authorize, by a receiver of the pre-transaction, an initiator of the transaction to use the pre-transaction as the pre-transaction of the transaction;
a second authorization module for a recipient of the transaction to authorize allowing an initiator of the transaction to create the transaction using the apparatus.
The checkout device based on the block chain provided by the embodiment of the application comprises:
a determining module, configured to determine whether a transaction is associated with at least one post-transaction, where the transaction payment is to be used for payment of the post-transaction, the transaction is a pre-transaction of the post-transaction, and the post-amount is an amount used for payment of the post-transaction in the amount of the transaction;
the searching module is used for recursively inquiring all the post-transactions related to the transaction, including the post-transactions of the transaction and all the post-transactions of all the post-transactions;
an allocation module for recursively allocating the amount of said transaction to all of said post-transactions involved;
a first payment module for paying a remaining amount of the transaction to a recipient of the transaction;
the second payment module is used for paying the amount to a receiver of the front transaction corresponding to the back transaction if the back transaction is already settled;
a first update module for changing a state of the transaction that is not settled to settled;
and the second updating module is used for updating the state of the post-transaction to be settled if all the pre-transactions of the post-transaction are settled.
Through the ordering and settling method and device provided by the invention, on one hand, a downstream enterprise receives a first transaction which is created by ordering of a client and contains a pre-payment, a second transaction is created when the first transaction is taken as a front-end transaction and purchased to an upstream enterprise, the second transaction does not need the pre-payment, the upstream enterprise also continues to create a third transaction by using the method, and thus, the upstream enterprise receives the transaction and orders to create a new transaction, the new transaction does not need to pay the pre-payment, and only the transaction needs to be associated as the front-end transaction; on the other hand, when the first transaction is settled, all post-transactions related to the first transaction are found, including the second transaction and the third transaction, then the amount of the first transaction is distributed to the second transaction, the third transaction and the like, and the related money is directly paid and completed. Therefore, a customer creates a transaction containing prepayment, the related enterprises in the supply chain activities do not need to pay the prepayment when purchasing for the transaction, only the transaction of the previous family is related to the transaction as the front-end transaction, the related money of the rear-end transaction is directly paid out while the transaction of the customer is settled, only one prepayment is needed in the supply chain activities from the terminal customer to the factory to complete the transaction of the customer, the prepayment quantity is reduced, the fund flow is accelerated, and the fund cost in the supply chain is saved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative effort.
Fig. 1 is a schematic diagram of a block chain based ordering method provided in an embodiment of the present application;
FIG. 2 is a schematic diagram of a block chain based checkout method according to an embodiment of the present application;
fig. 3 is a schematic diagram of a drop device based on a block chain according to an embodiment of the present application;
fig. 4 is a schematic diagram of a block chain based checkout device according to an embodiment of the present application.
Detailed Description
The embodiment of the application provides ordering and settling method and device based on a block chain.
In order to make those skilled in the art better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
Fig. 1 is a schematic diagram of a block chain based ordering method according to an embodiment of the present application.
S101, inquiring whether the transaction is related to a preposed transaction.
The query is made as to whether the transaction is associated with at least one preceding transaction, preferably the transaction comprises a list for storing a hash of the preceding transaction, which is used by the blockchain to find the corresponding preceding transaction.
Wherein the transaction includes an amount due.
The pre-transaction, which receives payment to be used for the transaction, is a post-transaction of the pre-transaction, the pre-transaction and the post-transaction being interdependent. When processing the transaction, the prefix amount is the amount used to pay for the transaction in the amount of the prefix transaction, each of which has its own prefix amount. The post total amount of the pre-transaction is the sum of the amounts of all the post transactions of the pre-transaction for paying the post transactions by using the amount in the pre-transaction, wherein the pre-amount of the transactions is included.
S102, all the prepositive transactions are detected.
Detecting each of said pre-transactions if said transaction is associated with at least one of said pre-transactions, said detecting comprising ensuring that the sum of said pre-amount of said pre-transaction for said transaction and said post-total amount thereof is not greater than its amount due, and rejecting said transaction if said detecting reports an error.
Optionally, if repeated hashes appear in the list storing the pre-transaction hashes, an error is detected and the transaction is rejected.
Optionally, if a transaction corresponding to a hash in the list storing the pre-transaction hashes does not exist, an error is detected and the transaction is rejected.
Wherein the preceding transaction of the transaction must be an unpaid transaction whose amount is not immediately paid to its recipient, but a subsequent checkout transaction is initiated to complete the corresponding payment. When the transaction is in an unpaid state, the prepaid for the transaction is stored on the blockchain but not paid to the recipient of the transaction. And if the transaction corresponding to a certain hash in the list storing the pre-transaction hashes is not an unpaid transaction, detecting error report and rejecting the transaction.
Wherein said amount due should equal a prepaid amount for said transaction plus said sum of said premiums for all of said premiums for said transaction, and if no error is detected, said transaction is rejected.
Wherein, when the amount due for the transaction is greater than the lead amount of all the lead transactions of the transaction, the transaction must pay a pre-payment additionally by a difference between the amount due for the transaction and the sum of the lead amounts of all the lead transactions of the transaction. This enables the initiator of the transaction to create a transaction with an amount due greater than the sum of the antecedent amounts of all of the antecedent transactions.
Preferably, the initiator of the transaction must be or obtain authorization of the recipient of the pre-transaction to use the pre-transaction.
Optionally, the receiver of the pre-transaction authorizes the pre-transaction to the initiator of the transaction by initiating a one-time authorization transaction.
Optionally, the receiver of the pre-transaction authorizes the initiator of the transaction to use the transaction of which all receivers are the receivers of the pre-transaction as the pre-transaction.
Preferably, the block chain caches the authorization information, so as to conveniently inquire the authorization.
Preferably, the initiator of the transaction must obtain authorization of the recipient of the transaction to create the transaction using the ordering method. Since the checkout conditions of the transaction created by the method often involve checkout of a preceding transaction, the time for waiting for checkout is long, and some accounts often cannot accept the transaction created by the method when fund turnover is urgently needed, the transaction initiator acquires authorization of the transaction receiver before the transaction is created by the method.
Optionally, the recipient of the transaction authorizes a single transaction that is allowed to be created by the originator of the transaction using the ordering method.
Optionally, the recipient of the transaction authorizes all of the transactions that the originator of the transaction is allowed to create using the ordering method.
Optionally, the recipient of the transaction authorizes the transaction that is allowed to be created by all accounts using the ordering method.
S103, the transaction is linked up, and the post total sum of all the pre-transactions is updated.
And updating the post total sum of all the pre-transactions of the transactions simultaneously during the uplink transaction, so that the post total sum of the pre-transactions can be directly obtained without traversing the whole block chain when the transaction is established next time by the method.
The initial value of the post-total amount of any unpaid transaction is 0, and the post-total amount is not stored when the post-total amount is 0.
Fig. 2 is a schematic diagram of a block chain-based checkout method according to an embodiment of the present application.
S201, confirming whether the transaction to be settled is related to the post transaction.
Determining whether a transaction to be settled is associated with at least one post transaction, wherein the transaction is to be paid for the post transaction, the transaction being a pre-transaction of the post transaction. The post-amount is the amount of the transaction that is used to pay for the post-transaction.
S202, if the post transactions are related, all the post transactions are searched recursively.
If the transaction is associated with at least one post transaction, recursively searching all the post transactions of all the post transactions.
Specifically, all post-transactions of the transaction are searched first; and then searching all post-transactions for all the post-transactions, and going down in this way until the searched post-transactions are not associated with any post-transactions.
Preferably, a cache is constructed on the blockchain node and used for storing a hash list of post-transactions of the transactions, so that the efficiency of recursive search can be optimized.
S203, the amount is distributed recursively, and the rest is distributed to the receiver of the transaction.
Wherein the amount of the transaction to be settled is recursively allocated, and the remainder is paid to the recipient of the transaction.
When the amount is distributed recursively, if the post-transaction is already settled, the corresponding amount does not need to be distributed to the post-transaction, and the amount is paid to the receiver of the corresponding pre-transaction.
Specifically, firstly, the remaining part of the transaction is obtained by subtracting the post total amount of the transaction from the amount due to the transaction, then whether all the post transactions of the transaction are in an unpaid state is detected, if the post transactions are not in an unpaid state, the remaining part of the transaction is added with the pre amount of the post transaction used by the post transaction, after the traversal is completed, the remaining part of the transaction is clearly calculated, and finally the remaining part of the transaction can be paid to a receiver of the transaction, wherein the allocated amount of each unpaid post transaction is the pre amount of the post transaction used by the post transaction. At this time, the amount of the transaction is allocated, and the state of the transaction is changed into the settled state.
Next, all of the outstanding post transactions of the transaction are traversed. Optionally, since the post-transaction may also depend on other pre-transactions, there may be an outstanding transaction in other pre-transactions, and it is necessary to wait for the post-transaction to be processed when all the pre-transactions of the post-transaction are settled. And if the state of all the front transactions of the back transactions is not checked out, temporarily not distributing the front transactions. And if the states of all the front transactions of the back transactions are settled, and the back transactions do not need to wait for settlement of other front transactions any more, directly distributing according to the distribution scheme of the transactions. In this way, until the found post transaction is not associated with any post transaction or a state in all of the found pre transactions of the post transaction is not checked out.
It is emphasized that if a transaction does not have the post-transaction, the post-total amount for that transaction is 0.
Preferably, in the recursive traversal process, if the states of all the front transactions of the back transactions are settled, the state of the back transaction is updated to be settled.
Fig. 3 is a schematic diagram of a drop device based on a block chain according to an embodiment of the present application.
A first determining module 11, configured to determine whether the transaction is associated with at least one pre-transaction, where the transaction includes an amount due, the pre-transaction receives a payment to be used for the transaction, the transaction is a post-transaction of the pre-transaction, the pre-amount of the pre-transaction is an amount used for paying the transaction in the amount of the pre-transaction, and the post-total amount of the pre-transaction is a sum of amounts used for paying the post-transaction in all the post-transactions of the pre-transaction;
the second judgment module 12 is used for judging that the sum of the preposed sum and the postposition total sum of the preposed transaction is not more than the sum due for the preposed transaction;
an updating module 13, configured to update the post total amount of the pre-transaction;
a first verification module 14 for verifying that the initiator of the transaction is the recipient of the preceding transaction or is authorized by the recipient of the preceding transaction for use of the preceding transaction;
a second verification module 15 for verifying that the initiator of the transaction gets authorization of the recipient of the transaction to create the transaction using the ordering device;
a first authorization module 16, configured to authorize the initiator of the transaction to use the pre-transaction as the pre-transaction of the transaction by the receiver of the pre-transaction;
a second authorization module 17 for authorizing by a recipient of the transaction to allow an initiator of the transaction to create the transaction using the apparatus.
Fig. 4 is a schematic diagram of a block chain based checkout device according to an embodiment of the present application.
A determining module 21, configured to determine whether a transaction is associated with at least one post-transaction, where the transaction payment is to be used for payment of the post-transaction, the transaction is a pre-transaction of the post-transaction, and the post-amount is an amount used for payment of the post-transaction in the amount of the transaction;
the searching module 22 is configured to recursively query all the post-transactions related to the transaction, including the post-transactions of the transaction and all the post-transactions of all the post-transactions;
an allocation module 23 for recursively allocating the amount of said transaction to all of said post-transactions involved;
a first payment module 24 for paying the remaining amount of the transaction to a recipient of the transaction;
a second payment module 25, configured to pay an equal amount to a receiver of the front end transaction corresponding to the back end transaction if the back end transaction has already been settled;
a first update module 26 for changing the state of the transaction when not checked out to checked out;
a second updating module 27, configured to update the status of the post transaction to be checked-out if all the pre transactions of the post transaction have been checked-out.
Through the ordering and settling method and device provided by the invention, on one hand, a downstream enterprise receives a first transaction which is created by ordering of a client and contains a pre-payment, a second transaction is created when the first transaction is taken as a front-end transaction and purchased to an upstream enterprise, the second transaction does not need the pre-payment, the upstream enterprise also continues to create a third transaction by using the method, and thus, the upstream enterprise receives the transaction and orders to create a new transaction, the new transaction does not need to pay the pre-payment, and only the transaction needs to be associated as the front-end transaction; on the other hand, when the first transaction is settled, all post-transactions related to the first transaction are found, including the second transaction and the third transaction, then the amount of the first transaction is distributed to the second transaction, the third transaction and the like, and the related money is directly paid and completed. Therefore, a customer creates a transaction containing prepayment, the related enterprises in the supply chain activities do not need to pay the prepayment when purchasing for the transaction, only the transaction of the previous family is related to the transaction as the front-end transaction, the related money of the rear-end transaction is directly paid out while the transaction of the customer is settled, only one prepayment is needed in the supply chain activities from the terminal customer to the factory to complete the transaction of the customer, the prepayment quantity is reduced, the fund flow is accelerated, and the fund cost in the supply chain is saved.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data.
Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
In the description of the present application, "a plurality" means two or more unless otherwise specified.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product.
Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A ordering method based on a block chain is characterized by comprising the following steps:
inquiring whether the transaction is related to at least one preposition transaction, wherein the transaction comprises an amount due, the preposition transaction is used for paying the transaction after receiving payment, the transaction is a post-transaction of the preposition transaction, the preposition amount of the preposition transaction is the amount used for paying the transaction in the amount of the preposition transaction, and the post-total amount of the preposition transaction is the sum of the amounts paid by all post-transactions of the preposition transaction by using the amount in the preposition transaction;
detecting each of said pre-transactions if said transaction is associated with at least one of said pre-transactions, said detecting including ensuring that the sum of said pre-amount and said post-total amount for said pre-transaction is not greater than its amount due, and rejecting said transaction if said detecting is erroneous;
and updating the post total sum of all the pre-transactions of the transactions simultaneously when the transactions are linked.
2. The blockchain-based ordering method according to claim 1, further comprising:
the preceding one of the transactions must be an outstanding transaction whose amount is not paid immediately to its recipient, but rather a subsequently initiated checkout transaction to complete the corresponding payment.
3. The blockchain-based ordering method according to claim 1, further comprising:
the amount due is equal to a prepaid amount for the transaction plus the premier amount for all of the premiers for the transaction.
4. The blockchain-based ordering method according to claim 1, further comprising:
the initiator of the transaction must be or be authorized to use the pre-transaction by the recipient of the pre-transaction.
5. The blockchain-based ordering method according to claim 1, further comprising:
the initiator of the transaction must obtain authorization of the recipient of the transaction to create the transaction using the ordering method.
6. A blockchain based checkout method, comprising:
determining whether a transaction to be settled is associated with at least one post transaction, wherein the transaction is to be paid for a payment of the post transaction, the transaction is a pre-transaction of the post transaction, and the post amount is an amount of the transaction that is used to pay for the post transaction;
if the transaction is associated with at least one post transaction, recursively searching all the post transactions of all the post transactions;
the amount of the transaction to be settled is recursively allocated, and the remainder is paid to the recipient of the transaction.
7. The blockchain-based checkout method of claim 6, further comprising:
when the amount is distributed recursively, if the post-transaction is already settled, the corresponding amount is not required to be distributed to the post-transaction, and the amount is paid to the receiver of the corresponding pre-transaction.
8. The blockchain-based checkout method of claim 6, further comprising:
and if all the front transactions of the back transactions are settled, updating the state of the back transactions to be settled.
9. A device for ordering based on a block chain is characterized by comprising:
a first determining module, configured to determine whether the transaction is associated with at least one pre-transaction, where the transaction includes an amount due, the pre-transaction receives a payment to be used for the transaction, the transaction is a post-transaction of the pre-transaction, the pre-amount of the pre-transaction is an amount used for paying the transaction in the amount of the pre-transaction, and the post-total amount of the pre-transaction is a sum of amounts used for paying the post-transaction in all the post-transactions of the pre-transaction;
the second judgment module is used for judging that the sum of the preposed sum and the postposition total sum of the preposed transaction is not more than the sum due of the preposed transaction;
the updating module is used for updating the postposition total amount of the preposed transaction;
a first verification module for verifying that an initiator of the transaction is a recipient of the pre-transaction or is authorized by a recipient of the pre-transaction for use of the pre-transaction;
a second verification module for verifying that an initiator of the transaction is authorized by a recipient of the transaction to create the transaction using the ordering device;
a first authorization module, configured to authorize, by a receiver of the pre-transaction, an initiator of the transaction to use the pre-transaction as the pre-transaction of the transaction;
a second authorization module for a recipient of the transaction to authorize allowing an initiator of the transaction to create the transaction using the apparatus.
10. A blockchain based checkout device, comprising:
a determining module, configured to determine whether a transaction is associated with at least one post-transaction, where the transaction payment is to be used for payment of the post-transaction, the transaction is a pre-transaction of the post-transaction, and the post-amount is an amount used for payment of the post-transaction in the amount of the transaction;
the searching module is used for recursively inquiring all the post-transactions related to the transaction, including the post-transactions of the transaction and all the post-transactions of all the post-transactions;
an allocation module for recursively allocating the amount of said transaction to all of said post-transactions involved;
a first payment module for paying a remaining amount of the transaction to a recipient of the transaction;
the second payment module is used for paying the amount to a receiver of the front transaction corresponding to the back transaction if the back transaction is already settled;
a first update module for changing a state of the transaction that is not settled to settled;
and the second updating module is used for updating the state of the post-transaction to be settled if all the pre-transactions of the post-transaction are settled.
CN202010422026.0A 2020-05-18 2020-05-18 Ordering and settling method and device based on block chain Pending CN111539712A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010422026.0A CN111539712A (en) 2020-05-18 2020-05-18 Ordering and settling method and device based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010422026.0A CN111539712A (en) 2020-05-18 2020-05-18 Ordering and settling method and device based on block chain

Publications (1)

Publication Number Publication Date
CN111539712A true CN111539712A (en) 2020-08-14

Family

ID=71975948

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010422026.0A Pending CN111539712A (en) 2020-05-18 2020-05-18 Ordering and settling method and device based on block chain

Country Status (1)

Country Link
CN (1) CN111539712A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112070497A (en) * 2020-09-09 2020-12-11 上海万向区块链股份公司 Associated transaction rearrangement method, system and medium based on intelligent contract design

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108615148A (en) * 2018-03-26 2018-10-02 北交金科金融信息服务有限公司 A kind of preposition method of commerce of secured assets and system based on block chain technology
CN109544152A (en) * 2018-10-12 2019-03-29 深圳壹账通智能科技有限公司 Supply chain method of payment, cashing method, device, equipment and medium based on block chain
CN110223067A (en) * 2019-06-12 2019-09-10 北京航空航天大学 A pair of of pay this extra method and system under a kind of chain with decentralization characteristic
WO2019170170A2 (en) * 2019-06-21 2019-09-12 Alibaba Group Holding Limited Methods and systems for automatic blockchain deployment based on cloud platform
CN110363513A (en) * 2019-07-15 2019-10-22 湖南智慧政务区块链科技有限公司 Payment unions method and apparatus based on block chain
CN110503435A (en) * 2019-07-31 2019-11-26 阿里巴巴集团控股有限公司 Transaction method for early warning, device and equipment based on block chain

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108615148A (en) * 2018-03-26 2018-10-02 北交金科金融信息服务有限公司 A kind of preposition method of commerce of secured assets and system based on block chain technology
CN109544152A (en) * 2018-10-12 2019-03-29 深圳壹账通智能科技有限公司 Supply chain method of payment, cashing method, device, equipment and medium based on block chain
CN110223067A (en) * 2019-06-12 2019-09-10 北京航空航天大学 A pair of of pay this extra method and system under a kind of chain with decentralization characteristic
WO2019170170A2 (en) * 2019-06-21 2019-09-12 Alibaba Group Holding Limited Methods and systems for automatic blockchain deployment based on cloud platform
CN110363513A (en) * 2019-07-15 2019-10-22 湖南智慧政务区块链科技有限公司 Payment unions method and apparatus based on block chain
CN110503435A (en) * 2019-07-31 2019-11-26 阿里巴巴集团控股有限公司 Transaction method for early warning, device and equipment based on block chain

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112070497A (en) * 2020-09-09 2020-12-11 上海万向区块链股份公司 Associated transaction rearrangement method, system and medium based on intelligent contract design

Similar Documents

Publication Publication Date Title
CN108876380B (en) Transaction method and system based on centralized settlement and block chain deposit certificate
CN108229943B (en) Block chain balance adjusting method and device and electronic equipment
CN105787733B (en) Service information processing method and device
CN109961365B (en) Account receiving record processing method and system based on block chain intelligent contract
WO2020088130A1 (en) Blockchain-based property execution method and system
CN110060139B (en) Accounting processing method and device
WO2019237778A1 (en) Method and apparatus for processing multi-currency refund service
CN109615379B (en) Generating method and device of rejection processing system
CN111539712A (en) Ordering and settling method and device based on block chain
CN111311215A (en) E-commerce platform settlement method and device, storage medium and settlement equipment
WO2024055779A1 (en) Bill processing method and apparatus
CN108564433B (en) Method, device and server for currency conversion
US10558980B2 (en) Online transaction processing system for transactions including multiple product suppliers
CN112016914A (en) Resource control and fund control method, device and equipment
CN110020931B (en) Accounting and abnormal business identification method and device
CN114971751A (en) Delayed billing request processing method, device and equipment
CN113506176A (en) Transaction commission transfer method and device based on block chain
CN110263816B (en) Enterprise classification method and device
CN109272321B (en) Quick payment method, device, equipment and computer readable storage medium
CN109150994B (en) Hotspot data processing method and device and electronic equipment
CN113129086B (en) Value-added tax deduction method, device, system, equipment and medium
CN114548964A (en) Payment method, device and equipment
CN106598985B (en) Information recommendation method and device
CN114880335A (en) Information processing method, device, equipment and storage medium
CN107146042B (en) Logistics scheduling method and device for predetermined logistics objects 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
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20200814