WO2020114242A1 - Token conversion method based on public blockchain and blockchain system - Google Patents

Token conversion method based on public blockchain and blockchain system Download PDF

Info

Publication number
WO2020114242A1
WO2020114242A1 PCT/CN2019/119533 CN2019119533W WO2020114242A1 WO 2020114242 A1 WO2020114242 A1 WO 2020114242A1 CN 2019119533 W CN2019119533 W CN 2019119533W WO 2020114242 A1 WO2020114242 A1 WO 2020114242A1
Authority
WO
WIPO (PCT)
Prior art keywords
chain
exchange
supply
public
transaction
Prior art date
Application number
PCT/CN2019/119533
Other languages
French (fr)
Chinese (zh)
Inventor
白杰
吴先锋
李冬云
Original Assignee
白杰
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 白杰 filed Critical 白杰
Priority to JP2021516604A priority Critical patent/JP6979736B2/en
Publication of WO2020114242A1 publication Critical patent/WO2020114242A1/en

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/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • G06Q20/065Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash
    • 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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • 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/381Currency conversion
    • 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/3827Use of message hashing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
    • 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
    • G06Q2220/00Business processing using cryptography
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2463/00Additional details relating to network architectures or network communication protocols for network security covered by H04L63/00
    • H04L2463/102Additional details relating to network architectures or network communication protocols for network security covered by H04L63/00 applying security measure for e-commerce

