CN111311253A - Transaction method, device and system based on block chain - Google Patents

Transaction method, device and system based on block chain Download PDF

Info

Publication number
CN111311253A
CN111311253A CN201811518168.6A CN201811518168A CN111311253A CN 111311253 A CN111311253 A CN 111311253A CN 201811518168 A CN201811518168 A CN 201811518168A CN 111311253 A CN111311253 A CN 111311253A
Authority
CN
China
Prior art keywords
commodity
record
transaction
node
consensus
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
CN201811518168.6A
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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201811518168.6A priority Critical patent/CN111311253A/en
Publication of CN111311253A publication Critical patent/CN111311253A/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/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management

Abstract

The embodiment of the invention provides a transaction method, a device and a system based on a block chain, wherein the method comprises the following steps: the seller node sends a commodity record to the commodity audit consensus node; the commodity audit consensus node performs consensus verification on the commodity record and stores the commodity record block chain; the transaction promotion node conducts promotion and drainage on the commodity records; the buyer node issues a commodity transfer record; the transaction verification consensus node performs consensus verification on the commodity transfer record and stores the commodity transfer record into a transaction record block chain; the logistics consensus node performs consensus verification on the logistics record corresponding to the commodity transfer record and stores the logistics record block chain; the purchaser node sends a transaction result record to the transaction verification consensus node; and the transaction verification consensus node performs consensus verification on the transaction result record and stores the transaction result record into a transaction record block chain. Therefore, commodity transaction is realized through the block chain, monopoly of a traditional electronic commerce transaction platform can be eliminated, and reliability and stability of commodity transaction are guaranteed.

Description

