WO2021129002A1 - Dual-chain supply chain transaction system based on utxo model - Google Patents
Dual-chain supply chain transaction system based on utxo model Download PDFInfo
- Publication number
- WO2021129002A1 WO2021129002A1 PCT/CN2020/117087 CN2020117087W WO2021129002A1 WO 2021129002 A1 WO2021129002 A1 WO 2021129002A1 CN 2020117087 W CN2020117087 W CN 2020117087W WO 2021129002 A1 WO2021129002 A1 WO 2021129002A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- transaction
- logistics
- chain
- capital
- utxo
- 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.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06Q—INFORMATION 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
- G06Q10/00—Administration; Management
- G06Q10/10—Office automation; Time management
- G06Q10/103—Workflow collaboration or project management
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06Q—INFORMATION 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
- G06Q10/00—Administration; Management
- G06Q10/08—Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
- G06Q10/083—Shipping
- G06Q10/0832—Special goods or special handling procedures, e.g. handling of hazardous or fragile goods
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06Q—INFORMATION 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/00—Payment architectures, schemes or protocols
- G06Q20/38—Payment protocols; Details thereof
- G06Q20/382—Payment protocols; Details thereof insuring higher security of transaction
- G06Q20/3829—Payment protocols; Details thereof insuring higher security of transaction involving key management
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06Q—INFORMATION 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/00—Payment architectures, schemes or protocols
- G06Q20/38—Payment protocols; Details thereof
- G06Q20/389—Keeping log of transactions for guaranteeing non-repudiation of a transaction
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06Q—INFORMATION 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
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/04—Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
Definitions
- the invention relates to the field of block chains, in particular to a double-chain type supply chain transaction system based on a UTXO model.
- blockchain has become a hot topic in society. It creates a credible decentralized data storage mechanism by integrating technologies such as peer-to-peer transmission, distributed data storage, consensus mechanism, and encryption algorithm. Effectively solve the fraudulent behavior of data in the process of data circulation in the system in the traditional transaction model, which is conducive to building a transparent, credible and efficient business transaction environment.
- Commodity transaction information and capital transaction information are packaged in one transaction, which makes it difficult to separate money and goods, and the distinction between regulatory authority has become complicated.
- the purpose of the present invention is to provide a dual-chain supply chain transaction system based on the UTXO model to solve the above problems.
- it provides companies on the supply chain with strict privacy protection strategies, so that the ownership of transaction data can truly return to the company’s
- the information of the goods and funds in the transaction is effectively and clearly separated and independently managed, so as to better meet the needs of enterprises and regulatory authorities.
- a dual-chain supply chain transaction system based on UTXO model including:
- the enterprise nodes are deployed with logistics nodes and capital flow nodes; the logistics nodes of the multiple enterprise nodes are constructed into a logistics chain using the UTXO model, and the capital flow nodes of the multiple enterprise nodes are based on the UTXO model Constructed into a capital chain; when a transaction occurs between the two enterprise nodes, logistics transaction information and capital transaction information are generated; the capital transaction information includes UXTO for indicating the source and destination of funds; the logistics transaction information includes useful information UXTO to indicate the source and destination of the goods;
- the logistics transaction information is released in the logistics chain, and the capital transaction information is released in the capital chain; the logistics transaction information and the capital transaction information are linked by the same transaction ticket number.
- the present invention discloses a dual-chain supply chain transaction system based on the UTXO model.
- the UTXO model By using the UTXO model to construct a capital chain and a logistics chain, the logistics transactions and capital transactions of enterprise nodes are split to obtain two independent transactions.
- it provides a strict privacy protection strategy for enterprises in the supply chain, and allows the ownership of transaction data to truly return to the hands of the enterprise.
- the generated logistics chain and the capital chain are connected through the transaction number. Effective and clear separation and independent management of the information of the goods and funds in the transaction, so as to better meet the needs of enterprises and regulatory authorities.
- the use of the UTXO model achieves natural traceability from the underlying data structure level and greatly improves the traceability chain Synthesis efficiency.
- a quality supervision node which is used to supervise the logistics chain formed by the logistics nodes of a plurality of the enterprise nodes
- a fund supervision node which is used to supervise the The capital chain formed by the capital flow node is supervised.
- the role of the supervision node is divided into the fund supervision node and the quality supervision node, and the information of the fund chain and the logistics chain are separately supervised, so as to further provide different supervision departments with the data that they focus on and are within their authority.
- the supervisory authority ensures data security while supervising.
- a statistics node which is connected to the logistics chain and the capital chain for information statistics.
- the logistics transaction information and the capital transaction information both include the same transaction ticket number; the transaction ticket number is not encrypted when it is released in the logistics chain; the transaction ticket number is released in the capital
- the two enterprise nodes that are transacted in the chain time are encrypted by the transaction ticket number encryption key exchanged by the DH algorithm when the transaction is generated.
- the two parties in the transaction obtain the key through the DH key exchange algorithm, store the unencrypted transaction number in the logistics chain, and store the encrypted transaction number in the capital chain, so only the two parties in the transaction can establish commodities through the key
- the association between the transaction and the fund transaction restores the complete information of the transaction order.
- the logistics transaction information includes the transaction order number, the type of goods, the identification code of the goods, one or more input logistics UTXO and one or more output logistics UTXO;
- the goods category is used to indicate the commodity category of the goods
- the goods identification code is used to indicate the batch or single product traceability code of the goods;
- the input logistics UTXO includes the quantity of goods input and the goods importer;
- the output logistics UTXO includes the quantity of goods exported and the receiver of the goods, the goods
- the output quantity must be equal to the input quantity of the goods; the output logistics UTXO is locked by the smart contract on the logistics chain when the transaction is generated, and unlocked after the transaction is confirmed.
- the fund transaction information includes the transaction ticket number, one or more input fund UTXO and one or more output fund UTXO; the input fund UTXO includes the amount of fund input and the fund input person; the output fund UTXO includes the amount of fund output and the recipient of the fund; the amount of fund output is equal to the amount of fund input; the output fund UTXO is locked by the smart contract of the fund chain when the transaction is generated, and unlocked when the transaction is confirmed.
- the two enterprise nodes generate a capital flow key pair and a logistics key pair each time a transaction is generated, and the capital flow key pair includes two capital flow keys stored in the two enterprise nodes, respectively.
- the logistics key pair includes two logistics keys stored in the two enterprise nodes; each capital flow key includes a capital flow public key and a capital flow private key; each logistics key includes a logistics public key Key and logistics private key; the capital flow public key is used as the output address of the output capital UTXO; the logistics public key is used as the output address of the output logistics UTXO; the capital flow private key is used as unlocking the output capital UTXO
- the certificate; the logistics private key is used as a certificate for unlocking the output logistics UTXO.
- the capital flow public key and the stored information of the enterprise node are backed up to the capital supervision node; the logistics public key and the stored information of the enterprise node are backed up to the quality supervision node.
- the supervisory node can save the correspondence between the public key and the enterprise, so as to facilitate subsequent decryption of the identity of the transaction subject on the chain.
- the goods identification code in the logistics transaction information is used to indicate the minimum traceability granularity of the commodity; when a transaction occurs between the two enterprise nodes, if there are multiple commodities with the minimum traceability granularity in a single transaction, the corresponding The multiple logistics transaction information; the multiple logistics transaction information all include the same transaction ticket number.
- the enterprise node in the logistics chain does not pack all the commodity information of a transaction order into a transaction, but splits it into multiple transactions according to the smallest granularity of commodity circulation, and then divides the transaction order number into multiple transactions. Linking transactions, this method can achieve accurate traceability of one item and one code.
- a commodity category dictionary is set in the quality supervision node; the commodity category dictionary is used to indicate the commodity category corresponding to the commodity category, and the setting of the commodity category dictionary is convenient for the enterprise node to call and query.
- FIG. 1 is a schematic diagram of the system architecture of a dual-chain supply chain transaction system based on the UTXO model described in an embodiment of the present invention.
- Fig. 2 is a schematic diagram of the logistics chain and the capital chain described in the embodiment of the present invention being connected through a transaction number.
- Fig. 3 is a schematic diagram of a specific work process described in an embodiment of the present invention.
- Fig. 4 is a schematic diagram of the transaction information query process described in the embodiment of the present invention.
- This embodiment discloses a dual-chain supply chain transaction system based on the UTXO model, which is deployed in a consortium chain.
- Upstream and downstream enterprises in the supply chain and supervisory departments form a blockchain consortium.
- the supervisory nodes are divided into quality supervisory nodes. There are two types of nodes and fund supervision nodes, and the rest of the enterprises are regarded as ordinary nodes. When a new enterprise node joins, it needs to provide corresponding certification materials, and the relevant supervisory department on the supervisory node will approve it.
- the basic architecture of this system includes multiple enterprise nodes, quality supervision nodes, capital supervision nodes and statistical nodes.
- each enterprise node is deployed with a logistics node and a capital flow node.
- the logistics nodes of multiple enterprise nodes form a logistics chain
- the capital flow nodes of multiple enterprise nodes form a capital chain.
- each enterprise joining the alliance needs to deploy two independent nodes: logistics node and capital flow node.
- logistics node and capital flow node are connected separately and constructed to form a logistics chain and a capital chain using the UTXO model.
- the information stored in the logistics chain is a record of commodity transactions between enterprises that does not contain the amount, and the capital chain only stores the records of capital transactions between enterprises.
- the authorized statistical agency that is, the statistical node, can perform macro-statistics on the data in the logistics chain and the capital chain.
- the dual-chain design can effectively separate funds and cargo information, thereby better meeting the needs of enterprises and supervision.
- the quality supervision node is used to supervise the logistics chain formed by the logistics nodes of multiple enterprise nodes;
- the capital supervision node is used to supervise the capital chain formed by the capital flow nodes of multiple enterprise nodes.
- Statistics nodes are connected to the logistics chain and capital chain for information statistics.
- logistics transaction information and capital transaction information are generated; specifically, logistics transaction information is published in the logistics chain, and capital transaction information is published in the capital chain; logistics transaction information and funds Transaction information is contacted through the same transaction ticket number.
- the logistics transaction information and the capital transaction information both include the same transaction order number.
- the transaction order number is not encrypted when it is released on the logistics chain, and the transaction order number is released on the capital chain for the two companies that are transacted.
- the node uses the transaction ticket encryption key exchanged by the DH algorithm to encrypt it.
- the transactions on the logistics chain and the capital chain adopt the UTXO model, that is, each transaction has its input, and the remaining inventory on the logistics chain or the balance on the capital chain comes from the unspent transaction output of the user.
- the logistics transaction information includes transaction number, cargo category, cargo identification code, one or more input logistics UTXO and one or more output logistics UTXO;
- the cargo category is used to indicate the commodity category of the cargo;
- the cargo identification code is used to Indicate the batch or single product traceability code of the goods;
- the input logistics UTXO includes the quantity of goods input and the importer of the goods;
- the output logistics UTXO includes the quantity of goods output and the receiver of the goods, the output quantity of goods must be equal to the quantity of goods input;
- the output logistics UTXO is generated in the transaction Time is locked by the smart contract on the logistics chain and unlocked after the transaction is confirmed.
- a commodity category dictionary is set in the quality supervision node;
- the commodity category dictionary is used to indicate the commodity category corresponding to the commodity category.
- the goods identification code in the logistics transaction information is used to indicate the minimum traceability granularity of the commodity; when a transaction occurs between two enterprise nodes, if there are multiple commodities with the minimum traceability granularity in a single transaction, multiple corresponding logistics are generated Transaction information; multiple logistics transaction information includes the same transaction number.
- the fund transaction information includes the transaction ticket number, one or more input fund UTXO and one or more output fund UTXO; the input fund UTXO includes the amount of fund input and the fund input person; the output fund UTXO includes the amount of fund output and the fund receiving People; the amount of fund output is equal to the amount of fund input; the output fund UTXO is locked by the smart contract of the fund chain when the transaction is generated, and unlocked when the transaction is confirmed.
- the logistics transaction information in a specific logistics chain transaction contains the following core fields:
- Transaction Number The code that identifies the transaction.
- Commodity code refers to the unique code that marks the commodity category. Specifically, a public dictionary should be maintained at the quality supervision node for ordinary nodes to call.
- Identification code refers to the unique identifier that marks the product batch or single product traceability code.
- Transaction number the unique code generated when confirming the transaction.
- this embodiment does not pack all the commodity information of a transaction order into one transaction, but splits it into multiple transactions according to the smallest granularity of commodity circulation (batch, traceability code), and then divides the transaction order number into multiple transactions. Linked transactions. For example, if the transaction ticket number 1111 contains 100 products with different traceability codes, 100 transactions will be generated, and the transaction ticket number of each transaction is 1111.
- Input UTXO The UTXO of the source of this transaction can only be left without input if the product is produced in the warehouse or the upstream has not joined the alliance.
- Output UTXO The destination of the transaction, including the quantity and recipient.
- the sum of the output quantity must be equal to the sum of the input quantity, and the recipient is encrypted by the public key of the quality supervision node.
- the recipient can be marked as [end customer], and when the goods are lost, the recipient can leave it empty.
- the fund transaction information of the fund chain transaction contains the following core fields
- Transaction number the unique code generated when confirming the transaction, encrypted by the key exchanged by both parties to the transaction.
- Input UTXO UTXO from the source of the transaction.
- the digital currency on the capital chain can be transferred in by 1:1 conversion of physical currency, or generated through internal mechanisms such as mining.
- Output UTXO The destination of the transaction, including the quantity and the recipient.
- the sum of the output quantity must be equal to the sum of the input quantity, and the recipient is encrypted by the public key of the fund supervision node.
- the supply chain transaction system disclosed in this embodiment also takes into account transaction privacy in the supply chain.
- transaction privacy in the supply chain can be divided into two aspects: channel confidentiality and commodity transaction price confidentiality.
- channel confidentiality means that the identities of both parties to the transaction are kept secret from other companies, but the supervisory authority has the right to know the identities of upstream and downstream companies to restore the traceability chain
- confidentiality of commodity transaction prices means that only both parties to the transaction can obtain the contract amount corresponding to the commodity transaction or a certain transfer Corresponding commodity transaction details.
- separation of logistics transactions and capital transactions it is actually the ability to restore complete transaction order information after associating logistics transactions with capital transactions.
- the enterprise nodes of both parties of the transaction When transactions are carried out upstream and downstream, the enterprise nodes of both parties of the transaction generate 2 pairs of keys each time.
- the 2 public keys are used as the output addresses for commodity transactions and fund transactions, and the 2 private keys are used as vouchers for unlocking the logistics chain and the capital chain UTXO. .
- the public key While the key is being generated, the public key needs to be reported to the quality and capital supervision nodes for filing. In this way, the identities of both parties to the transaction can be made anonymous to other nodes and made public to supervisory nodes.
- the logistics chain and the capital chain are related to each other through the "transaction order number".
- the two companies When conducting a transaction, the two companies will first obtain a key that only the two parties know through the DH key exchange algorithm, and publish the transaction information to the logistics separately
- the transaction ticket number stored on the logistics chain is not encrypted, and the transaction ticket number on the capital chain is encrypted with a key through a symmetric encryption algorithm.
- only the parties to the transaction can establish the transaction through the exchanged key and transaction ticket number.
- two enterprise nodes generate a capital flow key pair and a logistics key pair each time a transaction is generated.
- the capital flow key pair includes two capital flow keys stored in the two enterprise nodes; the logistics key pair Including two logistics keys stored in two enterprise nodes; each capital flow key includes a capital flow public key and a capital flow private key; each logistics key includes a logistics public key and a logistics private key; among them:
- the capital flow public key is used as the output address of the output capital UTXO; the logistics public key is used as the output address of the output logistics UTXO; the capital flow private key is used as the voucher for unlocking the output capital UTXO; the logistics private key is used as the voucher for unlocking the output logistics UTXO. Further, the capital flow public key and the stored information of the enterprise node are backed up to the fund supervision node; the logistics public key and the stored information of the enterprise node are backed up to the quality supervision node.
- the initiator of the transaction can be either the buyer or the seller.
- A initiates an order form to B, and B confirms it;
- B publicly releases a sales order, and A claims it. All operations in this process only exist at the application level and do not interact with the blockchain.
- a and B respectively generate two pairs of asymmetric keys, namely (A1,A1') and (A2,A2') and (B1,B1') and (B2,B2'), and exchange public keys A1, A2 , B1, B2, and report A1, B1 to the quality supervision node, and A2, B2 to the fund supervision node.
- the supervisory node saves a corporate-public key address mapping table for decrypting the identity of the transaction subject on the chain.
- a and B obtain a key C1 shared by both parties through the DH key exchange algorithm, and encrypt the transaction number.
- B confirms the receipt of the goods, it calls the smart contract of the logistics chain to generate a commodity transaction, and outputs the corresponding transaction quantity in the UTXO input by A to address B1, and "change" to address A1 if there is any remaining.
- the user needs to query the transaction order details of a certain kind, a certain batch or a certain traceability code, first query the eligible transaction order number on the logistics chain according to the product code and identification code.
- the transaction ticket number is encrypted by the exchanged secret key C1, and the fund transaction corresponding to the ticket number is queried on the fund chain.
- the disclosed device and method may be implemented in other ways.
- the device embodiments described above are merely illustrative.
- the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or It can be integrated into another system, or some features can be ignored or not implemented.
- the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
- the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
- the functional units in the various embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
- the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-viewable storage medium.
- the technical solution of the present invention essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present invention.
- the aforementioned storage media include: U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk and other media that can store program codes.
Landscapes
- Business, Economics & Management (AREA)
- Engineering & Computer Science (AREA)
- Strategic Management (AREA)
- Accounting & Taxation (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- Economics (AREA)
- Finance (AREA)
- Human Resources & Organizations (AREA)
- Entrepreneurship & Innovation (AREA)
- Marketing (AREA)
- Tourism & Hospitality (AREA)
- Quality & Reliability (AREA)
- Development Economics (AREA)
- Operations Research (AREA)
- Computer Security & Cryptography (AREA)
- Data Mining & Analysis (AREA)
- Technology Law (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
Description
本发明涉及区块链领域,尤其涉及一种基于UTXO模型的双链式供应链交易系统。The invention relates to the field of block chains, in particular to a double-chain type supply chain transaction system based on a UTXO model.
近年来,区块链成为了社会的热点话题,它通过将对点对点传输、分布式数据存储、共识机制、加密算法等技术进行集成,创造了一种可信的非中心化数据存储机制,可以有效地解决传统的交易模式中数据在系统内流转过程中的造假行为,有利于构建一种透明、可信、高效的商业交易环境。In recent years, blockchain has become a hot topic in society. It creates a credible decentralized data storage mechanism by integrating technologies such as peer-to-peer transmission, distributed data storage, consensus mechanism, and encryption algorithm. Effectively solve the fraudulent behavior of data in the process of data circulation in the system in the traditional transaction model, which is conducive to building a transparent, credible and efficient business transaction environment.
供应链由于多方参与,成员之间信任成本高等特点被认为是区块链最佳的落地场景。目前基于区块链设计的供应链交易系统大多采用联盟链方式部署,通过传统的账号模型来存储供应链交易信息,并利用中心节点对访问权限控制进行控制,达到保护用户隐私信息的目的。Due to the participation of multiple parties in the supply chain, the high cost of trust among members is considered to be the best landing scenario for blockchain. At present, most of the supply chain transaction systems designed based on blockchain are deployed in a consortium chain. The supply chain transaction information is stored through the traditional account model, and the central node is used to control access rights to achieve the purpose of protecting user privacy information.
但现有的供应链交易系统方案的技术缺点如下:However, the technical shortcomings of the existing supply chain transaction system solutions are as follows:
1、过于依赖中心化的权限控制节点,供应链联盟中的成员实际上并不拥有自身交易数据的所有权,存在一定的安全风险。1. To rely too much on centralized authority control nodes, and the members of the supply chain alliance do not actually own the ownership of their own transaction data, and there is a certain security risk.
2、商品交易信息与资金交易信息都打包在一个交易中,难以实现钱货分离,对监管权限的区分也变得复杂。2. Commodity transaction information and capital transaction information are packaged in one transaction, which makes it difficult to separate money and goods, and the distinction between regulatory authority has become complicated.
3、虽然可以在应用层面通过追溯码或批次实现追溯功能,但在交易量较大的情况下,合成追溯链条的效率很低。3. Although the traceability function can be achieved through traceability codes or batches at the application level, the efficiency of synthesizing traceability chains is very low when the transaction volume is large.
发明内容Summary of the invention
本发明的目的在于,针对上述问题,提供一种基于UTXO模型的双链式供应链交易系统,一方面为供应链上的企业提供严格的隐私保护策略,让交易数据的所有权真正回到企业的手上,另一方面对交易中的货物和资金的信息进行有效清晰的分离独立管理,从而更好地满足企业和监管部门的需求。The purpose of the present invention is to provide a dual-chain supply chain transaction system based on the UTXO model to solve the above problems. On the one hand, it provides companies on the supply chain with strict privacy protection strategies, so that the ownership of transaction data can truly return to the company’s On the other hand, on the other hand, the information of the goods and funds in the transaction is effectively and clearly separated and independently managed, so as to better meet the needs of enterprises and regulatory authorities.
为解决上述技术问题,本发明基于以下技术方案进行实施:In order to solve the above technical problems, the present invention is implemented based on the following technical solutions:
一种基于UTXO模型的双链式供应链交易系统,包括:A dual-chain supply chain transaction system based on UTXO model, including:
多个企业节点,所述企业节点部署有物流节点和资金流节点;多个所述企业节点的所述物流节点以UTXO模型构建成物流链,多个所述企业节点的资金流节点以UTXO模型构建成资金链;两个所述企业节点之间发生交易时,生成物流交易信息和资金交易信息;所述资金交易信息包括有用于指示资金的来源和去向的UXTO;所述物流交易信息包括有用于指示货物的来源和去向的UXTO;Multiple enterprise nodes, the enterprise nodes are deployed with logistics nodes and capital flow nodes; the logistics nodes of the multiple enterprise nodes are constructed into a logistics chain using the UTXO model, and the capital flow nodes of the multiple enterprise nodes are based on the UTXO model Constructed into a capital chain; when a transaction occurs between the two enterprise nodes, logistics transaction information and capital transaction information are generated; the capital transaction information includes UXTO for indicating the source and destination of funds; the logistics transaction information includes useful information UXTO to indicate the source and destination of the goods;
所述物流交易信息被发布在所述物流链内,所述资金交易信息被发布在所述资金链内;所述物流交易信息和所述资金交易信息通过同一交易单号被联系。The logistics transaction information is released in the logistics chain, and the capital transaction information is released in the capital chain; the logistics transaction information and the capital transaction information are linked by the same transaction ticket number.
与现有技术相比,本发明的有益效果是:Compared with the prior art, the beneficial effects of the present invention are:
本发明公开了一种基于UTXO模型的双链式供应链交易系统,通过使用UTXO模型构建资金链和物流链,以对企业节点的物流交易和资金交易进行分拆以得到相互独立的两条交易链,并将所生成的物流链和资金链通过交易单号进行联系,一方面为供应链上的企业提供严格的隐私保护策略,让交易数据的所有权真正回到企业的手上,另一方面对交易中的货物和资金的信息进行有效清晰的分离独立管理,从而更好地满足企业和监管部门的需求,同时UTXO模型的使用从底层数据结构层面实现天然的可追溯性,大幅提升追溯链条合成效率。The present invention discloses a dual-chain supply chain transaction system based on the UTXO model. By using the UTXO model to construct a capital chain and a logistics chain, the logistics transactions and capital transactions of enterprise nodes are split to obtain two independent transactions. On the one hand, it provides a strict privacy protection strategy for enterprises in the supply chain, and allows the ownership of transaction data to truly return to the hands of the enterprise. On the other hand, the generated logistics chain and the capital chain are connected through the transaction number. Effective and clear separation and independent management of the information of the goods and funds in the transaction, so as to better meet the needs of enterprises and regulatory authorities. At the same time, the use of the UTXO model achieves natural traceability from the underlying data structure level and greatly improves the traceability chain Synthesis efficiency.
进一步的,还包括:质量监管节点,用于对多个所述企业节点的所述物流节点所形成的所述物流链进行监管;资金监管节点,用于对多个所述企业节点的所述资金流节点所形成的所述资金链进行监管。Further, it further includes: a quality supervision node, which is used to supervise the logistics chain formed by the logistics nodes of a plurality of the enterprise nodes; and a fund supervision node, which is used to supervise the The capital chain formed by the capital flow node is supervised.
通过上述设置,将监管节点角色区分为资金监管节点和质量监管节点,分别监管资金链和物流链的信息,进一步为不同的监管部门提供其所重点关注的且在权限之内的数据,在便于监管部门进行监管的同时保证了数据的安全。Through the above settings, the role of the supervision node is divided into the fund supervision node and the quality supervision node, and the information of the fund chain and the logistics chain are separately supervised, so as to further provide different supervision departments with the data that they focus on and are within their authority. The supervisory authority ensures data security while supervising.
进一步的,还包括统计节点,连接至所述物流链和所述资金链以进行信息统计。Further, it also includes a statistics node, which is connected to the logistics chain and the capital chain for information statistics.
进一步的,所述物流交易信息和所述资金交易信息中均包括同一交易单号;所述交易单号被发布在所述物流链时不被加密;所述交易单号被发布在所述资 金链时被进行交易的两个所述企业节点在交易产生时通过DH算法所交换得到的交易单号加密密钥进行加密。Further, the logistics transaction information and the capital transaction information both include the same transaction ticket number; the transaction ticket number is not encrypted when it is released in the logistics chain; the transaction ticket number is released in the capital The two enterprise nodes that are transacted in the chain time are encrypted by the transaction ticket number encryption key exchanged by the DH algorithm when the transaction is generated.
通过上述设置,交易双方通过DH密钥交换算法得到密钥,把不加密的交易单号存储在物流链,把加密的交易单号存储在资金链,故只有交易的双方可以通过密钥建立商品交易与资金交易的关联,还原交易单的完整信息。Through the above settings, the two parties in the transaction obtain the key through the DH key exchange algorithm, store the unencrypted transaction number in the logistics chain, and store the encrypted transaction number in the capital chain, so only the two parties in the transaction can establish commodities through the key The association between the transaction and the fund transaction restores the complete information of the transaction order.
进一步的,所述物流交易信息中包括所述交易单号、货物类别、货物识别码、一个或多个输入物流UTXO和一个或多个输出物流UTXO;所述货物类别用于指示货物的商品类别;所述货物识别码用于指示货物的批次或单品追溯码;所述输入物流UTXO包括货物输入数量和货物输入人;所述输出物流UTXO包括货物输出数量和货物接收人,所述货物输出数量必须等于所述货物输入数量;所述输出物流UTXO在交易产生时被所述物流链上的智能合约锁定,并在交易确认后解锁。Further, the logistics transaction information includes the transaction order number, the type of goods, the identification code of the goods, one or more input logistics UTXO and one or more output logistics UTXO; the goods category is used to indicate the commodity category of the goods The goods identification code is used to indicate the batch or single product traceability code of the goods; the input logistics UTXO includes the quantity of goods input and the goods importer; the output logistics UTXO includes the quantity of goods exported and the receiver of the goods, the goods The output quantity must be equal to the input quantity of the goods; the output logistics UTXO is locked by the smart contract on the logistics chain when the transaction is generated, and unlocked after the transaction is confirmed.
进一步的,所述资金交易信息中包括所述交易单号、一个或多个输入资金UTXO和一个或多个输出资金UTXO;所述输入资金UTXO包括资金输入数量和资金输入人;所述输出资金UTXO包括资金输出数量和资金接收人;所述资金输出数量等于所述资金输入数量;所述输出资金UTXO在交易产生时被资金链的智能合约锁定,并在交易确认时解锁。Further, the fund transaction information includes the transaction ticket number, one or more input fund UTXO and one or more output fund UTXO; the input fund UTXO includes the amount of fund input and the fund input person; the output fund UTXO includes the amount of fund output and the recipient of the fund; the amount of fund output is equal to the amount of fund input; the output fund UTXO is locked by the smart contract of the fund chain when the transaction is generated, and unlocked when the transaction is confirmed.
进一步的,两个所述企业节点在每次交易产生时产生资金流密钥对和物流密钥对,所述资金流密钥对包括分别存储在两个所述企业节点的两个资金流密钥;所述物流密钥对包括分别存储在两个所述企业节点的两个物流密钥;每一资金流密钥包括资金流公钥和资金流私钥;每一物流密钥包括物流公钥和物流私钥;所述资金流公钥作为所述输出资金UTXO的输出地址;所述物流公钥作为所述输出物流UTXO的输出地址;所述资金流私钥作为解锁所述输出资金UTXO的凭证;所述物流私钥作为解锁所述输出物流UTXO的凭证。Further, the two enterprise nodes generate a capital flow key pair and a logistics key pair each time a transaction is generated, and the capital flow key pair includes two capital flow keys stored in the two enterprise nodes, respectively. The logistics key pair includes two logistics keys stored in the two enterprise nodes; each capital flow key includes a capital flow public key and a capital flow private key; each logistics key includes a logistics public key Key and logistics private key; the capital flow public key is used as the output address of the output capital UTXO; the logistics public key is used as the output address of the output logistics UTXO; the capital flow private key is used as unlocking the output capital UTXO The certificate; the logistics private key is used as a certificate for unlocking the output logistics UTXO.
进一步的,所述资金流公钥与其所存储的企业节点的信息被备份至所述资金监管节点;所述物流公钥与其所存储的企业节点的信息被备份至所述质量监管节点。通过将公钥上报至监管节点,监管节点可以保存公钥与企业之间的对 应关系,以便于后续解密链条上交易主体的身份。Further, the capital flow public key and the stored information of the enterprise node are backed up to the capital supervision node; the logistics public key and the stored information of the enterprise node are backed up to the quality supervision node. By reporting the public key to the supervisory node, the supervisory node can save the correspondence between the public key and the enterprise, so as to facilitate subsequent decryption of the identity of the transaction subject on the chain.
进一步的,所述物流交易信息中的货物识别码用于指示商品的最小追溯粒度;两个所述企业节点之间发生交易时,若单次交易中存在多个最小追溯粒度的商品,生成对应的多个物流交易信息;所述多个物流交易信息中均包括同一所述交易单号。Further, the goods identification code in the logistics transaction information is used to indicate the minimum traceability granularity of the commodity; when a transaction occurs between the two enterprise nodes, if there are multiple commodities with the minimum traceability granularity in a single transaction, the corresponding The multiple logistics transaction information; the multiple logistics transaction information all include the same transaction ticket number.
通过这样设置,交易产生时在物流链中企业节点不将一张交易单的所有商品信息打包在一个交易中,而是按商品流通的最小粒度拆分成多个交易,再通过交易单号把交易联系起来,这种方式能够实现对于一物一码的精准追溯。Through this setting, when the transaction is generated, the enterprise node in the logistics chain does not pack all the commodity information of a transaction order into a transaction, but splits it into multiple transactions according to the smallest granularity of commodity circulation, and then divides the transaction order number into multiple transactions. Linking transactions, this method can achieve accurate traceability of one item and one code.
进一步的,所述质量监管节点内设置有商品类别字典;所述商品类别字典用于指示所述货物类别所对应的商品类别,所述商品类别字典的设置方便企业节点进行调用查询。Further, a commodity category dictionary is set in the quality supervision node; the commodity category dictionary is used to indicate the commodity category corresponding to the commodity category, and the setting of the commodity category dictionary is convenient for the enterprise node to call and query.
图1是本发明实施例中所述的一种基于UTXO模型的双链式供应链交易系统的系统架构示意图。FIG. 1 is a schematic diagram of the system architecture of a dual-chain supply chain transaction system based on the UTXO model described in an embodiment of the present invention.
图2是本发明实施例中所述的物流链和资金链通过交易单号进行联系的示意图。Fig. 2 is a schematic diagram of the logistics chain and the capital chain described in the embodiment of the present invention being connected through a transaction number.
图3是本发明实施例中所述的一种具体工作流程的示意图。Fig. 3 is a schematic diagram of a specific work process described in an embodiment of the present invention.
图4是本发明实施例中所述的交易信息查询的流程示意图。Fig. 4 is a schematic diagram of the transaction information query process described in the embodiment of the present invention.
在下面的描述中阐述了很多具体细节以便于充分理解本发明。但是本发明能够以很多不同于此描述的其他方式来实施,本领域技术人员可以在不违背本发明内涵的情况下做类似推广,因此本发明不受下面公开的具体实施例的限制。In the following description, many specific details are explained in order to fully understand the present invention. However, the present invention can be implemented in many other ways different from the description herein, and those skilled in the art can make similar popularizations without violating the connotation of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed below.
下面结合具体实施例和附图对本发明的技术方案进行清楚、完整的描述。The technical solutions of the present invention will be clearly and completely described below in conjunction with specific embodiments and drawings.
本实施例公开了一种基于UTXO模型的双链式供应链交易系统,采用联盟链的方式进行部署,由供应链上下游企业以及监管部门组成区块链联盟,其中监管节点分为质量监管节点和资金监管节点两类,其余企业作为普通节点。新的企业节点加入时,需提供相应的证明材料,并由监管节点上的相关监管部门进行审批。This embodiment discloses a dual-chain supply chain transaction system based on the UTXO model, which is deployed in a consortium chain. Upstream and downstream enterprises in the supply chain and supervisory departments form a blockchain consortium. The supervisory nodes are divided into quality supervisory nodes. There are two types of nodes and fund supervision nodes, and the rest of the enterprises are regarded as ordinary nodes. When a new enterprise node joins, it needs to provide corresponding certification materials, and the relevant supervisory department on the supervisory node will approve it.
如图1所示,本系统的基本架构包括多个企业节点、质量监管节点,资金监管节点和统计节点。As shown in Figure 1, the basic architecture of this system includes multiple enterprise nodes, quality supervision nodes, capital supervision nodes and statistical nodes.
具体的,每一企业节点部署有物流节点和资金流节点,具体的,多个企业节点的物流节点形成物流链,多个企业节点的资金流节点形成资金链。通过这样设置,每个加入联盟的企业需要部署物流节点和资金流节点两个相互独立的节点,这些节点分别连接,以UTXO模型构建成组成物流链和资金链。物流链上存储的信息为企业之间的不包含金额的商品往来记录,资金链上则只存储企业之间的资金往来记录。获得授权的统计机构也即统计节点可对物流链和资金链上的数据进行宏观的统计。双链设计可以有效地将资金和货物信息进行分离,从而更好地满足企业和监管的需求。Specifically, each enterprise node is deployed with a logistics node and a capital flow node. Specifically, the logistics nodes of multiple enterprise nodes form a logistics chain, and the capital flow nodes of multiple enterprise nodes form a capital chain. Through this setting, each enterprise joining the alliance needs to deploy two independent nodes: logistics node and capital flow node. These nodes are connected separately and constructed to form a logistics chain and a capital chain using the UTXO model. The information stored in the logistics chain is a record of commodity transactions between enterprises that does not contain the amount, and the capital chain only stores the records of capital transactions between enterprises. The authorized statistical agency, that is, the statistical node, can perform macro-statistics on the data in the logistics chain and the capital chain. The dual-chain design can effectively separate funds and cargo information, thereby better meeting the needs of enterprises and supervision.
具体的,质量监管节点,用于对多个企业节点的物流节点所形成的物流链进行监管;资金监管节点,用于对多个企业节点的资金流节点所形成的资金链进行监管。统计节点,连接至物流链和资金链以进行信息统计。Specifically, the quality supervision node is used to supervise the logistics chain formed by the logistics nodes of multiple enterprise nodes; the capital supervision node is used to supervise the capital chain formed by the capital flow nodes of multiple enterprise nodes. Statistics nodes are connected to the logistics chain and capital chain for information statistics.
具体的,两个企业节点之间发生交易时,生成物流交易信息和资金交易信息;具体的,物流交易信息被发布在物流链内,资金交易信息被发布在资金链内;物流交易信息和资金交易信息通过同一交易单号被联系。Specifically, when a transaction occurs between two enterprise nodes, logistics transaction information and capital transaction information are generated; specifically, logistics transaction information is published in the logistics chain, and capital transaction information is published in the capital chain; logistics transaction information and funds Transaction information is contacted through the same transaction ticket number.
具体的,物流交易信息和资金交易信息中均包括同一交易单号,具体的,交易单号被发布在物流链时不被加密,交易单号被发布在资金链时被进行交易的两个企业节点在交易产生时通过DH算法所交换得到的交易单号加密密钥进行加密。Specifically, the logistics transaction information and the capital transaction information both include the same transaction order number. Specifically, the transaction order number is not encrypted when it is released on the logistics chain, and the transaction order number is released on the capital chain for the two companies that are transacted. When the transaction is generated, the node uses the transaction ticket encryption key exchanged by the DH algorithm to encrypt it.
具体的,物流链和资金链上的交易均采用UTXO模型,即每一笔交易都有其输入,物流链上的剩余库存或资金链上的余额来源于该用户未花费的交易输出。Specifically, the transactions on the logistics chain and the capital chain adopt the UTXO model, that is, each transaction has its input, and the remaining inventory on the logistics chain or the balance on the capital chain comes from the unspent transaction output of the user.
具体的,物流交易信息中包括交易单号、货物类别、货物识别码、一个或多个输入物流UTXO和一个或多个输出物流UTXO;货物类别用于指示货物的商品类别;货物识别码用于指示货物的批次或单品追溯码;输入物流UTXO包括货物输入数量和货物输入人;输出物流UTXO包括货物输出数量和货物接收人,货物输出数量必须等于货物输入数量;输出物流UTXO在交易产生时被物流链上的智能合约锁定,并在交易确认后解锁。具体的,质量监管节点内设置有商品类别字典;商品类别字典用于指示货物类别所对应的商品类别。Specifically, the logistics transaction information includes transaction number, cargo category, cargo identification code, one or more input logistics UTXO and one or more output logistics UTXO; the cargo category is used to indicate the commodity category of the cargo; the cargo identification code is used to Indicate the batch or single product traceability code of the goods; the input logistics UTXO includes the quantity of goods input and the importer of the goods; the output logistics UTXO includes the quantity of goods output and the receiver of the goods, the output quantity of goods must be equal to the quantity of goods input; the output logistics UTXO is generated in the transaction Time is locked by the smart contract on the logistics chain and unlocked after the transaction is confirmed. Specifically, a commodity category dictionary is set in the quality supervision node; the commodity category dictionary is used to indicate the commodity category corresponding to the commodity category.
进一步的,物流交易信息中的货物识别码用于指示商品的最小追溯粒度;两个企业节点之间发生交易时,若单次交易中存在多个最小追溯粒度的商品,生成对应的多个物流交易信息;多个物流交易信息中均包括同一交易单号。Further, the goods identification code in the logistics transaction information is used to indicate the minimum traceability granularity of the commodity; when a transaction occurs between two enterprise nodes, if there are multiple commodities with the minimum traceability granularity in a single transaction, multiple corresponding logistics are generated Transaction information; multiple logistics transaction information includes the same transaction number.
具体的,资金交易信息中包括交易单号、一个或多个输入资金UTXO和一个或多个输出资金UTXO;输入资金UTXO包括资金输入数量和资金输入人;输出资金UTXO包括资金输出数量和资金接收人;资金输出数量等于资金输入数量;输出资金UTXO在交易产生时被资金链的智能合约锁定,并在交易确认时解锁。Specifically, the fund transaction information includes the transaction ticket number, one or more input fund UTXO and one or more output fund UTXO; the input fund UTXO includes the amount of fund input and the fund input person; the output fund UTXO includes the amount of fund output and the fund receiving People; the amount of fund output is equal to the amount of fund input; the output fund UTXO is locked by the smart contract of the fund chain when the transaction is generated, and unlocked when the transaction is confirmed.
具体的,通过一具体的物流链和资金链的信息设置实例来解释上述物流交易信息和资金交易信息的具体技术细节进行进一步的阐述,在一优选的实施例中,物流链和资金链之间的联系如图2所示,具体的物流链交易内的物流交易信息包含以下核心字段:Specifically, the specific technical details of the above-mentioned logistics transaction information and capital transaction information are explained through a specific example of the information setting of the logistics chain and the capital chain. In a preferred embodiment, the relationship between the logistics chain and the capital chain The connection of is shown in Figure 2. The logistics transaction information in a specific logistics chain transaction contains the following core fields:
交易号:标识交易的编码。Transaction Number: The code that identifies the transaction.
商品编码:指标记商品类别的唯一编码,具体的,在质量监管节点应维护一个公共的字典供普通节点调用。Commodity code: refers to the unique code that marks the commodity category. Specifically, a public dictionary should be maintained at the quality supervision node for ordinary nodes to call.
识别码:指标记商品批次或单品追溯码的唯一标识。Identification code: refers to the unique identifier that marks the product batch or single product traceability code.
交易单号:确认交易时生成的唯一编码。优选的,本实施例没有把一张交易单的所有商品信息打包在一个交易中,而是按商品流通的最小粒度(批次、追溯码)拆分成多个交易,再通过交易单号把交易联系起来。比如编号1111的交易单中包含100件追溯码不同的商品,则会产生100个交易,每个交易的交易单号都是1111。Transaction number: the unique code generated when confirming the transaction. Preferably, this embodiment does not pack all the commodity information of a transaction order into one transaction, but splits it into multiple transactions according to the smallest granularity of commodity circulation (batch, traceability code), and then divides the transaction order number into multiple transactions. Linked transactions. For example, if the transaction ticket number 1111 contains 100 products with different traceability codes, 100 transactions will be generated, and the transaction ticket number of each transaction is 1111.
输入UTXO:该笔交易来源的UTXO,只有在商品生产入库或上游未加入联盟的情况下可以没有输入。Input UTXO: The UTXO of the source of this transaction can only be left without input if the product is produced in the warehouse or the upstream has not joined the alliance.
输出UTXO:该笔交易的去向,包含数量和接收人,输出的数量之和必须等于输入数量之和,接收人通过质量监管节点的公钥进行加密。当商品已经到达供应链最终端时(如零售),可以将接收人标记为【终端客户】,在商品发送损耗时,接收人可以置空。Output UTXO: The destination of the transaction, including the quantity and recipient. The sum of the output quantity must be equal to the sum of the input quantity, and the recipient is encrypted by the public key of the quality supervision node. When the goods have reached the end of the supply chain (such as retail), the recipient can be marked as [end customer], and when the goods are lost, the recipient can leave it empty.
而在这一优选的实施例中,资金链交易的资金交易信息包含以下核心字段In this preferred embodiment, the fund transaction information of the fund chain transaction contains the following core fields
交易单号(加密):确认交易时生成的唯一编码,通过交易双方交换的密钥进行加密。Transaction number (encryption): the unique code generated when confirming the transaction, encrypted by the key exchanged by both parties to the transaction.
输入UTXO:该笔交易来源的UTXO,资金链上的数字货币可以由实体货币1:1兑换转入,或通过挖矿等内部机制产生。Input UTXO: UTXO from the source of the transaction. The digital currency on the capital chain can be transferred in by 1:1 conversion of physical currency, or generated through internal mechanisms such as mining.
输出UTXO:该笔交易的去向,包含数量和接收人,输出的数量之和必须等于输入数量之和,接收人通过资金监管节点的公钥进行加密。Output UTXO: The destination of the transaction, including the quantity and the recipient. The sum of the output quantity must be equal to the sum of the input quantity, and the recipient is encrypted by the public key of the fund supervision node.
本实施例所公开的供应链交易系统同时兼顾了供应链上的交易隐私,具体的,供应链上的交易隐私可以分为渠道保密和商品交易价格保密两方面的需求。The supply chain transaction system disclosed in this embodiment also takes into account transaction privacy in the supply chain. Specifically, transaction privacy in the supply chain can be divided into two aspects: channel confidentiality and commodity transaction price confidentiality.
其中,渠道保密指交易双方身份对于其它企业保密,但是监管部门有权得知上下游企业身份以还原追溯链条,而商品交易价格保密指只有交易双方能够获取商品交易对应的合同金额或某次转账对应的商品交易明细。在物流交易和资金交易分离的情况下,实际就是将物流交易与资金交易关联后还原完整交易单信息的能力。Among them, channel confidentiality means that the identities of both parties to the transaction are kept secret from other companies, but the supervisory authority has the right to know the identities of upstream and downstream companies to restore the traceability chain, and the confidentiality of commodity transaction prices means that only both parties to the transaction can obtain the contract amount corresponding to the commodity transaction or a certain transfer Corresponding commodity transaction details. In the case of separation of logistics transactions and capital transactions, it is actually the ability to restore complete transaction order information after associating logistics transactions with capital transactions.
本供应链交易系统实现渠道保密的隐私策略如下:The privacy policy of this supply chain transaction system to achieve channel secrecy is as follows:
在上下游进行交易时,交易双方的企业节点每次生成2对密钥,2个公钥分别作为商品交易与资金交易的输出地址,2个私钥分别作为解锁物流链和资金链UTXO的凭证。在密钥生成的同时,需要将公钥分别上报至质量和资金监管节点进行备案。这样就能达到交易双方身份对其他节点匿名,对监管节点公开的效果。When transactions are carried out upstream and downstream, the enterprise nodes of both parties of the transaction generate 2 pairs of keys each time. The 2 public keys are used as the output addresses for commodity transactions and fund transactions, and the 2 private keys are used as vouchers for unlocking the logistics chain and the capital chain UTXO. . While the key is being generated, the public key needs to be reported to the quality and capital supervision nodes for filing. In this way, the identities of both parties to the transaction can be made anonymous to other nodes and made public to supervisory nodes.
具体的,本供应链交易系统实现商品交易价格保密的隐私策略如下:Specifically, the privacy policy of this supply chain transaction system to realize the confidentiality of commodity transaction prices is as follows:
物流链和资金链通过“交易单号”实现相互之间的关联,在进行交易时,双方企业会先通过DH密钥交换算法得到一个只有双方知道的密钥,并将交易信息分别发布至物流链和资金链上,其中物流链上存储的交易单号不加密,资金链上的交易单号通过对称加密算法用密钥加密,此时只有交易双方可以通过交换的密钥和交易单号建立起物流交易与资金交易关联。The logistics chain and the capital chain are related to each other through the "transaction order number". When conducting a transaction, the two companies will first obtain a key that only the two parties know through the DH key exchange algorithm, and publish the transaction information to the logistics separately On the chain and the capital chain, the transaction ticket number stored on the logistics chain is not encrypted, and the transaction ticket number on the capital chain is encrypted with a key through a symmetric encryption algorithm. At this time, only the parties to the transaction can establish the transaction through the exchanged key and transaction ticket number. Begin logistics transactions and capital transactions.
具体的,两个企业节点在每次交易产生时产生资金流密钥对和物流密钥对,资金流密钥对包括分别存储在两个企业节点的两个资金流密钥;物流密钥对包括分别存储在两个企业节点的两个物流密钥;每一资金流密钥包括资金流公钥和资金流私钥;每一物流密钥包括物流公钥和物流私钥;其中:Specifically, two enterprise nodes generate a capital flow key pair and a logistics key pair each time a transaction is generated. The capital flow key pair includes two capital flow keys stored in the two enterprise nodes; the logistics key pair Including two logistics keys stored in two enterprise nodes; each capital flow key includes a capital flow public key and a capital flow private key; each logistics key includes a logistics public key and a logistics private key; among them:
资金流公钥作为输出资金UTXO的输出地址;物流公钥作为输出物流UTXO的输出地址;资金流私钥作为解锁输出资金UTXO的凭证;物流私钥作为解锁输出物流UTXO的凭证。进一步的,资金流公钥与其所存储的企业节点的信息被备份至资金监管节点;物流公钥与其所存储的企业节点的信息被备份至质量监管节点。The capital flow public key is used as the output address of the output capital UTXO; the logistics public key is used as the output address of the output logistics UTXO; the capital flow private key is used as the voucher for unlocking the output capital UTXO; the logistics private key is used as the voucher for unlocking the output logistics UTXO. Further, the capital flow public key and the stored information of the enterprise node are backed up to the fund supervision node; the logistics public key and the stored information of the enterprise node are backed up to the quality supervision node.
参照图3,下面将以卖方A和买方B之间的交易为例叙述本发明的工作流程:Referring to Figure 3, the following will take the transaction between seller A and buyer B as an example to describe the workflow of the present invention:
1、交易的发起者既可以是买方也可以是卖方。买方发起交易的情况,A向B发起订货单,B进行确认;卖方发起交易的情况,B对外公开发布销售单,A对其进行认领。本过程中的所有操作仅存在与应用层面,不与区块链交互。1. The initiator of the transaction can be either the buyer or the seller. When a buyer initiates a transaction, A initiates an order form to B, and B confirms it; when a seller initiates a transaction, B publicly releases a sales order, and A claims it. All operations in this process only exist at the application level and do not interact with the blockchain.
2、双方达成交易确认后,确认的一方会生成一个唯一的交易单号。2. After the two parties have reached a transaction confirmation, the confirmed party will generate a unique transaction ticket number.
3、A、B分别生成两对非对称密钥,分别为(A1,A1’)和(A2,A2’)以及(B1,B1’)和(B2,B2’),交换公钥A1、A2、B1、B2,并将A1、B1上报至质量监管节点,A2、B2上报至资金监管节点。具体的,监管节点保存一张企业-公钥地址的映射表用于解密链条上交易主体的身份。3. A and B respectively generate two pairs of asymmetric keys, namely (A1,A1') and (A2,A2') and (B1,B1') and (B2,B2'), and exchange public keys A1, A2 , B1, B2, and report A1, B1 to the quality supervision node, and A2, B2 to the fund supervision node. Specifically, the supervisory node saves a corporate-public key address mapping table for decrypting the identity of the transaction subject on the chain.
4、A、B通过DH密钥交换算法得到一个双方共有的密钥C1,对交易单号进行加密。4. A and B obtain a key C1 shared by both parties through the DH key exchange algorithm, and encrypt the transaction number.
5、将B的交易资金UTXO转入智能合约,同时传入加密的交易单号,此时这些UTXO处于锁定状态,A或B都无法使用。5. Transfer B's transaction funds UTXO to the smart contract, and at the same time pass in the encrypted transaction ticket number. At this time, these UTXOs are locked and neither A nor B can be used.
6、将A的货物UTXO转入智能合约,同时应传入未加密的单号、交易商品编码、商品识别码以及数量。此时这些UTXO处于锁定状态,A或B都无法使用。6. Transfer the UTXO of A's goods to the smart contract, and at the same time, pass in the unencrypted tracking number, transaction product code, product identification code and quantity. At this time, these UTXOs are in a locked state, and neither A nor B can be used.
7、B确认收货时,调用物流链的智能合约,生成一笔商品交易,将A输入的UTXO中对应交易数量输出到地址B1,如有剩余则“找零”到地址A1。7. When B confirms the receipt of the goods, it calls the smart contract of the logistics chain to generate a commodity transaction, and outputs the corresponding transaction quantity in the UTXO input by A to address B1, and "change" to address A1 if there is any remaining.
8、物流交易确认后,调用资金链的智能合约,生成一笔资金交易,将B输入的UTXO中对应交易数量输出到地址A2,如有剩余则“找零”到地址B2。8. After the logistics transaction is confirmed, the smart contract of the capital chain is called to generate a capital transaction, and the corresponding transaction quantity in the UTXO input by B is output to address A2, and if there is surplus, "change" to address B2.
9、如果B不确认收货,则需要A同意终止交易,此时调用智能合约将A和B的UTXO解锁,如果A不同意终止交易,则需要权威机构介入协调,具体的,在智能合约中预留监管节点介入的通道。监管节点收集双方的证据后裁定资金和货物归属方,再调用智能合约执行。9. If B does not confirm the receipt, A agrees to terminate the transaction. At this time, the smart contract is called to unlock the UTXO of A and B. If A does not agree to terminate the transaction, an authority must intervene in coordination. Specifically, in the smart contract Reserve the channel through which the supervisory node intervenes. The supervisory node collects the evidence from both parties and decides the owner of the funds and goods, and then invokes the smart contract for execution.
下面参照图4,以用户在需要查询某个单号的交易单明细信息时,阐述在上述公开的供应链管理系统进行交易信息查询的流程:With reference to Figure 4 below, when a user needs to query the transaction details of a certain number, the process of querying transaction information in the above-mentioned public supply chain management system is described:
1、如果用户需要查询的是某一种、某一批次或某个追溯码的商品的交易单明细,则先根据商品编码和识别码在物流链上查询符合条件的交易单号。通过交换的秘钥C1加密交易单号,在资金链上查询该单号对应的资金交易。1. If the user needs to query the transaction order details of a certain kind, a certain batch or a certain traceability code, first query the eligible transaction order number on the logistics chain according to the product code and identification code. The transaction ticket number is encrypted by the exchanged secret key C1, and the fund transaction corresponding to the ticket number is queried on the fund chain.
2、如果用户需要查询的是某一笔资金收支对应的交易单明细,则先找到该笔交易对应的交易单号。通过交换的秘钥C1解密交易单号,在物流链上查询该单号对应的全部交易。2. If the user needs to query the transaction order details corresponding to a certain fund income and expenditure, first find the transaction order number corresponding to the transaction. The transaction ticket number is decrypted by the exchanged secret key C1, and all transactions corresponding to the ticket number are queried on the logistics chain.
3、最后将商品交易信息和资金交易信息组合起来,即可还原完整的交易单信息。3. Finally, combine the commodity transaction information and capital transaction information to restore the complete transaction order information.
本领域普通技术人员可以意识到,结合本发明实施例中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。A person of ordinary skill in the art may realize that the units and algorithm steps of the examples described in the embodiments disclosed in the embodiments of the present invention can be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered as going beyond the scope of the present invention.
在本申请所提供的实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如, 所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the embodiments provided in this application, it should be understood that the disclosed device and method may be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or It can be integrated into another system, or some features can be ignored or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, the functional units in the various embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可查看存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-viewable storage medium. Based on this understanding, the technical solution of the present invention essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage media include: U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk and other media that can store program codes.
以上详细描述了本发明的较佳具体实施例,应当理解,本领域的普通技术人员无需创造性劳动就可以根据本发明的构思作出诸多修改和变化。因此,凡本技术领域中技术人员依本发明构思在现有技术基础上通过逻辑分析、推理或者根据有限的实验可以得到的技术方案,均应该在由本权利要求书所确定的保护范围之中。The preferred embodiments of the present invention are described in detail above. It should be understood that those of ordinary skill in the art can make many modifications and changes according to the concept of the present invention without creative work. Therefore, all technical solutions that can be obtained by those skilled in the art through logical analysis, reasoning or limited experiments based on the concept of the present invention on the basis of the prior art should fall within the protection scope determined by the claims.
Claims (10)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201911365442.5 | 2019-12-26 | ||
| CN201911365442.5A CN111144844A (en) | 2019-12-26 | 2019-12-26 | A Supply Chain Management System Separating Funds and Logistics |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2021129002A1 true WO2021129002A1 (en) | 2021-07-01 |
Family
ID=70520413
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2020/117087 Ceased WO2021129002A1 (en) | 2019-12-26 | 2020-09-23 | Dual-chain supply chain transaction system based on utxo model |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN111144844A (en) |
| WO (1) | WO2021129002A1 (en) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111144844A (en) * | 2019-12-26 | 2020-05-12 | 广州中国科学院软件应用技术研究所 | A Supply Chain Management System Separating Funds and Logistics |
| CN112163866A (en) * | 2020-08-14 | 2021-01-01 | 广州中国科学院软件应用技术研究所 | Market standing book chain construction system |
| CN113052601A (en) * | 2021-04-30 | 2021-06-29 | 中国银行股份有限公司 | Commodity sharing method and device based on double chains |
| CN113379547A (en) * | 2021-06-24 | 2021-09-10 | 华南理工大学 | A double-chain-based supply chain transaction data security supervision method and system |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109003030A (en) * | 2018-07-19 | 2018-12-14 | 深圳前海微众银行股份有限公司 | Object circulation method, system and the computer readable storage medium of block chain |
| CN109102285A (en) * | 2018-07-30 | 2018-12-28 | 上海淳麒金融信息服务有限公司 | Supply chain finance implementation method and its control system based on block chain duplex structure |
| CN109450638A (en) * | 2018-10-23 | 2019-03-08 | 国科赛思(北京)科技有限公司 | Electronic component data management system and method based on block chain |
| CN110020860A (en) * | 2019-04-09 | 2019-07-16 | 湖南天河国云科技有限公司 | A method, system and computer-readable storage medium for cross-chain asset transfer |
| US20190236560A1 (en) * | 2016-10-11 | 2019-08-01 | Coinplug, Inc. | Method for issuing, redeeming, refunding, settling and revoking electronic voucher by using utxo-based protocol, and server employing same |
| CN111144844A (en) * | 2019-12-26 | 2020-05-12 | 广州中国科学院软件应用技术研究所 | A Supply Chain Management System Separating Funds and Logistics |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109829726B (en) * | 2019-01-09 | 2021-08-27 | 莘上信息技术(上海)有限公司 | Block chain-based drug information management method and system |
| CN110570283A (en) * | 2019-09-11 | 2019-12-13 | 炫盛(上海)科技有限公司 | shopping method and system based on block chain |
-
2019
- 2019-12-26 CN CN201911365442.5A patent/CN111144844A/en active Pending
-
2020
- 2020-09-23 WO PCT/CN2020/117087 patent/WO2021129002A1/en not_active Ceased
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20190236560A1 (en) * | 2016-10-11 | 2019-08-01 | Coinplug, Inc. | Method for issuing, redeeming, refunding, settling and revoking electronic voucher by using utxo-based protocol, and server employing same |
| CN109003030A (en) * | 2018-07-19 | 2018-12-14 | 深圳前海微众银行股份有限公司 | Object circulation method, system and the computer readable storage medium of block chain |
| CN109102285A (en) * | 2018-07-30 | 2018-12-28 | 上海淳麒金融信息服务有限公司 | Supply chain finance implementation method and its control system based on block chain duplex structure |
| CN109450638A (en) * | 2018-10-23 | 2019-03-08 | 国科赛思(北京)科技有限公司 | Electronic component data management system and method based on block chain |
| CN110020860A (en) * | 2019-04-09 | 2019-07-16 | 湖南天河国云科技有限公司 | A method, system and computer-readable storage medium for cross-chain asset transfer |
| CN111144844A (en) * | 2019-12-26 | 2020-05-12 | 广州中国科学院软件应用技术研究所 | A Supply Chain Management System Separating Funds and Logistics |
Also Published As
| Publication number | Publication date |
|---|---|
| CN111144844A (en) | 2020-05-12 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Ma et al. | The privacy protection mechanism of Hyperledger Fabric and its application in supply chain finance | |
| CN109829824B (en) | Commodity transaction information sharing method based on block chain technology | |
| Sunyaev | Distributed ledger technology | |
| JP6995762B2 (en) | Cryptographic methods and systems for the secure extraction of data from the blockchain | |
| WO2021129002A1 (en) | Dual-chain supply chain transaction system based on utxo model | |
| CN113439281A (en) | Digital legal currency | |
| TW202029086A (en) | Block chain-based evidence storage method and device | |
| WO2021135169A1 (en) | Blockchain-based management method, terminal, apparatus, and storage medium | |
| CN111369245A (en) | Alliance chain system for financial product sales | |
| Li et al. | A decentralized and secure blockchain platform for open fair data trading | |
| Cui et al. | Protecting vaccine safety: An improved, blockchain-based, storage-efficient scheme | |
| WO2020125234A1 (en) | Blockchain-based data processing method and apparatus | |
| WO2021220062A1 (en) | Blockchain transaction | |
| CN114254374B (en) | Data traceability method and system | |
| US20190026672A1 (en) | System and computer program for implementing an improved blockchain for use a value chain | |
| Zhang et al. | Environmental accounting system model based on artificial intelligence blockchain and embedded sensors | |
| Chen et al. | Optimization Model of Cross‐Border E‐commerce Payment Security by Blockchain Finance | |
| Qian et al. | A method of exchanging data in smart city by blockchain | |
| Hassan et al. | Future of the internet of things emerging with blockchain and smart contracts | |
| KR20220167146A (en) | System for providing blockchain based international trade automation service for import and export business using smart contract | |
| Huang et al. | Building private blockchains over public blockchains (PoP) an attribute-based access control approach | |
| CN115375305A (en) | Ship data credible tracing method based on block chain | |
| CN113704353B (en) | Block chain credit investigation method integrating information chain and privacy chain | |
| Yu et al. | Blockchain technology for the 5g-enabled internet of things systems: Principle, applications and challenges | |
| CN118821202A (en) | Method and system for privacy protection and privacy intersection of power data based on blockchain |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20907354 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 20907354 Country of ref document: EP Kind code of ref document: A1 |