Definitions

  • This application relates to the field of network transaction technology, and in particular to a public chain-based certificate exchange method and blockchain system.
  • Blockchain technology is a relatively objective non-repudiation digital environment created based on the decentralized system application architecture and public consensus. Based on the blockchain technology, the authenticity of the network information can be guaranteed. For example, if a transaction occurs in the blockchain network, the nodes in the blockchain network will generate block data that records the transaction content based on the transaction information, and the block The data is broadcast throughout the network, and other nodes in the network store block data at the same time, forming an unchangeable blockchain.
  • the transaction has a broad sense, not referring to "commodity trading" or “item exchange” in the traditional sense, but refers to a certain data operation content or operation result on the blockchain network, for example, a certain
  • the blockchain node A initiates a query request a for the performance of a certain type of communication device, and the query request a is a transaction for the blockchain node B that undertakes the query service.
  • Empathy It is also a transaction that node B sends the performance table b of the communication device of the model obtained to the node A to the query.
  • Information A, a and information B, b will be written into the data block of the blockchain as transaction information.
  • transactions in the blockchain network will use a digital token as a marker for network transactions, used to measure the degree of attention or value of the transaction operation itself or calibrate the transaction data, for example, Bitcoin Network bitcoin, Ethereum network Ether.
  • a digital token used to measure the degree of attention or value of the transaction operation itself or calibrate the transaction data, for example, Bitcoin Network bitcoin, Ethereum network Ether.
  • different blockchain networks use different types of certificates. As a symbol of network transactions, different types of exchanges need to be exchanged, so that the use of A-blockchain network A and B-blockchain network B, through A-block and B-block Information or value transfer between two blockchain networks.
  • STO exchange which provides a trading center in the form of an exchange in the network, and the trading center provides an exchange platform between different STOs so that both parties involved in the exchange can follow a certain exchange ratio , In exchange for the number 1 A-share pass for the quantity 2 B-share pass.
  • the exchange operation between the two types of securities passes depends on the traditional exchange platform or a third-party platform, and the exchange ratio also depends on the exchange platform or the third-party platform (such as the bank). Since the exchange platform or third-party platform is essentially a centralized platform, it is vulnerable to network attacks and security is difficult to guarantee. In addition, the traditional exchange platform needs to determine the exchange counterparty.
  • the exchange party of the exchange party is the relatively uncommon stock exchange, it takes a long time to find the exchange opponent and determine the exchange ratio between the stock exchanges, which will cause the exchange process to consume a long time. Not only can the exchange not be completed in time, it will also consume more network resources and reduce the exchange efficiency.
  • This application provides a public chain-based exchange method and block chain system to solve the problem that the traditional exchange method is controlled by a centralized program and the exchange efficiency is low.
  • the present application provides a public chain-based exchange method for stock exchange, which is applied to the public chain network and includes
  • the supply transaction including the type and number of supply certificates transferred to the public chain;
  • the steps of querying the supply volume of the supply chain in the public chain network and calculating the exchange ratio of the supply chain and the public chain stock chain according to the supply volume of the supply chain include:
  • the pledge certificate pass includes a predetermined number of supply certificate passes to the public chain and the public chain certificate passes to the public chain at the same time;
  • the initial conversion ratio is stored, and based on the initial conversion ratio, the conversion ratio is adjusted in real time according to the number of subsequent supply pass transfers.
  • the method before the step of receiving a supply transaction initiated by the supply chain, the method further includes:
  • the steps of querying the supply volume of the initial stock exchange and the exchange stock exchange in the public chain network, and calculating the conversion ratio of the exchange stock exchange and the initial stock exchange according to the supply volume include:
  • the initial stock exchange is a public chain stock exchange, query the supply of exchange stocks in the public chain network;
  • the initial stock exchange is not a public chain stock exchange, query the supply of the initial stock exchange and exchange stock exchange in the public chain network;
  • the steps of configuring the smart contract to the supply chain include:
  • the present application provides a public chain-based exchange method for securities, which is applied to the supply chain network and includes:
  • the supply transaction includes the type of supply pass and the number of supply passes transferred to the public chain;
  • the receiving public chain calculates based on the supply volume of the supply pass, and the exchange ratio of the supply pass to the public link pass confirms whether the transaction is completed;
  • the public chain transfer After confirming the completion of the transaction, the public chain transfer that has the same value as the number of supply certificate transfers received from the public chain transfer.
  • the receiving public chain calculates the supply ratio of the supply pass, the exchange ratio between the supply pass and the public link pass, and the steps to confirm whether the transaction is completed include:
  • Control the parallel chain to generate a query transaction based on the supply transaction and initiate a query transaction to the public chain, so that the public chain returns the exchange ratio between the supply certificate and the public chain certificate to the parallel chain according to the query transaction;
  • Control the parallel chain to calculate the number of available public chain certificates and send the number of public chain certificates to the supply chain based on the exchange ratio between supply certificates and public chain certificates.
  • the present application provides a public chain-based exchange method for exchanges, which is applied to the exchange chain network and includes:
  • the exchange transaction includes the initial number of exchanges and the type of exchange exchanges transferred to the public chain;
  • the receiving public chain calculates based on the supply of the initial stock exchange and the exchange stock exchange, the conversion ratio of the exchange stock exchange and the public chain stock exchange, and confirms whether the transaction is completed;
  • the receiving public chain calculates the conversion ratio of the exchange stock exchange and the public chain stock exchange based on the supply of the stock exchange stock exchange, and the steps to confirm whether the transaction is completed include:
  • Control the parallel chain to generate a query transaction based on the exchange transaction, and initiate a query transaction to the public chain, so that the public chain returns the conversion ratio of the exchange certificate to the initial certificate to the parallel chain according to the query transaction;
  • Control the parallel chain to calculate the number of available exchange passes based on the exchange ratio of the exchange pass and the initial pass, and send the number of exchange passes to the exchange chain;
  • the present application provides a public blockchain-based blockchain system, including: a public chain, and a supply chain and an exchange chain connected to the public chain network.
  • the public chain, the supply chain, and the exchange chain are all peer-to-peer networks;
  • the supply chain is configured to: initiate a supply transaction to the public chain, and the supply transaction includes the type and number of supply certificates that are transferred to the public chain; and, the public chain certificate that receives transfers from the public chain;
  • the exchange chain is configured to initiate an exchange transaction to the public chain, and the exchange transaction includes the initial number of exchanges and types of exchanges to be transferred to the public chain; and, the exchange exchange to receive transfers from the public chain;
  • the public chain is configured to: receive supply transactions initiated by the supply chain; query the supply volume of the supply chain in the public chain network, and calculate the exchange ratio between the supply chain and the public chain chain based on the supply volume of the supply chain; based on The exchange ratio of supply certificate to public chain certificate, transfer to the supply chain and the value of the supply chain to the public chain certificate;
  • this application provides a public chain-based certificate exchange method and blockchain system.
  • multiple supply chains initiate supply transactions to the public chain to transfer their respective supply
  • the stock exchange is converted into an equal value public chain stock exchange.
  • the public chain stores and records the supply of various supply stock transfers in the supply chain transfer; the exchange chain initiates the exchange transaction to the public chain to make the public chain according to the exchange transaction.
  • Specify the supply amount of the initial stock exchange and the exchange stock exchange calculate the conversion ratio, and then extract the exchange stock equivalent to the initial stock exchange from the stored supply stock exchange and transfer it to the exchange chain.
  • the method uses the public chain to judge the exchange ratio between different securities, which can provide an objective and reasonable exchange environment.
  • the supply certificate is stored through the public chain, so that when the exchange chain performs the exchange transaction, the transaction only occurs with the public chain. There is no need to contact the exchange counterparty to avoid the participation of the centralized program and improve the exchange efficiency.
  • FIG. 1 is a schematic flow chart of the application of the certificate exchange method applied to the public chain network
  • Figure 2 is a schematic diagram of the process of applying for supply transactions in the supply chain
  • Figure 3 is a schematic diagram of the application transaction process with a pledge period
  • Figure 4 is a schematic diagram of the process of determining whether the contract is supported by the application supply transaction
  • Figure 5 is a schematic diagram of the flow of the application to complete the supply transaction through the parallel chain
  • Figure 6 is a schematic diagram of the process of applying for verification of supply chain supply qualification
  • Figure 7 is a schematic diagram of the flow of the exchange chain for redemption transactions
  • Figure 8 is a schematic diagram of the process of calculating the exchange ratio in the application for exchange transactions
  • FIG. 10 is a schematic diagram of the structure of a public exchange-based block chain system based on the application.
  • a blockchain network refers to a peer-to-peer (P2P) network with a decentralized application architecture.
  • the blockchain network is capable of distributed storage, public consensus, digital encryption, transaction accounting, and verification. That is, a trading platform covering distributed technology, cryptography, P2P network architecture, and various consensus algorithms that may be applied.
  • Blockchain or blockchain information refers to the accounting information generated based on the transaction information when transactions occur in the blockchain network, that is, multiple specific transactions form a block, and multiple blocks form a block chain.
  • the blockchain network includes nodes that establish peer-to-peer network connections with each other. Each node is configured with a corresponding consensus mechanism, such as a smart contract, and has sufficient computing power to conduct transaction verification and accounting procedures. Nodes also have interface specifications that conform to a unified standard to enable access to more nodes or other types of blockchain networks through the interface specifications.
  • public chain, exchange chain, supply chain, and parallel chain refer to different blockchain networks that comply with blockchain technology.
  • public chain, exchange chain, supply chain and parallel chain refer to corresponding networks, namely public chain network, exchange chain network, supply chain network and parallel chain network.
  • the public chain network is a basic platform arranged in the entire network, and its node interfaces are connected to multiple blockchain networks, such as industry chains, alliance chains and private chains and third-party blockchain networks built based on the public link port specifications. .
  • Each blockchain network can serve as an independent development platform and provide corresponding services within its network.
  • the definition and specification of the public chain has a standard interface method to facilitate network connection with other blockchains, such as the exchange chain and the supply chain.
  • the public chain in this application has the ability to support cross-chain intermediary, and also has the ability to store certificates, decentralized applications and smart contracts.
  • the exchange chain and supply chain refer to the blockchains connected to the public chain network, that is, in this application, the public chain provides the basic platform, and the exchange chain and supply chain as the access blockchain network have their own functions and services .
  • the exchange chain and supply chain can be a blockchain network built on the basis of public chain network standards and interface specifications, that is, the exchange chain and supply chain can directly communicate and service dock with the public chain network.
  • the exchange chain and supply chain can also be separate networks with their own proprietary interface specifications, such as the existing blockchain network Bitcoin, Ethereum, etc., or industry chains and alliance chains developed by certain industries, or even It is a private chain built to meet certain service needs.
  • These existing blockchains, industry chains, alliance chains, and private chains are due to their proprietary network interface specifications. Generally, they cannot directly trade with each other or even with the public chain network. Therefore, in this application, parallel chains can be used to connect the public chain with other networks.
  • the parallel chain can be composed of some nodes in the public chain network, and the parallel chain can bridge the public chain with other networks that cannot be directly traded.
  • each blockchain network corresponds to a parallel chain.
  • the parallel chain is set to have the complete function of the corresponding blockchain network and can synchronize the transactions in the blockchain network. Transform and transfer to the public chain network. Therefore, in the technical solution provided by the present application, the parallel chain can be determined as a mirror image of the corresponding blockchain network, and for convenience of description, the corresponding blockchain network becomes the parent chain.
  • the parallel chain is composed of some nodes in the public chain network, and these nodes are also nodes in the parent chain to transfer transaction information.
  • the public chain can provide cross-chain relays in actual applications, complete transaction verification, data certification, asset transfer, and smart contract execution.
  • the unified external interface specification of the public chain can enable other blockchain networks to quickly access the public chain network.
  • the public chain also provides the basic blockchain platform capabilities, that is, quickly complete the deployment and verification of the plan, and complete the distributed storage and accounting procedures in the public chain network.
  • the public chain can also provide public development functions, so as to complete the collaborative development and deployment of multiple parallel chain smart contracts at one time.
  • the public chain can also be used to store information summaries of corresponding cross-chain transactions, that is, transaction summaries. Record related content of cross-chain transactions through formatted transaction data.
  • the public chain in order to reduce the occupation of distributed storage space on the public chain, when the public chain records certain information, it can also record third-party blockchain information through a specific compression algorithm.
  • the block data formed and stored in the public chain may include the following content: block identification (such as sequence number, time stamp, block hash value, and previous block hash value), block attribution (ie, block generator ), other information of the block (such as random value, difficulty value and additional information, etc.), block weight, information summary (such as transaction tree, status tree, receipt tree and data tree, etc.), transaction fees, rewards, size, etc.
  • block identification such as sequence number, time stamp, block hash value, and previous block hash value
  • block attribution ie, block generator
  • other information of the block such as random value, difficulty value and additional information, etc.
  • block weight such as random value, difficulty value and additional information, etc.
  • information summary such as transaction tree, status tree, receipt tree and data tree, etc.
  • transaction fees such as rewards, size, etc.
  • FIG. 1 it is a schematic flow chart of a method of stock exchange conversion applied to a public chain network.
  • the method of exchange for securities provided by this application when applied to the public chain network, includes the following steps:
  • S11 Receive a supply transaction initiated by the supply chain, where the supply transaction includes the type and number of supply certificates transferred to the public chain;
  • S12 Query the supply volume of the supply chain in the public chain network, and calculate the exchange ratio between the supply chain and the public chain stock chain based on the supply volume of the supply chain;
  • S13 According to the exchange ratio of the supply certificate and the public chain certificate, transfer the value to the supply chain and the value of the supply chain to the public chain certificate.
  • the purpose of the above steps is to complete the supply operation between supply chain and public chain, that is, supply transaction.
  • the supply chain is configured to perform the following procedural steps:
  • S21 Initiate a supply transaction to the public chain.
  • the supply transaction includes the types of supply certificates and the number of supply certificates transferred to the public chain;
  • the receiving public chain calculates based on the supply volume of the supply certificate, the exchange ratio of the supply certificate and the public chain certificate, and confirms whether the transaction is completed;
  • the transfer transaction is completed between the supply chain and the public chain, and the certificate circulation in the supply chain is transferred to the public chain to participate in the subsequent exchange transaction. That is to say, in actual application, the supply chain first initiates a supply transaction to the public chain, and the supply transaction includes the types of supplied securities and the number of securities that can be supplied.
  • the supply transaction includes the types of supplied securities and the number of securities that can be supplied.
  • a total of access to network A ⁇ network F these six blockchain networks, in network A ⁇ network F, the respective types of circulation of securities (or the type of securities that support outbound exchange transactions ) Are Ta, Tb, Tc, Td, Te, and Tf, respectively.
  • the node in network C that is responsible for cross-chain transactions (this application can be called a supply node) first initiates supply transactions to the public chain network, namely The supply chain performs the steps of S21 above.
  • the supply transaction includes the type of supply pass that is transferred to the public chain, that is, Tec Tc; and the number of supply passes that are transferred, for example, 1000 Tc Tc transferred to the public chain.
  • the public chain executes step S11, and then inquires the supply quantity of the supply certificate through the public chain network according to the content of the supply transaction.
  • the same kind of supply certificate can come from one blockchain network or multiple blockchain networks. Therefore, for supply transactions initiated by the supply chain, you can first query whether the current public chain network has been stored. Corresponding supply pass. For example, after receiving the supply transaction, the public chain P extracts the type of supply certificates in the supply transaction as Tc, and the number of supply certificates is 1000. The public chain P then queries the certificates from various supply certificates stored in the public chain network.
  • the specific method for calculating the exchange ratio between the supply certificate Tc and the public chain certificate Tp according to the supply volume can be a calculation method agreed by the public chain, or a value exchange agreement that has been recognized by consensus. Such as hereor agreement.
  • the method of calculating the exchange ratio by supplying the supply of Stock Connect can further consider other factors to further weight the calculation, such as the weight of the degree of circulation, and the weight of the stability of the value of the blockchain network.
  • the technical solutions provided in this application can be When each blockchain network accesses the public chain network, the way of the on-line conditional constraints allows the connected blockchain network to transfer part of the supply certificate to the public chain as the reserve quantity of the supply certificate type, the specific reserve quantity value It can be determined according to the size of the accessed blockchain.
  • the steps of querying the supply volume of the supply chain in the public chain network, and calculating the exchange ratio of the supply chain through the supply chain of the supply chain include:
  • S131 Receive a pledge certificate pass for supply chain transfers, the pledge certificate pass includes a predetermined number of supply certificate passes to the public chain and a public chain certificate pass to the public chain at the same time;
  • S132 Calculate the initial exchange ratio based on the quantitative relationship between the supplied pledge certificate and the supply certificate and the public chain certificate;
  • S133 Store the initial conversion ratio, and based on the initial conversion ratio, adjust the conversion ratio in real time according to the number of subsequent supply pass transfers.
  • a supply chain corresponding to a supply pass as an exchange party for this supply pass needs to transfer the supply pass to the public chain and pledge a part of the public link pass to the public chain, namely to Public chain transfer pledge certificate pass, which includes a preset number of supply certificate passes to the public chain and a public chain certificate pass to the public chain at the same time.
  • the public chain can calculate the initial exchange ratio based on the quantitative relationship between the supply certificate and the public chain certificate. That is to say, in the technical solution provided by this application, the initial exchange ratio requires the project party to pledge supply certificate and public certificate on the public chain.
  • a pool for the exchange of stock passes can be formed in the public chain. This pool has supply stock exchanges and public chain stock exchanges to support exchange transactions. This pool can be understood as the concept of financial reserves.
  • the exchange ratio between the supply certificate and the public chain certificate will be updated in real time. That is, in the initial situation, the access nodes in the supply chain provide a preset number of supply certificates and the corresponding public chain certificates through the smart contract provided by the public chain to determine the corresponding exchange ratio. For example, the supply chain provides 1000 supply certificates and 10 public chain certificates at the same time, and the corresponding exchange ratio is determined to be 100:1. This part of the initial supply of securities will be used as reserve securities.
  • the smart contract can be called multiple times, and each call completes a pass exchange, and the corresponding exchange ratio can be updated through non-stop exchange.
  • the exchange Since there is no exchange opponent, the exchange will be directly reserved, and the exchange ratio is the current real-time ratio. If the reserve pass is exhausted, it will be manifested in two situations: one case is that the supply pass is exhausted and overbought, then the supply pass is in short supply, and the supply pass will appreciate, so it will encourage the access chain network to provide supply Stock exchange, otherwise the price will increase consistently; another situation is that the public chain stock exchange corresponding to the reserve stock exchange is exhausted and oversold, then the supply stock exchange is sold off and the price collapses, which will cause the value of the supply stock exchange to return to zero. . Therefore, under this mechanism, all parties involved in the exchange of Securities will do their utmost to maintain a fair exchange ratio and ensure the interests of all parties. In this embodiment, through the above-mentioned method of updating the exchange ratio, it is possible to protect the interests of various exchange participants as much as possible, ensure the maintenance of the value of their own certificate, and maintain the safety and fairness of the public chain itself.
  • the blockchain network connected to the public chain network initiates a supply transaction to supply various types of securities before the exchange of the securities.
  • the supply chain as the seller can exchange the pre-sold stock pass through the public chain to the public chain stock pass, and then store the sold stock pass through the public chain, so that there is no need to purchase counterparties to complete the exchange transaction.
  • the supply node within the supply chain will generate a block data that conforms to the supply chain network transaction specifications based on the supply transaction information, and the block data will be formed in the supply chain network. Broadcast with the public chain network to form a complete blockchain in the supply chain network.
  • the nodes in the public chain re-verify the block data, and form or further transform into block data that conforms to the public chain transaction specifications, so that after broadcasting in the public chain network, a complete, public chain network-based blockchain is formed To complete the billing operation.
  • the public chain calculates the exchange ratio, according to the exchange ratio and the number of supply certificate transfers to the supply chain, the value of the public chain certificate pass, the nodes in the public chain responsible for the transfer form a zone that meets the public chain transaction specifications Block data, and broadcast the block data in the public chain network to form a complete block chain.
  • the block data is sent to the supply chain network together with the transfer operation.
  • the block data will be broadcast again from the supply chain network to form a complete block chain to complete the billing operation.
  • the block data contains timestamp information, so the time of the first block data can be
  • the stamp is used as the timing start time, and can also form a complete blockchain, that is, the timestamp of the last blockchain is used as the timing start time.
  • the timing time reaches the time corresponding to the pledge period, the nodes in the public chain network initiate a refund transaction to the supply chain. It is also necessary to query the supply amount of the supply certificate in the public chain network, and calculate the real-time exchange ratio according to the supply amount, and according to the exchange The ratio returns the supply certificate to the supply chain.
  • the blockchain network connected to the public chain network can be used as a supply chain to initiate supply transactions to the public chain
  • different blockchain networks often have their own dedicated interface specifications and require special consensus methods.
  • Only smart contracts or public contracts can complete transactions with the public chain. Therefore, in some embodiments provided in this application, before receiving the supply chain-initiated supply transaction step, it is necessary to verify whether the supply chain is configured with a smart contract that conforms to the public chain exchange rules. If the corresponding smart contract is configured, then directly Initiate and complete supply transactions through smart contracts; if the supply chain is not configured with smart contracts, as shown in Figure 4, the method further includes:
  • S101 determine whether the supply chain supports the configuration of smart contracts
  • S104 Configure a smart contract for the parallel chain, so that the parallel chain initiates supply transactions to the public chain.
  • supply chains that support the configuration of smart contracts for example, for a blockchain network that is first launched to the public chain network and has the same interface specifications as the public chain network, It may support the configuration of smart contracts, therefore, smart contracts can be configured for this supply chain through the public chain.
  • some public chain nodes can be selected as parallel chains of the supply chain for the supply chain that accesses the public chain according to predetermined rules or the principle of proximity in the public chain.
  • a parallel chain node it can be configured to have all the functions and information of the public chain and the supply chain at the same time, and have a bridging role in order to complete the supply transaction and transfer operation between the supply chain and the public chain.
  • the public chain After configuring the parallel chain for the supply chain, the public chain can configure smart contracts for the parallel chain. Since the parallel chain is a part of the nodes in the public chain, configuring the smart contract for the parallel chain only requires setting the corresponding supply chain in the smart contract Information, giving the parallel chain a bridge function, so that the supply chain can initiate supply transactions to the public chain through the parallel chain.
  • the parallel chain nodes can come from the public chain network, can also come from the supply chain network, it can also come from the public chain network, partly from the supply chain network.
  • the public chain verifies the nodes and determines that the nodes as parallel chains can support the public chain network specifications.
  • the supply chain network cannot directly complete the transaction with the public chain. Therefore, as shown in FIG. 5, when receiving the public chain according to the supply certificate
  • the calculation of the supply amount of the pass, the exchange ratio of the supply of the stock exchange and the public chain stock exchange, and the steps to confirm whether the transaction is completed include:
  • S222 Control the parallel chain to generate a query transaction according to the supply transaction, and initiate a query transaction to the public chain, so that the public chain returns the exchange ratio of the supply certificate to the public chain certificate to the parallel chain according to the query transaction;
  • S223 Control the parallel chain to calculate the number of public chain certificates that can be obtained and send the number of public chain certificates to the supply chain according to the exchange ratio between supply certificates and public chain certificates.
  • S224 Receive the number of public chain certificates, determine whether to complete the transaction, and after determining to complete the transaction, control the parallel chain to initiate supply transactions to the public chain.
  • the parallel chain can generate a query transaction for the public chain according to the supply transaction.
  • the query transaction can be a transaction of a prescribed form, such as a transaction with a number of transaction passes , Or a transaction in the form specified by a smart contract, the inquiry transaction needs to be accompanied by supply certificate type information.
  • the public chain After receiving the inquiry transaction, the public chain returns the exchange ratio between the supply certificate and the public chain certificate to the parallel chain according to the inquiry transaction.
  • the parallel chain then passes the returned exchange rate to the supply chain, or calculates the number of public chain certificates that can be exchanged based on the supply transaction and the conversion ratio, and sends the available number of public chain certificates to the supply chain (or supply node) .
  • the supply chain After receiving the number of public chain certificates issued by the parallel chain, the supply chain can judge it to determine whether it can accept such exchange results. If the supply chain can accept the exchange result, the parallel chain can be controlled to send the supply transaction to the public chain. If the exchange result is not accepted, the parallel chain can be controlled to withdraw the supply transaction.
  • the public chain needs to verify the supply certificate of the supply chain, as shown in Figure 6, the specific supply qualification verification The method includes the following steps:
  • S105 verify the supply qualification of the supply chain supply certificate connected to the public chain network through the number of public chain certificates issued by the supply chain;
  • S107 If the number of public chain certificates issued by the supply chain is less than the verification threshold, determine that the supply chain does not have supply qualifications, send verification prompts to the supply chain, and store the types of supply certificates that the supply chain can provide.
  • the number of public chain certificates needed to be owned should be relatively large, and then the supply qualification of the supply certificate should be judged by the number of public chain certificates issued by the supply chain.
  • the verification of the supply chain's supply qualification can also avoid individual small blockchain networks, such as private chains, issuing false certificates, and avoiding the destruction of the exchange stability of the public chain system.
  • the supply chain supplies different types of certificates to the public chain, and stores them in the public chain, so as to access other blockchain networks in the public chain network for exchange.
  • the supply chain and the exchange chain refer to the roles played when performing different types of operations.
  • the blockchain network connected to the public chain network as long as it can meet the corresponding certification supply qualification, it can be used as the supply chain.
  • all the blockchain networks connected to the public chain network can also be used as exchange chains to the public.
  • the chain initiates the exchange transaction to obtain the required securities.
  • the public chain is configured to perform the following procedure steps:
  • S14 Receive an exchange transaction initiated by the exchange chain, where the exchange transaction includes the initial number and type of exchange certificates transferred to the public chain;
  • S15 Query the supply volume of the initial stock exchange and the exchange stock exchange in the public chain network, and calculate the exchange ratio of the exchange stock exchange and the initial stock exchange based on the supply volume;
  • the exchange chain is configured to perform the following procedure steps:
  • S31 Initiate an exchange transaction to the public chain, where the exchange transaction includes the number of initial certificates and the type of exchange certificates transferred to the public chain;
  • the receiving public chain calculates the conversion ratio between the exchange stock exchange and the public chain stock exchange based on the supply of the initial stock exchange and the exchange stock exchange to confirm whether the transaction is completed;
  • the block chain network as the exchange chain first initiates the exchange transaction to the public chain, and the exchange transaction includes the initial number of exchange passes and the type of exchange pass.
  • the block chain network as the exchange chain is network A
  • one or more nodes (that is, exchange nodes) in network A need to use 100 certificates to exchange Ta to exchange certificates to Tc, then its node initiates a
  • the exchange transaction includes the initial number of exchanges to be transferred to the public chain is 100 exchanges Ta, and the exchange exchange type is Tc.
  • the exchange chain sends the exchange transaction containing the above information to the public chain.
  • the public chain After receiving the exchange transaction, the public chain extracts the types of the initial certificate exchange and the exchange certificate pass, and queries the initial certificate exchange and the exchange certificate in the public chain network. According to the supply of two kinds of securities, the exchange ratio of the two kinds of securities is calculated based on the supply of the two kinds of securities.
  • the calculation method of the exchange ratio is the same as the calculation method of the supply chain when initiating the supply transaction.
  • the initial stock exchange type during the exchange can be in many different forms.
  • the initial stock exchange type used for exchange can be in the network A Circulation Securities Link Ta can also be the public chain Securities Link Tp, or even the circulation of Tb, Te or Tf in other blockchains. Therefore, different methods can be used in the calculation of the exchange ratio.
  • the steps of querying the supply volume of the initial stock exchange and the exchange stock exchange in the public chain network, and calculating the exchange ratio of the exchange stock exchange and the initial stock exchange according to the supply volume include:
  • S156 Calculate the exchange ratio between the exchange certificate and the public chain certificate according to the supply of the exchange certificate
  • the exchange chain network A uses 100 public chain stock exchange Tp to exchange stock exchange Tc, then the public chain only needs to obtain the exchange stock supply, that is, the supply of stock exchange Tc. Then calculate the exchange ratio between the exchange certificate Tc and the public chain certificate Tp according to the supply of exchange certificates.
  • the initial stock exchange is not a public chain stock exchange, that is, the exchange chain network A uses 100 stock exchange Ta to exchange stock exchange Tc
  • the public chain needs to query the supply of the initial stock exchange Ta and the exchange stock exchange Tc at the same time, and then calculate separately
  • the exchange ratio between the initial stock exchange Ta and the public chain stock exchange Tp, as well as the exchange ratio between the exchange stock exchange Tc and the public chain stock exchange Tp, the final stock exchange stock Ta and the exchange are determined based on the exchange ratio calculated twice The exchange ratio between Tec Tc.
  • the public chain After calculating the exchange ratio between the initial stock exchange and the exchange stock exchange, the public chain transfers the exchange stock exchange and the value of the initial stock exchange to the exchange chain based on the number of transfer stock exchanges received. For example, if the exchange ratio between the initial stock exchange Ta and the exchange stock exchange Tc is 5:1, when the public chain receives 100 stock exchange Ta, it transfers 20 Tc to the exchange chain according to the exchange ratio. After the transfer, Store 100 STOs in the public chain, and then add 100 STO supplies in the public chain.
  • the step of confirming whether the transaction is completed includes:
  • S322 Control the parallel chain to generate a query transaction according to the exchange transaction, and initiate a query transaction to the public chain, so that the public chain returns the conversion ratio of the exchange certificate to the initial certificate to the parallel chain according to the query transaction;
  • S323 Control the parallel chain to calculate the number of available exchange passes based on the exchange ratio of the exchange pass and the initial pass, and send the number of exchange passes to the exchange chain;
  • S324 Receive the number of exchange certificates, determine whether to complete the transaction, and after determining to complete the transaction, control the parallel chain to initiate the exchange transaction to the public chain.
  • the parallel chain can generate a query transaction for the public chain according to the exchange transaction.
  • the query transaction may be a transaction of a prescribed form, such as a transaction in which the number of transaction passes is 0, or a transaction in a form specified by a smart contract, and the query transaction needs to carry exchange pass type information.
  • the public chain After receiving the inquiry transaction, the public chain returns the exchange ratio of the exchange certificate exchange to the initial exchange certificate to the parallel chain according to the inquiry transaction.
  • the parallel chain then passes the returned exchange ratio to the exchange chain, or calculates the number of exchangeable public chain certificates through the exchange transaction and the conversion ratio, and sends the available public chain certificates to the exchange chain (or exchange node) .
  • the exchange chain After receiving the number of public chain certificates issued by the parallel chain, the exchange chain can judge it to determine whether such exchange results can be accepted. If the exchange chain can accept the exchange result, the parallel chain can be controlled to send the exchange transaction to the public chain. If the exchange result is not accepted, the parallel chain can be controlled to withdraw the exchange transaction.
  • the exchange node within the exchange chain will generate a block data that conforms to the exchange chain network transaction specifications based on the exchange transaction information, and will The formed block data is broadcast respectively in the exchange chain network and the public chain network, thereby forming a complete block chain in the exchange chain network.
  • the nodes in the public chain re-verify the block data of the exchange transaction, and form or further convert into block data that conforms to the public chain transaction specifications, so that after broadcasting in the public chain network, a complete, public chain network-based Blockchain to complete bookkeeping operations.
  • exchange chain Ta and the supply chain Tc described in the above embodiments are merely examples for ease of description.
  • a blockchain network connected to a public chain network such as a third-party public chain,
  • the tripartite industry chain, alliance chain and private chain, as well as the sub-chain developed based on the public link specification, can be used as both the exchange chain and the supply chain.
  • a public chain network such as a third-party public chain
  • the tripartite industry chain, alliance chain and private chain, as well as the sub-chain developed based on the public link specification can be used as both the exchange chain and the supply chain.
  • multiple types of certificates can be provided for the same blockchain network.
  • the exchange chain and supply chain may not need to directly receive the transfer certificate exchange, but through the public chain or blockchain
  • the corresponding account on the network is used to complete the transfer, that is, between two incompatible two blockchain networks, the transfer can be completed through the account opened on the public chain to avoid the problem that the exchange chain cannot identify the exchange certificate.
  • the essence of the transaction process is to use Tec Tc and exchange for another Tec T, such as Ta, so for the supply chain, the supply is completed
  • the obtained public chain certificate pass Tp can be directly used to exchange the certificate pass Ta, that is, the network C can then be used as the exchange chain to initiate the exchange transaction, by transferring 3000 public chain certificate pass Tp to the public chain, exchange the equivalent value of the certificate pass Ta.
  • the step of determining the exchange ratio between the two STOs can be calculated according to the STO supply provided in the above scheme. It is also possible to build a regularly updated exchange rate table in the public chain network.
  • the exchange ratio table can provide a variety of exchange ratios between securities exchanges. This exchange ratio can be calculated and provided by some nodes in the public chain that are specifically used to balance the value of the securities exchange, or it can be provided by the financial industry chain connected to the public chain network. provide.
  • the maintenance nodes in the public chain and other blockchain networks related to the interest can vote on the financial industry chain to determine the The authority and effectiveness of the financial industry to provide a more reasonable exchange ratio.
  • the public chain when determining the exchange ratio between the two types of securities, the public chain can also guarantee the maximum exchange between the two parties by providing the exchange efficiency according to the amount of supply and referring to the exchange ratio table. rights and interests.
  • this application also provides a public blockchain-based blockchain system.
  • the blockchain system includes: a public blockchain, and a supply chain and redemption connected to the public blockchain network Chain, public chain, supply chain and exchange chain are all peer-to-peer networks;
  • the supply chain is configured to: initiate a supply transaction to the public chain, and the supply transaction includes the type and number of supply certificates that are transferred to the public chain; and, the public chain certificate that receives transfers from the public chain;
  • the exchange chain is configured to initiate an exchange transaction to the public chain, and the exchange transaction includes the initial number of exchanges and types of exchanges to be transferred to the public chain; and, the exchange exchange to receive transfers from the public chain;
  • the public chain is configured to: receive supply transactions initiated by the supply chain; query the supply volume of the supply chain in the public chain network, and calculate the exchange ratio of the supply chain through the supply chain of the supply chain; The exchange ratio of supply certificate to public chain certificate, transfer to the supply chain and the value of the supply chain to the public chain certificate;
  • this application provides a public chain-based certificate exchange method and blockchain system.
  • multiple supply chains initiate supply transactions to the public chain to transfer their respective supply
  • the stock exchange is converted into an equal value public chain stock exchange.
  • the public chain stores and records the supply of various supply stock transfers in the supply chain transfer; the exchange chain initiates the exchange transaction to the public chain to make the public chain according to the exchange transaction.
  • Specify the supply amount of the initial stock exchange and the exchange stock exchange calculate the conversion ratio, and then extract the exchange stock equivalent to the initial stock exchange from the stored supply stock exchange and transfer it to the exchange chain.
  • the method uses the public chain to judge the exchange ratio between different securities, which can provide an objective and reasonable exchange environment.
  • the supply certificate is stored through the public chain, so that when the exchange chain performs the exchange transaction, the transaction only occurs with the public chain. There is no need to contact the exchange counterparty to avoid the participation of the centralized program and improve the exchange efficiency.