Transaction method, device and system based on block chain
Technical Field
The embodiment of the invention relates to the technical field of electronic commerce, in particular to a transaction method, a device and a system based on a block chain.
Background
Electronic Commerce (EC) is a novel business operation mode in which, in wide business activities worldwide, buyers and sellers conduct various business activities in an unfurled internet environment based on a browser/server application mode, and various online shopping of consumers, online transactions and online Electronic payments among merchants, and various business activities, transaction activities, financial activities, and related comprehensive service activities are realized.
At present, in electronic commerce of each industry, both transaction parties, namely a buyer and a seller need to interact with an electronic commerce transaction platform to complete transaction, so that the core of the operation of the whole electronic commerce transaction system is the electronic commerce transaction platform, and therefore, the traditional electronic commerce transaction system has the following problems:
(1) the stability of the e-commerce transaction platform determines the stability of the whole e-commerce transaction system, for example, when the e-commerce transaction platform is broken down, the buyer and the seller cannot complete the transaction.
(2) The electronic commerce transaction platform can have monopoly rule setting rights, for example, the electronic commerce transaction platform can set flow guide and collected transaction commission according to own rules, or the electronic commodity transaction platform can easily set different thresholds aiming at different users, and audit of commodities is controlled according to own rules, so that the problem of unfair competition is easy to occur.
Therefore, how to reasonably realize e-commerce is a problem to be solved urgently at present.
Disclosure of Invention
In view of this, embodiments of the present invention provide a transaction method, apparatus, and system based on a block chain, in which a commodity transaction is implemented through the block chain, and multiple intermediate parties participate in the commodity transaction, so that monopoly of a conventional e-commerce transaction platform is eliminated, reliability and stability of the commodity transaction are ensured, and e-commerce can be implemented more reasonably.
In order to solve the above technical problems, embodiments of the present invention provide the following technical solutions:
in a first aspect, an embodiment of the present invention provides a block chain-based transaction method, which is applied to a seller node, and the method includes: obtaining a commodity record for initiating a commodity transaction; sending the commodity record to each commodity audit consensus node so that each commodity audit consensus node stores the commodity record into a commodity record block chain after the commodity record consensus verification is passed; receiving a commodity transfer record issued by a purchaser node, wherein the commodity transfer record is used for responding to a commodity transaction initiated by a seller node; performing transaction confirmation on the commodity transfer record; and forwarding the commodity transfer record confirmed by the transaction to each transaction verification consensus node so that each transaction verification consensus node stores the commodity transfer record into a transaction record block chain after passing the consensus verification of the commodity transfer record.
In a second aspect, an embodiment of the present invention provides a transaction method based on a block chain, which is applied to a commodity audit consensus node, and the method includes: receiving a commodity record which is sent by a seller node and used for initiating commodity transaction; carrying out consensus verification on the received commodity records; and storing the commodity record passing the consensus verification into a commodity record block chain, and performing drainage promotion on the commodity record issued by the seller node through a transaction promotion node, so that the buyer node issues a commodity transfer record aiming at the commodity record to respond to the commodity transaction initiated by the seller node.
In a third aspect, an embodiment of the present invention provides a transaction method based on a block chain, which is applied to a transaction promotion node, and the method includes: acquiring a commodity record issued by a seller node and used for initiating commodity transaction from a commodity record block chain, wherein the commodity record is stored in the commodity record block chain by a commodity audit consensus node; and carrying out promotion and drainage on the commodity records so that the buyer node issues a commodity transfer record aiming at the commodity records to respond to the commodity transaction initiated by the seller node.
In a fourth aspect, an embodiment of the present invention provides a block chain-based transaction method, applied to a buyer node, where the method includes: the method comprises the steps that a commodity transfer record is obtained, wherein the commodity transfer record is used for responding to commodity transaction initiated by a seller node through issuing a commodity record, and the commodity record is stored in a commodity record block chain by a commodity audit consensus node and is promoted and guided by a transaction promotion node; sending the commodity transfer record to a seller node, so that the seller node sends the commodity transfer record to each transaction verification consensus node after the commodity transfer record is confirmed through transaction, and each transaction verification consensus node stores the commodity transfer record into a transaction record block chain after the commodity transfer record is verified through the transaction verification; generating a transaction result record based on the commodity transfer record and the corresponding commodity record, wherein the transaction result record is a confirmed purchase record used for indicating that the commodity transaction is successful or a transaction cancel record used for indicating that the commodity transaction is failed; and sending the transaction result record to each transaction verification consensus node so that each transaction verification consensus node stores the transaction result record into a transaction record block chain after passing the transaction result record consensus verification.
In a fifth aspect, an embodiment of the present invention provides a transaction method based on a blockchain, which is applied to a transaction verification consensus node, and the method includes: receiving a commodity transfer record sent by a seller node, wherein the commodity transfer record is issued by a buyer node and confirmed through the seller node; performing consensus verification on the commodity transfer record; storing the commodity transfer record passing the consensus verification into a transaction record block chain, so that the logistics node stores the logistics record into the logistics record block chain after passing the consensus verification of the logistics record corresponding to the commodity transfer record; receiving a transaction result record sent by a purchaser node, wherein the transaction result record is a confirmed purchase record used for indicating that the commodity transaction is successful or a transaction cancel record used for indicating that the commodity transaction is failed; performing consensus verification on the transaction result record; and storing the transaction result record passing the consensus verification into a transaction record block chain.
In a sixth aspect, an embodiment of the present invention provides a transaction method based on a block chain, which is applied to a logistics consensus node, where the method includes: acquiring a commodity transfer record from a transaction record block chain, wherein the commodity transfer record is stored in the transaction record block chain by a transaction verification consensus node; acquiring a logistics record corresponding to the commodity transfer record; performing consensus verification on the logistics records; and storing the logistics record passing the consensus verification into a logistics record block chain.
In a seventh aspect, an embodiment of the present invention provides a transaction apparatus based on a blockchain, where the apparatus is applied to a seller node, and the apparatus includes: an obtaining unit, configured to obtain a commodity record used for initiating a commodity transaction; the first sending unit is used for sending the commodity records to each commodity audit consensus node so that each commodity audit consensus node stores the commodity records into a commodity record block chain after the commodity record consensus verification is passed; the system comprises a receiving unit, a transaction processing unit and a processing unit, wherein the receiving unit is used for receiving a commodity transfer record issued by a buyer node, and the commodity transfer record is used for responding to a commodity transaction initiated by a seller node; the transaction confirmation unit is used for performing transaction confirmation on the commodity transfer record; and the second sending unit is used for forwarding the commodity transfer record confirmed through the transaction to each transaction verification consensus node so that each transaction verification consensus node stores the commodity transfer record into the transaction record block chain after the commodity transfer record is verified through the consensus verification of each transaction verification consensus node.
In an eighth aspect, an embodiment of the present invention provides a transaction apparatus based on a block chain, which is applied to a commodity audit consensus node, and the apparatus includes: the receiving unit is used for receiving a commodity record which is sent by a seller node and used for initiating commodity transaction; the consensus verification unit is used for carrying out consensus verification on the received commodity record; and the storage unit is used for storing the commodity records which pass the consensus verification into a commodity record block chain so as to conduct drainage promotion on the commodity records issued by the seller node through the transaction promotion node, so that the buyer node issues a commodity transfer record aiming at the commodity records to respond to the commodity transaction initiated by the seller node.
In a ninth aspect, an embodiment of the present invention provides a transaction apparatus based on a block chain, which is applied to a transaction promotion node, and the apparatus includes: the acquisition unit is used for acquiring a commodity record which is issued by a seller node and used for initiating commodity transaction from a commodity record block chain, wherein the commodity record is stored in the commodity record block chain by a commodity audit consensus node; and the promotion and drainage unit is used for promoting and guiding the commodity records so that the buyer node issues the commodity transfer records aiming at the commodity records to respond to the commodity transaction initiated by the seller node.
In a tenth aspect, an embodiment of the present invention provides a block chain-based transaction apparatus, applied to a buyer node, where the apparatus includes: the system comprises an obtaining unit, a transaction management unit and a transaction management unit, wherein the obtaining unit is used for obtaining a commodity transfer record, the commodity transfer record is used for responding to commodity transaction initiated by a seller node through issuing a commodity record, and the commodity record is stored in a commodity record block chain by a commodity audit consensus node and is promoted and drained through a transaction promotion node; the first sending unit is used for sending the commodity transfer record to a seller node so that the seller node sends the commodity transfer record to each transaction verification consensus node after the commodity transfer record is confirmed through transaction, and each transaction verification consensus node stores the commodity transfer record into a transaction record block chain after the commodity transfer record is verified through the transaction verification; the generation unit is used for generating a transaction result record based on the commodity transfer record and the corresponding commodity record, wherein the transaction result record is a confirmed purchase record used for indicating commodity transaction success or a transaction cancel record used for indicating commodity transaction failure; and the second sending unit is used for sending the transaction result record to each transaction verification consensus node so that each transaction verification consensus node stores the transaction result record into a transaction record block chain after passing the transaction result record consensus verification.
In an eleventh aspect, an embodiment of the present invention provides a block chain-based transaction apparatus, which is applied to a transaction verification consensus node, and the apparatus includes: the system comprises a first receiving unit, a second receiving unit and a third receiving unit, wherein the first receiving unit is used for receiving a commodity transfer record sent by a seller node, and the commodity transfer record is issued by a buyer node and confirmed through the seller node in a transaction; the first consensus verification unit is used for performing consensus verification on the commodity transfer record; the storage unit is used for storing the commodity transfer record which passes the consensus verification into the transaction record block chain, so that the logistics node stores the logistics record into the logistics record block chain after the logistics record consensus verification corresponding to the commodity transfer record passes; the second receiving unit is used for receiving a transaction result record sent by the purchaser node, wherein the transaction result record is a confirmed purchase record used for indicating that the commodity transaction is successful or a transaction cancel record used for indicating that the commodity transaction is failed; the second consensus verification unit is used for performing consensus verification on the transaction result record; and the storage unit is used for storing the transaction result record passing the consensus verification into the transaction record block chain.
In a twelfth aspect, an embodiment of the present invention provides an electronic commerce transaction apparatus based on a block chain, which is applied to a logistics consensus node, where the apparatus includes: the system comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring a commodity transfer record from a transaction record block chain, and the commodity transfer record is stored in the transaction record block chain by a transaction verification consensus node; the second acquisition unit is used for acquiring the logistics record corresponding to the commodity transfer record; the consensus verification unit is used for performing consensus verification on the logistics records; and the storage unit is used for storing the logistics record passing the consensus verification into the logistics record block chain.
In a thirteenth aspect, an embodiment of the present invention provides a block chain based transaction system, where the system includes: the system comprises a commodity recording block chain, a transaction recording block chain and a logistics recording block chain; wherein the commodity recording block chain includes: seller's node and commodity audit consensus node, the transaction record blockchain includes: seller's node, transaction popularization node, transaction verification consensus node and purchaser's node, the commodity circulation record block chain includes: a logistics consensus node; the seller node is used for obtaining a commodity record for initiating commodity transaction; sending the commodity record to each commodity audit consensus node; the system is also used for receiving a commodity transfer record issued by the buyer node, wherein the commodity transfer record is used for responding to a commodity transaction initiated by the seller node; performing transaction confirmation on the commodity transfer record; the commodity transfer record confirmed by the transaction is forwarded to each transaction verification consensus node; the commodity audit consensus node is used for receiving a commodity record which is sent by a seller node and used for initiating commodity transaction; carrying out consensus verification on the received commodity records; storing the commodity records passing the consensus verification into a commodity record block chain; the transaction promotion node is used for acquiring a commodity record which is issued by the seller node and used for initiating commodity transaction from the commodity record block chain; carrying out promotion and drainage on the commodity records; the buyer node is used for obtaining a commodity transfer record, wherein the commodity transfer record is used for responding to a commodity transaction initiated by the seller node through issuing a commodity record; sending the commodity transfer record to a seller node; generating a transaction result record based on the commodity transfer record and the corresponding commodity record, wherein the transaction result record is a confirmed purchase record used for indicating that the commodity transaction is successful or a transaction cancel record used for indicating that the commodity transaction is failed; sending the transaction result record to each transaction verification consensus node; the transaction verification consensus node is used for receiving a commodity transfer record sent by a seller node, wherein the commodity transfer record is issued by a buyer node and confirmed by the seller node through transaction; performing consensus verification on the commodity transfer record; storing the commodity transfer record passing the consensus verification into a transaction record block chain; the logistics consensus node is used for acquiring a commodity transfer record from the transaction record block chain; acquiring a logistics record corresponding to the commodity transfer record; performing consensus verification on the logistics records; and storing the logistics record passing the consensus verification into a logistics record block chain.
In a fourteenth aspect, an embodiment of the present invention provides a computer-readable storage medium, where the storage medium includes a stored program, where the program, when executed, controls a device in which the storage medium is located to perform the steps of the above block chain-based transaction method.
In a fifteenth aspect, an embodiment of the present invention provides a node device, where the node device includes: at least one processor; and at least one memory, bus connected with the processor; the processor and the memory complete mutual communication through the bus; the processor is configured to invoke program instructions in the memory to perform the steps of the blockchain based transaction method described above.
In the transaction method, the device and the system based on the block chain, provided by the embodiment of the invention, in the commodity transaction process, firstly, in order to initiate commodity transaction, a seller node sends a commodity record for initiating commodity transaction to a commodity audit consensus node, and then, the commodity audit consensus node performs consensus verification on the commodity record and stores the commodity record passing the consensus verification into a commodity record block chain; secondly, the transaction promotion node carries out promotion and drainage on the commodity records issued by the seller node, and then in order to respond to the commodity transaction initiated by the seller node, the buyer node can issue a commodity transfer record aiming at the commodity records; thirdly, after the seller confirms the commodity transfer record in transaction, the transaction verification consensus node can perform consensus verification on the commodity transfer record and store the commodity transfer record passing the consensus verification into a transaction record block chain; then, the logistics consensus node can perform consensus verification on the logistics record corresponding to the commodity transfer record and store the logistics record passing the consensus verification into a logistics record block chain; and finally, after the commodity transaction is completed, the purchaser node sends a transaction result record to the transaction verification consensus node, and then the transaction verification consensus node performs consensus verification on the transaction result record and stores the transaction result record passing the consensus verification into a transaction record block chain so as to realize the completion of the commodity transaction. Therefore, in the process of realizing commodity transaction through the block chain, the transaction data related to the commodity transaction can be identified and linked up through the block chain nodes of the plurality of middle parties, namely, the plurality of middle parties can participate in the transaction without monopolizing by the e-commerce transaction platform, so that monopoly of the traditional e-commerce transaction platform can be eliminated, the reliability and stability of the commodity transaction are ensured, and the vitality of the e-commerce transaction can be increased.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a block chain based transaction system according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating a blockchain-based transaction method according to an embodiment of the present invention;
FIG. 3 is a first block chain based transaction apparatus according to an embodiment of the present invention;
FIG. 4 is a second schematic structural diagram of a blockchain-based transaction apparatus according to an embodiment of the present invention;
fig. 5 is a third schematic structural diagram of a blockchain-based transaction apparatus according to an embodiment of the present invention;
fig. 6 is a fourth schematic structural diagram of a blockchain-based transaction apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a blockchain-based transaction apparatus according to an embodiment of the present invention;
fig. 8 is a sixth schematic structural diagram of a blockchain-based transaction apparatus according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a node device in the embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
The Block chain (Block chain) is a special distributed system integrating distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and other computer technologies, and has the characteristics of decentralization, collective maintenance, non-tampering, data transparency, user anonymity and the like. In practical applications, the blockchain mainly serves to store data, and any blockchain may include at least one block.
In practical applications, the type of blockchain may include public chains, alliance chains, private chains, etc. according to different design of permissions of the blockchain. The public chain refers to a block chain which can be accessed by anyone to read data, send confirmable transaction and competitively record transaction data in the block chain system at any time; the alliance chain is a blockchain which is managed by a plurality of organizations or organizations together, each organization runs one or more nodes, and the data only allows different organizations in the blockchain system to read, write and send transactions and records the transaction data together; private chain refers to a chain of blocks whose write rights are controlled by an organization and organization, and the qualification of participating nodes is severely restricted.
The system adopting the block chain technology framework can be regarded as a block chain system, one block chain system can comprise a plurality of block chain nodes, and people can join the block chain system through node equipment to form one block chain node. A node device may correspond to multiple blockchains, and thus any blockchain node may correspond to at least one blockchain.
An embodiment of the present invention provides a transaction system based on a blockchain, and fig. 1 is a schematic structural diagram of the transaction system based on the blockchain in the embodiment of the present invention, and referring to fig. 1, the transaction system 10 based on the blockchain may include: a commodity recording block chain 101, a transaction recording block chain 102 and a logistics recording block chain 103; the commodity recording block chain 101 includes: seller node 1011 and commodity audit consensus node 1012, transaction record blockchain 102 includes: seller node 1021, transaction promotion node 1022, transaction verification consensus node 1023 and buyer node 1024, and the logistics record blockchain 103 includes: and a logistics consensus node 1031.
Here, the commodity record block chain is mainly used for storing commodity records. The transaction record blockchain is mainly used for storing transaction records such as commodity transfer records, confirmation purchase records and the like. The logistics record block chain is mainly used for storing logistics records such as delivery records, traceability records, signing records and the like corresponding to the commodity objects.
In a specific implementation process, the commodity recording blockchain may be implemented by a federation chain, the transaction recording blockchain may be implemented by a public chain, and the logistics recording blockchain may be implemented by a federation chain. Of course, each of the blockchains included in the above-mentioned blockchain system may also be implemented by other types of blockchains, which can be determined by those skilled in the art according to specific implementation situations, and the embodiments of the present invention are not limited in detail herein.
Specifically, the six types of nodes are essentially node devices corresponding to the blockchain, but different types of nodes have different functions, for example, a seller node is a blockchain link node for initiating a commodity transaction and confirming the commodity transaction responded by a buyer node; the buyer node is a block chain link point used for responding to the commodity transaction initiated by the seller node; the commodity audit consensus node is a block chain node used for determining whether commodity transaction initiated by a seller is valid; the transaction verification consensus node is a block chain node used for determining whether the commodity transaction initiated by the seller node, responded by the buyer node and confirmed by the seller node is valid; the logistics node is a block chain node used for determining whether the logistics record corresponding to the commodity transaction initiated by the seller node, responded by the buyer node and confirmed by the seller node is valid.
In practical applications, the six nodes described in the embodiments of the present invention may be changed, and any node device may not be permanently changed after becoming a certain type of node, for example, a certain node device may become a buyer node for another commodity transaction after becoming a seller node for a certain commodity transaction. Any node device can become a node of a corresponding type as long as the corresponding condition is met, and of course, if a certain type of node no longer meets the corresponding condition, the node can be correspondingly removed. In addition, in physical terms, a plurality of the above six types of nodes may be combined on the same node device, for example, one user may be a buyer or a seller, and in this case, the node device used by the user may correspond to two types of nodes, namely a seller node and a buyer node.
In practical applications, the six types of nodes, namely the seller node, the goods auditing consensus node, the transaction promotion node, the transaction verification consensus node, the buyer node and the logistics consensus node, described in the embodiments of the present invention may be implemented by various types of node devices. For example, the node device may be a fixed terminal such as a server or a desktop, or may also be a mobile terminal such as a smart phone, a notebook computer, or a tablet computer, or may also be other types of node devices, and here, the embodiment of the present invention is not limited specifically.
Further, in combination with the above transaction system based on the blockchain, an embodiment of the present invention provides a transaction method based on the blockchain. In practical applications, the blockchain-based transaction method can be applied to various types of electronic commerce.
Then, fig. 2 is a schematic flow chart of a blockchain-based transaction method in an embodiment of the present invention, and referring to fig. 2, the blockchain-based transaction method may include:
s201: a seller node obtains a commodity record;
here, the goods record is used to initiate a goods transaction, i.e. to indicate a goods transaction initiated by a seller, to indicate to the purchaser goods objects offered by the seller. The seller node is a block link point for initiating a commodity transaction and confirming the commodity transaction responded by the buyer node, and the block link point is corresponding to the seller.
In practical applications, when a seller needs to sell a commodity object, a seller node obtains a commodity record corresponding to the commodity object supplied by the seller, and then, in a specific implementation process, the step S201 may include: receiving commodity content, seller information and transaction commission information input by a seller; based on the commodity content, seller information and transaction commission information, a commodity record is generated.
Here, the commodity contents may include: description information of the commodity object, selling price information of the commodity object, selling quantity information of the commodity object and the like; vendor information may include: supply and qualification information of the seller, address information of the seller and the like; the transaction commission information may include: transaction commission of the commodity auditing party, transaction commission of the promoting party, transaction commission of the logistics party and transaction commission of the transaction verifying party.
In practical applications, the transaction commission, also called transaction commission, is used to represent the amount of digital money that can be obtained from each commodity transaction by miners writing data information related to the commodity transaction, such as commodity records, commodity transfer records, and the like, into the block chain after the commodity transaction initiated by each seller is ended. Specifically, the miners can be intermediate party nodes except for two transaction parties, such as a commodity audit node, a transaction popularizing party node, a logistics consensus node, a transaction verification consensus node and the like. In practical application, the transaction commission can be set by the seller through the seller node, and certainly, the more the transaction commission is, the more the intermediary party participating in the transaction is, the faster the data information related to the commodity transaction, such as the commodity record, the commodity transfer record and the like, can be confirmed and written into the block chain, so that the two parties to the transaction can complete the commodity transaction more quickly.
S202: the seller node sends the commodity record to each commodity audit consensus node;
specifically, for the commodity record issued by the seller, only when the commodity record is written into the commodity record block chain by each commodity audit common identification node, the buyer can determine that the commodity record is confirmed and is true and valid, at this time, it indicates that the commodity transaction initiated by the seller issuing the commodity record is valid, and then the buyer responds to the commodity transaction. Therefore, when the seller needs to sell the commodity object, the seller can send the commodity record to each commodity audit consensus node through the seller node for consensus verification, so that after the commodity audit consensus node passes the commodity record consensus verification, the commodity record is stored in the commodity record block chain, and commodity transaction initiation is realized.
In practical applications, since the commodity record blockchain may include: the seller nodes and the commodity audit consensus nodes, each seller node can broadcast the commodity records to other block chain nodes in the commodity record block chain, such as each commodity audit consensus node, so that each commodity audit consensus node performs consensus verification on the commodity records.
Then, when the seller node sends the commodity record to each commodity audit consensus node in a broadcast manner, in order to ensure the safety and integrity of the information stored in the block chain and facilitate the commodity audit consensus node to perform consensus verification on the commodity record, in a specific implementation process, the step S202 may include: step A1: based on a private key of the seller node, performing signature processing on the commodity record to obtain a signature of the seller node for the commodity record; step A2: and broadcasting the commodity record, the signature of the seller node aiming at the commodity record and a public key corresponding to a private key of the seller node to each commodity audit consensus node.
In a specific implementation process, the step a1 may include: performing Hash calculation on the commodity record to obtain a Hash value of the commodity record; and encrypting the hash value of the commodity record by using a private key of the seller node to generate a signature of the seller node for the commodity record.
In practical applications, the hash algorithm used in the hash calculation may be an SHA (Secure hash algorithm), such as SHA256 and SHA 512, or an RIPEMD (RACE integrity verification Message Digest), such as RIPEMD160, or may be another hash algorithm, such as a Keccak algorithm, and the embodiments of the present invention are not limited in this respect.
S203: the commodity audit consensus node receives a commodity record sent by a seller node;
s204: the commodity audit consensus node performs consensus verification on the received commodity record;
s205: the commodity audit consensus node stores the commodity record passing the consensus verification into a commodity record block chain;
here, the commodity audit consensus node is a block chain node that performs consensus verification on a commodity record issued by a seller node to determine whether a commodity transaction initiated by the seller is valid. The commodity record received by the commodity consensus verification node is used for indicating the commodity transaction initiated by the seller node.
Specifically, for the commodity record issued by the seller, the buyer can determine that the commodity transaction initiated by the seller is valid only when the commodity record is written into the commodity record block chain by each commodity audit common identification node, so that when the buyer needs to buy a commodity object, the buyer responds to the commodity transaction by issuing a commodity transfer record by using the buyer node. Then, when a seller wants to initiate a commodity transaction, the commodity audit consensus node receives a commodity record sent by the seller node and used for initiating the commodity transaction, then the commodity audit consensus node performs consensus verification on the commodity record, and stores the commodity record into the commodity record block chain after the commodity record passes the consensus verification, that is, at this time, the seller confirms the commodity transaction initiated by the seller node, and then the transaction promotion node performs drainage promotion on the commodity record issued by the seller node, so that the buyer node issues a commodity transfer record aiming at the commodity record to respond to the commodity transaction initiated by the seller node.
In other embodiments of the present invention, when the seller node sends the commodity record in a broadcast manner, in order to ensure the safety and integrity of the information stored in the block chain and facilitate the commodity audit consensus node to perform consensus verification on the commodity record, in a specific implementation process, the step S203 may include: and receiving the commodity record broadcasted by the seller node, the signature aiming at the commodity record by the seller node and a public key corresponding to the private key of the seller node.
Further, when the seller node sends the commodity record in a broadcast manner, the step S204 may include: verifying the validity of the commodity record based on the commodity record, the signature of the seller node aiming at the commodity record and a public key corresponding to a private key of the seller node; and after the validity verification is passed, carrying out consensus on the commodity records according to a consensus mechanism of the commodity record block chain.
In a specific implementation process, the validity verification of the commodity record sent by the seller node by each commodity audit consensus node may include: and auditing the items such as whether the identity of the seller node is legal, whether the commodity record is tampered in the transmission process, whether the format and/or the content of the commodity record meet preset conditions and the like. Therefore, if the verification result obtained by each commodity audit consensus node is that the identity of the seller node is legal, the commodity record is not tampered in the transmission process, and the format and/or the content of the commodity record meet the preset conditions, each commodity audit consensus node can determine that the received commodity record passes the validity verification. Furthermore, according to the consensus mechanism of the commodity record block chain, each commodity audit consensus node can achieve consensus on the commodity record, so that after the commodity record passes the consensus, one commodity audit consensus node can store the commodity record into the commodity record block chain.
Specifically, the validity verification of the commodity audit consensus node on the commodity record received by the commodity audit consensus node can exist but is not limited to the following three steps:
the first step is as follows: the commodity audit consensus node can judge whether the identity of the seller node is legal or not based on the received public key corresponding to the private key of the seller node and the signature of the seller node for the commodity record.
Specifically, the commodity audit consensus node can decrypt the signature of the received seller node for the commodity record by using the public key of the seller node received by the commodity audit consensus node, and if the decryption is successful and the original hash value corresponding to the commodity record is obtained, the commodity audit consensus node can determine that the identity of the seller node is legal; if the decryption fails, the commodity audit consensus node can determine that the identity of the seller node is illegal, and then can directly determine that the commodity record fails the validity verification.
The second step is that: when the commodity audit consensus node determines that the identity of the seller node is legal, the commodity audit consensus node can determine whether the commodity record is tampered or not based on the hash value of the commodity record obtained through decryption and the hash value of the commodity record obtained through current calculation.
Specifically, the commodity audit consensus node can perform hash calculation on the received commodity record to generate a current hash value of the commodity record, and if the original hash value corresponding to the commodity record obtained through decryption is the same as the current hash value of the commodity record obtained through calculation, the commodity audit consensus node can determine that the commodity record is not tampered in the transmission process; if the commodity audit common identification node is not the same as the commodity audit common identification node, the commodity audit common identification node can determine that the commodity record is tampered in the transmission process, and then can directly determine that the commodity record does not pass the validity verification.
And thirdly, when the commodity audit consensus node confirms that the commodity record is not tampered in the transmission process, the commodity audit consensus node can audit whether the format and/or the content of the commodity record meet preset conditions.
Here, the preset condition is used to indicate a relevant condition necessary for initiating a commodity transaction. The commodity records meeting the preset conditions can initiate commodity transaction, and the commodity records not meeting the preset conditions cannot initiate commodity transaction.
In practical applications, the preset condition may include whether the commodity record includes commodity contents, for example, whether description information of the commodity object exists, whether the sales price of the commodity object is explicitly shown, whether the sales quantity of the commodity object is given, and the like; the preset condition may also include whether the commodity record includes the relevant information of the seller corresponding to the sales node, for example, whether the supply and qualification information of the seller, the address information of the seller, and the like are given; the preset conditions may also include transaction commissions due by various intermediary parties involved in the transaction, such as whether a commodity audit party commission, a promotional party commission, a logistics party commission, a transaction verification party commission, etc. is given. Of course, a person skilled in the art may set other preset conditions according to actual situations, and the embodiment of the present invention is not limited in detail herein.
In Practical applications, the Consensus mechanism of the commodity record block chain may be a Byzantine Consensus algorithm such as Byzantine Fault Tolerance algorithm (BFT), Practical Byzantine Fault Tolerance (PBFT), Federal Byzantine Agreement (FBA), authorized Byzantine Fault Tolerance algorithm (DBFT), etc., or may be a Proof of workload (POW) algorithm, a Proof of equity (Proof of equity of stos POS), a rayleigh Consensus mechanism (Ripple Consensus), an authorized equity Proof of equity (deferred Proof of equity of stos, DPOS), a transaction-based equity Proof mechanism (Transactions of stos, POS), or may be other Consensus mechanisms, for example, which are not limited herein.
Illustratively, when the commodity record block chain is implemented as a federation chain, the consensus mechanism of the commodity record block chain may be implemented by using a byzantine consensus algorithm.
S206: the transaction promotion node acquires a commodity record from the commodity record block chain;
s207: the transaction promotion node conducts promotion and drainage on the obtained commodity records;
here, the commodity record acquired by the transaction promotion node is a commodity record in the commodity record block chain issued by the seller node and stored by the commodity audit consensus node, and is used for indicating that the seller node initiates a commodity transaction. The transaction promotion node is a block chain node for promoting and guiding the commodity records issued by the seller node after the commodity records are written into the commodity record block chain, so that the buyer generates the block chain node of the purchase intention, namely the effective commodity transaction initiated by the seller is confirmed.
Specifically, in order to enable the buyer to know the commodity transaction initiated by the seller more quickly so as to respond to the commodity transaction initiated by the seller more quickly, the transaction promotion node may monitor the commodity record block chain, and when a new commodity record written into the block chain through consensus appears in the commodity record block chain, the transaction promotion node may read the commodity record from the commodity record block chain. Then, the transaction promotion node can perform drainage promotion on the commodity record after acquiring the commodity record, so that the buyer can see the commodity record in each drainage channel, and thus, when the buyer needs to purchase a commodity object, the buyer can respond to the commodity transaction by issuing a commodity transfer record by using the buyer node.
In another embodiment of the invention, in order to acquire the commodity record more quickly and facilitate commodity promotion more quickly, the transaction promotion party can set the trusted commodity audit consensus node through the transaction promotion node in a targeted manner, and then the transaction promotion node can selectively monitor the trusted commodity audit consensus node. Then, in a specific implementation process, the step S206 may include: monitoring whether a commodity audit consensus node generates a new block on a commodity record block chain or not; and if so, acquiring a commodity record which is used for initiating commodity transaction and is issued by the seller node and stored in the new block.
In a specific implementation process, when the drainage promotion of the commodity record is implemented by publishing the commodity promotion page, the above S207 may include: generating a corresponding commodity promotion page based on the commodity record; and issuing the commodity promotion page through a preset promotion drainage channel so that the buyer node issues a commodity transfer record aiming at the commodity record based on the commodity promotion page to respond to the commodity transaction initiated by the seller node.
Here, the promotion drainage channel refers to an all-around diversified drainage promotion platform owned by a transaction promotion party, such as social software, web advertisements, and the like, and is not limited to the drainage channel provided by the conventional e-commerce transaction platform.
In another embodiment of the present invention, since the buyer node can only broadcast its own goods transfer record, and often the number of goods objects sold by a seller is large, after the seller issues the goods record through the seller node, there are usually many different buyers purchasing the goods objects corresponding to the goods record, and thus many different buyer nodes issue the goods transfer record one by one, which may cause the seller to receive the broadcast message frequently and may affect the speed of writing the goods transfer record into the transaction record block chain. Then, in order to reduce the number of times of broadcasting information in the blockchain, reduce the resource consumption of the blockchain system, and accelerate the commodity transaction speed, the transaction promoting party can collect commodity transfer records of a plurality of buyers generated by the drainage channels of the transaction promoting party through the transaction promoting party node, and then the transaction promoting party can pack and broadcast the commodity transfer records to the seller node. Then, in a specific implementation process, when the commodity record is promoted in a drainage manner by publishing a commodity promotion page, after S207, the method may further include: receiving commodity transfer records from each buyer node through a commodity promotion page, wherein the commodity transfer records are used for responding to commodity transactions initiated by a seller node; and broadcasting the commodity transfer record to each seller node.
S208: the buyer node obtains the commodity transfer record;
here, the buyer node is a block link point responding to a commodity transaction initiated by the seller node, and refers to a block link point corresponding to the buyer. The goods transfer record obtained by the purchaser node is used for responding to the goods transaction initiated by the seller node through the issuing of the goods record, namely for indicating the goods transaction responded by the purchaser node, so as to indicate the purchasing demand of the purchaser to the seller, and enable the seller to perform transaction confirmation on the goods transaction responded by the purchaser node through the seller node. The commodity records issued by the seller nodes are stored in the commodity record block chain by the commodity audit consensus node and are promoted and guided by the transaction promotion node.
Specifically, the article transfer record is mainly used to record what kinds of article objects are transferred from which seller to which buyer. Thus, the goods transfer record may include the goods content of the goods object, the purchase quantity information, the address information of the purchaser, the address information of the transaction promotion node, the address information of the seller, and the like.
In practical applications, when the buyer needs to purchase the commodity object, the buyer node obtains a commodity transfer record corresponding to the commodity record issued by the seller, and then, in a specific implementation process, the step S208 may include: receiving transaction response information input by a purchaser through a commodity promotion page which is published by a transaction promotion node and corresponds to a commodity record published by a seller node; and generating a commodity transfer record based on the transaction response information and the commodity record.
Here, the transaction response information may include: the information of the purchase quantity of the commodity object, the address information of the purchaser, the address information of the transaction promotion node and the like. Of course, other information required for responding to the commodity transaction may also be included, and the embodiment of the present invention is not particularly limited herein.
For example, after the transaction promotion node publishes a commodity promotion page generated for a commodity record published by the seller node through a drainage promotion channel, when a purchaser needs to purchase a commodity object corresponding to the commodity record, the purchaser may input transaction response information through the commodity promotion page, for example, by clicking the commodity promotion page, skipping to a placing page, directly placing a sheet on the commodity promotion page, and the like, so that the purchaser node may receive the transaction response information input by the purchaser. Further, a commodity transfer record may be generated for responding to the commodity transaction.
S209: the purchaser node sends the commodity transfer record to the seller node;
specifically, for the commodity transfer record issued by the buyer node, only when the commodity transfer record passes through the transaction confirmation of the seller node and is written into the commodity record block chain by each transaction record consensus node, other nodes can determine that the commodity transfer record is confirmed and is true and valid, at this time, it indicates that the commodity transaction responded by the buyer node is valid, and then the logistics party provides corresponding logistics service for the commodity transaction. Therefore, when the purchaser needs to purchase the commodity object, the purchaser can send the commodity transfer record to the seller node through the purchaser node for transaction confirmation, so that the seller node forwards the commodity transfer record to each transaction verification consensus node for consensus verification after the commodity transfer record passes the transaction confirmation, and each transaction verification consensus node stores the commodity transfer record into the transaction record block chain after the commodity transfer record passes the consensus verification, thereby realizing the response to the commodity transaction initiated by the seller node.
In practical applications, since the transaction record blockchain may include: the seller node, the buyer node, the transaction verification consensus node and the transaction promotion node, so that each buyer node can broadcast the commodity transfer record to other block link nodes in the transaction record block link, such as the seller node, so that the seller node can confirm the transaction of the commodity transfer record.
Then, when the purchaser node sends the goods transfer record to the seller node in a broadcast manner, in order to ensure the safety and integrity of the information stored in the block chain and facilitate the seller node to confirm the goods transfer record, the step S209 may include: step B1: based on the private key of the buyer node, performing signature processing on the commodity transfer record to obtain a signature of the buyer node for the commodity transfer record; step B2: the goods record, the signature of the purchaser node for the goods transfer record, and a public key corresponding to the private key of the purchaser node are broadcast to the seller node.
In a specific implementation process, the step B1 may include: carrying out Hash calculation on the commodity transfer record to obtain a Hash value of the commodity transfer record; and encrypting the hash value of the commodity transfer record by using the private key of the buyer node to generate a signature of the buyer node for the commodity transfer record.
In practical applications, the hash algorithm used in the hash calculation may be SHA256, SHA 512, ripemm 16, and the like, and the embodiment of the present invention is not limited specifically herein.
S210: a seller node receives a commodity transfer record;
s211: the seller confirms the transaction of the received commodity transfer record;
here, the commodity transfer record received by the seller node is a commodity transfer record issued by the buyer node, indicating a commodity transaction initiated by the seller node and responded by the buyer node, and being capable of indicating a purchase demand of the buyer.
Specifically, when the buyer needs to purchase the commodity object sold by the seller, the buyer issues a commodity transfer record through the buyer node in order to make the seller know the purchase intention of the buyer, so as to respond to the commodity transaction initiated by the seller node, and thus, the seller node receives the commodity transfer record issued by the buyer node, that is, the seller node receives the response of the buyer node to the commodity transaction initiated by the seller node. Next, in order to confirm whether the seller can perform a commodity transaction with the purchaser, that is, whether the commodity transaction responded by the purchaser node can be performed, the seller node needs to perform a transaction confirmation on the received commodity transfer record.
In a specific implementation process, according to a difference of a distribution manner of the commodity transfer record, the above S210 may exist but is not limited to include the following two cases:
in case one, to reduce the participation of the intermediate nodes and reduce the transaction commission, the purchaser node may send the goods transfer record directly to the seller node. Then, in a specific implementation process, the step S210 may include: and receiving the commodity transfer record sent by the buyer node.
In a second case, in order to reduce the number of times of broadcasting information in the blockchain and reduce the resource consumption of the blockchain system, the purchaser node may send the commodity transfer record to the transaction promotion node first, and then the transaction promotion node forwards the commodity transfer record to the seller node, at this time, the transaction promotion node may collect the commodity transfer records issued by each purchaser node, and then pack and forward a plurality of commodity transfer records to the seller node, so that the seller node may receive a plurality of commodity transfer records of different purchaser nodes at a time. Then, in a specific implementation process, the step S210 may include: and receiving the commodity transfer record from the buyer node forwarded by the transaction promotion node.
In a specific implementation process, in order to ensure the safety and integrity of the information stored in the block chain and facilitate the seller to confirm the transaction of the commodity transfer record, when the buyer node or the transaction promotion node sends the commodity transfer record in a broadcast manner, the step S210 may include: the seller node receives the goods transfer record broadcasted by the buyer node or the transaction promotion node, the signature of the buyer node for the goods transfer record and the public key corresponding to the private key of the buyer node.
Further, in a specific implementation process, the step S211 may include: step C1: the seller node determines whether the seller information contained in the commodity transfer record is consistent with the seller information corresponding to the seller node stored in advance; step C2: if the two commodities are consistent, the seller node determines whether commodity transaction can be carried out or not based on the commodity transfer record and the prestored commodity inventory information.
Specifically, first, after the seller node receives the commodity transfer record issued by the buyer node, in order to determine whether the seller corresponding to the seller node qualifies for the commodity transaction with the buyer corresponding to the buyer node, the seller node needs to determine whether the commodity transfer record belongs to itself, that is, whether the commodity transfer record is used for responding to the commodity transaction initiated by itself. If the seller information contained in the received commodity transfer record is determined to be consistent with the seller information corresponding to the seller node stored in advance, the commodity transfer record received by the seller node is indicated to be used for responding to the commodity record issued by the seller node, and at the moment, the seller node is qualified to perform transaction confirmation on the commodity transfer record. If the seller information contained in the received commodity transfer record is determined to be inconsistent with the seller information corresponding to the seller node which is stored in advance, the commodity transfer record received by the seller node is not used for responding to the commodity record issued by the seller node, and at the moment, the seller node is not qualified to carry out transaction confirmation on the commodity transfer record.
Then, after the seller node determines that the received commodity transfer record is used for responding to the commodity transaction initiated by itself, it needs to determine whether the seller corresponding to the seller node has the capability of conducting commodity transaction with the buyer corresponding to the buyer node, and then the seller node needs to determine whether the seller has enough commodity objects to conduct commodity transaction with the buyer according to the current commodity inventory information. If the seller node determines that the quantity of the available commodities in the current commodity inventory information cannot meet the quantity of the commodities in the commodity transfer record, the seller node indicates that the seller does not have enough commodity objects to conduct commodity transaction with the buyer, and at the moment, the seller node can determine that the commodity transaction responded by the buyer node cannot be conducted; if the number of the available commodities in the current commodity inventory information can meet the number of the commodities in the commodity transfer record, it indicates that the seller has enough commodity objects to conduct commodity transaction with the buyer, and at this time, the seller node can determine that the commodity transaction responded by the buyer node can be conducted.
Further, when the article transfer record is transmitted in a broadcast manner, the step C1 may include: the seller node carries out validity verification on the commodity transfer record based on the received commodity transfer record, the signature of the buyer node aiming at the commodity transfer record and a public key corresponding to a private key of the buyer node; after the validity verification is passed, the seller node confirms whether the seller information contained in the commodity transfer record is consistent with the seller information corresponding to the seller node stored in advance.
In a specific implementation process, the verifying the validity of the received commodity transfer record issued by the buyer node by the seller node may include: and auditing the items of whether the identity of the purchaser node is legal, whether the commodity transfer record is tampered in the transmission process, whether the format and/or the content of the commodity transfer record meet preset conditions and the like. Therefore, if the verification result obtained by the seller node is that the identity of the buyer node is legal, the commodity transfer record is not tampered in the transmission process, and the format and/or the content of the commodity transfer record meet the preset conditions, the seller node can determine that the received commodity transfer record passes the validity verification. Next, the seller node may determine whether the seller corresponding to the seller node qualifies for the commodity transaction with the purchaser corresponding to the purchaser node by comparing whether the seller information included in the commodity transfer record matches the seller information corresponding to the seller node stored in advance.
Specifically, the seller's validity verification of the goods transfer record it receives issued by the buyer's node may exist but includes, but is not limited to, the following three steps:
the first step is as follows: the seller node may first determine whether the identity of the purchaser node is legitimate based on the received signature of the purchaser node for the goods transfer record and a public key corresponding to the private key of the purchaser node.
Specifically, the seller node may decrypt the signature of the received buyer node for the commodity transfer record by using the public key of the received buyer node, and if the decryption is successful and the original hash value corresponding to the commodity transfer record is obtained, the seller node may determine that the identity of the buyer node is legal; if the decryption fails, the seller node may determine that the identity of the purchaser node is illegal, and may directly determine that the goods transfer record fails the validity verification.
The second step is that: when the seller node determines that the identity of the purchaser node is legal, the seller node may determine whether the goods transfer record is tampered with based on the hash value of the goods transfer record obtained through decryption and the hash value of the goods transfer record obtained through current calculation.
Specifically, the seller node may perform hash calculation on the received commodity transfer record to generate a current hash value of the commodity transfer record, and if the original hash value corresponding to the commodity transfer record obtained through decryption is the same as the current hash value of the commodity transfer record obtained through calculation, the seller node may determine that the commodity transfer record is not tampered in the transmission process; if the goods transfer records are not identical, the seller node can determine that the goods transfer records are tampered in the transmission process, and then can directly determine that the goods transfer records do not pass the validity verification.
And thirdly, after the seller node confirms that the commodity transfer record is not tampered in the transmission process, the seller node can examine whether the format and/or the content of the commodity transfer record meet preset conditions.
Here, the preset condition is used to indicate a relevant condition necessary for responding to a commodity transaction. The commodity transfer records meeting the preset conditions can respond to commodity transactions, and the commodity transfer records not meeting the preset conditions cannot respond to commodity transactions.
In practical applications, the preset condition may be whether the commodity transfer record includes commodity contents of the commodity object, whether the commodity transfer record includes purchase quantity information of the commodity object, and whether the commodity transfer record includes address information of a purchaser, address information of a transaction promotion node, address information of a seller, and the like. Of course, a person skilled in the art may set the preset condition as other conditions according to the actual situation, and the embodiment of the present invention is not limited in detail herein.
S212: the seller node forwards the commodity transfer record confirmed by the transaction to each transaction verification consensus node;
specifically, for the commodity transfer record issued by the buyer node and confirmed by the transaction of the seller node, only when the commodity transfer record is written into the transaction record block chain by each transaction verification consensus node, other nodes can determine that the commodity transfer record is confirmed and is authentic and valid, at this time, the commodity transaction responded by the buyer node and confirmed by the seller node is indicated to be valid, and then the logistics party provides corresponding logistics service for the commodity transaction. Therefore, when the seller can sell the commodity object to the purchaser, namely after the seller node determines that the commodity transfer record passes the transaction confirmation, the seller node can forward the commodity transfer record to each transaction verification consensus node for consensus verification, so that each transaction verification consensus node stores the commodity transfer record into the transaction record block chain after passing the commodity transfer record consensus verification.
In practical applications, since the transaction record blockchain may include: each seller node can broadcast the commodity transfer record to other block chain nodes in the transaction record block chain, such as each transaction verification consensus node, so that each transaction verification consensus node performs consensus verification on the commodity transfer record.
Then, when the seller node forwards the commodity transfer record to each transaction verification consensus node in a broadcast manner, in order to ensure the security and integrity of the information stored in the block chain and facilitate the transaction verification consensus nodes to perform consensus verification on the commodity transfer record, in a specific implementation process, the step S212 may include: step D1: based on the private key of the seller node, performing signature processing on the commodity transfer record to obtain the signature of the seller node for the commodity transfer record; step D2: and broadcasting the commodity transfer record, the signature of the seller node for the commodity transfer record, the public key corresponding to the private key of the seller node, the signature of the buyer node for the commodity transfer record and the public key corresponding to the private key of the buyer node to each transaction verification consensus node.
In a specific implementation process, the step D1 may include: carrying out Hash calculation on the commodity transfer record to obtain a Hash value of the commodity transfer record; and encrypting the hash value of the commodity transfer record by adopting a private key of the seller node to obtain a signature of the seller node for the commodity transfer record.
In practical applications, the hash algorithm used in the hash calculation may be SHA256, SHA 512, ripemm 16, and the like, and the embodiment of the present invention is not limited specifically herein.
S213: the transaction verification consensus node receives a commodity transfer record sent by the seller node;
s214: the transaction verification consensus node performs consensus verification on the received commodity transfer record;
s215: the transaction verification consensus node stores the commodity transfer record passing the consensus verification into a transaction record block chain;
here, the goods transfer record received by the transaction verification consensus node is a goods transfer record issued by the purchaser node and confirmed by the seller node's transaction for indicating the goods transaction initiated by the seller node, responded by the purchaser node and confirmed by the seller node. The transaction verification consensus node is a block chain node used for performing consensus verification on the commodity transfer record received by the transaction verification consensus node so as to determine whether the commodity transaction confirmed by the seller node is valid.
Specifically, for the commodity transfer record issued by the purchaser node and confirmed by the transaction of the seller node, only if the commodity transfer record is written into the transaction record block chain by each transaction verification consensus node, the logistics party can determine that the commodity transaction responded by the purchaser node and confirmed by the seller node is valid, and thus the logistics party can provide corresponding logistics service for the commodity transaction. Then, when the seller can sell the commodity object to the buyer, the transaction verification consensus node receives the commodity transfer record sent by the seller node, and then the transaction verification consensus node performs consensus verification on the commodity transfer record, and only stores the commodity transfer record into the transaction record block chain after the commodity transfer record passes the consensus verification, that is, at this time, the commodity transaction initiated by the seller node, responded by the buyer node and confirmed by the seller node is confirmed, and then the logistics node can obtain the logistics record of the commodity object corresponding to the commodity transfer record, and store the logistics record into the logistics record block chain after the logistics record passes the consensus verification.
In a specific implementation process, when the seller node forwards the commodity transfer record issued by the buyer node and confirmed by the transaction in a broadcast manner, in order to ensure the safety and integrity of the information stored in the block chain and facilitate the consensus verification of the commodity transfer record by each transaction verification consensus node, the S213 may include: and receiving the commodity transfer record broadcasted by the seller node, the signature of the seller node for the commodity transfer record, the public key corresponding to the private key of the seller node, the signature of the buyer node for the commodity transfer record and the public key corresponding to the private key of the buyer node.
Further, when the seller node forwards the goods transfer record issued by the buyer node and confirmed by the transaction in a broadcast manner, the step S214 may include: performing validity verification on the commodity transfer record based on the commodity transfer record, the signature of the seller node for the commodity transfer record, a public key corresponding to a private key of the seller node, the signature of the buyer node for the commodity transfer record and a public key corresponding to a private key of the buyer node; and after the validity verification is passed, the commodity transfer records are identified according to the identification mechanism of the transaction record block chain.
In a specific implementation process, the validity verification of the commodity transfer record forwarded by the seller node by each transaction verification consensus node may include: and auditing the items of whether the identity of the seller node is legal, whether the identity of the buyer node is legal, whether the commodity transfer record is tampered in the transmission process, whether the format and/or the content of the commodity transfer record meet preset conditions and the like. In this way, if the verification result obtained by each transaction verification consensus node is that the identity of the seller node is legal, the identity of the buyer node is legal, the commodity transfer record is not tampered in the transmission process, and the format and/or content of the commodity transfer record meet the preset conditions, each transaction verification consensus node can determine that the received commodity transfer record passes the validity verification. Furthermore, according to the consensus mechanism of the transaction record block chain, each transaction verification consensus node can achieve consensus on the commodity transfer record, so that after the commodity transfer record passes the consensus, one transaction verification consensus node can store the commodity transfer record into the transaction record block chain.
Specifically, the validity verification of the commodity transfer record received by the transaction verification consensus node may exist but is not limited to the following four steps:
the first step is as follows: the transaction verification consensus node may determine whether the identity of the seller node is legitimate based on the received public key corresponding to the seller node's private key and the seller node's signature for the goods transfer record.
Specifically, the transaction verification consensus node may decrypt the signature of the received seller node for the commodity transfer record by using the public key of the seller node received by the transaction verification consensus node, and if the decryption is successful, the original hash value corresponding to the commodity transfer record is obtained, and then the transaction verification consensus node may determine that the identity of the seller node is legal; if the decryption fails, the transaction verification consensus node can determine that the identity of the seller node is illegal, and then can directly determine that the commodity transfer record fails the validity verification.
The second step is that: when the transaction verification consensus node determines that the identity of the seller node is legal, the transaction verification consensus node may determine whether the identity of the buyer node is legal based on the received signature of the buyer node for the commodity transfer record and a public key corresponding to a private key of the buyer node.
Specifically, the transaction verification consensus node may decrypt the signature of the received purchaser node for the commodity transfer record by using the public key of the purchaser node received by the transaction verification consensus node, and if the decryption is successful and the original hash value corresponding to the commodity transfer record is obtained, the transaction verification consensus node may determine that the identity of the purchaser node is legal; if the decryption fails, the transaction verification consensus node can determine that the identity of the purchaser node is illegal, and then can directly determine that the commodity transfer record fails the validity verification.
The third step: when the transaction verification consensus node determines that the identities of the seller node and the buyer node are legal, the transaction verification consensus node may determine whether the commodity transfer record is tampered or not based on the hash value of the commodity transfer record obtained through decryption and the hash value of the commodity transfer record obtained through current calculation.
Specifically, the transaction verification consensus node may perform hash calculation on the received commodity transfer record to generate a current hash value of the commodity transfer record, and if the original hash value corresponding to the commodity transfer record obtained through decryption is the same as the current hash value of the commodity transfer record obtained through calculation, the transaction verification consensus node may determine that the commodity transfer record is not tampered in the transmission process; if the commodity transfer record is not the same as the commodity transfer record, the transaction verification consensus node can determine that the commodity transfer record is tampered in the transmission process, and then can directly determine that the commodity transfer record does not pass the validity verification.
And fourthly, when the transaction verification consensus node determines that the commodity transfer record is not tampered in the transmission process, the transaction verification consensus node can check whether the format and/or the content of the commodity transfer record meet preset conditions.
Here, the preset condition is used to indicate a relevant condition necessary for responding and confirming the commodity transaction. The commodity records meeting the preset conditions can respond to and confirm commodity transaction, and the commodity records not meeting the preset conditions cannot respond to and confirm commodity transaction.
In practical applications, the preset condition may be whether the commodity transfer record includes commodity contents of the commodity object, whether the commodity transfer record includes purchase quantity information of the commodity object, and whether the commodity transfer record includes address information of a purchaser, address information of a transaction promotion node, address information of a seller, and the like. Of course, a person skilled in the art may set other preset conditions according to actual situations, and the embodiment of the present invention is not limited in detail herein.
In practical applications, the consensus mechanism of the transaction record block chain may be a byzantine consensus algorithm, such as BFT, PBFT, etc., or a POW algorithm, or of course, other consensus algorithms, such as a POS algorithm, a DPOS algorithm, or a combination of the foregoing algorithms may also be used, and the embodiment of the present invention is not limited in detail herein.
For example, when the transaction record block chain is implemented as a public chain, the common mechanism of the transaction record block chain may be implemented by using a POW algorithm.
S216: the logistics consensus node acquires a commodity transfer record from the transaction record block chain;
s217: the logistics consensus node acquires a logistics record corresponding to the commodity transfer record;
s218: the logistics consensus node performs consensus verification on the logistics records;
s219: and the logistics consensus node stores the logistics record passing the consensus verification into a logistics record block chain.
The commodity transfer record obtained by the logistics consensus node is issued by the purchaser node, confirmed through the transaction of the seller node, and stored into the commodity transfer record in the transaction record block chain by the transaction verification consensus node, and is used for indicating the commodity transaction initiated by the seller node, responded by the purchaser node and confirmed by the seller node. The logistics consensus node is a block chain node which can acquire the logistics record of the commodity object corresponding to the commodity transfer record after the commodity transfer record issued by the purchaser node and confirmed through the transaction of the seller node is written into the transaction record block chain, and perform consensus verification on the acquired logistics record to determine whether the logistics record is valid.
In practical applications, the logistics record may include shipping record, tracing record, signing record, and other information. The delivery record can include a commodity transfer record, address information of a seller, description information of a commodity object, delivery time information, information of an initial logistics network and the like; the source tracing records can comprise commodity transfer records, transit point information of commodity objects, transit point information of the commodity objects, transit time information and the like; the receipt record may include address information of the purchaser, distribution logistics site information, receipt time information, etc. Here, the embodiments of the present invention are not particularly limited.
Specifically, in order to enable the logistics party to provide corresponding logistics services for the commodity transaction achieved by the two transaction parties, after the commodity transaction is determined to be carried out between the buyer and the seller, the logistics consensus node can acquire the commodity transfer record from the transaction record block chain. Next, after the logistics party provides the corresponding logistics service, the logistics node can obtain the logistics record of the commodity object corresponding to the commodity transfer record, and after the logistics record passes the consensus verification, the logistics record is stored in the logistics record block chain.
In a specific implementation process, the step S217 may include: the logistics consensus node determines whether logistics party information contained in the commodity transfer record is consistent with logistics party information corresponding to a pre-stored logistics node; and if the commodity transfer records are consistent, the commodity flow consensus node acquires the commodity flow records of the commodity objects corresponding to the commodity transfer records.
Specifically, first, after the logistics node obtains the commodity transfer record, in order to determine whether the logistics party corresponding to the logistics node has the qualification of providing the logistics service for the transaction parties corresponding to the commodity transfer record, the logistics node needs to determine whether the logistics party specified in the commodity transfer record is the logistics party corresponding to the logistics node. If it is determined that the logistics party information included in the received commodity transfer record is consistent with the logistics party information corresponding to the pre-stored logistics node, it is indicated that the logistics party corresponding to the logistics node is specified in the commodity transfer record acquired by the logistics node to provide the logistics service, that is, the logistics party corresponding to the logistics node is qualified to provide the logistics service to the transaction parties corresponding to the acquired commodity transfer record, and then, after the logistics service is provided, the logistics node can acquire the logistics record of the commodity object corresponding to the commodity transfer record. If the logistics party information contained in the received commodity transfer record is determined to be inconsistent with the logistics party information corresponding to the pre-stored logistics node, it is indicated that the logistics party corresponding to the logistics node is not qualified to provide logistics service for the transaction parties corresponding to the acquired commodity transfer record, and at this time, the logistics node does not acquire the logistics record of the commodity object corresponding to the commodity transfer record.
S220: the buyer node generates a transaction result record based on the commodity transfer record and the corresponding commodity record;
s221: the purchaser node sends the transaction result record to each transaction verification consensus node;
the transaction result record may be a confirmation purchase record for indicating that the commodity transaction is successful, or may be a transaction cancel record for indicating that the commodity transaction is failed. Of course, other types of records that are capable of representing the outcome of a transaction are also possible. Here, the embodiments of the present invention are not particularly limited.
In practical applications, the confirmed purchase record may include the amount of digital money paid, transaction commission information, contents information of the commodity object, evaluation information of the commodity object, address information of the purchaser, address information of the seller, and the like. The transaction cancellation record may include content information of the commodity object, evaluation information of the commodity object, address information of the purchaser, address information of the seller, and the like. The method can be set by a person skilled in the art according to practical situations, and the embodiments of the present invention are not limited in detail herein.
Specifically, when the purchaser confirms the object of the commodity, the purchaser can generate a corresponding confirmed purchase record according to the commodity transfer record and the corresponding commodity record through the purchaser node, and then, in order to let each party know that the commodity transaction is successful and pay corresponding digital money to each party, the purchaser node sends the confirmed purchase record to each transaction verification consensus node for consensus verification, so that each transaction verification consensus node stores the confirmed purchase record into the transaction record block chain after the confirmation of the purchase record is verified, and thus, each party related to the commodity transaction can take corresponding data money according to the confirmed purchase record, such as the transaction verification consensus node obtains the due commission fee, the seller node obtains the due payment of the commodity, and the like.
Or, when the purchaser refuses to sign for the commodity object, the purchaser can generate a corresponding transaction cancel record according to the commodity transfer record and the corresponding commodity record through the purchaser node, so that the logistics party provides logistics service corresponding to the returned goods for the logistics party. Then, in order to let each party know that the commodity transaction failed, the purchaser node sends the transaction cancellation record to each transaction verification consensus node for consensus verification, so that each transaction verification consensus node stores the transaction cancellation record into the transaction record block chain after passing the transaction cancellation record consensus verification.
In another embodiment of the present invention, when the purchaser node sends the transaction result record to each transaction verification consensus node in a broadcast manner, the step S221 may include: step E1: based on the private key of the purchaser node, performing signature processing on the transaction result record to obtain a signature of the purchaser node for the transaction result record; step E2: and broadcasting the transaction result record, the signature of the purchaser node for the transaction result record and a public key corresponding to the private key of the purchaser node to each transaction verification consensus node.
In a specific implementation process, the step E1 may include: performing hash calculation on the transaction result record to obtain a hash value of the transaction result record; and encrypting the hash value of the transaction result record by using a private key of the purchaser node to generate a signature of the purchaser node for the transaction result record.
In practical applications, the hash algorithm used in the hash calculation may be SHA256, SHA 512, ripemm 16, and the like, and the embodiment of the present invention is not limited specifically herein.
S222: the transaction verification consensus node receives a transaction result record sent by the purchaser node;
s223: the transaction verification consensus node performs consensus verification on the received transaction result record;
s224: and the transaction verification consensus node stores the transaction result record passing the consensus verification into the transaction record block chain.
The transaction result record may be a confirmation purchase record for indicating that the commodity transaction is successful, or may be a transaction cancel record for indicating that the commodity transaction is failed. Of course, other types of records that are capable of representing the outcome of a transaction are also possible. Here, the embodiments of the present invention are not particularly limited.
Here, the transaction verification consensus node may also perform consensus verification on the transaction result record received by the transaction verification consensus node to determine whether the transaction result record is valid.
Specifically, for the transaction result record issued by the purchaser, only when the transaction result record is written into the transaction record block chain by each transaction verification consensus node, each party can know the transaction result corresponding to the commodity transaction performed between the seller and the purchaser, and further, can obtain the digital currency which should be obtained by the seller participating in the commodity transaction. Then, when the purchaser confirms and refuses to receive the goods and wants to issue the transaction result record, the transaction verification consensus node will receive the transaction result record sent by the purchaser node, and then the transaction verification consensus node will perform consensus verification on the transaction result record, and only after the transaction result record passes the consensus verification, the transaction result record is stored in the transaction record block chain. At this point, the transaction process of the buyer and seller dimension is completed.
In another embodiment of the present invention, when the buyer node sends the transaction result record to the transaction verification consensus node in a broadcast manner, the step S222 may include: the transaction verification consensus node receives a transaction result record broadcast by the purchaser node, a signature of the purchaser node for the transaction result record, and a public key corresponding to a private key of the purchaser node.
Further, when the purchaser node transmits the transaction result record transaction verification consensus node in a broadcast manner, the step S223 may include: verifying the validity of the transaction result record based on the transaction result record, the signature of the purchaser node for the transaction result record and a public key corresponding to the private key of the purchaser node; after the validity verification is passed, the transaction result records are identified according to the identification mechanism of the transaction record block chain.
In a specific implementation process, the legality verification of the transaction result record sent by the purchaser node by each transaction verification consensus node may include: and auditing whether the identity of the purchaser node is appropriate, whether the transaction result record is tampered in the transmission process, whether the format and/or the content of the transaction result record meet preset conditions and the like. In this way, if the verification result obtained by each transaction verification and consensus node is that the identity of the purchaser node is legal, the transaction result record is not tampered in the transmission process, and the format and/or content of the transaction result record meet the preset conditions, each transaction verification and consensus node can determine that the received transaction result record passes the validity verification. Furthermore, according to the consensus mechanism of the transaction record block chain, each transaction verification consensus node can achieve consensus on the transaction result record, so that after the transaction result record passes the consensus, one transaction verification consensus node can store the transaction result record into the transaction record block chain.
Specifically, the validity verification of the transaction result record received by the transaction verification consensus node may exist but is not limited to the following four steps:
the first step is as follows: the transaction verification consensus node may determine whether the identity of the purchaser node is legitimate based on the received signature of the purchaser node for the transaction result record and a public key corresponding to the private key of the purchaser node.
Specifically, the transaction verification consensus node may decrypt the signature of the received purchaser node for the transaction result record by using the public key of the purchaser node received by the transaction verification consensus node, and if the decryption is successful and the original hash value corresponding to the transaction result record is obtained, the transaction verification consensus node may determine that the identity of the purchaser node is legal; if the decryption fails, the transaction verification consensus node can determine that the identity of the purchaser node is illegal, and then can directly determine that the transaction result record fails the validity verification.
The second step is that: when the transaction verification consensus node determines that the identity of the purchaser node is legal, the transaction verification consensus node may determine whether the transaction result record is tampered based on the hash value of the decrypted transaction result record and the hash value of the currently calculated transaction result record.
Specifically, the transaction verification consensus node may perform hash calculation on the received transaction result record to generate a current hash value of the transaction result record, and if the original hash value corresponding to the transaction result record obtained through decryption is the same as the current hash value of the transaction result record obtained through calculation, the transaction verification consensus node may determine that the transaction result record is not tampered in the transmission process; if the transaction result record is not the same as the transaction result record, the transaction verification consensus node can determine that the transaction result record is tampered in the transmission process, and then can directly determine that the transaction result record fails to pass the validity verification.
And thirdly, when the transaction verification consensus node determines that the transaction result record is not tampered in the transmission process, the transaction verification consensus node can check whether the format and/or the content of the transaction result record meet preset conditions.
In practical applications, the preset condition may be whether the transaction result record includes evaluation information of the commodity object, or whether the transaction result record includes address information of the buyer and address information of the seller. Of course, those skilled in the art may set other preset conditions according to actual situations, such as determining whether the purchase record includes the amount of the digital currency to be paid, and the embodiment of the present invention is not limited in detail herein.
In another embodiment of the present invention, after the step S224, the method may further include: the logistics consensus node acquires a confirmation purchase record issued by the purchaser node and used for indicating that the commodity transaction is successful from the transaction record block chain, wherein the confirmation purchase record is stored in the transaction record block chain by the transaction verification consensus node; the logistics consensus node generates a corresponding signing record used for indicating the completion of logistics based on the confirmed purchase record; the logistics consensus node performs consensus verification on the signing record; and the logistics consensus node stores the signing record passing the consensus verification into a logistics record block chain.
The confirmed purchase record acquired by the logistics consensus node is a transaction result record used for indicating that the commodity transaction is successful, and is issued by the purchaser node and stored in the transaction record block chain by the transaction verification consensus node.
In practical applications, the signing record may include logistics information, commodity content, shipping record, commodity transfer record, signature of logistics node, and the like. Here, the embodiments of the present invention are not particularly limited.
Specifically, in order to complete the transaction process of the logistics party in this dimension, the logistics consensus node may monitor the transaction record blockchain, and when a confirmed purchase record newly written into the blockchain through consensus appears in the transaction record blockchain, the logistics consensus node may read the confirmed purchase record from the transaction record blockchain. Then, the logistics consensus node can generate a corresponding signing record for indicating the completion of logistics according to the purchase confirmation record, so as to perform consensus verification on the generated signing record, and store the signing record into the logistics record block chain after the signing record passes the consensus verification. At this point, the transaction process of the logistic side in this dimension is completed.
At this point, the commodity transaction process based on the blockchain is completed.
As can be seen from the above, in the transaction method based on the block chain provided in the embodiment of the present invention, in the commodity transaction process, first, in order to initiate a commodity transaction, the seller node sends a commodity record for initiating a commodity transaction to the commodity audit consensus node, and then, the commodity audit consensus node performs consensus verification on the commodity record and stores the commodity record passing the consensus verification into the commodity record block chain; secondly, the transaction promotion node carries out promotion and drainage on the commodity records issued by the seller node, and then in order to respond to the commodity transaction initiated by the seller node, the buyer node can issue a commodity transfer record aiming at the commodity records; thirdly, after the seller confirms the commodity transfer record in transaction, the transaction verification consensus node can perform consensus verification on the commodity transfer record and store the commodity transfer record passing the consensus verification into a transaction record block chain; then, the logistics consensus node can perform consensus verification on the logistics record corresponding to the commodity transfer record and store the logistics record passing the consensus verification into a logistics record block chain; and finally, after the commodity transaction is completed, the purchaser node sends a transaction result record to the transaction verification consensus node, and then the transaction verification consensus node performs consensus verification on the transaction result record and stores the transaction result record passing the consensus verification into a transaction record block chain so as to realize the completion of the commodity transaction. Therefore, in the process of realizing commodity transaction through the block chain, the transaction data related to the commodity transaction can be identified and linked up through the block chain nodes of the plurality of middle parties, namely, the plurality of middle parties can participate in the transaction without monopolizing by the e-commerce transaction platform, so that monopoly of the traditional e-commerce transaction platform can be eliminated, the reliability and stability of the commodity transaction are ensured, and the vitality of the e-commerce transaction can be increased.
Based on the same inventive concept, as an implementation of the above method, an embodiment of the present invention provides a block chain-based transaction apparatus, and in practical applications, the block chain-based transaction apparatus may be applied to a seller node.
Fig. 3 is a schematic structural diagram of a blockchain-based transaction apparatus according to an embodiment of the present invention, and referring to fig. 3, the apparatus 30 may include: an obtaining unit 301, configured to obtain a commodity record used for initiating a commodity transaction; a first sending unit 302, configured to send the commodity record to each commodity audit consensus node, so that each commodity audit consensus node stores the commodity record into a commodity record block chain after passing the commodity record consensus verification; a receiving unit 303, configured to receive a commodity transfer record issued by a buyer node, where the commodity transfer record is used to respond to a commodity transaction initiated by a seller node; a transaction confirmation unit 304, configured to perform transaction confirmation on the commodity transfer record; a second sending unit 305, configured to forward the commodity transfer record confirmed by the transaction to each transaction verification consensus node, so that each transaction verification consensus node stores the commodity transfer record into the transaction record block chain after the commodity transfer record is verified by the transaction verification consensus node.
In the embodiment of the invention, the first sending unit is used for performing signature processing on the commodity record based on the private key of the seller node to obtain the signature of the seller node for the commodity record; and broadcasting the commodity record, the signature of the seller node aiming at the commodity record and a public key corresponding to a private key of the seller node to each commodity audit consensus node.
In the embodiment of the present invention, the first sending unit is configured to perform hash calculation on the commodity record to obtain a hash value of the commodity record; and encrypting the hash value of the commodity record by using a private key of the seller node to generate a signature of the seller node for the commodity record.
In the embodiment of the invention, the obtaining unit is used for receiving commodity content, seller information and transaction commission information input by a seller; based on the commodity content, seller information and transaction commission information, a commodity record is generated.
In an embodiment of the present invention, the receiving unit is configured to receive a commodity transfer record sent by a buyer node; or receiving the commodity transfer record from the buyer node forwarded by the transaction promotion node.
In the embodiment of the invention, the transaction confirmation unit is used for determining whether seller information contained in the commodity transfer record is consistent with seller information corresponding to a prestored seller node; if the two items match, it is determined whether or not the commodity transaction can be performed based on the commodity transfer record and the commodity inventory information stored in advance.
In an embodiment of the present invention, the receiving unit is configured to receive a commodity transfer record, a signature of a buyer node for the commodity transfer record, and a public key corresponding to a private key of the buyer node; the transaction confirmation unit is used for carrying out validity verification on the commodity transfer record based on the commodity transfer record, the signature of the buyer node aiming at the commodity transfer record and a public key corresponding to a private key of the buyer node; and after the validity verification is passed, confirming whether the seller information contained in the commodity transfer record is consistent with the seller information corresponding to the prestored seller node.
In the embodiment of the present invention, the second sending unit is configured to perform signature processing on the commodity transfer record based on a private key of the seller node, so as to obtain a signature of the seller node for the commodity transfer record; and broadcasting the commodity transfer record, the signature of the seller node for the commodity transfer record, the public key corresponding to the private key of the seller node, the signature of the buyer node for the commodity transfer record and the public key corresponding to the private key of the buyer node to each transaction verification consensus node.
In the embodiment of the present invention, the second sending unit is configured to perform hash calculation on the commodity transfer record to obtain a hash value of the commodity transfer record; and encrypting the hash value of the commodity transfer record by adopting a private key of the seller node to obtain a signature of the seller node for the commodity transfer record.
Based on the same inventive concept, as an implementation of the above method, the embodiment of the present invention provides a transaction apparatus based on a block chain, which can be applied to a commodity audit consensus node in practical applications,
fig. 4 is a schematic structural diagram of a blockchain-based transaction apparatus in an embodiment of the present invention, and referring to fig. 4, the apparatus 40 may include: a receiving unit 401, configured to receive a commodity record sent by a seller node and used for initiating a commodity transaction; a consensus verification unit 402, configured to perform consensus verification on the received commodity record; the saving unit 403 is configured to store the commodity record passing the consensus verification into the commodity record block chain, so as to perform drainage promotion on the commodity record issued by the seller node through the transaction promotion node, so that the buyer node issues a commodity transfer record for the commodity record to respond to the commodity transaction initiated by the seller node.
In the embodiment of the present invention, the receiving unit is configured to receive the commodity record broadcasted by the seller node, a signature of the seller node for the commodity record, and a public key corresponding to a private key of the seller node.
In the embodiment of the invention, the consensus verification unit is used for verifying the validity of the commodity record based on the commodity record, the signature of the seller node aiming at the commodity record and a public key corresponding to a private key of the seller node; and after the validity verification is passed, carrying out consensus on the commodity records according to a consensus mechanism of the commodity record block chain.
Based on the same inventive concept, as an implementation of the method, the embodiment of the invention provides a transaction device based on a block chain, and in practical application, the transaction device based on the block chain can be applied to a transaction promotion node. Fig. 5 is a schematic structural diagram three of a block chain-based transaction apparatus according to an embodiment of the present invention, and referring to fig. 5, the apparatus 50 may include: an obtaining unit 501, configured to obtain, from a commodity record block chain, a commodity record issued by a seller node and used for initiating a commodity transaction, where the commodity record is stored in the commodity record block chain by a commodity audit consensus node; the promotion and drainage unit 502 is configured to conduct promotion and drainage on the commodity records, so that the buyer node issues a commodity transfer record for the commodity records to respond to a commodity transaction initiated by the seller node.
In the embodiment of the invention, the acquisition unit is used for monitoring whether the commodity audit consensus node generates a new block on the commodity record block chain; and if so, acquiring the commodity record stored in the new block.
In the embodiment of the invention, the promotion drainage unit is used for generating a corresponding commodity promotion page based on the commodity record; and issuing the commodity promotion page through a preset promotion flow guide channel so that the buyer node issues a commodity transfer record aiming at the commodity record based on the commodity promotion page to respond to the commodity transaction initiated by the seller node.
In other embodiments of the present invention, the apparatus further comprises: the receiving unit is used for receiving the commodity transfer records from each buyer node through the commodity promotion page, wherein the commodity transfer records are used for responding to commodity transactions initiated by a seller node; and the sending unit is used for broadcasting the commodity transfer record to each seller node.
Based on the same inventive concept, as an implementation of the foregoing method, an embodiment of the present invention provides a block chain-based transaction apparatus, which can be applied to a buyer node in practical applications, and fig. 6 is a schematic structural diagram of the block chain-based transaction apparatus in the embodiment of the present invention, and referring to fig. 6, the apparatus 60 may include: an obtaining unit 601, configured to obtain a commodity transfer record, where the commodity transfer record is used to respond to a commodity transaction initiated by a seller node through issuing a commodity record, and the commodity record is stored in a commodity record block chain by a commodity audit consensus node and is promoted and drained by a transaction promotion node; a first sending unit 602, configured to send the commodity transfer record to the seller node, so that the seller node sends the commodity transfer record to each transaction verification consensus node after the commodity transfer record passes the transaction confirmation, so that each transaction verification consensus node stores the commodity transfer record into the transaction record blockchain after the commodity transfer record passes the consensus verification; a generating unit 603, configured to generate a transaction result record based on the commodity transfer record and the corresponding commodity record, where the transaction result record is a confirmed purchase record for indicating that the commodity transaction is successful or a transaction cancel record for indicating that the commodity transaction is failed; a second sending unit 604, configured to send the transaction result record to each transaction verification consensus node, so that each transaction verification consensus node stores the transaction result record into the transaction record block chain after passing the transaction result record consensus verification.
In an embodiment of the present invention, the first sending unit is configured to perform signature processing on the commodity transfer record based on a private key of the buyer node, so as to obtain a signature of the buyer node for the commodity transfer record; the goods record, the signature of the purchaser node for the goods transfer record, and a public key corresponding to the private key of the purchaser node are broadcast to each seller node.
In the embodiment of the present invention, the first sending unit is configured to perform hash calculation on the commodity transfer record to obtain a hash value of the commodity transfer record; and encrypting the hash value of the commodity transfer record by using a private key of the buyer node to obtain a signature of the buyer node for the commodity transfer record.
In the embodiment of the present invention, the obtaining unit is configured to receive transaction response information input by a purchaser through a commodity promotion page corresponding to a commodity record issued by a seller node and issued by a transaction promotion node; and generating a commodity transfer record based on the transaction response information and the commodity record.
In an embodiment of the present invention, the second sending unit is configured to perform signature processing on the transaction result record based on a private key of the buyer node, so as to obtain a signature of the buyer node for the transaction result record; and broadcasting the transaction result record, the signature of the purchaser node for the transaction result record and a public key corresponding to the private key of the purchaser node to each transaction verification consensus node.
In the embodiment of the present invention, the second sending unit is configured to perform hash calculation on the transaction result record to obtain a hash value of the transaction result record; and encrypting the hash value of the transaction result record by using a private key of the purchaser node to obtain a signature of the purchaser node for the transaction result record.
Based on the same inventive concept, as an implementation of the foregoing method, an embodiment of the present invention provides a block chain-based transaction apparatus, in practical application, the block chain-based transaction apparatus may be applied to a transaction verification consensus node, fig. 7 is a schematic structural diagram of the block chain-based transaction apparatus in the embodiment of the present invention, and referring to fig. 7, the apparatus 70 may include: a first receiving unit 701, configured to receive a commodity transfer record sent by a seller node, where the commodity transfer record is issued by a buyer node and confirmed through a seller node transaction; a first consensus verification unit 702, configured to perform consensus verification on the commodity transfer record; the first saving unit 703 is configured to store the commodity transfer record that passes the consensus verification into the transaction record block chain, so that the logistics node stores the logistics record into the logistics record block chain after passing the logistics record consensus verification corresponding to the commodity transfer record; a second receiving unit 704, configured to receive a transaction result record sent by the purchaser node, where the transaction result record is a confirmed purchase record used for indicating that the commodity transaction is successful or a transaction cancel record used for indicating that the commodity transaction is failed; a second consensus verification unit 705, configured to perform consensus verification on the transaction result record; and a second saving unit 706, configured to save the transaction result record that passes the consensus verification into the transaction record block chain.
In an embodiment of the present invention, the first receiving unit is configured to receive an article transfer record broadcasted by a seller node, a signature of the seller node for the article transfer record, a public key corresponding to a private key of the seller node, a signature of a buyer node for the article transfer record, and a public key corresponding to a private key of the buyer node.
In the embodiment of the present invention, the first common identification verification unit is configured to perform validity verification on the commodity transfer record based on the commodity transfer record, the signature of the seller node for the commodity transfer record, the public key corresponding to the private key of the seller node, the signature of the buyer node for the commodity transfer record, and the public key corresponding to the private key of the buyer node; and after the validity verification is passed, the commodity transfer records are identified according to the identification mechanism of the transaction record block chain.
In an embodiment of the present invention, the second receiving unit is configured to receive the transaction result record broadcasted by the purchasing node, a signature of the purchasing node for the transaction result record, and a public key corresponding to a private key of the purchasing node.
In the embodiment of the present invention, the second consensus verifying unit is configured to verify the validity of the transaction result record based on the transaction result record, the signature of the purchase node for the transaction result record, and a public key corresponding to a private key of the purchase node; after the validity verification is passed, the transaction result records are identified according to the identification mechanism of the transaction record block chain.
Based on the same inventive concept, as an implementation of the foregoing method, an embodiment of the present invention provides a block chain-based transaction apparatus, in practical application, the block chain-based transaction apparatus may be applied to a logistics consensus node, fig. 8 is a schematic structural diagram six of the block chain-based transaction apparatus in the embodiment of the present invention, and referring to fig. 8, the apparatus 80 may include: a first obtaining unit 801, configured to obtain a commodity transfer record from the transaction record block chain, where the commodity transfer record is stored in the transaction record block chain by the transaction verification consensus node; a second obtaining unit 802, configured to obtain a logistics record corresponding to the commodity transfer record; a first consensus verification unit 803, configured to perform consensus verification on the logistics record; and a first storing unit 804 for storing the logistics record passing the consensus verification into the logistics record block chain.
In other embodiments of the present invention, the apparatus further comprises: the third acquisition unit is used for acquiring a confirmation purchase record used for indicating that the commodity transaction is successful from the transaction record block chain, wherein the confirmation purchase record is stored in the transaction record block chain by the transaction verification consensus node; a generating unit for generating a sign-in record for indicating the completion of the logistics service based on the confirmed purchase record; the second consensus verifying unit is used for performing consensus verification on the signing record; and the second storage unit is used for storing the signing record passing the consensus verification into the logistics record block chain.
In the embodiment of the present invention, the second obtaining unit is configured to determine whether logistics party information included in the commodity transfer record is consistent with logistics party information corresponding to a pre-stored logistics node; and if the commodity transfer records are consistent, acquiring the logistics records corresponding to the commodity transfer records.
Based on the same inventive concept, as an implementation of the method, the embodiment of the invention provides a transaction system based on a block chain. Still referring to fig. 1, the system 10 may include: a commodity recording block chain 101, a transaction recording block chain 102 and a logistics recording block chain 103; the commodity recording block chain 101 includes: seller node 1011 and commodity audit consensus node 1012, transaction record blockchain 102 includes: seller node 1021, transaction promotion node 1022, transaction verification consensus node 1023 and buyer node 1024, and the logistics record blockchain 103 includes: and a logistics consensus node 1031.
The seller node 1011 is configured to obtain a commodity record for initiating a commodity transaction; sending the commodity record to each commodity audit consensus node;
a seller node 1021 for receiving a commodity transfer record issued by the buyer node, wherein the commodity transfer record is used for responding to a commodity transaction initiated by the seller node; transaction confirmation is carried out on the commodity transfer record; the commodity transfer record confirmed by the transaction is forwarded to each transaction verification consensus node;
a commodity audit consensus node 1012, configured to receive a commodity record sent by a seller node and used for initiating a commodity transaction; carrying out consensus verification on the received commodity records; storing the commodity records passing the consensus verification into a commodity record block chain;
the transaction promotion node 1022 is configured to obtain, from the commodity record blockchain, a commodity record issued by the seller node and used for initiating a commodity transaction; carrying out popularization and drainage on the commodity records;
the buyer node 1024 is configured to obtain a commodity transfer record, where the commodity transfer record is used to respond to a commodity transaction initiated by the seller node by issuing a commodity record; sending the commodity transfer record to a seller node; generating a transaction result record based on the commodity transfer record and the corresponding commodity record, wherein the transaction result record is a confirmed purchase record used for indicating that the commodity transaction is successful or a transaction cancel record used for indicating that the commodity transaction is failed; sending the transaction result record to each transaction verification consensus node;
the transaction verification consensus node 1023 is used for receiving a commodity transfer record sent by the seller node, wherein the commodity transfer record is issued by the buyer node and confirmed by the seller node in a transaction; carrying out consensus verification on the commodity transfer record; storing the commodity transfer record passing the consensus verification into a transaction record block chain;
the logistics consensus node 1031 is used for acquiring a commodity transfer record from the transaction record block chain; acquiring a logistics record corresponding to the commodity transfer record; performing consensus verification on the logistics records; and storing the logistics record passing the consensus verification into a logistics record block chain.
Based on the same inventive concept, the embodiment of the invention provides node equipment. Fig. 9 is a schematic structural diagram of a node device in an embodiment of the present invention, and referring to fig. 9, the node device 90 includes: at least one processor 901; and at least one memory 902, bus 903 connected to processor 901; the processor 901 and the memory 902 complete communication with each other through the bus 903; the processor 901 is configured to call program instructions in the memory 902 to perform the steps of the blockchain based transaction method in one or more embodiments described above.
Accordingly, based on the same inventive concept, embodiments of the present invention further provide a processor, where the processor is configured to execute a program, where the program executes to perform the steps of the blockchain-based transaction method in one or more embodiments described above.
The Processor may be implemented by a Central Processing Unit (CPU), a MicroProcessor Unit (MPU), a Digital Signal Processor (DSP), a Field Programmable Gate Array (FPGA), or the like. The Memory may include volatile Memory in a computer readable medium, Random Access Memory (RAM), and/or nonvolatile Memory such as Read Only Memory (ROM) or Flash Memory (Flash RAM), and the Memory includes at least one Memory chip.
It should be noted that, in the embodiment of the present invention, if the blockchain-based transaction method in one or more embodiments described above is implemented in the form of a software functional module and sold or used as a standalone product, it may also be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or a part contributing to the prior art may be embodied in the form of a software product stored in a storage medium, and including several instructions for enabling a computer device (which may be a smart phone, a personal computer, a server, or a network device) to execute all or part of the methods of the embodiments of the present invention.
Accordingly, based on the same inventive concept, an embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium includes a stored program, where the program, when executed, controls a device in which the storage medium is located to execute the steps of the blockchain-based transaction method in one or more embodiments described above.
Here, it should be noted that: the above description of the embodiments of the apparatus, system, node device, or computer-readable storage medium is similar to the description of the foregoing method embodiments, and has similar advantages to the method embodiments, and for technical details that are not disclosed in the embodiments of the apparatus, system, node device, or computer-readable storage medium of the present invention, please refer to the description of the embodiments of the method of the present invention, it should be understood that for convenience of reading, details of the foregoing method embodiments are not repeated in the embodiments of the apparatus, system, node device, or computer-readable storage medium, but it should be clear that the above apparatus, system, node device, or computer-readable storage medium can correspondingly implement all the contents of the foregoing method embodiments.
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, Compact disk Read-Only Memory (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, RAM and/or non-volatile memory, such as ROM or Flash RAM. The 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. The computer-readable storage medium may be ROM, Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), magnetic Random Access Memory (FRAM), Flash Memory (Flash Memory), magnetic surface Memory, optical disc, or optical Read-Only disc; or flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium which can be used to store information and which can be accessed by a computing device; but may also be various electronic devices such as mobile phones, computers, tablet devices, personal digital assistants, etc., that include one or any combination of the above-mentioned memories. 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.
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 identical elements in the process, method, article, or apparatus that comprises the element.
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, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present invention, and are not intended to limit the present invention. Various modifications and alterations to this invention will become apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.

