Disclosure of Invention
In view of the above-mentioned drawbacks of the prior art, the present invention aims to solve the technical problems that the existing payment method based on blockchain has low payment efficiency, cannot support a large amount of payment requirements of a large number of users, and cannot realize offline payment.
In order to achieve the above object, the present invention provides a scalable quick payment method based on blockchain, comprising the steps of:
the payment party sends a token acquisition request to a user interface of an issuer;
after receiving a token acquisition request sent by a payer, an issuer verifies whether public key information of the payer is valid;
after verification is valid, the issuer issues information of a corresponding number of digital assets, and returns the information to the payer, wherein the information of the digital assets comprises C-Tree evidence of the digital assets;
the payer creates a piece of payment information, which at least comprises the information of the receiver and the signature of the public key of the receiver by using the private key of the payer;
the payer delivers the C-Tree certification of the digital asset and the signed payment information to the recipient.
Further, the payer delivers the C-Tree certificate and signed payment information of the digital asset to the recipient, comprising the steps of:
submitting a payment request to a user interface of an issuer of the payment party in the presence of a network connection;
after receiving the payment request, the user interface verifies the legal ownership of the digital asset of the payer and the signature validity of the payment information;
after verification is passed, the issuer adds the transaction information to the ownership record of the digital asset and sends a new C-Tree certification of the digital asset to the recipient.
Further, the payer delivers the C-Tree certification and signed payment information of the digital asset to the receiver, comprising the steps of:
in the offline case, the payer directly sends the signed payment information and the C-Tree certificate of the digital asset to the recipient;
the receiver submits signed payment information of the payer, and a C-Tree certification of the digital asset of the payer, through a user interface provided by the issuer, in the presence of the network;
the issuer verifies the legal ownership of the digital asset of the payer and the signature validity of the payment information, and after verification, adds the payment information to the ownership record of the digital asset and sends a C-Tree proof of ownership of the digital asset to the receiver.
Further, the payer may set an open payment information, the open payment information not setting a designated recipient, and the payer may send the C-Tree proof of the digital asset, the signature of the payer, the open payment information to any recipient.
Another preferred embodiment of the present invention provides a blockchain-based scalable quick payment system, comprising:
the request module is used for sending a token acquisition request to a user interface of the issuer of the payment party;
the verification module is used for verifying whether public key information of the payer is valid or not after the issuer receives a token acquisition request sent by the payer;
the issuing module is used for issuing information of corresponding digital assets by the issuer after the issuer verifies the digital assets to be valid and returning the information to the payer, wherein the information of the digital assets comprises C-Tree evidence of the digital assets, and the C-Tree evidence comprises all historical records of owners;
the signature module is used for creating a piece of payment information by the payer, and at least comprises information of a receiver and a signature of a public key of the receiver by using a private key of the payer;
and the payment module is used for delivering the C-Tree certification of the digital asset and the signed payment information to the receiver.
Further, the payment module specifically includes:
a first submitting unit for submitting a payment request to a user interface of an issuer of the payment party in case of a network connection;
the first verification unit is used for verifying the legal ownership of the digital asset of the payer and the signature validity of the payment information after the user interface receives the payment request;
and the first payment unit is used for adding transaction information into the ownership record of the digital asset by the issuer after the verification is passed and sending a new C-Tree certification of the digital asset to the receiver.
Further, the payment module specifically includes:
the second payment unit is used for directly transmitting the signed payment information and the C-Tree evidence of the digital asset to the receiver by the payer under the offline condition;
a second submitting unit for submitting signed payment information of the payer, and a C-Tree certification of the digital asset of the payer, through a user interface provided by the issuer, by the receiver in the presence of the network;
and the second verification unit is used for verifying the legal ownership of the digital asset of the payer and the signature validity of the payment information by the issuer, adding the payment information into the ownership record of the digital asset after the verification is passed, and sending the C-Tree certification of the ownership of one digital asset to the receiver.
Further, the payer may set an open payment information, the open payment information not setting a designated recipient, and the payer may send the C-Tree proof of the digital asset, the signature of the payer, the open payment information to any recipient.
A further preferred embodiment of the present invention provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing a method as any one of the above when executing the program.
Another preferred embodiment of the present invention provides a computer-readable storage medium storing a computer program which, when executed by a computer, causes the computer to implement a blockchain-based scalable quick payment method as in any of the above.
Technical effects
The invention discloses a block chain-based extensible quick payment method and a block chain-based extensible quick payment system, which adopt C-Tree capable of determining uniqueness to realize confirmation of ownership of digital assets, and realize under-chain transaction and on-chain confirmation. The block chain-based extensible quick payment method and system can simultaneously support the functions of online payment and offline payment. Meanwhile, on the same blockchain system, support for a plurality of issuers and a plurality of digital assets can be realized, so that support for mass transaction processing of mass users is realized.
The conception, specific structure, and technical effects of the present invention will be further described with reference to the accompanying drawings to fully understand the objects, features, and effects of the present invention.
Detailed Description
In order to make the technical problems, technical schemes and beneficial effects to be solved more clear, the invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular internal procedures, techniques, etc. in order to provide a thorough understanding of embodiments of the present invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
As shown in fig. 1, an embodiment of the present invention provides a scalable quick payment method based on blockchain, including the following steps:
step 100, a payment direction issuer user interface sends a token acquisition request;
step 200, after receiving the token acquisition request sent by the payer, the issuer verifies whether the public key information of the payer is valid;
step 300, after verifying the validity, the issuer issues information of a corresponding number of digital assets, and returns the information to the payer, wherein the information of the digital assets comprises C-Tree certification of the digital assets;
in step 400, the payer creates a payment message including at least the information of the receiver and a signature of the public key of said receiver using the private key, and then the payer delivers the C-Tree certificate of the digital asset and the signed payment message to the receiver. Wherein the payer delivers the C-Tree certification of the digital asset and the signed payment information to the recipient, including online payment and offline payment, step 400. The online payment method specifically comprises the following steps:
step 410, submitting a payment request to a user interface of an issuer for payment in the presence of a network connection;
step 411, after receiving the payment request, the user interface verifies the legal ownership of the digital asset of the payer and the signature validity of the payment information; where legal ownership of a digital asset refers to the owner of the digital asset, at some point in time the owner is unique. The change in ownership appears to be the last owner to sign the public key of the recipient with its private key.
After verification, the issuer adds the transaction information to the ownership record of the digital asset and sends a new C-Tree proof of the digital asset to the recipient, step 412.
The offline payment method specifically comprises the following steps:
step 420, in the case of offline, the payer directly sends the signed payment information and the C-Tree proof of the digital asset to the recipient;
step 421, the recipient, in the presence of the network, submitting signed payment information of the payer, and a C-Tree proof of the digital asset of the payer, through a user interface provided by the issuer;
in step 422, the issuer verifies the legal ownership of the digital asset of the payer and the signature validity of the payment information, and after verification, adds the payment information to the ownership record of the digital asset, and sends a C-Tree certificate of ownership of the digital asset to the receiver.
Further, the payer may set an open payment information, the open payment information not setting a designated recipient, and the payer may send the C-Tree proof of the digital asset, the signature of the payer, the open payment information to any recipient. The present example uses a formatted public key address as the recipient.
The following will explain the specific scheme and support of the present embodiment, and a scalable and fast method based on blockchain of the present embodiment includes the following conditions:
a blockchain system supporting a plurality of issuers that issue digital assets;
each issuer maintains a plurality of databases arranged in a C-Tree structure;
the issuer has a unique valid identification ID in the blockchain system;
periodically writing root node information of a plurality of C-Tree into a blockchain system by an issuer;
in this embodiment, both the payer and the receiver have a public-private key pair.
The issuer provides a user interface, the payer obtains a certain digital asset through the user interface, the ownership of the digital asset of the payer is recorded in the C-Tree, and the payer obtains the C-Tree certification of the digital asset at the same time;
if the payer needs to pay the digital asset to the receiver, the payer signs the payment information by using the owned private key;
the payment information comprises information of the receiver and legal signature of the payer;
under the condition of online payment, a payer can submit payment information through a user interface provided by an issuer;
the issuer verifies the legal ownership of the digital asset of the payer and the signature validity of the payment information, and if the verification is passed, adds transaction information to the ownership record of the digital asset;
the recipient may query a user interface provided by the issuer, confirm payment completion, and obtain a C-Tree proof of ownership of the digital asset;
under the condition of offline payment, the payer can directly send effective payment information and C-Tree evidence of the digital asset owned by the payer to the receiver;
the receiver submits the effective payment information of the payer and the C-Tree certification of the digital asset owned by the payer through a user interface provided by the issuer under the condition of network connection;
the issuer verifies the legal ownership of the digital asset of the payer and the signature validity of the payment information, and if the verification passes, adds the payment information to the ownership record of the digital asset, and the recipient obtains a C-Tree proof of ownership of the digital asset.
Wherein, C-Tree has the following characteristics:
1. C-Tree is an ordered binary Tree;
2. the same C-Tree stores a plurality of similar digital assets issued by the issuers;
3. two leaf nodes of the C-Tree belonging to the same father node respectively store the unique number of the digital asset and the history record of the owner of the digital asset in the circulation process;
4. the parent node of the leaf node of the C-Tree records binary information: the digital asset number of its child node, the hash value of the combined information of the left and right child nodes;
5. the parent node of the non-leaf node of the C-Tree records ternary information: the minimum digital asset number of the child node, the maximum digital asset number of the child node and the hash value of the combined information of the left child node and the right child node;
6. the root node of the C-Tree records ternary information: the minimum digital asset number of the whole C-Tree, the maximum digital asset number of the whole C-Tree, and hash values of the combined information of the left child node and the right child node;
7. ternary information of the root node of the C-Tree is periodically written into the blockchain system.
The C-Tree can be deployed in a plurality of ways and are mutually independent and processed in parallel, so that the processing capacity of the whole system is increased, a large number of payment demands of a large number of users can be supported, and the quick payment method provided by the embodiment of the invention can be expanded.
For a given digital asset, its C-Tree proof includes the following ordered combination of information:
1. numbering of digital assets, historical records of owners of digital assets during circulation;
2. record information of a direct father node of the leaf node corresponding to the digital asset number in the C-Tree and record information of brother nodes of the direct father node;
3. setting a direct father node as a current node;
4. according to the Tree structure of the C-Tree, the record information of the father node of the current node and the record information of the brother node of the father node of the current node are obtained in sequence;
5. repeating the above processes until the parent node of the current node is the root node of the C-Tree;
6. the C-Tree root node records the information.
The following describes a specific procedure of a scalable fast method based on blockchain in this embodiment as a specific example.
As shown in FIG. 1, blockchain 101 is a public chain or a federated chain. The issuer 1 may implement definition of the nominal value, quantity, numbering range, etc. of the digital asset being issued by deploying an intelligent contract 102 within the blockchain 101. At the same time, the issuer 1 deploys a database based on the C-Tree architecture locally. Issuer 1 writes the root node information of the C-Tree to the blockchain through periodic operation 103. While the issuer's digital assets are issued to the payer in the form of C-Tree certificates as the only valid certificates. Likewise, other issuers may also issue one or more digital assets in a similar manner.
As shown in FIG. 2, C-Tree is an extended implementation of the merck Tree. C-Tree is a ranking Tree. The leaf nodes of the C-Tree have a special treatment. An example of a left leaf node is shown at 201, representing the number of digital assets. 203 shows an example of a right leaf node for maintaining an owner history of the digital asset. Ownership of all digital assets is initialized to the issuer. 202 refers to the public key of the issuer. The immediate parent node 204 of the leaf node contains at least binary information: the number of the digital asset represented by its child node, and a hash of the combination of the number of the digital asset and the owner history. Parent node 205 of node 204 contains at least ternary information: the minimum number of digital assets represented by its child nodes, the maximum number of digital assets represented by its child nodes, and a hash of the child node information combinations. And so on, all parent nodes of non-leaf nodes contain ternary information. 206 refers to the root information of the C-Tree, and operation 103 in fig. 1 is to periodically write the root information of the C-Tree to the blockchain.
The C-Tree certification is used to represent a proof that a digital asset exists and is unique. The black portion 207 in fig. 2 is an example of a C-Tree proof of a digital asset.
The digital asset payment in the online case is shown in fig. 3, where user a is the payer and user b is the recipient. The issuer maintains a user interface and one or more C-Tree's internal. The user A can submit a proper token acquisition request to a user node of an issuer through the user A converted or purchased, at least comprises public key information of the user A, and after the issuer verifies that the public key information is valid, the issuer issues information of digital assets with corresponding quantity from the digital assets which are not distributed in the C-Tree and returns the information to the user A. The information record for this digital asset includes at least: the number of the digital asset in the C-Tree, a C-Tree certificate, and issuer private key signed payment information. Thus, the current owner of the digital asset is user A.
When user A needs to pay the digital asset to user B, user A signs the payment information with its own private key and submits the signature and payment information to the issuer's user interface. The issuer detects the validity of the signature, and if valid, the issuer updates the ownership history of the digital asset in the C-Tree, adding the signature, payment information to the original ownership history. User b may accordingly access the issuer's user interface requesting new certification of the digital asset. The issuer's user interface verifies that user b is the current legitimate owner and, if so, returns a new C-Tree certification of the digital asset to user b. Thus, an online payment process for digital assets is achieved.
The offline payment function of the digital asset is shown in fig. 4, where user a is the payer and user b is the recipient. When the user A needs to pay off-line to the user B, the user A signs the payment information by using the private key of the user A, and delivers the C-Tree certification and the signature information of the current digital asset to the user B off-line. User b may submit an online request for digital assets to the issuer's user interface at a later time, as appropriate. The issuer verifies the validity of the C-Tree proof of the digital asset submitted by the user, the signature of the user A, the payment information, and if valid, the issuer adds the new payment information to the ownership history of the digital asset and returns the new C-Tree proof to the user B.
It should be explained that the user b may select a continuous offline payment function to the user c as long as the user b correctly signs the new payment information. At this time, the user b becomes the paying party and the user c becomes the receiving party. This continuous offline payment process may continue arbitrarily until the last user chooses to submit an online request to the issuer's user interface and obtain a new C-Tree proof. Another offline payment function of an embodiment of the present invention is that an open payment message may be set by the owner of a digital asset, user a (i.e., the payer). The open payment information does not set the recipient. The user a can correctly sign the open payment information with its own private key. The user A can send the C-Tree certification of the digital asset, the signature of the user A and the open payment information to any receiver, so that the receiver obtains the ownership of the digital asset.
The receiver submits a declaration to the digital asset through a user interface provided by the issuer under the condition of network connection, wherein the declaration at least comprises a public key of a third party;
declaring valid for a set validity period, during which the digital asset does not accept other declarations;
declaring, if valid, the third party obtains a C-Tree proof of the declaration;
a third party submitting, through a user interface provided by the issuer, the effective open payment information of the payer a, and a C-Tree proof of the digital asset owned by the payer a;
the issuer verifies the legal ownership of the digital asset of the payer A and the signature validity of the open payment information, and if the verification is passed, the open payment information and the declaration information are added into the ownership record of the digital asset, and the declared third party obtains a C-Tree certification of the ownership of the digital asset.
The following offline payment and the process of multiple offline payments will be explained below for a clearer understanding. After obtaining the effective payment information P1 of the payer a and the C-Tree proof of the digital asset owned by the payer a, the receiver B may pay to the third party C offline, the specific process comprising:
the receiver B constructs new payment information P2, wherein the new payment information P2 comprises a public key of a third party C and a legal signature of the current receiver B;
the receiver B connects the obtained payment information P1 of the payer A with the new payment information P2 in series to form an effective payment information combination PC;
the receiver B directly submits the effective payment information combination PC and the C-Tree certification of the digital asset owned by the payer A to a third party C;
the third party C may continue such an offline payment process until the last recipient E, in the presence of a network connection, submits, via a user interface provided by the issuer, the effective payment information combination, and a C-Tree proof of the digital asset owned by the payer a;
the issuer verifies the legal ownership of the digital asset of the payer a and the signature validity of the payment information combination, and if the verification passes, adds the payment information combination to the ownership record of the digital asset, the last recipient E obtains a C-Tree proof of ownership of the digital asset.
In order to achieve information lightening of digital assets, the issuer may close the digital asset's record in the current C-Tree and give the last owner a new equivalent digital asset in the new equivalent C-Tree if one of the following conditions is reached (number of transactions in the ownership record exceeds the set value, information amount of the ownership record exceeds the set value).
The invention has the advantages that the C-Tree capable of determining the uniqueness is adopted to realize the confirmation of the ownership of the digital asset, and the under-chain transaction and the on-chain confirmation are realized. The invention can simultaneously support the online payment and the offline payment functions. Meanwhile, on the same blockchain system, support for a plurality of issuers and a plurality of digital assets can be realized, so that support for mass transaction processing of mass users is realized.
Example two
Another preferred embodiment of the present invention provides a blockchain-based scalable quick payment system, comprising:
the request module is used for sending a token acquisition request to a user interface of the issuer of the payment party;
the verification module is used for verifying whether public key information of the payer is valid or not after the issuer receives a token acquisition request sent by the payer;
the issuing module is used for issuing information of corresponding digital assets by the issuer after the digital assets are validated and returning the information to the paying party, wherein the information of the digital assets comprises C-Tree evidence of the digital assets;
the signature module is used for creating a piece of payment information by the payer, and at least comprises information of a receiver and a signature of a public key of the receiver by using a private key of the payer;
and the payment module is used for delivering the C-Tree certification of the digital asset and the signed payment information to the receiver by the payer.
Further, the payment module specifically includes:
a first submitting unit for submitting a payment request to a user interface of an issuer of the payment party in case of a network connection;
the first verification unit is used for verifying the legal ownership of the digital asset of the payer and the signature validity of the payment information after the user interface receives the payment request;
and the first payment unit is used for adding transaction information into the ownership record of the digital asset by the issuer after the verification is passed and sending a new C-Tree certification of the digital asset to the receiver.
Further, the payment module specifically includes:
the second payment unit is used for directly transmitting the signed payment information and the C-Tree evidence of the digital asset to the receiver by the payer under the offline condition;
a second submitting unit for submitting signed payment information of the payer, and a C-Tree certification of the digital asset of the payer, through a user interface provided by the issuer, by the receiver in the presence of the network;
and the second verification unit is used for verifying the legal ownership of the digital asset of the payer and the signature validity of the payment information by the issuer, adding the payment information into the ownership record of the digital asset after the verification is passed, and sending the C-Tree certification of the ownership of one digital asset to the receiver.
Further, the payer may set an open payment information, the open payment information not setting a designated recipient, and the payer may send the C-Tree proof of the digital asset, the signature of the payer, the open payment information to any recipient.
An apparatus supporting a blockchain-based scalable quick payment system of the present embodiment includes:
a blockchain system supporting a plurality of issuers issuing digital assets is comprised of a plurality of network service nodes, each network service node comprising a network interface, a memory, and a processor coupled to the network interface and the memory, wherein the processor is configured to:
receiving root node information of a plurality of C-Tree submitted by an issuer, and recording the root node information in a memory through a set consensus process of the nodes;
the processor is configured to:
and constructing, storing, updating and deleting a plurality of C-Tree examples according to the structural logic of the C-Tree.
Each issuer maintains a plurality of database service nodes arranged in a C-Tree structure.
The implementation process of the scalable quick payment method based on blockchain in the present embodiment is as in the first embodiment, and will not be described herein.
Example III
The third embodiment of the invention provides a computer device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the program to realize the method of any one of the above.
The computer device of this embodiment includes: a processor, a memory, and a computer program, such as a payment program, stored in the memory and executable on the processor. The steps of the above-described respective networking method embodiments are implemented when the processor executes the computer program. Alternatively, the processor may implement the functions of the modules/units in the above-described device embodiments when executing the computer program.
The computer program may be divided into one or more modules/units, which are stored in the memory and executed by the processor to accomplish the present invention, for example. The one or more modules/units may be a series of computer program instruction segments capable of performing the specified functions, which instruction segments describe the execution of the computer program in the computer device.
The computer equipment can be a desktop computer, a notebook computer, a palm computer, a cloud server and other computing equipment. The computer device may include, but is not limited to, a processor, a memory.
The processor may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory may be an internal storage unit of the computer device, such as a hard disk or a memory of the computer device. The memory may also be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the computer device. Further, the memory may also include both internal storage units and external storage devices of the computer device. The memory is used for storing the computer program and other programs and data required by the computer device. The memory may also be used to temporarily store data that has been output or is to be output.
The embodiment of the invention also provides a computer readable storage medium storing a computer program, which is characterized in that the computer program enables a computer to realize the scalable quick payment method based on the blockchain when the computer program is executed.
Preferred embodiments of the present invention are described in detail above. It should be understood that numerous modifications and variations can be made in accordance with the concepts of the invention by one of ordinary skill in the art without undue burden. Therefore, all technical solutions which can be obtained by logic analysis, reasoning or limited experiments based on the prior art by the person skilled in the art according to the inventive concept shall be within the scope of protection defined by the claims.