Abstract

Disclosed are a token conversion method based on public blockchain and a blockchain system. In the practical use, a plurality of supply chains issue a supply transaction to a public blockchain, the supply tokens are converted into equal-value public blockchain tokens, and the public blockchain stores and records the supply amount of the received supply tokens; a conversion chain issues a conversion transaction to the public blockchain, the public blockchain calculates the conversion rate according to the supply amount of initial tokens and conversion tokens, extracts conversion tokens having equal value as the initial tokens from the stored supply tokens, and transfers to the conversion chain. In the method, the conversion rate between two kinds of tokens is calculated by means of the public blockchain, thus providing a relatively objective conversion environment. After a supply transaction occurs, the supply tokens are stored by means of the public blockchain, so that the conversion chain only transacts with the public blockchain during the conversion transaction and is not required to contact with the conversion counterparts, thereby avoiding centralized program or platform participation and improving conversion efficiency.

Description

基于公链的证通兑换方法及区块链系统Public chain-based certificate exchange method and blockchain system
本申请要求在2018年12月07日提交中国专利局、申请号为201811496915.0、发明名称为“基于公链的证通兑换方法及区块链系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requires the priority of the Chinese patent application filed on December 07, 2018 in the China Patent Office with the application number 201811496915.0 and the invention titled "Public Chain-based Exchange and Exchange Method and Blockchain System", all of which are approved by The reference is incorporated in this application.
技术领域Technical field
本申请涉及网络交易技术领域,尤其涉及一种基于公链的证通兑换方法及区块链系统。This application relates to the field of network transaction technology, and in particular to a public chain-based certificate exchange method and blockchain system.
背景技术Background technique
区块链技术是一种根据去中心化的系统应用架构和公众共识的方式,创建的一个相对客观的抗抵赖数字环境。基于区块链技术,可以保证网络信息的真实性,例如,区块链网络中发生一笔交易,区块链网络中的节点会根据交易信息生成记载交易内容的区块数据,并将区块数据进行全网广播,网络中的其他节点同时存储区块数据,形成不可更改的区块链。其中,所述交易具有广义性,不是指传统意义上的“商品买卖”、“物品交换”,而是指区块链网络上的某种数据操作内容或操作结果,例如,在网络上某个区块链节点A发起一个某型号通信设备性能的查询请求a,所述查询请求a对于承担查询服务的区块链节点B来说就是一笔交易。同理。节点B将查询得到的该型号通信设备的性能表b发送给节点A也是一笔交易。信息A、a和信息B、b作为交易信息会被写入区块链的数据块中。Blockchain technology is a relatively objective non-repudiation digital environment created based on the decentralized system application architecture and public consensus. Based on the blockchain technology, the authenticity of the network information can be guaranteed. For example, if a transaction occurs in the blockchain network, the nodes in the blockchain network will generate block data that records the transaction content based on the transaction information, and the block The data is broadcast throughout the network, and other nodes in the network store block data at the same time, forming an unchangeable blockchain. Among them, the transaction has a broad sense, not referring to "commodity trading" or "item exchange" in the traditional sense, but refers to a certain data operation content or operation result on the blockchain network, for example, a certain The blockchain node A initiates a query request a for the performance of a certain type of communication device, and the query request a is a transaction for the blockchain node B that undertakes the query service. Empathy. It is also a transaction that node B sends the performance table b of the communication device of the model obtained to the node A to the query. Information A, a and information B, b will be written into the data block of the blockchain as transaction information.
通常,在区块链网络中的交易,会使用一种数字证通(token),作为网络交易的标志物,用于衡量交易操作本身或标定交易数据的被关注程度或价值,例如,比特币网络的bitcoin,以太坊网络的Ether。通常,不同的区块链网络使用不同类型的证通。作为网络交易的标志物,不同类型的证通之间需要兑换,从而使用A证通的区块链网络A和使用B证通的区块链网络B,通过A证通和B证通,实现在两个区块链网络之间的信息或价值传递。Generally, transactions in the blockchain network will use a digital token as a marker for network transactions, used to measure the degree of attention or value of the transaction operation itself or calibrate the transaction data, for example, Bitcoin Network bitcoin, Ethereum network Ether. Generally, different blockchain networks use different types of certificates. As a symbol of network transactions, different types of exchanges need to be exchanged, so that the use of A-blockchain network A and B-blockchain network B, through A-block and B-block Information or value transfer between two blockchain networks.
传统的证通兑换操作利用证通交易所完成,即以交易所的形式在网络中提供一个交易中心,交易中心为不同证通之间提供兑换平台,以便参与兑换的双方能够按照一定的兑换比例,以数量1的A证通换取数量2的B证通。The traditional STO exchange operation is completed by STO exchange, which provides a trading center in the form of an exchange in the network, and the trading center provides an exchange platform between different STOs so that both parties involved in the exchange can follow a certain exchange ratio , In exchange for the number 1 A-share pass for the quantity 2 B-share pass.
现有的兑换方法中,两种类型证通之间的兑换操作依赖于传统的兑换平台或第三方平台,兑换比例也取决于兑换平台或第三方平台(如银关)。由于兑换平台或第三方平台本质上是中心化的平台,容易受到网络攻击,安全性难以保证。另外,传统的兑换平台需要确定兑换对手,当兑换一方的兑换对象是比较冷门的证通,需要长时间寻找兑换对手,以及确定证通间的兑换比例,将导致兑换过程消耗较长的时间,不但不能及时完成兑换,还会消耗更多的网络资源,降低兑换效率。In the existing exchange methods, the exchange operation between the two types of securities passes depends on the traditional exchange platform or a third-party platform, and the exchange ratio also depends on the exchange platform or the third-party platform (such as the bank). Since the exchange platform or third-party platform is essentially a centralized platform, it is vulnerable to network attacks and security is difficult to guarantee. In addition, the traditional exchange platform needs to determine the exchange counterparty. When the exchange party of the exchange party is the relatively uncommon stock exchange, it takes a long time to find the exchange opponent and determine the exchange ratio between the stock exchanges, which will cause the exchange process to consume a long time. Not only can the exchange not be completed in time, it will also consume more network resources and reduce the exchange efficiency.
发明内容Summary of the invention
本申请提供了一种基于公链的证通兑换方法及区块链系统,以解决传统证通兑换方法受中心化程序控制,兑换效率低的问题。This application provides a public chain-based exchange method and block chain system to solve the problem that the traditional exchange method is controlled by a centralized program and the exchange efficiency is low.
第一方面,本申请提供一种基于公链的证通兑换方法,应用于公链网络,包括:In the first aspect, the present application provides a public chain-based exchange method for stock exchange, which is applied to the public chain network and includes
接收供应链发起的供应交易,所述供应交易包括向所述公链转账的供应证通类型以及供应证通数量;Receiving a supply transaction initiated by the supply chain, the supply transaction including the type and number of supply certificates transferred to the public chain;
查询公链网络中供应证通的供给量,以及根据供应证通的供给量计算供应证通与公链证通的兑换比率;Query the supply volume of the supply chain in the public chain network, and calculate the exchange ratio between the supply chain and the public chain stock chain based on the supply volume of the supply chain;
根据供应证通与公链证通的兑换比率,向供应链转账与供应证通数量等价值的公链证通;According to the exchange ratio of supply certificate and public chain certificate, transfer to the supply chain and the value of the supply chain of the same value of the public chain certificate;
接收兑换链发起的兑换交易,所述兑换交易包括向公链转账的起始证通数量和兑换证通类型;Receive an exchange transaction initiated by the exchange chain, where the exchange transaction includes the initial number of exchanges and the type of exchange exchanges transferred to the public chain;
查询公链网络中起始证通和兑换证通的供给量,以及根据供给量计算兑换证通与起始证通的兑换比率;Query the supply volume of the initial stock exchange and the exchange stock exchange in the public chain network, and calculate the exchange ratio of the exchange stock exchange and the initial stock exchange based on the supply volume;
根据兑换证通与起始证通的兑换比率,向兑换链转账与起始证通数量等价值的兑换证通。According to the exchange ratio between the exchange pass and the initial pass, transfer the exchange pass with the value equal to the number of the initial pass to the exchange chain.
可选的,查询公链网络中供应证通的供给量,以及根据供应证通的供给量计算供应证通与公链证通的兑换比率的步骤包括:Optionally, the steps of querying the supply volume of the supply chain in the public chain network and calculating the exchange ratio of the supply chain and the public chain stock chain according to the supply volume of the supply chain include:
接收供应链转账的质押证通,所述质押证通包括向公链转账预设数量的供应证通以及同时向公链转账的公链证通;Receive the pledge certificate pass of the supply chain transfer, the pledge certificate pass includes a predetermined number of supply certificate passes to the public chain and the public chain certificate passes to the public chain at the same time;
根据接收的质押证通中,供应证通和公链证通的数量关系,计算初始兑换比率;Calculate the initial exchange ratio based on the quantitative relationship between the supplied pledge certificates, the supply certificates and the public chain certificates;
存储所述初始兑换比率,以及以所述初始兑换比率为基础,根据后续的供应证通转账数量实时调整兑换比率。The initial conversion ratio is stored, and based on the initial conversion ratio, the conversion ratio is adjusted in real time according to the number of subsequent supply pass transfers.
可选的,接收供应链发起的供应交易的步骤前,所述方法还包括:Optionally, before the step of receiving a supply transaction initiated by the supply chain, the method further includes:
通过供应链拥有的公链证通数量,验证接入公链网络的供应链供应证通的供应资质;Verify the supply qualification of supply chain supply certificates connected to the public chain network through the number of public chain certificates issued by the supply chain;
如果供应链拥有的公链证通数量大于或等于验证阈值,确定供应链具有供应资质,接收供应链发起的供应交易;If the number of public chain certificates passed by the supply chain is greater than or equal to the verification threshold, it is determined that the supply chain has supply qualifications and the supply transaction initiated by the supply chain is received;
如果供应链拥有的公链证通数量小于验证阈值,确定供应链不具有供应资质,向供应链发送验证提示信息,以及存储供应链所能够提供的供应证通类型。If the number of public chain certificates issued by the supply chain is less than the verification threshold, determine that the supply chain does not have supply qualifications, send verification prompts to the supply chain, and store the types of supply certificates that the supply chain can provide.
可选的,查询公链网络中起始证通和兑换证通的供给量,以及根据供给量计算兑换证通与起始证通的兑换比率的步骤包括:Optionally, the steps of querying the supply volume of the initial stock exchange and the exchange stock exchange in the public chain network, and calculating the conversion ratio of the exchange stock exchange and the initial stock exchange according to the supply volume include:
判断所述起始证通是否为公链证通;Determine whether the initial stock exchange is a public chain stock exchange;
如果所述起始证通是公链证通,查询公链网络中兑换证通的供给量;If the initial stock exchange is a public chain stock exchange, query the supply of exchange stocks in the public chain network;
根据兑换证通的供给量计算兑换证通与公链证通的兑换比率;Calculate the exchange ratio of exchange certificates to public chain certificates according to the supply of exchange certificates;
如果所述起始证通不是公链证通,查询公链网络中起始证通和兑换证通的供给量;If the initial stock exchange is not a public chain stock exchange, query the supply of the initial stock exchange and exchange stock exchange in the public chain network;
根据起始证通的供给量计算起始证通与公链证通的兑换比率;Calculate the exchange ratio between the initial stock exchange and the public chain stock exchange according to the supply of the initial stock exchange;
根据兑换证通的供给量计算兑换证通与公链证通的兑换比率;Calculate the exchange ratio of exchange certificates to public chain certificates according to the supply of exchange certificates;
计算兑换证通与起始证通的兑换比率。Calculate the exchange ratio between the exchange pass and the initial pass.
可选的,在接收供应链发起的供应交易的步骤前,验证供应链是否配置有符合公链兑换规则的智能合约,如果供应链未配置有智能合约,向供应链配置智能合约的步骤包括:Optionally, before the step of receiving the supply transaction initiated by the supply chain, verify whether the supply chain is configured with smart contracts that comply with the public chain exchange rules. If the supply chain is not configured with smart contracts, the steps of configuring the smart contract to the supply chain include:
判断供应链是否支持配置智能合约;Determine whether the supply chain supports the configuration of smart contracts;
如果供应链支持配置智能合约,向供应链配置智能合约;If the supply chain supports the configuration of smart contracts, configure smart contracts to the supply chain;
如果供应链不支持配置智能合约,向供应链配置平行链,所述平行链为公链网络中的部分节点;If the supply chain does not support the configuration of smart contracts, configure a parallel chain to the supply chain, which is a part of nodes in the public chain network;
为平行链配置智能合约,以使平行链向公链发起供应交易。Configure smart contracts for parallel chains so that the parallel chain initiates supply transactions to the public chain.
第二方面,本申请提供一种基于公链的证通兑换方法,应用于供应链网络,包括:In the second aspect, the present application provides a public chain-based exchange method for securities, which is applied to the supply chain network and includes:
向公链发起供应交易,所述供应交易包括向公链转账的供应证通类型以及供应证通数量;Initiate a supply transaction to the public chain, the supply transaction includes the type of supply pass and the number of supply passes transferred to the public chain;
接收公链根据供应证通的供给量计算的,供应证通与公链证通的兑换比率,确认是否完成交易;The receiving public chain calculates based on the supply volume of the supply pass, and the exchange ratio of the supply pass to the public link pass confirms whether the transaction is completed;
在确认完成交易后,接收公链转账的,与供应证通数量等价值的公链证通。After confirming the completion of the transaction, the public chain transfer that has the same value as the number of supply certificate transfers received from the public chain transfer.
可选的,接收公链根据供应证通的供给量计算的,供应证通与公链证通的兑换比率,确认是否完成交易的步骤包括:Optionally, the receiving public chain calculates the supply ratio of the supply pass, the exchange ratio between the supply pass and the public link pass, and the steps to confirm whether the transaction is completed include:
向供应链对应的平行链发起供应交易;Initiate supply transactions to the parallel chain corresponding to the supply chain;
控制平行链根据供应交易生成查询交易,并向公链发起查询交易,以使公链根据查询交易,向平行链返回供应证通与公链证通的兑换比率;Control the parallel chain to generate a query transaction based on the supply transaction and initiate a query transaction to the public chain, so that the public chain returns the exchange ratio between the supply certificate and the public chain certificate to the parallel chain according to the query transaction;
控制平行链根据供应证通与公链证通的兑换比率,计算可获得的公链证通数量,以及将公链证通数量发送至供应链;Control the parallel chain to calculate the number of available public chain certificates and send the number of public chain certificates to the supply chain based on the exchange ratio between supply certificates and public chain certificates.
接收公链证通数量,确定是否完成交易,以及在确定完成交易后,控制平行链向公链发起供应交易。Receive the number of public chain certificates, determine whether to complete the transaction, and after determining to complete the transaction, control the parallel chain to initiate supply transactions to the public chain.
第三方面,本申请提供一种基于公链的证通兑换方法,应用于兑换链网络,包括:In the third aspect, the present application provides a public chain-based exchange method for exchanges, which is applied to the exchange chain network and includes:
向公链发起兑换交易,所述兑换交易包括向公链转账的起始证通数量和兑换证通类型;Initiate an exchange transaction to the public chain. The exchange transaction includes the initial number of exchanges and the type of exchange exchanges transferred to the public chain;
接收公链根据起始证通和兑换证通的供给量计算的,兑换证通与公链证通的兑换比率,确认是否完成交易;The receiving public chain calculates based on the supply of the initial stock exchange and the exchange stock exchange, the conversion ratio of the exchange stock exchange and the public chain stock exchange, and confirms whether the transaction is completed;
在确认完成交易后,接收公链转账的,与公链证通数量等价值的兑换证通。After confirming the completion of the transaction, if the transfer from the public chain is received, the exchange certificate of the same value as the number of public chain certificates will be received.
可选的,接收公链根据兑换证通的供给量计算的,兑换证通与公链证通的兑换比率,确认是否完成交易的步骤包括:Optionally, the receiving public chain calculates the conversion ratio of the exchange stock exchange and the public chain stock exchange based on the supply of the stock exchange stock exchange, and the steps to confirm whether the transaction is completed include:
通过兑换链对应的平行链发起兑换交易;Initiate the exchange transaction through the parallel chain corresponding to the exchange chain;
控制平行链根据兑换交易生成查询交易,并向公链发起查询交易,以使公链根据查询交易,向平行链返回兑换证通与起始证通的兑换比率;Control the parallel chain to generate a query transaction based on the exchange transaction, and initiate a query transaction to the public chain, so that the public chain returns the conversion ratio of the exchange certificate to the initial certificate to the parallel chain according to the query transaction;
控制平行链根据兑换证通与起始证通的兑换比率,计算可获得的兑换证通数量,以及将兑换证通数量发送至兑换链;Control the parallel chain to calculate the number of available exchange passes based on the exchange ratio of the exchange pass and the initial pass, and send the number of exchange passes to the exchange chain;
接收兑换证通数量,确定是否完成交易,以及在确定完成交易后,控制平行链向公链发起兑换交易。Receive the number of exchange certificates, determine whether to complete the transaction, and after determining to complete the transaction, control the parallel chain to initiate the exchange transaction to the public chain.
第四方面,本申请提供一种基于公链的区块链系统,包括:公链,以及接入公链网络的供应链和兑换链,公链、供应链以及兑换链均为点对点的网络;In the fourth aspect, the present application provides a public blockchain-based blockchain system, including: a public chain, and a supply chain and an exchange chain connected to the public chain network. The public chain, the supply chain, and the exchange chain are all peer-to-peer networks;
其中,所述供应链被配置为:向公链发起供应交易,供应交易包括向公链转账的供应证通类型以及供应证通数量;以及,接收公链转账的公链证通;Wherein, the supply chain is configured to: initiate a supply transaction to the public chain, and the supply transaction includes the type and number of supply certificates that are transferred to the public chain; and, the public chain certificate that receives transfers from the public chain;
所述兑换链被配置为:向公链发起兑换交易,兑换交易包括向公链转账的起始证通数量和兑换证通类型;以及,接收公链转账的兑换证通;The exchange chain is configured to initiate an exchange transaction to the public chain, and the exchange transaction includes the initial number of exchanges and types of exchanges to be transferred to the public chain; and, the exchange exchange to receive transfers from the public chain;
所述公链被配置为:接收供应链发起的供应交易;查询公链网络中供应证通的供给量, 以及根据供应证通的供给量计算供应证通与公链证通的兑换比率;根据供应证通与公链证通的兑换比率,向供应链转账与供应证通数量等价值的公链证通;The public chain is configured to: receive supply transactions initiated by the supply chain; query the supply volume of the supply chain in the public chain network, and calculate the exchange ratio between the supply chain and the public chain chain based on the supply volume of the supply chain; based on The exchange ratio of supply certificate to public chain certificate, transfer to the supply chain and the value of the supply chain to the public chain certificate;
以及,接收兑换链发起的兑换交易;查询公链网络中兑换证通和起始证通的供给量,以及根据兑换证通和起始证通的供给量计算兑换证通与起始证通的兑换比率;根据兑换证通与起始证通的兑换比率,向兑换链转账与起始证通数量等价值的兑换证通。And, receive the exchange transaction initiated by the exchange chain; query the supply of the exchange certificate and the initial certificate in the public chain network, and calculate the exchange certificate and the initial certificate according to the supply of the exchange certificate and the initial certificate Exchange ratio; according to the exchange ratio between the exchange pass and the initial pass, transfer the exchange pass to the exchange chain and the number of the initial pass is equal to the exchange pass.
由以上技术方案可知,本申请提供一种基于公链的证通兑换方法及区块链系统,所述方法在实际应用中,多个供应链通过向公链发起供应交易,将各自提供的供应证通兑换为等价值的公链证通,公链对供应交链转账的各种供应证通进行存储并记录供应量;兑换链通过向公链发起兑换交易,以使公链根据兑换交易中指定的起始证通和兑换证通的供应量,计算兑换比率,再从存储的供应证通中,提取与起始证通等价值的兑换证通,并转账给兑换链。所述方法通过公链判断不同证通之间的兑换比率,可提供客观、合理的兑换环境。并且在供应交易发生后,通过公链将供应证通进行存储,使得兑换链在进行兑换交易时,仅与公链之间发生交易,不必接触兑换对手避免中心化程序参与,提高兑换效率。As can be seen from the above technical solutions, this application provides a public chain-based certificate exchange method and blockchain system. In practical applications, multiple supply chains initiate supply transactions to the public chain to transfer their respective supply The stock exchange is converted into an equal value public chain stock exchange. The public chain stores and records the supply of various supply stock transfers in the supply chain transfer; the exchange chain initiates the exchange transaction to the public chain to make the public chain according to the exchange transaction. Specify the supply amount of the initial stock exchange and the exchange stock exchange, calculate the conversion ratio, and then extract the exchange stock equivalent to the initial stock exchange from the stored supply stock exchange and transfer it to the exchange chain. The method uses the public chain to judge the exchange ratio between different securities, which can provide an objective and reasonable exchange environment. And after the supply transaction occurs, the supply certificate is stored through the public chain, so that when the exchange chain performs the exchange transaction, the transaction only occurs with the public chain. There is no need to contact the exchange counterparty to avoid the participation of the centralized program and improve the exchange efficiency.
附图说明BRIEF DESCRIPTION
图1为本申请应用于公链网络的证通兑换方法流程示意图;FIG. 1 is a schematic flow chart of the application of the certificate exchange method applied to the public chain network;
图2为本申请供应链进行供应交易的流程示意图;Figure 2 is a schematic diagram of the process of applying for supply transactions in the supply chain;
图3为本申请带有质押期的供应交易流程示意图;Figure 3 is a schematic diagram of the application transaction process with a pledge period;
图4为本申请供应交易判断是否支持合约的流程示意图;Figure 4 is a schematic diagram of the process of determining whether the contract is supported by the application supply transaction;
图5为本申请通过平行链完成供应交易的流程示意图;Figure 5 is a schematic diagram of the flow of the application to complete the supply transaction through the parallel chain;
图6为本申请验证供应链证通供应资质的流程示意图;Figure 6 is a schematic diagram of the process of applying for verification of supply chain supply qualification;
图7为本申请兑换链进行兑换交易的流程示意图;Figure 7 is a schematic diagram of the flow of the exchange chain for redemption transactions;
图8为本申请兑换交易中计算兑换比率的流程示意图;Figure 8 is a schematic diagram of the process of calculating the exchange ratio in the application for exchange transactions;
图9为本申请通过平行链完成兑换交易的流程示意图;9 is a schematic diagram of the flow of the application to complete the exchange transaction through the parallel chain;
图10为本申请一种基于公链的证通兑换区块链系统的结构示意图。FIG. 10 is a schematic diagram of the structure of a public exchange-based block chain system based on the application.
具体实施方式detailed description
在本申请提供的技术方案中,区块链网络是指具有去中心化应用架构的点对点(P2P)网络,所述区块链网络能够进行分布式存储、公共共识、数字加密、交易记账以及验证。即涵盖了分布式技术、密码学、P2P网络架构以及各种可能被应用的共识算法的交易平台。区块链或区块链信息是指在区块链网络中发生交易时,根据交易信息生成的记账信息,即多笔具体的交易组成一个区块,多个区块形成一条区块链。区块链网络中,包括相互建立点对点网络连接的节点,每一个节点都配置有相应的共识机制,如智能合约,并且具有足够的运算能力,以进行交易验证和记账程序。节点上还具有符合某种统一标准的接口规范,以实现通过接口规范接入更多的节点或者其他类型的区块链网络。In the technical solution provided by this application, a blockchain network refers to a peer-to-peer (P2P) network with a decentralized application architecture. The blockchain network is capable of distributed storage, public consensus, digital encryption, transaction accounting, and verification. That is, a trading platform covering distributed technology, cryptography, P2P network architecture, and various consensus algorithms that may be applied. Blockchain or blockchain information refers to the accounting information generated based on the transaction information when transactions occur in the blockchain network, that is, multiple specific transactions form a block, and multiple blocks form a block chain. The blockchain network includes nodes that establish peer-to-peer network connections with each other. Each node is configured with a corresponding consensus mechanism, such as a smart contract, and has sufficient computing power to conduct transaction verification and accounting procedures. Nodes also have interface specifications that conform to a unified standard to enable access to more nodes or other types of blockchain networks through the interface specifications.
在本申请中,所提及的公链、兑换链、供应链以及平行链,均是指符合区块链技术的不同区块链网络。本申请中除另有说明外,公链、兑换链、供应链以及平行链均是指相应的网络,即公链网络、兑换链网络、供应链网络以及平行链网络。其中,公链网络作为布置在全网的基础平台,其节点接口接入多个区块链网络,如基于公链接口规范搭建的行业链、联盟链以及私有链以及第三方区块链网路。每个区块链网络均可以作为一个独立的开 发平台,并为其网络内部提供相应的服务。其中,公链定义和规范有标准的接口方式,以便于同其他区块链,如兑换链和供应链,进行网络对接。本申请中公链具有支持跨链中介的能力,还具有存储证通、去中心化的应用和智能合约化能力。In this application, the mentioned public chain, exchange chain, supply chain, and parallel chain refer to different blockchain networks that comply with blockchain technology. Unless otherwise stated in this application, public chain, exchange chain, supply chain and parallel chain refer to corresponding networks, namely public chain network, exchange chain network, supply chain network and parallel chain network. Among them, the public chain network is a basic platform arranged in the entire network, and its node interfaces are connected to multiple blockchain networks, such as industry chains, alliance chains and private chains and third-party blockchain networks built based on the public link port specifications. . Each blockchain network can serve as an independent development platform and provide corresponding services within its network. Among them, the definition and specification of the public chain has a standard interface method to facilitate network connection with other blockchains, such as the exchange chain and the supply chain. The public chain in this application has the ability to support cross-chain intermediary, and also has the ability to store certificates, decentralized applications and smart contracts.
兑换链和供应链是指接入公链网络中的区块链,即在本申请中,公链提供基础平台,兑换链和供应链作为接入的区块链网络,具有各自的功能和服务。兑换链和供应链可以是基于公链网络标准和接口规范搭建的区块链网络,即兑换链和供应链可以直接与公链网络之间进行通信和服务对接。兑换链和供应链也可以是各自独立的网络,有各自专有的接口规范,如现有的区块链网络比特币、以太坊等,或者,某些行业开发的行业链和联盟链,甚至是为了达到某种服务需求而搭建的私有链。这些现有区块链、行业链、联盟链以及私有链,因其专有的网络接口规范。一般不能直接相互交易甚至不能与公链网络之间相互交易,因此,本申请中可通过平行链来连接公链与其他网络。The exchange chain and supply chain refer to the blockchains connected to the public chain network, that is, in this application, the public chain provides the basic platform, and the exchange chain and supply chain as the access blockchain network have their own functions and services . The exchange chain and supply chain can be a blockchain network built on the basis of public chain network standards and interface specifications, that is, the exchange chain and supply chain can directly communicate and service dock with the public chain network. The exchange chain and supply chain can also be separate networks with their own proprietary interface specifications, such as the existing blockchain network Bitcoin, Ethereum, etc., or industry chains and alliance chains developed by certain industries, or even It is a private chain built to meet certain service needs. These existing blockchains, industry chains, alliance chains, and private chains are due to their proprietary network interface specifications. Generally, they cannot directly trade with each other or even with the public chain network. Therefore, in this application, parallel chains can be used to connect the public chain with other networks.
平行链可以由公链网络中的部分节点组成,通过平行链可以对公链与其他不能直接交易的网络之间进行桥接。本申请中,对于不能直接交易的网络,每一个区块链网络都对应一个平行链,平行链被设置为具有对应区块链网络的完整功能,并且能够对区块链网络中的交易进行同步转化,并传递到公链网络中。因此,在本申请提供的技术方案中,平行链可以确定为对应区块链网络的镜像,而为了便于描述,对应区块链网络成为母链。在本申请中,平行链由公链网络中的部分节点组成,并且这些节点也是母链中的节点,以进行交易信息的传递。The parallel chain can be composed of some nodes in the public chain network, and the parallel chain can bridge the public chain with other networks that cannot be directly traded. In this application, for a network that cannot be directly traded, each blockchain network corresponds to a parallel chain. The parallel chain is set to have the complete function of the corresponding blockchain network and can synchronize the transactions in the blockchain network. Transform and transfer to the public chain network. Therefore, in the technical solution provided by the present application, the parallel chain can be determined as a mirror image of the corresponding blockchain network, and for convenience of description, the corresponding blockchain network becomes the parent chain. In this application, the parallel chain is composed of some nodes in the public chain network, and these nodes are also nodes in the parent chain to transfer transaction information.
基于上述组成部分,公链在实际应用中可提供跨链中继,完成交易验证,数据证明,资产转移和智能合约执行等工作。公链统一对外的接口规范,可使其他区块链网络能够快速接入公链网络。公链还提供基础的区块链平台能力,即快速完成方案部署和验证,完成在公链网络中的分布式存储和记账程序。另外,作为基础平台,公链还可以提供公共开发功能,从而一次性完成多个平行链智能合约协同开发和部署。Based on the above components, the public chain can provide cross-chain relays in actual applications, complete transaction verification, data certification, asset transfer, and smart contract execution. The unified external interface specification of the public chain can enable other blockchain networks to quickly access the public chain network. The public chain also provides the basic blockchain platform capabilities, that is, quickly complete the deployment and verification of the plan, and complete the distributed storage and accounting procedures in the public chain network. In addition, as a basic platform, the public chain can also provide public development functions, so as to complete the collaborative development and deployment of multiple parallel chain smart contracts at one time.
公链除了记录自己的区块链信息外,还可以用于存储相应跨链交易的信息摘要,即交易摘要。通过格式化的交易数据记录跨链交易的相关内容。同时,为了减少对公链上分布式存储空间的占用,公链在记录某些信息时,还可以通过特定的压缩算法记录第三方区块链信息。示例地,在公链中形成和存储的区块数据可以包括以下内容:区块标识(如序号、时间戳、区块hash值以及前区块hash值)、区块归属(即区块生成者)、区块其他信息(如随机值、难度值以及附加信息等)、区块权重、信息摘要(如交易树、状态树、收据树以及数据树等)、交易费用、奖励、大小等。In addition to recording its own blockchain information, the public chain can also be used to store information summaries of corresponding cross-chain transactions, that is, transaction summaries. Record related content of cross-chain transactions through formatted transaction data. At the same time, in order to reduce the occupation of distributed storage space on the public chain, when the public chain records certain information, it can also record third-party blockchain information through a specific compression algorithm. For example, the block data formed and stored in the public chain may include the following content: block identification (such as sequence number, time stamp, block hash value, and previous block hash value), block attribution (ie, block generator ), other information of the block (such as random value, difficulty value and additional information, etc.), block weight, information summary (such as transaction tree, status tree, receipt tree and data tree, etc.), transaction fees, rewards, size, etc.
参见图1,为一种应用于公链网络的证通兑换方法流程示意图。由图1可知,本申请提供的证通兑换方法,在应用于公链网络时,包括以下步骤:Referring to FIG. 1, it is a schematic flow chart of a method of stock exchange conversion applied to a public chain network. As can be seen from FIG. 1, the method of exchange for securities provided by this application, when applied to the public chain network, includes the following steps:
S11:接收供应链发起的供应交易,所述供应交易包括向所述公链转账的供应证通类型以及供应证通数量;S11: Receive a supply transaction initiated by the supply chain, where the supply transaction includes the type and number of supply certificates transferred to the public chain;
S12:查询公链网络中供应证通的供给量,以及根据供应证通的供给量计算供应证通与公链证通的兑换比率;S12: Query the supply volume of the supply chain in the public chain network, and calculate the exchange ratio between the supply chain and the public chain stock chain based on the supply volume of the supply chain;
S13:根据供应证通与公链证通的兑换比率,向供应链转账与供应证通数量等价值的公链证通。S13: According to the exchange ratio of the supply certificate and the public chain certificate, transfer the value to the supply chain and the value of the supply chain to the public chain certificate.
以上步骤的目的在于供应链和公链之间完成供应证通的交易操作,即供应交易。如图 2所示,为完成供应交易,供应链被配置为执行以下程序步骤:The purpose of the above steps is to complete the supply operation between supply chain and public chain, that is, supply transaction. As shown in Figure 2, to complete the supply transaction, the supply chain is configured to perform the following procedural steps:
S21:向公链发起供应交易,所述供应交易包括向公链转账的供应证通类型以及供应证通数量;S21: Initiate a supply transaction to the public chain. The supply transaction includes the types of supply certificates and the number of supply certificates transferred to the public chain;
S22:接收公链根据供应证通的供给量计算的,供应证通与公链证通的兑换比率,确认是否完成交易;S22: The receiving public chain calculates based on the supply volume of the supply certificate, the exchange ratio of the supply certificate and the public chain certificate, and confirms whether the transaction is completed;
S23:在确认完成交易后,接收公链转账的,与供应证通数量等价值的公链证通。S23: After confirming the completion of the transaction, the public chain transfer with the same value as the supply of the number of public chain transfers received from the public chain transfer.
由以上步骤可以,本申请提供的技术方案中,兑换链发起兑换交易之前,先通过供应链与公链之间完成转账交易,将供应链内流通的证通转账到公链,以参与后续兑换交易。即在实际应用中,供应链先向公链发起供应交易,供应交易中包含供应的证通类型和能够供应的证通数量。例如,公链网络P上,共接入网络A~网络F,这6个区块链网络,在网络A~网络F中,各自流通的证通类型(或者支持向外兑换交易的证通类型)分别为Ta、Tb、Tc、Td、Te、Tf。当其中一个区块链网络,如网络C,要进行证通的供应交易时,网络C中负责跨链交易的节点(本申请可称为供应节点),先向公链网络发起供应交易,即供应链执行上述S21的步骤。供应交易中包括向公链转账的供应证通类型,即证通Tc;和转账的供应证通数量,例如,向公链转账1000个证通Tc。From the above steps, in the technical solution provided by this application, before the exchange chain initiates the exchange transaction, the transfer transaction is completed between the supply chain and the public chain, and the certificate circulation in the supply chain is transferred to the public chain to participate in the subsequent exchange transaction. That is to say, in actual application, the supply chain first initiates a supply transaction to the public chain, and the supply transaction includes the types of supplied securities and the number of securities that can be supplied. For example, on the public chain network P, a total of access to network A ~ network F, these six blockchain networks, in network A ~ network F, the respective types of circulation of securities (or the type of securities that support outbound exchange transactions ) Are Ta, Tb, Tc, Td, Te, and Tf, respectively. When one of the blockchain networks, such as network C, is going to conduct supply transactions for securities trading, the node in network C that is responsible for cross-chain transactions (this application can be called a supply node) first initiates supply transactions to the public chain network, namely The supply chain performs the steps of S21 above. The supply transaction includes the type of supply pass that is transferred to the public chain, that is, Tec Tc; and the number of supply passes that are transferred, for example, 1000 Tc Tc transferred to the public chain.
公链在供应链发起供应交易后,执行步骤S11,再根据供应交易的内容查询公链网络中供应证通的供给量。实际应用中,同一种供应证通可以来源于一个区块链网络,也可以来自于多个区块链网络,因此,对于供应链发起的供应交易,可以先查询当前公链网络中是否已存储相应的供应证通。例如,公链P在接收到供应交易后,提取供应交易中供应证通类型为Tc,供应证通数量为1000个,公链P再从公链网络存储的各种供应证通中查询证通Tc,如查询到当前供应证通Tc的数量为1053个,则确定供应证通的当前供应量为1053,公链根据这一供应量数值,和公链所发行的公链证通Tp计算当前时间供应证通Tc与公链证通Tp的兑换比率。After the supply chain initiates a supply transaction, the public chain executes step S11, and then inquires the supply quantity of the supply certificate through the public chain network according to the content of the supply transaction. In practical applications, the same kind of supply certificate can come from one blockchain network or multiple blockchain networks. Therefore, for supply transactions initiated by the supply chain, you can first query whether the current public chain network has been stored. Corresponding supply pass. For example, after receiving the supply transaction, the public chain P extracts the type of supply certificates in the supply transaction as Tc, and the number of supply certificates is 1000. The public chain P then queries the certificates from various supply certificates stored in the public chain network. Tc, if the current supply Tc number is 1053, then the current supply of supply pass is determined to be 1053, and the public chain calculates the current value based on this supply value and the public chain pass Tp issued by the public chain. The exchange ratio of time supply Tec Tc to public chain Tec Tp.
本申请提供的技术方案中,根据供应量计算供应证通Tc与公链证通Tp之间的兑换比率的具体方式可以一种公链约定的计算方式,或已经得到公认共识的价值兑换协议,如bancor协议等。实际应用中,通过供应证通的供给量计算兑换比率的方式可以综合考虑其他因素来进一步加权计算,例如流通程度权重,区块链网络证通价值稳定性权重等。In the technical solution provided by this application, the specific method for calculating the exchange ratio between the supply certificate Tc and the public chain certificate Tp according to the supply volume can be a calculation method agreed by the public chain, or a value exchange agreement that has been recognized by consensus. Such as bancor agreement. In practical applications, the method of calculating the exchange ratio by supplying the supply of Stock Connect can further consider other factors to further weight the calculation, such as the weight of the degree of circulation, and the weight of the stability of the value of the blockchain network.
需要说明的是,为了防止出现公链网络中供应证通的供给量为0或过低时,造成兑换比率异常或者出现极端不均衡的价值波动情况,在本申请提供的技术方案中,可以在每一个区块链网络接入公链网络时,以上线条件约束的方式,令接入的区块链网络向公链转账一部分供应证通作为该供应证通类型的储备数量,具体储备数量值可以根据接入的区块链规模来确定。It should be noted that, in order to prevent the supply of the supply chain of the public chain network from being 0 or too low, causing the exchange rate to be abnormal or extremely uneven value fluctuations, the technical solutions provided in this application can be When each blockchain network accesses the public chain network, the way of the on-line conditional constraints allows the connected blockchain network to transfer part of the supply certificate to the public chain as the reserve quantity of the supply certificate type, the specific reserve quantity value It can be determined according to the size of the accessed blockchain.
进一步地,如图3所示,查询公链网络中供应证通的供给量,以及根据供应证通的供给量计算供应证通与公链证通的兑换比率的步骤包括:Further, as shown in FIG. 3, the steps of querying the supply volume of the supply chain in the public chain network, and calculating the exchange ratio of the supply chain through the supply chain of the supply chain include:
S131:接收供应链转账的质押证通,所述质押证通包括向公链转账预设数量的供应证通以及同时向公链转账的公链证通;S131: Receive a pledge certificate pass for supply chain transfers, the pledge certificate pass includes a predetermined number of supply certificate passes to the public chain and a public chain certificate pass to the public chain at the same time;
S132:根据接收的质押证通中,供应证通和公链证通的数量关系,计算初始兑换比率;S132: Calculate the initial exchange ratio based on the quantitative relationship between the supplied pledge certificate and the supply certificate and the public chain certificate;
S133:存储所述初始兑换比率,以及以所述初始兑换比率为基础,根据后续的供应证通转账数量实时调整兑换比率。S133: Store the initial conversion ratio, and based on the initial conversion ratio, adjust the conversion ratio in real time according to the number of subsequent supply pass transfers.
即在本实施例中,一种供应证通对应的供应链作为这种供应证通的兑换方,需要在向公链转账供应证通的同时,向公链质押一部分公链证通,即向公链转账质押证通,所述质押证通中包括向公链转账预设数量的供应证通,以及同时向公链转账的公链证通。公链在接收到质押证通后,可以根据供应证通和公链证通的之间的数量比例关系,计算初始兑换比例。即在本申请提供的技术方案中,初始的兑换比率需要项目方在公链上进行供应证通和公链证通的质押。并且在后续的供应节点可以基于这个初始质押,决定是卖出供应证通,得到公链证通;或是买进供应证通,卖出公链证通。为了便于描述,在供应链转账质押证通后,可以在公链中,形成一个用于证通兑换的池子,这个池子里面有供应证通和公链证通,以支持证通兑换交易。这个池子可以理解为金融准备金的概念。That is to say, in this embodiment, a supply chain corresponding to a supply pass as an exchange party for this supply pass needs to transfer the supply pass to the public chain and pledge a part of the public link pass to the public chain, namely to Public chain transfer pledge certificate pass, which includes a preset number of supply certificate passes to the public chain and a public chain certificate pass to the public chain at the same time. After receiving the pledge certificate, the public chain can calculate the initial exchange ratio based on the quantitative relationship between the supply certificate and the public chain certificate. That is to say, in the technical solution provided by this application, the initial exchange ratio requires the project party to pledge supply certificate and public certificate on the public chain. And at the subsequent supply node, based on this initial pledge, it can decide whether to sell the supply certificate and get the public chain certificate; or to buy the supply certificate and sell the public chain certificate. For the convenience of description, after the supply chain transfers the pledged certificate pass, a pool for the exchange of stock passes can be formed in the public chain. This pool has supply stock exchanges and public chain stock exchanges to support exchange transactions. This pool can be understood as the concept of financial reserves.
随着兑换交易的进行,供应证通与公链证通之间的兑换比率会实时进行更新。即在初始情况下,供应链中的接入节点,通过公链提供的智能合约,提供预设数量的供应证通,以及对应的公链证通,以确定对应的兑换比率。如,供应链提供1000个供应证通,同时提供10个公链证通,确定对应的兑换比率为100:1,这部分初始供应的证通会作为储备性证通。在后续应用中,智能合约可以多次调用,每次调用即完成一次证通兑换,进而可以通过不停的兑换,进行相应的兑换比率更新。As the exchange transaction progresses, the exchange ratio between the supply certificate and the public chain certificate will be updated in real time. That is, in the initial situation, the access nodes in the supply chain provide a preset number of supply certificates and the corresponding public chain certificates through the smart contract provided by the public chain to determine the corresponding exchange ratio. For example, the supply chain provides 1000 supply certificates and 10 public chain certificates at the same time, and the corresponding exchange ratio is determined to be 100:1. This part of the initial supply of securities will be used as reserve securities. In subsequent applications, the smart contract can be called multiple times, and each call completes a pass exchange, and the corresponding exchange ratio can be updated through non-stop exchange.
由于没有兑换对手,因此会直接储备证通进行兑换,兑换比率为当前的实时比率。如果储备证通耗尽,即表现为两种情况:一种情况是,供应证通耗尽,出现超买,则供应证通供不应求,供应证通会升值,所以会激励接入链网络提供供应证通,否则价格会一致高升;另一种情况是,储备证通对应的公链证通耗尽,出现超卖,则供应证通被抛售,出现价格崩盘,会导致供应证通价值归零。所以在这种机制下,参与证通兑换的各方会尽全力维护一个公允的兑换比率,保证各方的利益。本实施例中,通过上述兑换比率的更新方式,可以尽量保护各个兑换参与方的利益,保证维护自己证通的价值,并且维护公链本身的安全性和公允性。Since there is no exchange opponent, the exchange will be directly reserved, and the exchange ratio is the current real-time ratio. If the reserve pass is exhausted, it will be manifested in two situations: one case is that the supply pass is exhausted and overbought, then the supply pass is in short supply, and the supply pass will appreciate, so it will encourage the access chain network to provide supply Stock exchange, otherwise the price will increase consistently; another situation is that the public chain stock exchange corresponding to the reserve stock exchange is exhausted and oversold, then the supply stock exchange is sold off and the price collapses, which will cause the value of the supply stock exchange to return to zero. . Therefore, under this mechanism, all parties involved in the exchange of Securities will do their utmost to maintain a fair exchange ratio and ensure the interests of all parties. In this embodiment, through the above-mentioned method of updating the exchange ratio, it is possible to protect the interests of various exchange participants as much as possible, ensure the maintenance of the value of their own certificate, and maintain the safety and fairness of the public chain itself.
由以上技术方案可知,本申请提供的技术方案在进行证通兑换前,由接入公链网络中的区块链网络发起供应交易,供应各种类型的证通。可见,作为卖出方的供应链可以将预出售的证通通过公链兑换为公链证通,再通过公链将出售的证通进行存储,从而不必需要购买对手即可完成兑换交易,可大大增加供应证通的卖出效率。It can be seen from the above technical solutions that, before the technical solutions provided by this application, the blockchain network connected to the public chain network initiates a supply transaction to supply various types of securities before the exchange of the securities. It can be seen that the supply chain as the seller can exchange the pre-sold stock pass through the public chain to the public chain stock pass, and then store the sold stock pass through the public chain, so that there is no need to purchase counterparties to complete the exchange transaction. Greatly increase the selling efficiency of the supply of securities.
本申请中,供应链向公链发起供应交易时,供应链内部的供应节点会根据供应交易信息生成一个符合供应链网络交易规范的区块数据,并将形成的区块数据分别在供应链网络和公链网络中进行广播,从而在供应链网络之中形成一个完整的区块链。公链中的节点对区块数据进行再次验证,并形成或进一步转化为符合公链交易规范的区块数据,以致经过在公链网络中的广播形成完整的,基于公链网络的区块链,以完成记账操作。In this application, when the supply chain initiates a supply transaction to the public chain, the supply node within the supply chain will generate a block data that conforms to the supply chain network transaction specifications based on the supply transaction information, and the block data will be formed in the supply chain network. Broadcast with the public chain network to form a complete blockchain in the supply chain network. The nodes in the public chain re-verify the block data, and form or further transform into block data that conforms to the public chain transaction specifications, so that after broadcasting in the public chain network, a complete, public chain network-based blockchain is formed To complete the billing operation.
同理,在公链计算了兑换比率后,根据兑换比率和供应证通数量向供应链转账等价值的公链证通的过程中,公链中负责转账的节点形成符合公链交易规范的区块数据,并将该区块数据在公链网络中进行广播,形成完整的区块链。同时,区块数据连同转账操作一同发送给供应链网络,区块数据将再次从供应链网络中进行广播,形成完整的区块链,以完成记账操作。In the same way, after the public chain calculates the exchange ratio, according to the exchange ratio and the number of supply certificate transfers to the supply chain, the value of the public chain certificate pass, the nodes in the public chain responsible for the transfer form a zone that meets the public chain transaction specifications Block data, and broadcast the block data in the public chain network to form a complete block chain. At the same time, the block data is sent to the supply chain network together with the transfer operation. The block data will be broadcast again from the supply chain network to form a complete block chain to complete the billing operation.
本实施例中,随着公链向供应链转账与供应证通数量等价值的公链证通的时刻开始计时,由于区块数据中包含时间戳信息,因此可以第一个区块数据的时间戳作为计时开始时 刻,也可以形成完整区块链,即最后一个区块链的时间戳作为计时开始时刻。当计时时间达到质押期对应的时间时,公链网络中的节点向供应链发起退还交易,同样需要查询公链网络中供应证通的供给量,并根据供给量计算实时兑换比率,以及按照兑换比率向供应链退还供应证通。In this embodiment, as the public chain transfers to the supply chain and the value of the supply chain is equal to the time of the public chain certificate, the block data contains timestamp information, so the time of the first block data can be The stamp is used as the timing start time, and can also form a complete blockchain, that is, the timestamp of the last blockchain is used as the timing start time. When the timing time reaches the time corresponding to the pledge period, the nodes in the public chain network initiate a refund transaction to the supply chain. It is also necessary to query the supply amount of the supply certificate in the public chain network, and calculate the real-time exchange ratio according to the supply amount, and according to the exchange The ratio returns the supply certificate to the supply chain.
实际应用中,由于接入公链网络的区块链网络均可作为供应链,向公链发起供应交易,但不同的区块链网络往往存在各自专用的接口规范,并且需要专门的共识方式,如智能合约或公共合约才能与公链之间完成交易。因此,在本申请提供的部分实施例中,在接收供应链发起的供应交易的步骤前,需要验证供应链是否配置有符合公链兑换规则的智能合约,如果配置有相应的智能合约,则直接通过智能合约发起和完成供应交易;如果供应链未配置有智能合约,如图4所示,所述方法还包括:In practical applications, since the blockchain network connected to the public chain network can be used as a supply chain to initiate supply transactions to the public chain, different blockchain networks often have their own dedicated interface specifications and require special consensus methods. Only smart contracts or public contracts can complete transactions with the public chain. Therefore, in some embodiments provided in this application, before receiving the supply chain-initiated supply transaction step, it is necessary to verify whether the supply chain is configured with a smart contract that conforms to the public chain exchange rules. If the corresponding smart contract is configured, then directly Initiate and complete supply transactions through smart contracts; if the supply chain is not configured with smart contracts, as shown in Figure 4, the method further includes:
S101:判断供应链是否支持配置智能合约;S101: determine whether the supply chain supports the configuration of smart contracts;
S102:如果供应链支持配置智能合约,向供应链配置智能合约;S102: If the supply chain supports the configuration of smart contracts, configure smart contracts to the supply chain;
S103:如果供应链不支持配置智能合约,向供应链配置平行链,所述平行链为公链网络中的部分节点;S103: If the supply chain does not support the configuration of smart contracts, configure a parallel chain to the supply chain, and the parallel chain is a part of nodes in the public chain network;
S104:为平行链配置智能合约,以使平行链向公链发起供应交易。S104: Configure a smart contract for the parallel chain, so that the parallel chain initiates supply transactions to the public chain.
本实施例中,可以先判断供应链是否支持配置智能合约,对于支持配置智能合约的供应链,例如,对于初次上线到公链网络,并且与公链网络具有相同接口规范的区块链网络,其可能支持配置智能合约,因此,可以通过公链为该供应链配置智能合约。而对于不支持配置智能合约的供应链,可以在公链中按照预定规则,或就近原则,为接入公链的供应链选取部分公链节点作为供应链的平行链。作为平行链的节点,可以被配置为同时拥有公链和供应链的全部功能和信息,并且具有桥接作用,以便完成供应链和公链之间的供应交易和转账操作。In this embodiment, you can first determine whether the supply chain supports the configuration of smart contracts. For supply chains that support the configuration of smart contracts, for example, for a blockchain network that is first launched to the public chain network and has the same interface specifications as the public chain network, It may support the configuration of smart contracts, therefore, smart contracts can be configured for this supply chain through the public chain. For the supply chain that does not support the configuration of smart contracts, some public chain nodes can be selected as parallel chains of the supply chain for the supply chain that accesses the public chain according to predetermined rules or the principle of proximity in the public chain. As a parallel chain node, it can be configured to have all the functions and information of the public chain and the supply chain at the same time, and have a bridging role in order to complete the supply transaction and transfer operation between the supply chain and the public chain.
在为供应链配置平行链以后,公链可以为平行链配置智能合约,由于平行链是公链中的部分节点,因此对平行链配置智能合约仅需要在智能合约中设定相对应的供应链信息,赋予平行链具有桥接功能,以使供应链可以通过平行链向公链发起供应交易。需要说明的是,平行链节点可以来自于公链网络,也可以来自于供应链网络,也可以部分来自于公链网络,部分来自于供应链网络。对于来自于供应链网络的节点,需要在供应链确定哪些节点为平行链网络节点后,由公链对节点进行验证,确定作为平行链的节点能够支持公链网络规范。After configuring the parallel chain for the supply chain, the public chain can configure smart contracts for the parallel chain. Since the parallel chain is a part of the nodes in the public chain, configuring the smart contract for the parallel chain only requires setting the corresponding supply chain in the smart contract Information, giving the parallel chain a bridge function, so that the supply chain can initiate supply transactions to the public chain through the parallel chain. It should be noted that the parallel chain nodes can come from the public chain network, can also come from the supply chain network, it can also come from the public chain network, partly from the supply chain network. For the nodes from the supply chain network, after the supply chain determines which nodes are parallel chain network nodes, the public chain verifies the nodes and determines that the nodes as parallel chains can support the public chain network specifications.
在本申请的部分实施例中,区块链网络通过平行链接入公链的情况下,由于供应链网络不能直接与公链完成交易,因此,如图5所示,在接收公链根据供应证通的供给量计算的,供应证通与公链证通的兑换比率,确认是否完成交易的步骤包括:In some embodiments of the present application, when the blockchain network is connected to the public chain through parallel links, the supply chain network cannot directly complete the transaction with the public chain. Therefore, as shown in FIG. 5, when receiving the public chain according to the supply certificate The calculation of the supply amount of the pass, the exchange ratio of the supply of the stock exchange and the public chain stock exchange, and the steps to confirm whether the transaction is completed include:
S221:向供应链对应的平行链发起供应交易;S221: Initiate supply transaction to the parallel chain corresponding to the supply chain;
S222:控制平行链根据供应交易生成查询交易,并向公链发起查询交易,以使公链根据查询交易,向平行链返回供应证通与公链证通的兑换比率;S222: Control the parallel chain to generate a query transaction according to the supply transaction, and initiate a query transaction to the public chain, so that the public chain returns the exchange ratio of the supply certificate to the public chain certificate to the parallel chain according to the query transaction;
S223:控制平行链根据供应证通与公链证通的兑换比率,计算可获得的公链证通数量,以及将公链证通数量发送至供应链;S223: Control the parallel chain to calculate the number of public chain certificates that can be obtained and send the number of public chain certificates to the supply chain according to the exchange ratio between supply certificates and public chain certificates.
S224:接收公链证通数量,确定是否完成交易,以及在确定完成交易后,控制平行链向公链发起供应交易。S224: Receive the number of public chain certificates, determine whether to complete the transaction, and after determining to complete the transaction, control the parallel chain to initiate supply transactions to the public chain.
本实施例中,供应链在通过平行链发起供应交易后,平行链可以根据供应交易生成面向公链的查询交易,查询交易可以是一种约定形式的交易,如交易证通数量为0的交易,或具有智能合约指定形式的交易,查询交易中需要带有供应证通类型信息。公链在接收到查询交易后,根据查询交易向平行链返回供应证通与公链证通的兑换比率。平行链再对返回的兑换比率传递给供应链,或者根据供应交易和兑换比率计算出可以兑换的公链证通数量,并将可获得的公链证通数量发送给供应链(或供应节点)。In this embodiment, after the supply chain initiates the supply transaction through the parallel chain, the parallel chain can generate a query transaction for the public chain according to the supply transaction. The query transaction can be a transaction of a prescribed form, such as a transaction with a number of transaction passes , Or a transaction in the form specified by a smart contract, the inquiry transaction needs to be accompanied by supply certificate type information. After receiving the inquiry transaction, the public chain returns the exchange ratio between the supply certificate and the public chain certificate to the parallel chain according to the inquiry transaction. The parallel chain then passes the returned exchange rate to the supply chain, or calculates the number of public chain certificates that can be exchanged based on the supply transaction and the conversion ratio, and sends the available number of public chain certificates to the supply chain (or supply node) .
供应链在接收到平行链发送的公链证通数量后,可以对其进行判断,确定能否接受这样的兑换结果。如果供应链能够接受该兑换结果,则可控制平行链将供应交易发送给公链,如果不接受该兑换结果,可以控制平行链将供应交易撤回。After receiving the number of public chain certificates issued by the parallel chain, the supply chain can judge it to determine whether it can accept such exchange results. If the supply chain can accept the exchange result, the parallel chain can be controlled to send the supply transaction to the public chain. If the exchange result is not accepted, the parallel chain can be controlled to withdraw the supply transaction.
进一步地,为了保证供应证通的价值稳定性,即接收供应链发起的供应交易的步骤前,公链需要对供应链的证通供应资质进行验证,如图6所示,具体的供应资质验证方法包括以下步骤:Further, in order to ensure the value stability of the supply certificate, that is, before receiving the supply transaction initiated by the supply chain, the public chain needs to verify the supply certificate of the supply chain, as shown in Figure 6, the specific supply qualification verification The method includes the following steps:
S105:通过供应链拥有的公链证通数量,验证接入公链网络的供应链供应证通的供应资质;S105: verify the supply qualification of the supply chain supply certificate connected to the public chain network through the number of public chain certificates issued by the supply chain;
S106:如果供应链拥有的公链证通数量大于或等于验证阈值,确定供应链具有供应资质,接收供应链发起的供应交易;S106: If the number of public chain certificates passed by the supply chain is greater than or equal to the verification threshold, it is determined that the supply chain has supply qualifications, and the supply transaction initiated by the supply chain is received;
S107:如果供应链拥有的公链证通数量小于验证阈值,确定供应链不具有供应资质,向供应链发送验证提示信息,以及存储供应链所能够提供的供应证通类型。S107: If the number of public chain certificates issued by the supply chain is less than the verification threshold, determine that the supply chain does not have supply qualifications, send verification prompts to the supply chain, and store the types of supply certificates that the supply chain can provide.
本实施例中,可以设定在每个区块链网络接入公链时,都需要在公链获取一定数量的公链证通,以作为区块链网络的交易资本,因此具有能力或大规模的区块链网络,需要拥有的公链证通数量应较大,进而通过供应链所拥有的公链证通数量判断供应证通的供应资质。通过对供应链供应资质的验证,可以避免供应数量的大幅度波动,减少兑换比率异常情况的发生。同时,对供应链的供应资质进行验证还能够避免个别小型区块链网络,如私链,发行虚假证通,避免破坏公链系统的兑换稳定性。In this embodiment, it can be set that when each blockchain network accesses the public chain, it is necessary to obtain a certain number of public chain certificates in the public chain as the transaction capital of the blockchain network, so it has the ability or large For a large-scale blockchain network, the number of public chain certificates needed to be owned should be relatively large, and then the supply qualification of the supply certificate should be judged by the number of public chain certificates issued by the supply chain. By verifying the supply qualification of the supply chain, large fluctuations in the supply quantity can be avoided, and the occurrence of abnormalities in the exchange rate can be reduced. At the same time, the verification of the supply chain's supply qualification can also avoid individual small blockchain networks, such as private chains, issuing false certificates, and avoiding the destruction of the exchange stability of the public chain system.
本申请提供的技术方案中,供应链向公链供应不同类型的证通,并且在公链中进行存储,以便接入公链网络中的其他区块链网络进行兑换。显然,在本申请中,所述供应链和兑换链是指在进行不同类型的操作时所扮演的角色。对于接入公链网络的区块链网络,只要其能够满足相应的证通供应资质,均可作为供应链,同时,接入公链网络的全部区块链网络也均可以作为兑换链向公链发起兑换交易,以获得需要的证通。如图1所示,对于兑换交易,公链被配置为执行以下程序步骤:In the technical solution provided by this application, the supply chain supplies different types of certificates to the public chain, and stores them in the public chain, so as to access other blockchain networks in the public chain network for exchange. Obviously, in this application, the supply chain and the exchange chain refer to the roles played when performing different types of operations. As for the blockchain network connected to the public chain network, as long as it can meet the corresponding certification supply qualification, it can be used as the supply chain. At the same time, all the blockchain networks connected to the public chain network can also be used as exchange chains to the public. The chain initiates the exchange transaction to obtain the required securities. As shown in Figure 1, for exchange transactions, the public chain is configured to perform the following procedure steps:
S14:接收兑换链发起的兑换交易,所述兑换交易包括向公链转账的起始证通数量和兑换证通类型;S14: Receive an exchange transaction initiated by the exchange chain, where the exchange transaction includes the initial number and type of exchange certificates transferred to the public chain;
S15:查询公链网络中起始证通和兑换证通的供给量,以及根据供给量计算兑换证通与起始证通的兑换比率;S15: Query the supply volume of the initial stock exchange and the exchange stock exchange in the public chain network, and calculate the exchange ratio of the exchange stock exchange and the initial stock exchange based on the supply volume;
S16:根据兑换证通与起始证通的兑换比率,向兑换链转账与起始证通数量等价值的兑换证通。S16: According to the exchange ratio between the exchange pass and the initial pass, transfer the exchange pass with the value equal to the number of the initial pass to the exchange chain.
相应地,在进行兑换交易操作时,如图7所示,兑换链被配置为执行以下程序步骤:Accordingly, when performing an exchange transaction operation, as shown in FIG. 7, the exchange chain is configured to perform the following procedure steps:
S31:向公链发起兑换交易,所述兑换交易包括向公链转账的起始证通数量和兑换证通类型;S31: Initiate an exchange transaction to the public chain, where the exchange transaction includes the number of initial certificates and the type of exchange certificates transferred to the public chain;
S32:接收公链根据起始证通和兑换证通的供给量计算的,兑换证通与公链证通的兑换比率,确认是否完成交易;S32: The receiving public chain calculates the conversion ratio between the exchange stock exchange and the public chain stock exchange based on the supply of the initial stock exchange and the exchange stock exchange to confirm whether the transaction is completed;
S33:在确认完成交易后,接收公链转账的,与公链证通数量等价值的兑换证通。S33: After confirming the completion of the transaction, receiving the transfer of the public chain, the exchange certificate of the same value as the number of public chain certificates.
本申请提供的技术方案中,作为兑换链的区块链网络先向公链发起兑换交易,兑换交易中包含起始证通数量和兑换证通类型。例如,作为兑换链的区块链网络为网络A,网络A中的某一个或多个节点(即,兑换节点)要使用100个证通Ta兑换证通Tc,则其节点向公链发起一个兑换交易,兑换交易中包括,向公链转账的起始证通数量为100个证通Ta,兑换证通类型为Tc。兑换链将包含上述信息的兑换交易发送给公链,公链在接收到兑换交易后,根据提取起始证通和兑换证通的类型,并在公链网络中查询起始证通和兑换证通的供给量,以根据两种证通的供给量计算两种证通在兑换时的兑换比率。关于兑换比率的计算方式与供应链在发起供应交易时的计算方式相同。In the technical solution provided by this application, the block chain network as the exchange chain first initiates the exchange transaction to the public chain, and the exchange transaction includes the initial number of exchange passes and the type of exchange pass. For example, if the block chain network as the exchange chain is network A, one or more nodes (that is, exchange nodes) in network A need to use 100 certificates to exchange Ta to exchange certificates to Tc, then its node initiates a For exchange transactions, the exchange transaction includes the initial number of exchanges to be transferred to the public chain is 100 exchanges Ta, and the exchange exchange type is Tc. The exchange chain sends the exchange transaction containing the above information to the public chain. After receiving the exchange transaction, the public chain extracts the types of the initial certificate exchange and the exchange certificate pass, and queries the initial certificate exchange and the exchange certificate in the public chain network. According to the supply of two kinds of securities, the exchange ratio of the two kinds of securities is calculated based on the supply of the two kinds of securities. The calculation method of the exchange ratio is the same as the calculation method of the supply chain when initiating the supply transaction.
在实际应用中,对于兑换链,其进行兑换时的起始证通类型可以是多种不同的形式,例如,对于兑换链网络A,其用作兑换的起始证通类型可以是网络A中流通证通Ta,也可以是公链证通Tp,甚至可以是其他区块链中流通的证通Tb、Te或Tf。因此,在进行兑换比率的计算时,可以采用不同的方式。进一步地,如图8所示,查询公链网络中起始证通和兑换证通的供给量,以及根据供给量计算兑换证通与起始证通的兑换比率的步骤包括:In practical applications, for the exchange chain, the initial stock exchange type during the exchange can be in many different forms. For example, for the exchange chain network A, the initial stock exchange type used for exchange can be in the network A Circulation Securities Link Ta can also be the public chain Securities Link Tp, or even the circulation of Tb, Te or Tf in other blockchains. Therefore, different methods can be used in the calculation of the exchange ratio. Further, as shown in FIG. 8, the steps of querying the supply volume of the initial stock exchange and the exchange stock exchange in the public chain network, and calculating the exchange ratio of the exchange stock exchange and the initial stock exchange according to the supply volume include:
S151:判断所述起始证通是否为公链证通;S151: determine whether the initial stock exchange is a public chain stock exchange;
S152:如果所述起始证通是公链证通,查询公链网络中兑换证通的供给量;S152: If the initial stock exchange is a public chain stock exchange, query the supply of exchange stocks in the public chain network;
S153:根据兑换证通的供给量计算兑换证通与公链证通的兑换比率;S153: Calculate the exchange ratio between the exchange certificate and the public chain certificate according to the supply of the exchange certificate;
S154:如果所述起始证通不是公链证通,查询公链网络中起始证通和兑换证通的供给量;S154: If the initial stock exchange is not a public chain stock exchange, query the supply of the initial stock exchange and exchange stock exchange in the public chain network;
S155:根据起始证通的供给量计算起始证通与公链证通的兑换比率;S155: Calculate the exchange ratio between the initial stock exchange and the public chain stock exchange based on the supply of the initial stock exchange;
S156:根据兑换证通的供给量计算兑换证通与公链证通的兑换比率;S156: Calculate the exchange ratio between the exchange certificate and the public chain certificate according to the supply of the exchange certificate;
S157:计算兑换证通与起始证通的兑换比率。S157: Calculate the exchange ratio between the exchange pass and the initial pass.
本实施例中,可以根据兑换链发起的兑换交易对初始证通进行证通类型的判断,即判断初始证通是否为公链证通。如果起始证通是公链证通,即兑换链网络A使用100个公链证通Tp兑换证通Tc,则公链只需获取兑换证通的供给量,即证通Tc的供给量。再根据兑换证通的供给量计算兑换证通Tc与公链证通Tp之间的兑换比率。如果起始证通不是公链证通,即兑换链网络A使用100个证通Ta兑换证通Tc,则公链需要同时查询起始证通Ta和兑换证通Tc的供给量,再分别计算起始证通Ta与公链证通Tp之间的兑换比率,以及兑换证通Tc与公链证通Tp之间的兑换比率,根据两次计算的兑换比率确定最终起始证通Ta与兑换证通Tc之间的兑换比率。In this embodiment, it is possible to judge the type of the initial pass through the exchange transaction initiated by the exchange chain, that is, to determine whether the initial pass is a public chain pass. If the initial stock exchange is a public chain stock exchange, that is, the exchange chain network A uses 100 public chain stock exchange Tp to exchange stock exchange Tc, then the public chain only needs to obtain the exchange stock supply, that is, the supply of stock exchange Tc. Then calculate the exchange ratio between the exchange certificate Tc and the public chain certificate Tp according to the supply of exchange certificates. If the initial stock exchange is not a public chain stock exchange, that is, the exchange chain network A uses 100 stock exchange Ta to exchange stock exchange Tc, then the public chain needs to query the supply of the initial stock exchange Ta and the exchange stock exchange Tc at the same time, and then calculate separately The exchange ratio between the initial stock exchange Ta and the public chain stock exchange Tp, as well as the exchange ratio between the exchange stock exchange Tc and the public chain stock exchange Tp, the final stock exchange stock Ta and the exchange are determined based on the exchange ratio calculated twice The exchange ratio between Tec Tc.
在计算出起始证通与兑换证通之间的兑换比率后,公链根据接收到的转账起始证通数量,向兑换链转账与起始证通数量等价值的兑换证通。例如,起始证通Ta与兑换证通Tc之间的兑换比率为5:1,则公链在接收到100个证通Ta时,根据兑换比率向兑换链转账20个Tc,在转账后,将100个证通Ta存储到公链中,此时公链中存储的证通Ta供给量加100个。After calculating the exchange ratio between the initial stock exchange and the exchange stock exchange, the public chain transfers the exchange stock exchange and the value of the initial stock exchange to the exchange chain based on the number of transfer stock exchanges received. For example, if the exchange ratio between the initial stock exchange Ta and the exchange stock exchange Tc is 5:1, when the public chain receives 100 stock exchange Ta, it transfers 20 Tc to the exchange chain according to the exchange ratio. After the transfer, Store 100 STOs in the public chain, and then add 100 STO supplies in the public chain.
进一步地,如图9所示,针对接收公链根据兑换证通的供给量计算的,兑换证通与公链证通的兑换比率,确认是否完成交易的步骤包括:Further, as shown in FIG. 9, for the conversion ratio of the exchange certificate to the public chain certificate calculated by the receiving public chain based on the supply of the exchange certificate, the step of confirming whether the transaction is completed includes:
S321:通过兑换链对应的平行链发起兑换交易;S321: initiate the exchange transaction through the parallel chain corresponding to the exchange chain;
S322:控制平行链根据兑换交易生成查询交易,并向公链发起查询交易,以使公链根据查询交易,向平行链返回兑换证通与起始证通的兑换比率;S322: Control the parallel chain to generate a query transaction according to the exchange transaction, and initiate a query transaction to the public chain, so that the public chain returns the conversion ratio of the exchange certificate to the initial certificate to the parallel chain according to the query transaction;
S323:控制平行链根据兑换证通与起始证通的兑换比率,计算可获得的兑换证通数量,以及将兑换证通数量发送至兑换链;S323: Control the parallel chain to calculate the number of available exchange passes based on the exchange ratio of the exchange pass and the initial pass, and send the number of exchange passes to the exchange chain;
S324:接收兑换证通数量,确定是否完成交易,以及在确定完成交易后,控制平行链向公链发起兑换交易。S324: Receive the number of exchange certificates, determine whether to complete the transaction, and after determining to complete the transaction, control the parallel chain to initiate the exchange transaction to the public chain.
本实施例中,与供应交易时形式相似。兑换链在通过平行链发起兑换交易后,平行链可以根据兑换交易生成面向公链的查询交易。同样本实施例中的,查询交易可以是一种约定形式的交易,如交易证通数量为0的交易,或具有智能合约指定形式的交易,查询交易中需要带有兑换证通类型信息。公链在接收到查询交易后,根据查询交易向平行链返回兑换证通与起始证通的兑换比率。平行链再对返回的兑换比率传递给兑换链,或者根据兑换交易和兑换比率计算出可以兑换的公链证通数量,并将可获得的公链证通数量发送给兑换链(或兑换节点)。In this embodiment, it is similar to the form of supply transaction. After the exchange chain initiates the exchange transaction through the parallel chain, the parallel chain can generate a query transaction for the public chain according to the exchange transaction. Also in this embodiment, the query transaction may be a transaction of a prescribed form, such as a transaction in which the number of transaction passes is 0, or a transaction in a form specified by a smart contract, and the query transaction needs to carry exchange pass type information. After receiving the inquiry transaction, the public chain returns the exchange ratio of the exchange certificate exchange to the initial exchange certificate to the parallel chain according to the inquiry transaction. The parallel chain then passes the returned exchange ratio to the exchange chain, or calculates the number of exchangeable public chain certificates through the exchange transaction and the conversion ratio, and sends the available public chain certificates to the exchange chain (or exchange node) .
兑换链在接收到平行链发送的公链证通数量后,可以对其进行判断,确定能否接受这样的兑换结果。如果兑换链能够接受该兑换结果,则可控制平行链将兑换交易发送给公链,如果不接受该兑换结果,可以控制平行链将兑换交易撤回。After receiving the number of public chain certificates issued by the parallel chain, the exchange chain can judge it to determine whether such exchange results can be accepted. If the exchange chain can accept the exchange result, the parallel chain can be controlled to send the exchange transaction to the public chain. If the exchange result is not accepted, the parallel chain can be controlled to withdraw the exchange transaction.
与供应链发起的供应交易过程相似,本申请中,兑换链向公链发起供应交易时,兑换链内部的兑换节点会根据兑换交易信息生成一个符合兑换链网络交易规范的区块数据,并将形成的区块数据分别在兑换链网络和公链网络中进行广播,从而在兑换链网络之中形成一个完整的区块链。公链中的节点对兑换交易的区块数据进行再次验证,并形成或进一步转化为符合公链交易规范的区块数据,以致经过在公链网络中的广播形成完整的,基于公链网络的区块链,以完成记账操作。Similar to the supply transaction process initiated by the supply chain, in this application, when the exchange chain initiates a supply transaction to the public chain, the exchange node within the exchange chain will generate a block data that conforms to the exchange chain network transaction specifications based on the exchange transaction information, and will The formed block data is broadcast respectively in the exchange chain network and the public chain network, thereby forming a complete block chain in the exchange chain network. The nodes in the public chain re-verify the block data of the exchange transaction, and form or further convert into block data that conforms to the public chain transaction specifications, so that after broadcasting in the public chain network, a complete, public chain network-based Blockchain to complete bookkeeping operations.
需要说明的是,上述实施例中所述的兑换链Ta和供应链Tc仅仅作为一种便于描述的示例,在实际应用中接入公链网络的区块链网络,如第三方公链、第三方行业链和联盟链以及私有链等,以及基于公链接口规范所开发的子链等都可同时作为兑换链和供应链。并且,由于不同区块链网络具有各自的功能,因此,对于同一个区块链网络可供应多种类型的证通。另外,在本申请中所述的公链向供应链或兑换链转账兑换证通和公链证通中,兑换链和供应链可以不必直接接收转账证通,而是通过公链或者区块链网络上对应的账户来完成转账,即在部分不能兼容的两个区块链网络之间,可以通过在公链上开设的账户完成转账,以避免造成兑换链无法识别兑换证通的问题。It should be noted that the exchange chain Ta and the supply chain Tc described in the above embodiments are merely examples for ease of description. In actual applications, a blockchain network connected to a public chain network, such as a third-party public chain, The tripartite industry chain, alliance chain and private chain, as well as the sub-chain developed based on the public link specification, can be used as both the exchange chain and the supply chain. Moreover, since different blockchain networks have their own functions, multiple types of certificates can be provided for the same blockchain network. In addition, in the public chain to supply chain or exchange chain transfer exchange exchange and public chain exchange mentioned in this application, the exchange chain and supply chain may not need to directly receive the transfer certificate exchange, but through the public chain or blockchain The corresponding account on the network is used to complete the transfer, that is, between two incompatible two blockchain networks, the transfer can be completed through the account opened on the public chain to avoid the problem that the exchange chain cannot identify the exchange certificate.
本申请提供的技术方案中,对于供应链,如供应链网络C,其从事交易过程的本质就是用证通Tc,兑换另一种证通,如Ta,因此对于供应链而言,在完成供应交易后,获得的公链证通Tp可以直接用来兑换证通Ta,即网络C可以再作为兑换链发起兑换交易,通过向公链转账3000个公链证通Tp,兑换等价值的证通Ta。In the technical solution provided by this application, for the supply chain, such as supply chain network C, the essence of the transaction process is to use Tec Tc and exchange for another Tec T, such as Ta, so for the supply chain, the supply is completed After the transaction, the obtained public chain certificate pass Tp can be directly used to exchange the certificate pass Ta, that is, the network C can then be used as the exchange chain to initiate the exchange transaction, by transferring 3000 public chain certificate pass Tp to the public chain, exchange the equivalent value of the certificate pass Ta.
可见,在本申请中,作为供应链区块链网络可通过公链换取公链证通后,再利用公链证通换取要兑换的证通,整个过程完全不接触其他区块链网络,即在无对手的情况下完成证通兑换。同理对于兑换链,也是通过公链完成证通兑换,也同样无需接触到兑换对手。因此整过兑换过程可以由公链网络中的去中心化应用完成,并且交易过程同时在公链和参 与区块链网络中完成记账程序,可以提供一个相对客观公平的兑换环境。It can be seen that in this application, as the supply chain blockchain network can be exchanged for the public chain certificate through the public chain, and then use the public chain certificate to exchange for the certificate to be exchanged, the entire process does not touch other blockchain networks at all, that is Complete the exchange of STO without opponents. Similarly, for the exchange chain, the exchange of securities through the public chain is also completed, and there is no need to contact the exchange opponent. Therefore, the entire conversion process can be completed by the decentralized application in the public chain network, and the transaction process simultaneously completes the accounting procedures in the public chain and the participating blockchain network, which can provide a relatively objective and fair exchange environment.
在本申请提供的证通兑换方法中,无论供应交易还是兑换交易,在确定两种证通之间的兑换比率的步骤,可以按照上述方案提供的根据证通供给量来计算。也可以在公链网络中构建一个定期刷新的兑换比率表。兑换比率表中可提供多种证通之间的兑换比率,这个兑换比率可以是公链中部分专门用于平衡证通价值的节点计算并提供,也可以由接入公链网络的金融行业链提供。但对于接入公链网络的金融行业链,在接入到公链网络时,公链中的维护节点以及涉及到利益相关的其他区块链网络可以对该金融行业链进行上线投票,确定该金融行业的权威性和有效性,以提供更加合理的兑换比率。显然,在实际应用中,公链在确定两种证通间的兑换比率时,还可以通过按供给量的方式并参考兑换比率表的方式,在提供兑换效率的前提下最大限度的保证双方兑换权益。In the STO exchange method provided in this application, regardless of the supply transaction or the exchange transaction, the step of determining the exchange ratio between the two STOs can be calculated according to the STO supply provided in the above scheme. It is also possible to build a regularly updated exchange rate table in the public chain network. The exchange ratio table can provide a variety of exchange ratios between securities exchanges. This exchange ratio can be calculated and provided by some nodes in the public chain that are specifically used to balance the value of the securities exchange, or it can be provided by the financial industry chain connected to the public chain network. provide. However, for the financial industry chain connected to the public chain network, when accessing the public chain network, the maintenance nodes in the public chain and other blockchain networks related to the interest can vote on the financial industry chain to determine the The authority and effectiveness of the financial industry to provide a more reasonable exchange ratio. Obviously, in actual application, when determining the exchange ratio between the two types of securities, the public chain can also guarantee the maximum exchange between the two parties by providing the exchange efficiency according to the amount of supply and referring to the exchange ratio table. rights and interests.
基于上述证通兑换方法,本申请还提供一种基于公链的区块链系统,如图10所示,所述区块链系统包括:公链,以及接入公链网络的供应链和兑换链,公链、供应链以及兑换链均为点对点的网络;Based on the above-mentioned exchange methods, this application also provides a public blockchain-based blockchain system. As shown in FIG. 10, the blockchain system includes: a public blockchain, and a supply chain and redemption connected to the public blockchain network Chain, public chain, supply chain and exchange chain are all peer-to-peer networks;
其中,所述供应链被配置为:向公链发起供应交易,供应交易包括向公链转账的供应证通类型以及供应证通数量;以及,接收公链转账的公链证通;Wherein, the supply chain is configured to: initiate a supply transaction to the public chain, and the supply transaction includes the type and number of supply certificates that are transferred to the public chain; and, the public chain certificate that receives transfers from the public chain;
所述兑换链被配置为:向公链发起兑换交易,兑换交易包括向公链转账的起始证通数量和兑换证通类型;以及,接收公链转账的兑换证通;The exchange chain is configured to initiate an exchange transaction to the public chain, and the exchange transaction includes the initial number of exchanges and types of exchanges to be transferred to the public chain; and, the exchange exchange to receive transfers from the public chain;
所述公链被配置为:接收供应链发起的供应交易;查询公链网络中供应证通的供给量,以及根据供应证通的供给量计算供应证通与公链证通的兑换比率;根据供应证通与公链证通的兑换比率,向供应链转账与供应证通数量等价值的公链证通;The public chain is configured to: receive supply transactions initiated by the supply chain; query the supply volume of the supply chain in the public chain network, and calculate the exchange ratio of the supply chain through the supply chain of the supply chain; The exchange ratio of supply certificate to public chain certificate, transfer to the supply chain and the value of the supply chain to the public chain certificate;
以及,接收兑换链发起的兑换交易;查询公链网络中兑换证通和起始证通的供给量,以及根据兑换证通和起始证通的供给量计算兑换证通与起始证通的兑换比率;根据兑换证通与起始证通的兑换比率,向兑换链转账与起始证通数量等价值的兑换证通。And, receive the exchange transaction initiated by the exchange chain; query the supply of the exchange certificate and the initial certificate in the public chain network, and calculate the exchange certificate and the initial certificate according to the supply of the exchange certificate and the initial certificate Exchange ratio; according to the exchange ratio between the exchange pass and the initial pass, transfer the exchange pass to the exchange chain and the number of the initial pass is equal to the exchange pass.
由以上技术方案可知,本申请提供一种基于公链的证通兑换方法及区块链系统,所述方法在实际应用中,多个供应链通过向公链发起供应交易,将各自提供的供应证通兑换为等价值的公链证通,公链对供应交链转账的各种供应证通进行存储并记录供应量;兑换链通过向公链发起兑换交易,以使公链根据兑换交易中指定的起始证通和兑换证通的供应量,计算兑换比率,再从存储的供应证通中,提取与起始证通等价值的兑换证通,并转账给兑换链。所述方法通过公链判断不同证通之间的兑换比率,可提供客观、合理的兑换环境。并且在供应交易发生后,通过公链将供应证通进行存储,使得兑换链在进行兑换交易时,仅与公链之间发生交易,不必接触兑换对手避免中心化程序参与,提高兑换效率。As can be seen from the above technical solutions, this application provides a public chain-based certificate exchange method and blockchain system. In practical applications, multiple supply chains initiate supply transactions to the public chain to transfer their respective supply The stock exchange is converted into an equal value public chain stock exchange. The public chain stores and records the supply of various supply stock transfers in the supply chain transfer; the exchange chain initiates the exchange transaction to the public chain to make the public chain according to the exchange transaction. Specify the supply amount of the initial stock exchange and the exchange stock exchange, calculate the conversion ratio, and then extract the exchange stock equivalent to the initial stock exchange from the stored supply stock exchange and transfer it to the exchange chain. The method uses the public chain to judge the exchange ratio between different securities, which can provide an objective and reasonable exchange environment. And after the supply transaction occurs, the supply certificate is stored through the public chain, so that when the exchange chain performs the exchange transaction, the transaction only occurs with the public chain. There is no need to contact the exchange counterparty to avoid the participation of the centralized program and improve the exchange efficiency.
本申请提供的实施例之间的相似部分相互参见即可,以上提供的具体实施方式只是本申请总的构思下的几个示例,并不构成本申请保护范围的限定。对于本领域的技术人员而言,在不付出创造性劳动的前提下依据本申请方案所扩展出的任何其他实施方式都属于本申请的保护范围。The similar parts between the embodiments provided in this application can be referred to each other, and the specific embodiments provided above are just a few examples under the general concept of this application, and do not constitute a limitation of the protection scope of this application. For those skilled in the art, any other implementations extended based on the solution of the present application under the premise of not paying creative work fall within the protection scope of the present application.