Claims (39)

1. A blockchain-based transaction method applied to a seller node, the method comprising:
obtaining a commodity record for initiating a commodity transaction;
sending the commodity record to each commodity audit consensus node so that each commodity audit consensus node stores the commodity record into a commodity record block chain after the commodity record consensus verification is passed;
receiving a commodity transfer record issued by a purchaser node, wherein the commodity transfer record is used for responding to a commodity transaction initiated by a seller node;
performing transaction confirmation on the commodity transfer record;
and forwarding the commodity transfer record confirmed by the transaction to each transaction verification consensus node so that each transaction verification consensus node stores the commodity transfer record into a transaction record block chain after passing the consensus verification of the commodity transfer record.
2. The method of claim 1, wherein sending the commodity record to each commodity audit consensus node comprises:
based on the private key of the seller node, performing signature processing on the commodity record to obtain the signature of the seller node for the commodity record;
and broadcasting the commodity record, the signature of the seller node aiming at the commodity record and a public key corresponding to a private key of the seller node to each commodity audit consensus node.
3. The method of claim 2, wherein the signing the commodity record based on the private key of the seller node to obtain the signature of the seller node for the commodity record comprises:
performing hash calculation on the commodity record to obtain a hash value of the commodity record;
and encrypting the hash value of the commodity record by using a private key of the seller node to generate a signature of the seller node for the commodity record.
4. The method of claim 1, wherein obtaining a record of the commodity for use in initiating a commodity transaction comprises:
receiving commodity content, seller information and transaction commission information input by a seller;
generating the record of the goods based on the content of the goods, the seller information and the transaction commission information.
5. The method of claim 1, wherein receiving the record of the transfer of the good issued by the buyer node comprises:
receiving the commodity transfer record sent by the buyer node;
or receiving the commodity transfer record from the buyer node forwarded by the transaction promotion node.
6. The method of claim 1, wherein said transaction confirmation of said item transfer record comprises:
determining whether seller information contained in the commodity transfer record is consistent with seller information corresponding to the seller node stored in advance;
and if so, determining whether the commodity transaction can be carried out or not based on the commodity transfer record and the prestored commodity inventory information.
7. The method of claim 6, wherein receiving the record of the transfer of the good issued by the buyer node comprises: receiving the goods transfer record, a signature of the purchaser node for the goods transfer record, and a public key corresponding to a private key of the purchaser node;
the determining whether seller information included in the commodity transfer record is consistent with seller information corresponding to the seller node stored in advance includes: verifying the validity of the commodity transfer record based on the commodity transfer record, the signature of the buyer node for the commodity transfer record and a public key corresponding to a private key of the buyer node; and after the validity verification is passed, confirming whether the seller information contained in the commodity transfer record is consistent with the seller information corresponding to the seller node stored in advance.
8. The method of claim 7, wherein forwarding the item transfer record validated by the transaction to each transaction verification consensus node comprises:
based on the private key of the seller node, performing signature processing on the commodity transfer record to obtain the signature of the seller node for the commodity transfer record;
and broadcasting the commodity transfer record, the signature of the seller node aiming at the commodity transfer record, a public key corresponding to a private key of the seller node, the signature of the buyer node aiming at the commodity transfer record and the public key corresponding to the private key of the buyer node to each transaction verification consensus node.
9. The method according to claim 8, wherein the signing the commodity transfer record based on the private key of the seller node to obtain the signature of the seller node for the commodity transfer record comprises:
performing hash calculation on the commodity transfer record to obtain a hash value of the commodity transfer record;
and encrypting the hash value of the commodity transfer record by adopting a private key of a seller node to obtain a signature of the seller node aiming at the commodity transfer record.
10. A transaction method based on a block chain is applied to a commodity audit consensus node, and comprises the following steps:
receiving a commodity record which is sent by a seller node and used for initiating commodity transaction;
carrying out consensus verification on the received commodity records;
and storing the commodity record passing the consensus verification into a commodity record block chain, and performing drainage promotion on the commodity record issued by the seller node through a transaction promotion node, so that the buyer node issues a commodity transfer record aiming at the commodity record to respond to the commodity transaction initiated by the seller node.
11. The method of claim 10, wherein receiving the record of the goods sent by the seller node for initiating the transaction of the goods comprises:
and receiving the commodity record broadcasted by the seller node, the signature aiming at the commodity record by the seller node and a public key corresponding to the private key of the seller node.
12. The method of claim 11, wherein the performing consensus verification on the received merchandise records comprises:
verifying the validity of the commodity record based on the commodity record, the signature of the seller node for the commodity record and a public key corresponding to a private key of the seller node;
and after the validity verification is passed, carrying out consensus on the commodity records according to a consensus mechanism of the commodity record block chain.
13. A transaction method based on a block chain is applied to a transaction promotion node, and the method comprises the following steps:
acquiring a commodity record issued by a seller node and used for initiating commodity transaction from a commodity record block chain, wherein the commodity record is stored in the commodity record block chain by a commodity audit consensus node;
and carrying out promotion and drainage on the commodity records so that the buyer node issues a commodity transfer record aiming at the commodity records to respond to the commodity transaction initiated by the seller node.
14. The method of claim 13, wherein obtaining the commodity record issued by the seller node for initiating the commodity transaction from the commodity record blockchain comprises:
monitoring whether a commodity audit consensus node generates a new block on a commodity record block chain or not;
and if so, acquiring the commodity record stored in the new block.
15. The method of claim 13, wherein said marketing diversion of said merchandise records comprises:
generating a corresponding commodity promotion page based on the commodity record;
and issuing the commodity promotion page through a preset promotion drainage channel so that the buyer node responds to the commodity transaction initiated by the seller node based on the commodity transfer record issued by the commodity promotion page and aiming at the commodity record.
16. The method of claim 15, wherein after said posting of said merchandise promotional page through a preset promotional diversion channel, said method further comprises:
receiving a commodity transfer record from each buyer node through the commodity promotion page, wherein the commodity transfer record is used for responding to a commodity transaction initiated by a seller node;
and broadcasting the commodity transfer record to each seller node.
17. A blockchain-based transaction method applied to a buyer node, the method comprising:
the method comprises the steps that a commodity transfer record is obtained, wherein the commodity transfer record is used for responding to commodity transaction initiated by a seller node through issuing a commodity record, and the commodity record is stored in a commodity record block chain by a commodity audit consensus node and is promoted and guided by a transaction promotion node;
sending the commodity transfer record to a seller node, so that the seller node sends the commodity transfer record to each transaction verification consensus node after the commodity transfer record is confirmed through transaction, and each transaction verification consensus node stores the commodity transfer record into a transaction record block chain after the commodity transfer record is verified through the transaction verification;
generating a transaction result record based on the commodity transfer record and the corresponding commodity record, wherein the transaction result record is a confirmed purchase record used for indicating that the commodity transaction is successful or a transaction cancel record used for indicating that the commodity transaction is failed;
and sending the transaction result record to each transaction verification consensus node so that each transaction verification consensus node stores the transaction result record into a transaction record block chain after passing the transaction result record consensus verification.
18. The method of claim 17, wherein said sending said goods transfer record to a seller node comprises:
signing the commodity transfer record based on the private key of the buyer node to obtain a signature of the buyer node for the commodity transfer record;
and broadcasting the commodity record, the signature of the buyer node aiming at the commodity transfer record and a public key corresponding to a private key of the buyer node to each seller node.
19. The method of claim 18, wherein said signing the record of the transfer of the item based on the private key of the purchasing node to obtain the signature of the purchasing node for the record of the transfer of the item comprises:
performing hash calculation on the commodity transfer record to obtain a hash value of the commodity transfer record;
and encrypting the hash value of the commodity transfer record by using a private key of the buyer node to obtain a signature of the buyer node for the commodity transfer record.
20. The method of claim 17, wherein obtaining a merchandise transfer record comprises:
receiving transaction response information input by a purchaser through a commodity promotion page which is published by a transaction promotion node and corresponds to a commodity record published by a seller node;
and generating the commodity transfer record based on the transaction response information and the commodity record.
21. The method of claim 17, wherein sending the transaction result record to each transaction verification consensus node comprises:
based on the private key of the buyer node, performing signature processing on the transaction result record to obtain the signature of the buyer node for the transaction result record;
and broadcasting the transaction result record, the signature of the purchaser node aiming at the transaction result record and a public key corresponding to the private key of the purchaser node to each transaction verification consensus node.
22. The method of claim 21, wherein said signing the transaction result record based on the private key of the purchasing node to obtain the signature of the purchasing node for the transaction result record comprises: performing hash calculation on the transaction result record to obtain a hash value of the transaction result record; and encrypting the hash value of the transaction result record by using a private key of the purchaser node to obtain a signature of the purchaser node for the transaction result record.
23. A transaction method based on a blockchain is applied to a transaction verification consensus node, and comprises the following steps:
receiving a commodity transfer record sent by a seller node, wherein the commodity transfer record is issued by a buyer node and confirmed through the seller node;
performing consensus verification on the commodity transfer record;
storing the commodity transfer record passing the consensus verification into a transaction record block chain, so that the logistics node stores the logistics record into the logistics record block chain after passing the consensus verification of the logistics record corresponding to the commodity transfer record;
receiving a transaction result record sent by a purchaser node, wherein the transaction result record is a confirmed purchase record used for indicating that the commodity transaction is successful or a transaction cancel record used for indicating that the commodity transaction is failed;
performing consensus verification on the transaction result record;
and storing the transaction result record passing the consensus verification into a transaction record block chain.
24. The method of claim 23, wherein receiving the record of the transfer of the goods sent by the seller node comprises: and receiving the commodity transfer record broadcasted by the seller node, the signature of the seller node for the commodity transfer record, a public key corresponding to a private key of the seller node, the signature of the buyer node for the commodity transfer record and a public key corresponding to a private key of the buyer node.
25. The method of claim 24, wherein the consensus verification of the merchandise transfer record comprises:
verifying the validity of the commodity transfer record based on the commodity transfer record, the signature of the seller node for the commodity transfer record, a public key corresponding to a private key of the seller node, the signature of the buyer node for the commodity transfer record and a public key corresponding to a private key of the buyer node;
and after the validity verification is passed, carrying out consensus on the commodity transfer record according to a consensus mechanism of the transaction record block chain.
26. The method of claim 23, wherein receiving the transaction result record sent by the purchaser node comprises: receiving the transaction result record broadcasted by a purchaser node, a signature of the purchaser node for the transaction result record, and a public key corresponding to a private key of the purchaser node.
27. The method of claim 26, wherein the consensus verification of the transaction outcome record comprises:
verifying the validity of the transaction result record based on the transaction result record, the signature of the purchaser node for the transaction result record, and a public key corresponding to a private key of the purchaser node;
and after the validity verification is passed, performing consensus on the transaction result records according to a consensus mechanism of the transaction record block chain.
28. A transaction method based on a block chain is applied to a logistics consensus node, and comprises the following steps:
acquiring a commodity transfer record from a transaction record block chain, wherein the commodity transfer record is stored in the transaction record block chain by a transaction verification consensus node;
acquiring a logistics record corresponding to the commodity transfer record;
performing consensus verification on the logistics records;
and storing the logistics record passing the consensus verification into a logistics record block chain.
29. The method of claim 28, wherein after storing the logistics record verified by consensus in a logistics record block chain, the method further comprises:
acquiring a confirmation purchase record used for indicating that the commodity transaction is successful from the transaction record blockchain, wherein the confirmation purchase record is stored in the transaction record blockchain by a transaction verification consensus node;
generating a signing record for indicating the completion of the logistics service based on the confirmed purchase record;
performing consensus verification on the signing record;
and storing the signing record passing the consensus verification into the logistics record block chain.
30. The method of claim 28, wherein the obtaining of the logistics record corresponding to the commodity transfer record comprises:
determining whether logistics party information contained in the commodity transfer record is consistent with logistics party information corresponding to the logistics node stored in advance;
and if the commodity transfer records are consistent, acquiring the logistics records corresponding to the commodity transfer records.
31. A blockchain-based transaction apparatus for use with a seller node, the apparatus comprising:
an obtaining unit, configured to obtain a commodity record used for initiating a commodity transaction;
the first sending unit is used for sending the commodity records to each commodity audit consensus node so that each commodity audit consensus node stores the commodity records into a commodity record block chain after the commodity record consensus verification is passed;
the system comprises a receiving unit, a transaction processing unit and a processing unit, wherein the receiving unit is used for receiving a commodity transfer record issued by a buyer node, and the commodity transfer record is used for responding to a commodity transaction initiated by a seller node;
the transaction confirmation unit is used for performing transaction confirmation on the commodity transfer record;
and the second sending unit is used for forwarding the commodity transfer record confirmed through the transaction to each transaction verification consensus node so that each transaction verification consensus node stores the commodity transfer record into the transaction record block chain after the commodity transfer record is verified through the consensus verification of each transaction verification consensus node.
32. A transaction device based on a blockchain is applied to a commodity audit consensus node, and the device comprises:
the receiving unit is used for receiving a commodity record which is sent by a seller node and used for initiating commodity transaction;
the consensus verification unit is used for carrying out consensus verification on the received commodity record;
and the storage unit is used for storing the commodity records which pass the consensus verification into a commodity record block chain so as to conduct drainage promotion on the commodity records issued by the seller node through the transaction promotion node, so that the buyer node issues a commodity transfer record aiming at the commodity records to respond to the commodity transaction initiated by the seller node.
33. A transaction device based on a block chain is applied to a transaction promotion node, and the device comprises:
the acquisition unit is used for acquiring a commodity record which is issued by a seller node and used for initiating commodity transaction from a commodity record block chain, wherein the commodity record is stored in the commodity record block chain by a commodity audit consensus node;
and the promotion and drainage unit is used for promoting and guiding the commodity records so that the buyer node issues the commodity transfer records aiming at the commodity records to respond to the commodity transaction initiated by the seller node.
34. A blockchain-based transaction arrangement for use at a buyer node, the arrangement comprising:
the system comprises an obtaining unit, a transaction management unit and a transaction management unit, wherein the obtaining unit is used for obtaining a commodity transfer record, the commodity transfer record is used for responding to commodity transaction initiated by a seller node through issuing a commodity record, and the commodity record is stored in a commodity record block chain by a commodity audit consensus node and is promoted and drained through a transaction promotion node;
the first sending unit is used for sending the commodity transfer record to a seller node so that the seller node sends the commodity transfer record to each transaction verification consensus node after the commodity transfer record is confirmed through transaction, and each transaction verification consensus node stores the commodity transfer record into a transaction record block chain after the commodity transfer record is verified through the transaction verification;
the generation unit is used for generating a transaction result record based on the commodity transfer record and the corresponding commodity record, wherein the transaction result record is a confirmed purchase record used for indicating commodity transaction success or a transaction cancel record used for indicating commodity transaction failure;
and the second sending unit is used for sending the transaction result record to each transaction verification consensus node so that each transaction verification consensus node stores the transaction result record into a transaction record block chain after passing the transaction result record consensus verification.
35. A blockchain-based transaction apparatus applied to a transaction verification consensus node, the apparatus comprising:
the system comprises a first receiving unit, a second receiving unit and a third receiving unit, wherein the first receiving unit is used for receiving a commodity transfer record sent by a seller node, and the commodity transfer record is issued by a buyer node and confirmed through the seller node in a transaction;
the first consensus verification unit is used for performing consensus verification on the commodity transfer record;
the first storage unit is used for storing the commodity transfer record which passes the consensus verification into the transaction record block chain, so that the logistics node stores the logistics record into the logistics record block chain after the logistics record corresponding to the commodity transfer record passes the consensus verification;
the second receiving unit is used for receiving a transaction result record sent by the purchaser node, wherein the transaction result record is a confirmed purchase record used for indicating that the commodity transaction is successful or a transaction cancel record used for indicating that the commodity transaction is failed;
the second consensus verification unit is used for performing consensus verification on the transaction result record;
and the second storage unit is used for storing the transaction result record passing the consensus verification into the transaction record block chain.
36. An electronic commerce transaction device based on a block chain is applied to a logistics consensus node, and the device comprises:
the system comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring a commodity transfer record from a transaction record block chain, and the commodity transfer record is stored in the transaction record block chain by a transaction verification consensus node;
the second acquisition unit is used for acquiring the logistics record corresponding to the commodity transfer record;
the first consensus verification unit is used for performing consensus verification on the logistics record;
and the first storage unit is used for storing the logistics record passing the consensus verification into the logistics record block chain.
37. A blockchain based transaction system, the system comprising: the system comprises a commodity recording block chain, a transaction recording block chain and a logistics recording block chain; wherein the commodity recording block chain includes: seller's node and commodity audit consensus node, the transaction record blockchain includes: seller's node, transaction popularization node, transaction verification consensus node and purchaser's node, the commodity circulation record block chain includes: a logistics consensus node;
the seller node is used for obtaining a commodity record for initiating commodity transaction; sending the commodity record to each commodity audit consensus node; the system is also used for receiving a commodity transfer record issued by the buyer node, wherein the commodity transfer record is used for responding to a commodity transaction initiated by the seller node; performing transaction confirmation on the commodity transfer record; the commodity transfer record confirmed by the transaction is forwarded to each transaction verification consensus node;
the commodity audit consensus node is used for receiving a commodity record which is sent by a seller node and used for initiating commodity transaction; carrying out consensus verification on the received commodity records; storing the commodity records passing the consensus verification into a commodity record block chain;
the transaction promotion node is used for acquiring a commodity record which is issued by the seller node and used for initiating commodity transaction from the commodity record block chain; carrying out promotion and drainage on the commodity records;
the buyer node is used for obtaining a commodity transfer record, wherein the commodity transfer record is used for responding to a commodity transaction initiated by the seller node through issuing a commodity record; sending the commodity transfer record to a seller node; generating a transaction result record based on the commodity transfer record and the corresponding commodity record, wherein the transaction result record is a confirmed purchase record used for indicating that the commodity transaction is successful or a transaction cancel record used for indicating that the commodity transaction is failed; sending the transaction result record to each transaction verification consensus node;
the transaction verification consensus node is used for receiving a commodity transfer record sent by a seller node, wherein the commodity transfer record is issued by a buyer node and confirmed by the seller node through transaction; performing consensus verification on the commodity transfer record; storing the commodity transfer record passing the consensus verification into a transaction record block chain;
the logistics consensus node is used for acquiring a commodity transfer record from the transaction record block chain; acquiring a logistics record corresponding to the commodity transfer record; performing consensus verification on the logistics records; and storing the logistics record passing the consensus verification into a logistics record block chain.
38. A computer-readable storage medium, comprising a stored program, wherein the program, when executed, controls a device on which the storage medium is located to perform the steps of the blockchain-based transaction method according to any one of claims 1 to 30.
39. A node apparatus, characterized in that the node apparatus comprises:
at least one processor;
and at least one memory, bus connected with the processor;
the processor and the memory complete mutual communication through the bus; the processor is operable to invoke program instructions in the memory to perform the steps of the blockchain based transaction method of any one of claims 1 to 30.
CN201811518168.6A 2018-12-12 2018-12-12 Transaction method, device and system based on block chain Pending CN111311253A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811518168.6A CN111311253A (en) 2018-12-12 2018-12-12 Transaction method, device and system based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811518168.6A CN111311253A (en) 2018-12-12 2018-12-12 Transaction method, device and system based on block chain

