Disclosure of Invention
The invention aims to provide a transfer payment method based on a block chain technology, which can effectively avoid the risk defect in the existing order system. By utilizing the characteristic of the block chain distributed account book, a monitoring mechanism can monitor all transactions in the system in real time, and the problems of secondary clearing and the like are avoided.
In order to achieve the purpose, the invention adopts the following technical scheme:
a method for payment transfer based on blockchain technology, comprising:
s1, user order submission: the information of the user and the transfer party generates a payment request;
s2, submitting a payment request by the merchant system: the merchant order system submits the payment request to any one node on the block chain payment system, and at the moment, the node forms a receiving node;
s3, block chain processing step: after the block chain verifies the payment request, the verified payment request is blocked by a consensus algorithm, so that the payment request is recorded on the block chain;
s4, monitoring and paying steps: the method comprises the steps that a first known system monitors a payment request on a block chain of a node matched with the first known system, and sends the payment request to a payment channel; the payment channel processes the payment request and returns a payment result to the precedent system; the known system returns a payment result to the block chain through the matched block chain link point;
s5, payment result processing step: after the payment results are blocked by a consensus algorithm, the payment results are recorded on a block chain and are notified to an order system of a merchant;
and S6, ending the payment.
Further, the block chain processing step (S3) is specifically:
s3.1, the receiving node receives the payment request, verifies the payment request, broadcasts the payment request to other nodes of the block chain if the verification is successful, simultaneously stores the payment request in a transaction pool of the node, and goes to step S3.2; if the verification fails, directly discarding the payment request and ending the payment;
s3.2, after receiving the broadcasted payment request, other nodes of the block chain respectively carry out verification, if the verification is successful and the payment request is received for the first time, the other nodes broadcast the payment request and simultaneously store the payment request into a transaction pool of the node, otherwise, the node directly discards the payment request;
and S3.3, after the preset time, blocking the payment request through a consensus algorithm, and recording the block to a block chain.
Further, the step of monitoring and paying (S4) is specifically:
s4.1, monitoring a payment request on a block chain of a node matched with the payment request by a first-known system, verifying the payment request, if the verification is successful, sending the payment request to a payment channel, and entering the step S4.2, if the verification is failed, discarding the payment request, and ending the payment;
s4.2, processing the payment request through a payment channel to generate a payment result;
s4.3, the payment channel sends the successful payment result to the precedent system, the precedent system verifies the successful payment, and if the successful verification is achieved, the payment result is written into the matched block chain link point; and if the verification fails, discarding the payment result and not recording.
Further, the payment result processing step (S5) is specifically:
s5.1, the block chain node matched with the priori knowledge system receives the payment result written by the priori knowledge system, verifies the payment result, if the verification is successful, sends the payment result to other nodes of the block chain, and simultaneously stores the payment result into a transaction pool of the node; if the verification fails, directly discarding the payment result;
s5.2, after receiving the broadcasted payment result, the other nodes respectively carry out verification, if the verification is successful and the payment result is received for the first time, the payment result is broadcasted, and meanwhile, the payment result is stored in a transaction pool of the nodes; otherwise, directly discarding the payment result;
s5.3, after the preset time, recording the payment result on a block chain after the payment result is blocked by a consensus algorithm; and S5.4, returning the payment result on the block chain to the merchant order system by the node which receives the request at the earliest.
Further, the payment result processing step (S5) further includes:
and S5.5, after the merchant order system receives the payment result, displaying the payment result.
Further, in step S4.3, after receiving the payment result, the block chain link point matched with the pre-known system also verifies the payment result, sends the verification result to other nodes of the block chain after the verification is successful, and simultaneously stores the payment result in the transaction pool of the node; if the verification fails, directly discarding the payment result; after receiving the broadcasted payment result, the other nodes respectively carry out verification, broadcast the payment result and store the payment result into a transaction pool of the nodes, wherein the verification is successful and the payment result is received for the first time; otherwise, the payment result is directly discarded.
Further, the payment data which fails to be verified is processed by an error checking and processing system connected with the blockchain, wherein the payment data comprises data of a payment request, a payment response, a payment result and a settlement result.
In addition, in the invention, after other nodes of the block chain receive the broadcast, the node discards the payment data, which means that only the node with the verification failure discards the payment data, but not all the nodes discard the payment data, and the payment data also exists in a certain node or certain nodes of the block chain.
Detailed Description
The payment transfer method based on the blockchain technology according to the present invention will be further explained and explained with reference to the drawings and the specific embodiments.
Example 1
The transfer payment has the following specific transaction flow:
the user submits an order: the information of the user and the transfer party generates a payment request;
the merchant system submits a payment request: the merchant order system submits the payment request to any node on the blockchain payment system;
the block chain broadcasts payment requests and blocks: the node receives a request of a merchant, verifies the request of the merchant, sends the request to other nodes of the block chain after the request is successfully verified, and simultaneously stores a payment request into a transaction pool of the node; if the verification fails, the payment request is discarded directly. After receiving the broadcasted payment request, other nodes respectively carry out verification, if the verification is successful and the payment request is received for the first time, broadcast the payment request and store the payment request into a transaction pool of the nodes; otherwise, the payment request is discarded directly. After a certain time, the payment request is packaged onto the blockchain according to consensus rules.
The first known system listens for a payment request: the first-known system monitors the payment request on the block chain of the matched node and verifies the transaction;
the precursor system sends a payment request: after the verification is successful, the pre-known system sends the payment request to a payment channel;
and returning a payment result by the payment channel: the payment channel processes the payment request and returns a payment result to the precedent system;
the precursor system returns a payment result: after the first-known system receives the payment result, the payment result is sent to the node matched with the payment result;
the block chain broadcasts the payment result and blocks: the node receives the result of the prior known system, verifies the result, sends the result to other nodes of the block chain after the result is verified successfully, and simultaneously stores the payment result into a transaction pool of the node; if the verification fails, the payment result is directly discarded. After receiving the broadcasted payment result, the other nodes respectively carry out verification, broadcast the payment result and store the payment result into a transaction pool of the nodes, wherein the verification is successful and the payment result is received for the first time; otherwise, the payment result is directly discarded. After a certain time, the payment result is packed to a block chain according to a consensus regulation;
the block chain returns a payment result: the node which receives the request earliest returns the payment result on the block chain to the merchant order system;
the merchant displays the payment result: after the order system of the merchant receives the payment result, the payment result is displayed to the user;
example 2
A method for payment transfer based on blockchain technology, comprising:
s1, user order submission: the information of the user and the transfer party generates a payment request;
s2, submitting a payment request by the merchant system: the merchant order system submits the payment request to any one node on the block chain payment system, and at the moment, the node forms a receiving node;
s3, block chain processing step: after the block chain verifies the payment request, the verified payment request is blocked by a consensus algorithm, so that the payment request is recorded on the block chain;
s4, monitoring and paying steps: the method comprises the steps that a first known system monitors a payment request on a block chain of a node matched with the first known system, and sends the payment request to a payment channel; the payment channel processes the payment request and returns a payment result to the precedent system; the known system returns a payment result to the block chain through the matched block chain link point;
s5, payment result processing step: after the payment results are blocked by a consensus algorithm, the payment results are recorded on a block chain and are notified to an order system of a merchant;
and S6, completing the whole payment process and ending the payment.
Further, the block chain processing step (S3) is specifically:
s3.1, the receiving node receives the payment request, verifies the payment request, broadcasts the payment request to other nodes of the block chain if the verification is successful, simultaneously stores the payment request in a transaction pool of the node, and goes to step S3.2; if the verification fails, directly discarding the payment request and ending the payment;
s3.2, after receiving the broadcasted payment request, other nodes of the block chain respectively carry out verification, if the verification is successful and the payment request is received for the first time, the other nodes broadcast the payment request and simultaneously store the payment request into a transaction pool of the node, otherwise, the node directly discards the payment request;
and S3.3, after the preset time, blocking the payment request through a consensus algorithm, and recording the block to a block chain.
Further, the step of monitoring and paying (S4) is specifically:
s4.1, monitoring a payment request on a block chain of a node matched with the payment request by a first-known system, verifying the payment request, if the verification is successful, sending the payment request to a payment channel, and entering the step S4.2, if the verification is failed, discarding the payment request, and ending the payment;
s4.2, processing the payment request through a payment channel to generate a payment result;
s4.3, the payment channel sends the successful payment result to the precedent system, the precedent system verifies the successful payment, and if the successful verification is achieved, the payment result is written into the matched block chain link point; and if the verification fails, discarding the payment result and not recording.
Further, the payment result processing step (S5) is specifically:
s5.1, the block chain node matched with the priori knowledge system receives the payment result written by the priori knowledge system, verifies the payment result, if the verification is successful, sends the payment result to other nodes of the block chain, and simultaneously stores the payment result into a transaction pool of the node; if the verification fails, directly discarding the payment result;
s5.2, after receiving the broadcasted payment result, the other nodes respectively carry out verification, if the verification is successful and the payment result is received for the first time, the payment result is broadcasted, and meanwhile, the payment result is stored in a transaction pool of the nodes; otherwise, directly discarding the payment result;
s5.3, after the preset time, recording the payment result on a block chain after the payment result is blocked by a consensus algorithm; and S5.4, returning the payment result on the block chain to the merchant order system by the node which receives the request at the earliest.
Further, the payment result processing step (S5) further includes:
and S5.5, after the merchant order system receives the payment result, displaying the payment result.
Further, the payment data which fails to be verified is processed by an error checking and processing system connected with the blockchain, wherein the payment data comprises data of a payment request, a payment response, a payment result and a settlement result.
Example 3
A method of payment transfer based on blockchain technology, comprising only:
s1, user order submission: the information of the user and the transfer party generates a payment request;
s2, submitting a payment request by the merchant system: the merchant order system submits the payment request to any one node on the block chain payment system, and at the moment, the node forms a receiving node;
s3, block chain processing step: after the block chain verifies the payment request, the verified payment request is blocked by a consensus algorithm, so that the payment request is recorded on the block chain;
s4, monitoring and paying steps: the method comprises the steps that a first known system monitors a payment request on a block chain of a node matched with the first known system, and sends the payment request to a payment channel; the payment channel processes the payment request and returns a payment result to the precedent system; the known system returns a payment result to the block chain through the matched block chain link point;
s5, payment result processing step: after the payment results are blocked by a consensus algorithm, the payment results are recorded on a block chain and are notified to an order system of a merchant;
and S6, completing the whole payment process and ending the payment.
In addition, in the invention, after other nodes of the block chain receive the broadcast, the node discards the payment data, which means that only the node with the verification failure discards the payment data, but not all the nodes discard the payment data, and the payment data also exists in a certain node or certain nodes of the block chain.
According to the transaction flow and blockchain features of the present invention, all nodes will have a complete non-tampered book. Therefore, the supervising mechanism can supervise all transactions through the account book of the node, and risk transactions are prevented from occurring.
The present invention is not limited to the above-described embodiments, and variations, modifications, additions and substitutions which can be made by those skilled in the art within the spirit of the invention are also within the scope of the invention.