Claims (10)

  1. 一种基于公链的证通兑换方法,应用于公链网络,其特征在于,包括:A public-chain-based exchange method for stock exchanges, applied to public-chain networks, is characterized by:
    接收供应链发起的供应交易,所述供应交易包括向所述公链转账的供应证通类型以及供应证通数量;Receiving a supply transaction initiated by the supply chain, the supply transaction including the type and number of supply certificates transferred to the public chain;
    查询公链网络中供应证通的供给量,以及根据供应证通的供给量计算供应证通与公链证通的兑换比率;Query the supply volume of the supply chain in the public chain network, and calculate the exchange ratio between the supply chain and the public chain stock chain based on the supply volume of the supply chain;
    根据供应证通与公链证通的兑换比率,向供应链转账与供应证通数量等价值的公链证通;According to the exchange ratio of supply certificate and public chain certificate, transfer to the supply chain and the value of the supply chain of the same value of the public chain certificate;
    接收兑换链发起的兑换交易,所述兑换交易包括向公链转账的起始证通数量和兑换证通类型;Receive an exchange transaction initiated by the exchange chain, where the exchange transaction includes the initial number of exchanges and the type of exchange exchanges transferred to the public chain;
    查询公链网络中起始证通和兑换证通的供给量,以及根据供给量计算兑换证通与起始证通的兑换比率;Query the supply volume of the initial stock exchange and the exchange stock exchange in the public chain network, and calculate the exchange ratio of the exchange stock exchange and the initial stock exchange based on the supply volume;
    根据兑换证通与起始证通的兑换比率,向兑换链转账与起始证通数量等价值的兑换证通。According to the exchange ratio between the exchange pass and the initial pass, transfer the exchange pass with the value equal to the number of the initial pass to the exchange chain.
  2. 根据权利要求1的兑换方法,其特征在于,查询公链网络中供应证通的供给量,以及根据供应证通的供给量计算供应证通与公链证通的兑换比率的步骤包括:The exchange method according to claim 1, characterized in that the steps of querying the supply volume of the supply chain in the public chain network, and calculating the conversion ratio of the supply chain through the supply chain of the supply chain include:
    接收供应链转账的质押证通,所述质押证通包括向公链转账预设数量的供应证通以及同时向公链转账的公链证通;Receive the pledge certificate pass of the supply chain transfer, the pledge certificate pass includes a predetermined number of supply certificate passes to the public chain and the public chain certificate passes to the public chain at the same time;
    根据接收的质押证通中,供应证通和公链证通的数量关系,计算初始兑换比率;Calculate the initial exchange ratio based on the quantitative relationship between the supplied pledge certificates, the supply certificates and the public chain certificates;
    存储所述初始兑换比率,以及以所述初始兑换比率为基础,根据后续的供应证通转账数量实时调整兑换比率。The initial conversion ratio is stored, and based on the initial conversion ratio, the conversion ratio is adjusted in real time according to the number of subsequent supply pass transfers.
  3. 根据权利要求1的兑换方法,其特征在于,接收供应链发起的供应交易的步骤前,所述方法还包括:The exchange method according to claim 1, characterized in that before the step of receiving a supply transaction initiated by the supply chain, the method further comprises:
    通过供应链拥有的公链证通数量,验证接入公链网络的供应链供应证通的供应资质;Verify the supply qualification of supply chain supply certificates connected to the public chain network through the number of public chain certificates issued by the supply chain;
    如果供应链拥有的公链证通数量大于或等于验证阈值,确定供应链具有供应资质,接收供应链发起的供应交易;If the number of public chain certificates passed by the supply chain is greater than or equal to the verification threshold, it is determined that the supply chain has supply qualifications and the supply transaction initiated by the supply chain is received;
    如果供应链拥有的公链证通数量小于验证阈值,确定供应链不具有供应资质,向供应链发送验证提示信息,以及存储供应链所能够提供的供应证通类型。If the number of public chain certificates issued by the supply chain is less than the verification threshold, determine that the supply chain does not have supply qualifications, send verification prompts to the supply chain, and store the types of supply certificates that the supply chain can provide.
  4. 根据权利要求1的兑换方法,其特征在于,查询公链网络中起始证通和兑换证通的供给量,以及根据供给量计算兑换证通与起始证通的兑换比率的步骤包括:The exchange method according to claim 1, characterized in that the steps of querying the supply volume of the initial stock exchange and the exchange stock exchange in the public chain network, and calculating the conversion ratio of the exchange stock exchange and the initial stock exchange based on the supply volume include:
    判断所述起始证通是否为公链证通;Determine whether the initial stock exchange is a public chain stock exchange;
    如果所述起始证通是公链证通,查询公链网络中兑换证通的供给量;If the initial stock exchange is a public chain stock exchange, query the supply of exchange stocks in the public chain network;
    根据兑换证通的供给量计算兑换证通与公链证通的兑换比率;Calculate the exchange ratio of exchange certificates to public chain certificates according to the supply of exchange certificates;
    如果所述起始证通不是公链证通,查询公链网络中起始证通和兑换证通的供给量;If the initial stock exchange is not a public chain stock exchange, query the supply of the initial stock exchange and exchange stock exchange in the public chain network;
    根据起始证通的供给量计算起始证通与公链证通的兑换比率;Calculate the exchange ratio between the initial stock exchange and the public chain stock exchange according to the supply of the initial stock exchange;
    根据兑换证通的供给量计算兑换证通与公链证通的兑换比率;Calculate the exchange ratio of exchange certificates to public chain certificates according to the supply of exchange certificates;
    计算兑换证通与起始证通的兑换比率。Calculate the exchange ratio between the exchange pass and the initial pass.
  5. 根据权利要求1的兑换方法,其特征在于,在接收供应链发起的供应交易的步骤前,验证供应链是否配置有符合公链兑换规则的智能合约,如果供应链未配置有智能合约,向供应链配置智能合约的步骤包括:The exchange method according to claim 1, characterized in that before the step of receiving the supply transaction initiated by the supply chain, it is verified whether the supply chain is configured with a smart contract that complies with the public chain exchange rules, and if the supply chain is not configured with a smart contract, the The steps of the chain configuration smart contract include:
    判断供应链是否支持配置智能合约;Determine whether the supply chain supports the configuration of smart contracts;
    如果供应链支持配置智能合约,向供应链配置智能合约;If the supply chain supports the configuration of smart contracts, configure smart contracts to the supply chain;
    如果供应链不支持配置智能合约,向供应链配置平行链,所述平行链为公链网络中的部分节点;If the supply chain does not support the configuration of smart contracts, configure a parallel chain to the supply chain, which is a part of nodes in the public chain network;
    为平行链配置智能合约,以使平行链向公链发起供应交易。Configure smart contracts for parallel chains so that the parallel chain initiates supply transactions to the public chain.
  6. 一种基于公链的证通兑换方法,应用于供应链网络,其特征在于,包括:A public chain-based exchange method for stock exchanges, applied to supply chain networks, is characterized by:
    向公链发起供应交易,所述供应交易包括向公链转账的供应证通类型以及供应证通数量;Initiate a supply transaction to the public chain, the supply transaction includes the type of supply pass and the number of supply passes transferred to the public chain;
    接收公链根据供应证通的供给量计算的,供应证通与公链证通的兑换比率,确认是否完成交易;The receiving public chain calculates based on the supply volume of the supply pass, and the exchange ratio of the supply pass to the public link pass confirms whether the transaction is completed;
    在确认完成交易后,接收公链转账的,与供应证通数量等价值的公链证通。After confirming the completion of the transaction, the public chain transfer that has the same value as the number of supply certificate transfers received from the public chain transfer.
  7. 根据权利要求6所述的兑换方法,其特征在于,接收公链根据供应证通的供给量计算的,供应证通与公链证通的兑换比率,确认是否完成交易的步骤包括:The exchange method according to claim 6, characterized in that the step of confirming whether the transaction is completed by the receiving public chain is calculated based on the supply quantity of the supply stock pass and the exchange ratio of the supply stock pass and the public chain stock pass includes:
    向供应链对应的平行链发起供应交易;Initiate supply transactions to the parallel chain corresponding to the supply chain;
    控制平行链根据供应交易生成查询交易,并向公链发起查询交易,以使公链根据查询交易,向平行链返回供应证通与公链证通的兑换比率;Control the parallel chain to generate a query transaction based on the supply transaction and initiate a query transaction to the public chain, so that the public chain returns the exchange ratio between the supply certificate and the public chain certificate to the parallel chain according to the query transaction;
    控制平行链根据供应证通与公链证通的兑换比率,计算可获得的公链证通数量,以及将公链证通数量发送至供应链;Control the parallel chain to calculate the number of available public chain certificates and send the number of public chain certificates to the supply chain based on the exchange ratio between supply certificates and public chain certificates.
    接收公链证通数量,确定是否完成交易,以及在确定完成交易后,控制平行链向公链发起供应交易。Receive the number of public chain certificates, determine whether to complete the transaction, and after determining to complete the transaction, control the parallel chain to initiate supply transactions to the public chain.
  8. 一种基于公链的证通兑换方法,应用于兑换链网络,其特征在于,包括:A public-chain-based exchange method for stock exchanges, applied to the exchange chain network, is characterized by including:
    向公链发起兑换交易,所述兑换交易包括向公链转账的起始证通数量和兑换证通类型;Initiate an exchange transaction to the public chain. The exchange transaction includes the initial number of exchanges and the type of exchange exchanges transferred to the public chain;
    接收公链根据起始证通和兑换证通的供给量计算的,兑换证通与公链证通的兑换比率,确认是否完成交易;The receiving public chain calculates based on the supply of the initial stock exchange and the exchange stock exchange, the conversion ratio of the exchange stock exchange and the public chain stock exchange, and confirms whether the transaction is completed;
    在确认完成交易后,接收公链转账的,与公链证通数量等价值的兑换证通。After confirming the completion of the transaction, if the transfer from the public chain is received, the exchange certificate of the same value as the number of public chain certificates will be received.
  9. 根据权利要求8所述的兑换方法,其特征在于,接收公链根据兑换证通的供给量计算的,兑换证通与公链证通的兑换比率,确认是否完成交易的步骤包括:The exchange method according to claim 8, characterized in that the step of confirming whether the transaction is completed by the receiving public chain is calculated based on the supply of the exchange certificate, the conversion ratio of the exchange certificate and the public chain certificate, including:
    通过兑换链对应的平行链发起兑换交易;Initiate the exchange transaction through the parallel chain corresponding to the exchange chain;
    控制平行链根据兑换交易生成查询交易,并向公链发起查询交易,以使公链根据查询交易,向平行链返回兑换证通与起始证通的兑换比率;Control the parallel chain to generate a query transaction based on the exchange transaction, and initiate a query transaction to the public chain, so that the public chain returns the conversion ratio of the exchange certificate to the initial certificate to the parallel chain according to the query transaction;
    控制平行链根据兑换证通与起始证通的兑换比率,计算可获得的兑换证通数量,以及将兑换证通数量发送至兑换链;Control the parallel chain to calculate the number of available exchange passes based on the exchange ratio of the exchange pass and the initial pass, and send the number of exchange passes to the exchange chain;
    接收兑换证通数量,确定是否完成交易,以及在确定完成交易后,控制平行链向公链发起兑换交易。Receive the number of exchange certificates, determine whether to complete the transaction, and after determining to complete the transaction, control the parallel chain to initiate the exchange transaction to the public chain.
  10. 一种基于公链的区块链系统,其特征在于,包括:公链,以及接入公链网络的供应链和兑换链,公链、供应链以及兑换链均为点对点的网络;A blockchain system based on a public chain is characterized by including: a public chain, and a supply chain and an exchange chain connected to the public chain network. The public chain, the supply chain, and the exchange chain are all peer-to-peer networks;
    其中,所述供应链被配置为:向公链发起供应交易,供应交易包括向公链转账的供应证通类型以及供应证通数量;以及,接收公链转账的公链证通;Wherein, the supply chain is configured to: initiate a supply transaction to the public chain, and the supply transaction includes the type and number of supply certificates that are transferred to the public chain; and, the public chain certificate that receives transfers from the public chain;
    所述兑换链被配置为:向公链发起兑换交易,兑换交易包括向公链转账的起始证通数量和兑换证通类型;以及,接收公链转账的兑换证通;The exchange chain is configured to initiate an exchange transaction to the public chain, and the exchange transaction includes the initial number of exchanges and types of exchanges to be transferred to the public chain; and, the exchange exchange to receive transfers from the public chain;
    所述公链被配置为:接收供应链发起的供应交易;查询公链网络中供应证通的供给量,以及根据供应证通的供给量计算供应证通与公链证通的兑换比率;根据供应证通与公链证通的兑换比率,向供应链转账与供应证通数量等价值的公链证通;The public chain is configured to: receive supply transactions initiated by the supply chain; query the supply volume of the supply chain in the public chain network, and calculate the exchange ratio of the supply chain through the supply chain of the supply chain; The exchange ratio of supply certificate to public chain certificate, transfer to the supply chain and the value of the supply chain to the public chain certificate;
    以及,接收兑换链发起的兑换交易;查询公链网络中兑换证通和起始证通的供给量,以及根据兑换证通和起始证通的供给量计算兑换证通与起始证通的兑换比率;根据兑换证通与起始证通的兑换比率,向兑换链转账与起始证通数量等价值的兑换证通。And, receive the exchange transaction initiated by the exchange chain; query the supply of the exchange certificate and the initial certificate in the public chain network, and calculate the exchange certificate and the initial certificate according to the supply of the exchange certificate and the initial certificate Exchange ratio; according to the exchange ratio between the exchange pass and the initial pass, transfer the exchange pass to the exchange chain and the number of the initial pass is equal to the exchange pass.