Publications (1)

Publication Number Publication Date
CN111311253A true CN111311253A (en) 2020-06-19

Family

ID=71159598

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811518168.6A Pending CN111311253A (en) 2018-12-12 2018-12-12 Transaction method, device and system based on block chain

Country Status (1)

Country Link
CN (1) CN111311253A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112017045A (en) * 2020-08-18 2020-12-01 无锡井通网络科技有限公司 Digital asset off-site transaction system and method based on block chain
CN114140239A (en) * 2021-12-03 2022-03-04 西华大学 Anti-monopoly platform network other certificate verification method based on block chain technology
CN117575634A (en) * 2024-01-15 2024-02-20 首都医科大学 Dermatological medicine traceability system and method based on blockchain

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106797389A (en) * 2016-11-18 2017-05-31 深圳前海达闼云端智能科技有限公司 Block chain network, article trading method, device and node device
CN107844978A (en) * 2017-11-30 2018-03-27 中链科技有限公司 A kind of staple commodities transaction processing method and system based on block chain
CN108073639A (en) * 2016-11-16 2018-05-25 北京物资学院 Merchandise news based on block chain preserves system
CN108200208A (en) * 2018-02-11 2018-06-22 广西师范学院 Logistics block chain common recognition algorithm based on cloud computing
WO2018119930A1 (en) * 2016-12-29 2018-07-05 深圳前海达闼云端智能科技有限公司 Transaction verification processing method, apparatus and node device
CN108540484A (en) * 2018-04-23 2018-09-14 北京云图科瑞科技有限公司 A kind of method of commerce, apparatus and system based on block chain
CN108573438A (en) * 2018-05-09 2018-09-25 深圳汇创联合自动化控制有限公司 A kind of autonomous transaction system of custom power based on block chain
CN108764992A (en) * 2018-05-23 2018-11-06 济南浪潮高新科技投资发展有限公司 A kind of network marketing settlement method and system based on block chain
CN108985790A (en) * 2018-06-25 2018-12-11 平安科技(深圳)有限公司 Method for anti-counterfeit, system, computer equipment and storage medium based on block chain

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108073639A (en) * 2016-11-16 2018-05-25 北京物资学院 Merchandise news based on block chain preserves system
CN106797389A (en) * 2016-11-18 2017-05-31 深圳前海达闼云端智能科技有限公司 Block chain network, article trading method, device and node device
WO2018090331A1 (en) * 2016-11-18 2018-05-24 深圳前海达闼云端智能科技有限公司 Blockchain network, article transaction method and apparatus, and node device
WO2018119930A1 (en) * 2016-12-29 2018-07-05 深圳前海达闼云端智能科技有限公司 Transaction verification processing method, apparatus and node device
CN107844978A (en) * 2017-11-30 2018-03-27 中链科技有限公司 A kind of staple commodities transaction processing method and system based on block chain
CN108200208A (en) * 2018-02-11 2018-06-22 广西师范学院 Logistics block chain common recognition algorithm based on cloud computing
CN108540484A (en) * 2018-04-23 2018-09-14 北京云图科瑞科技有限公司 A kind of method of commerce, apparatus and system based on block chain
CN108573438A (en) * 2018-05-09 2018-09-25 深圳汇创联合自动化控制有限公司 A kind of autonomous transaction system of custom power based on block chain
CN108764992A (en) * 2018-05-23 2018-11-06 济南浪潮高新科技投资发展有限公司 A kind of network marketing settlement method and system based on block chain
CN108985790A (en) * 2018-06-25 2018-12-11 平安科技(深圳)有限公司 Method for anti-counterfeit, system, computer equipment and storage medium based on block chain

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
佘维 等: "基于DCPN的区块链小额实时交易策略", vol. 50, no. 4 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112017045A (en) * 2020-08-18 2020-12-01 无锡井通网络科技有限公司 Digital asset off-site transaction system and method based on block chain
CN114140239A (en) * 2021-12-03 2022-03-04 西华大学 Anti-monopoly platform network other certificate verification method based on block chain technology
CN117575634A (en) * 2024-01-15 2024-02-20 首都医科大学 Dermatological medicine traceability system and method based on blockchain
CN117575634B (en) * 2024-01-15 2024-03-15 首都医科大学 Dermatological medicine traceability system and method based on blockchain

