Disclosure of Invention
The invention aims to provide a computer webpage payment method based on a block chain technology, which can effectively avoid the risk defect in the conventional 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 computer webpage payment method based on a block chain technology comprises the following steps:
s1, user order submission: a user selects goods to be purchased from a computer webpage mall of a merchant, clicks a payment button, and the computer webpage sends order information to an order system of the merchant to generate a payment request;
s2, submitting: the merchant order system generates a computer webpage payment request page and returns the page to the user computer webpage; the user computer webpage jumps to a payment request page and submits the payment request to any node on the block chain, 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:
s4.1, the first-known system monitors the payment request on the matched block chain link point and verifies the transaction;
s4.2, if the verification is successful, the system is known to generate a payment response containing the payment skip page of the payment channel computer webpage, the payment response is returned to the matched block chain link point, the payment response is returned to the user computer webpage through the block chain, the step S4.3 is carried out, and if the verification is failed, the step S7 is carried out;
s4.3, the computer webpage jumps to a payment page of a payment channel according to the returned payment response information, and a user inputs a password to pay;
s4.4, jumping to a payment result page according to the computer webpage of the guiding user by the payment channel; the payment channel sends the payment result to a precedent system;
s4.5, the precedent system verifies the payment result, and if the verification is successful, the payment result is written into the matched block chain link point; if the authentication fails, the flow proceeds to step S7.
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;
s6, clearing: the payment channel settles the transaction fund to the settlement account of the merchant, sends the settlement result to the prior system, and packs the settlement result to the block chain through the block chain link matched with the prior system to complete the whole payment process;
and S7, 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 proceeding to step S7;
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, in step S4.2 of the step of monitoring and paying (S4), the step of returning the payment response to the user computer webpage through the blockchain specifically includes:
s4.2.1, receiving the payment response by the block chain node matched with the prior system, verifying the payment response, sending the verification to other nodes of the block chain after the verification is successful, storing the payment response into the transaction pool of the node, and entering step S4.2.2; if the verification fails, the payment response is directly discarded to step S7;
s4.2.2, after receiving the broadcasted payment response, other nodes of the block chain respectively carry out verification, if the verification is successful and the payment response is received for the first time, the payment response is broadcasted, and meanwhile, the payment response is stored in the transaction pool of the nodes; otherwise, the node itself directly discards the payment response;
s4.2.3, after the preset time, the payment response is blocked by a consensus algorithm and recorded on the block chain; s4.2.4, the node that received the payment request the earliest returns the payment reply on the blockchain to the user computer web page.
Furthermore, in step S4.5, after the computer webpage is called for payment, a user password needs to be input before payment is performed.
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, stores the payment result into a transaction pool of the node, and enters the step S5.2; if the verification fails, directly discarding the payment result, and entering step S7;
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, the node directly discards 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, after the notification system monitors the payment result on the block chain of the node matched with the notification system, notifying the payment result to an order system of a merchant.
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 S6, the packing the settlement result onto the block chain by the prior knowledge system specifically includes: the prior knowledge system verifies the settlement result, after the verification is successful, the settlement result is written into the block chain link point matched with the prior knowledge system, the node broadcasts the settlement result to other nodes, and after the preset time, the settlement result is blocked by a consensus algorithm and then recorded on a block chain.
Further, in step S5.4, after the notification system monitors the payment result on the block link point matched with the notification system, the method further includes verifying the payment result, and notifying the order system of the merchant of the payment result after the verification is successful.
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 computer web page payment method based on the block chain technology according to the present invention will be further explained and explained with reference to the drawings and the specific embodiments.
Example 1
The specific transaction flow of computer webpage payment is as follows:
the user submits an order: a user selects goods to be purchased from a computer webpage mall of a merchant, clicks a payment button, and the computer webpage sends order information to an order system of the merchant to generate a payment request;
the merchant system returns a computer webpage payment request page: the merchant order system generates a computer webpage payment request page and returns the page to the user computer webpage;
the user submits a payment request: skipping a user computer webpage to a payment request page, and submitting a payment request to any node on the blockchain payment system;
the block chain broadcasts payment requests and blocks: the node receives a payment request of a computer webpage, verifies the request, sends the request to other nodes of the block chain after the request is successfully verified, and simultaneously stores the 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 first-known system returns a computer payment page: after the verification is successful, the known system generates a response containing the webpage payment skip page of the payment channel computer and returns the response to the matched node;
block chains broadcast payment responses and block: the node receives the response of the pre-known system, verifies the response, sends the response to other nodes of the block chain after the response is verified successfully, and simultaneously stores the payment response into a transaction pool of the node; if the verification fails, the payment reply is discarded directly. After receiving the broadcasted payment response, other nodes respectively carry out verification, if the verification is successful and the payment response is received for the first time, broadcast the payment response and store the payment response into a transaction pool of the nodes; otherwise, the payment reply is discarded directly. After a certain time, the payment response is packed into a block chain according to a consensus regulation;
the blockchain returns a payment response: the node which receives the request at the earliest returns the payment response on the block chain to the user computer webpage;
the user carries out computer webpage payment: the computer webpage skips to a payment page of a payment channel according to the return information, and the user inputs a password to complete payment;
the payment channel returns a webpage payment result: the payment channel is converted to a payment result page according to the guidance of the user;
and returning a payment result by the payment channel: the payment channel sends the successful transaction result to the advanced system;
the precursor system returns a payment result: firstly, after the verification of the system is successful, writing the payment result into the matched block chain link point;
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;
informing the system to answer the payment result: after the notification system monitors the payment result on the block chain of the matched node, the payment result is verified;
the notification system notifies the payment result: the notification system notifies the order system of the merchant of the payment result;
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;
and (4) settlement of funds of a payment channel: on the settlement day, the payment channel settles the transaction funds to the settlement account of the merchant;
and the payment channel sends a settlement result: and sending the settlement result to a prior knowledge system;
the prior system returns a settlement result: after the first-known system receives the settlement result, the settlement result is sent to the node matched with the settlement result;
and broadcasting settlement results by the block chain and blocking: 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 settlement result into a transaction pool of the node; if the verification fails, the settlement result is directly discarded. After receiving the broadcasted settlement results, other nodes respectively carry out verification, if the verification is successful and the settlement results are received for the first time, broadcast the settlement results and store the settlement results into the transaction pools of the nodes; otherwise, directly discarding the settlement result. After a certain time, the settlement result is packed into a block chain according to consensus regulation;
example 2
A computer webpage payment method based on a block chain technology comprises the following steps:
s1, user order submission: a user selects goods to be purchased from a computer webpage mall of a merchant, clicks a payment button, and the computer webpage sends order information to an order system of the merchant to generate a payment request;
s2, submitting: the merchant order system generates a computer webpage payment request page and returns the page to the user computer webpage; the user computer webpage jumps to a payment request page and submits the payment request to any node on the block chain, 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:
s4.1, the first-known system monitors the payment request on the matched block chain link point and verifies the transaction; s4.2, if the verification is successful, the system is known to generate a payment response containing the payment skip page of the payment channel computer webpage, the payment response is returned to the matched block chain link point, the payment response is returned to the user computer webpage through the block chain, the step S4.3 is carried out, and if the verification is failed, the step S7 is carried out;
s4.3, the computer webpage jumps to a payment page of a payment channel according to the returned payment response information, and a user inputs a password to pay;
s4.4, jumping to a payment result page according to the computer webpage of the guiding user by the payment channel; the payment channel sends the payment result to a precedent system;
s4.5, the precedent system verifies the payment result, and if the verification is successful, the payment result is written into the matched block chain link point; if the authentication fails, the flow proceeds to step S7.
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;
s6, clearing: the payment channel settles the transaction fund to the settlement account of the merchant, sends the settlement result to the prior system, and packs the settlement result to the block chain through the block chain link matched with the prior system to complete the whole payment process;
and S7, 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 proceeding to step S7;
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, in step S4.2 of the step of monitoring and paying (S4), the step of returning the payment response to the user computer webpage through the blockchain specifically includes:
s4.2.1, receiving the payment response by the block chain node matched with the prior system, verifying the payment response, sending the verification to other nodes of the block chain after the verification is successful, storing the payment response into the transaction pool of the node, and entering step S4.2.2; if the verification fails, the payment response is directly discarded to step S7;
s4.2.2, after receiving the broadcasted payment response, other nodes of the block chain respectively carry out verification, if the verification is successful and the payment response is received for the first time, the payment response is broadcasted, and meanwhile, the payment response is stored in the transaction pool of the nodes; otherwise, the node itself directly discards the payment response;
s4.2.3, after the preset time, the payment response is blocked by a consensus algorithm and recorded on the block chain; s4.2.4, the node that received the payment request the earliest returns the payment reply on the blockchain to the user computer web page.
Furthermore, in step S4.5, after the computer webpage is called for payment, a user password needs to be input before payment is performed.
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, stores the payment result into a transaction pool of the node, and enters the step S5.2; if the verification fails, directly discarding the payment result, and entering step S7;
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, the node directly discards 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, after the notification system monitors the payment result on the block chain of the node matched with the notification system, notifying the payment result to an order system of a merchant.
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 S6, the packing the settlement result onto the block chain by the prior knowledge system specifically includes: the prior knowledge system verifies the settlement result, after the verification is successful, the settlement result is written into the block chain link point matched with the prior knowledge system, the node broadcasts the settlement result to other nodes, and after the preset time, the settlement result is blocked by a consensus algorithm and then recorded on a block chain.
Further, in step S5.4, after the notification system monitors the payment result on the block link point matched with the notification system, the method further includes verifying the payment result, and notifying the order system of the merchant of the payment result after the verification is successful.
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.
Example 3
A computer webpage payment method based on a block chain technology only comprises the following steps:
s1, user order submission: a user selects goods to be purchased from a computer webpage mall of a merchant, clicks a payment button, and the computer webpage sends order information to an order system of the merchant to generate a payment request;
s2, submitting: the merchant order system generates a computer webpage payment request page and returns the page to the user computer webpage; the user computer webpage jumps to a payment request page and submits the payment request to any node on the block chain, 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:
s4.1, the first-known system monitors the payment request on the matched block chain link point and verifies the transaction;
s4.2, if the verification is successful, the system is known to generate a payment response containing the payment skip page of the payment channel computer webpage, the payment response is returned to the matched block chain link point, the payment response is returned to the user computer webpage through the block chain, the step S4.3 is carried out, and if the verification is failed, the step S7 is carried out;
s4.3, the computer webpage jumps to a payment page of a payment channel according to the returned payment response information, and a user inputs a password to pay;
s4.4, jumping to a payment result page according to the computer webpage of the guiding user by the payment channel; the payment channel sends the payment result to a precedent system;
s4.5, the precedent system verifies the payment result, and if the verification is successful, the payment result is written into the matched block chain link point; if the authentication fails, the flow proceeds to step S7.
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;
s6, clearing: the payment channel settles the transaction fund to the settlement account of the merchant, sends the settlement result to the prior system, and packs the settlement result to the block chain through the block chain link matched with the prior system to complete the whole payment process;
and S7, ending the payment.
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.