PCT/CN2019/119533 2018-12-07 2019-11-19 Token conversion method based on public blockchain and blockchain system WO2020114242A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2021516604A JP6979736B2 (en) 2018-12-07 2019-11-19 Token exchange method and blockchain system based on public chain

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811496915.0A CN111369353A (en) 2018-12-07 2018-12-07 Certificate exchange method based on public link and block link system
CN201811496915.0 2018-12-07

Publications (1)

Publication Number Publication Date
WO2020114242A1 true WO2020114242A1 (en) 2020-06-11

Family

ID=69187864

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/119533 WO2020114242A1 (en) 2018-12-07 2019-11-19 Token conversion method based on public blockchain and blockchain system

Country Status (4)

Country Link
JP (1) JP6979736B2 (en)
CN (1) CN111369353A (en)
NL (1) NL2024367B1 (en)
WO (1) WO2020114242A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112804211A (en) * 2020-12-31 2021-05-14 北京存金所贵金属有限公司 Hybrid chain data verification method and system based on alliance block chain and public chain
CN115225510A (en) * 2022-07-19 2022-10-21 北京天融信网络安全技术有限公司 Method and device for acquiring block chain public chain network structure and electronic equipment

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111986031B (en) * 2020-09-08 2023-09-19 中国银行股份有限公司 Exchange transaction information monitoring method and device
CN112633863A (en) * 2020-12-29 2021-04-09 杭州趣链科技有限公司 Block chain based bill exchange method, device, equipment and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106779805A (en) * 2016-11-24 2017-05-31 中国银行股份有限公司 Integration circulation method and device between a kind of different businessmans based on block chain
US20170206515A1 (en) * 2014-12-24 2017-07-20 Nomura Research Institute, Ltd. Settlement system and settlement method
CN107038639A (en) * 2017-03-07 2017-08-11 杭州公链网络技术有限公司 A kind of alliance's chain building method of compatible many Asset Type fast transactions
CN108460596A (en) * 2018-02-27 2018-08-28 周伟 A kind of quantized value assignment transfer method based on block chain
CN108768659A (en) * 2018-05-24 2018-11-06 深圳前海益链网络科技有限公司 Across the chain tra nsfer system of Token assets between a kind of different blocks chain network

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10255600B2 (en) * 2014-06-16 2019-04-09 Bank Of America Corporation Cryptocurrency offline vault storage system
US10812274B2 (en) * 2015-05-07 2020-10-20 Blockstream Corporation Transferring ledger assets between blockchains via pegged sidechains
US10713731B2 (en) * 2016-07-22 2020-07-14 Nec Corporation Method for secure ledger distribution and computer system using secure distributed ledger technology
CN107742210A (en) * 2017-10-13 2018-02-27 布比(北京)网络技术有限公司 Across the chain fund transfer system and method for a kind of different blocks interchain
CN108876337A (en) * 2018-05-24 2018-11-23 深圳前海益链网络科技有限公司 A kind of block chain network method for supporting different Token exchange money transfer transactions verifyings

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170206515A1 (en) * 2014-12-24 2017-07-20 Nomura Research Institute, Ltd. Settlement system and settlement method
CN106779805A (en) * 2016-11-24 2017-05-31 中国银行股份有限公司 Integration circulation method and device between a kind of different businessmans based on block chain
CN107038639A (en) * 2017-03-07 2017-08-11 杭州公链网络技术有限公司 A kind of alliance's chain building method of compatible many Asset Type fast transactions
CN108460596A (en) * 2018-02-27 2018-08-28 周伟 A kind of quantized value assignment transfer method based on block chain
CN108768659A (en) * 2018-05-24 2018-11-06 深圳前海益链网络科技有限公司 Across the chain tra nsfer system of Token assets between a kind of different blocks chain network

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112804211A (en) * 2020-12-31 2021-05-14 北京存金所贵金属有限公司 Hybrid chain data verification method and system based on alliance block chain and public chain
CN115225510A (en) * 2022-07-19 2022-10-21 北京天融信网络安全技术有限公司 Method and device for acquiring block chain public chain network structure and electronic equipment
CN115225510B (en) * 2022-07-19 2024-01-23 北京天融信网络安全技术有限公司 Method and device for acquiring block chain public chain network structure and electronic equipment