Similar Documents

Publication Publication Date Title
US20180189753A1 (en) Infrastructure for obligation management and validation
CN109191212B (en) Method, device and equipment for determining sharing user and computer readable storage medium
US20210390549A1 (en) Systems and methods for building blockchains for verifying assets for smart contracts
CN109118219B (en) Transaction data processing method and device
Ismanto et al. Blockchain as E-commerce platform in Indonesia
TW201732700A (en) Blockchain-based exchange with tokenisation
Ha et al. DeM-CoD: novel access-control-based cash on delivery mechanism for decentralized marketplace
JP2018097725A (en) Digital transaction system based on virtual currency
Vandervort Challenges and opportunities associated with a bitcoin-based transaction rating system
CN111311253A (en) Transaction method, device and system based on block chain
Lim et al. Blockchain technologies in e-commerce: Social shopping and loyalty program applications
CN112215682A (en) E-commerce live broadcast sale transaction processing method and system based on block chain
Madhani Blockchain implementation in marketing: enhancing effectiveness of marketing mix strategy
CA2995865C (en) Electronic-certificate-based transaction method and system
US20230334472A1 (en) Automatically pairing physical assets to a non-fungible token or digital asset
Garg et al. Issues and challenges with fake reviews in Digital Marketing
US11062347B2 (en) Systems and methods for providing authenticity, integrity, and non-repudiation to communications online
US20230012276A1 (en) System, Method, and Apparatus for Decentralized E-Commerce
TWM565363U (en) Blockchain-based virtual currency integration system
Kumar et al. Product Identification System Using Block chain
US20210125177A1 (en) Authentication network for transaction data
TW201229934A (en) An trusted transaction evidence method
Gupta Constructing an E-Commerce Model Using the Framework of Blockchain
Menon et al. Blockchain: An Exploratory Review of Applications in Marketing
Tran Blockchain technology and potential applications in online advertising

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