Also Published As

Publication number Publication date
JP6979736B2 (en) 2021-12-15
NL2024367B1 (en) 2020-07-14
CN111369353A (en) 2020-07-03
JP2021530065A (en) 2021-11-04
NL2024367A (en) 2020-06-03

Similar Documents

Publication Publication Date Title
WO2020114242A1 (en) Token conversion method based on public blockchain and blockchain system
KR102573433B1 (en) Platform for trading energy using block chain and method thereof
CN110866823B (en) Public link-based transaction method and block chain system
TWI716140B (en) Data processing method and device based on blockchain
US20200058071A1 (en) Least decentralized fund trading system and method thereof
CN106530088B (en) Method for trading certificate products based on blockchain security nodes
CN110335147A (en) A kind of digital asset Information Exchange System and method based on block chain
TWM543413U (en) Web lending platform using technology of blockchain for deal
CN109829824A (en) A kind of commodity transaction information sharing method based on block chain technology
WO2020173497A1 (en) Block chain network deployed with centralized system
TW202026997A (en) Blockchain-based product purchase method and apparatus
WO2020125234A1 (en) Blockchain-based data processing method and apparatus
CN109493041B (en) Distributed accounting method and transaction platform based on regional field chain
WO2021077975A1 (en) Third-party settlement control method and apparatus, electronic device and storage medium
KR20200106767A (en) System for trading intellectual property using block chain, and method for operating the same
CN112365119B (en) Distribution network electric energy distributed transaction model based on distributed database support
CN114282956A (en) Energy transaction method, device, electronic equipment and storage medium
WO2020118859A1 (en) Decentralized chip research and development transaction data storage method and system
CN110378693A (en) Distributed energy weak center trade managing system based on alliance's block chain
WO2021017635A1 (en) Digital asset financial system
WO2022036505A1 (en) Bulk commodity transaction information sharing method and system, and storage medium
CN115809440A (en) Method and device for managing copyrighted works based on block chain
WO2020114241A1 (en) Token exchange method based on public blockchain, and blockchain system
CN115630959A (en) Energy safety transaction method and system based on block chain intelligent contract
JP6535394B1 (en) Digital asset trading method

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: 19892767

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021516604

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19892767

Country of ref document: EP

Kind code of ref document: A1