NL2024395B1 - Public chain-based token exchange method and blockchain system - Google Patents

Public chain-based token exchange method and blockchain system Download PDF

Info

Publication number
NL2024395B1
NL2024395B1 NL2024395A NL2024395A NL2024395B1 NL 2024395 B1 NL2024395 B1 NL 2024395B1 NL 2024395 A NL2024395 A NL 2024395A NL 2024395 A NL2024395 A NL 2024395A NL 2024395 B1 NL2024395 B1 NL 2024395B1
Authority
NL
Netherlands
Prior art keywords
exchange
public chain
chain
tokens
token
Prior art date
Application number
NL2024395A
Other languages
Dutch (nl)
Other versions
NL2024395A (en
Inventor
Bai Jie
Wu Xianfeng
Li Dongyun
Original Assignee
Aowei Information Tech Jiangsu Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Aowei Information Tech Jiangsu Co Ltd filed Critical Aowei Information Tech Jiangsu Co Ltd
Publication of NL2024395A publication Critical patent/NL2024395A/en
Application granted granted Critical
Publication of NL2024395B1 publication Critical patent/NL2024395B1/en

Links

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
    • 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/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
    • 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

Abstract

This application provides a public chain-based token exchange method and blockchain system. In the method, an exchange initiating chain first initiates a query transaction to a public chain, so that the public chain may calculate a real-time exchange rate according to an initial token type and supply quantities of tokens for the exchange in the query transaction, or acquire the real-time exchange rate from an exchange rate table; and subsequently, the real-time exchange rate is sent to the exchange initiating chain. The exchange initiating chain initiates an exchange transaction to the public chain according to the realtime exchange rate, that is, transfers a preset number of initial tokens to the public chain, so that the public chain transfers exchange tokens equivalent to the number of the initial tokens to the exchange initiating chain according to the exchange transaction and the real-time exchange rate, thus the exchange transaction is completed. The method determines an exchange rate according to supply quantities of the initial token and exchange tokens. In this way, exchange rights of both parties that participate in exchange are ensured, and the exchange efficiency is improved, thereby avoiding a problem of low exchange efficiency caused by a centralized exchange platform.

Description

PUBLIC CHAIN-BASED TOKEN EXCHANGE METHOD AND BLOCKCHAIN SYSTEM FIELD OF THE INVENTION
[0001] This application relates to a technical field of network transactions, and in particular, to a public chain-based token exchange method and blockchain system.
BACKGROUND OF THE INVENTION
[0002] A blockchain technology is for creating a relative objective non- repudiation digital environment according to a decentralized system application architecture and a manner of consensus. Based on the blockchain technology, authenticity of network information can be ensured. For example, if a transaction occurs in a blockchain network, a node in the blockchain network may generate block data that records transaction content based on transaction information, and broadcasts the block data over the whole network; and other nodes in the network store the block data at the same time, forming an unchangeable blockchain. The transaction should be understood in a broad sense, does not refer to a conventional "commodity transaction” or "article exchange", but refers to a certain data operation content or operation result on the blockchain network. For example, a blockchain node A on the network initiates a query request a for a performance of a communications device of a certain model, the query request a is a transaction for a blockchain node B that takes on a query service.
Similarly, it is also a transaction that the node B sends the queried performance table b of the communications device of the model to the node A. Information A and a and information B and b as transaction information may be written into a data block of the blockchain.
[0003] Typically, a transaction through the blockchain network may use a digital token, such as a bitcoin in a bitcoin network or Ether in an Ether network, to serve as a marker of a network transaction for measuring an attention degree or value of a transaction operation or rating an attention degree or value of transaction data. Typically, different types of tokens are used in different blockchain networks. As a marker of a network transaction, the different types of tokens need to be exchanged with each other, so that information or value may be transferred, by using an A token and a B token, between a blockchain network A that uses the A token and a blockchain network B that uses the B token.
[0004] A conventional token exchange operation is acheived by using a token bourse. To be specific, a transaction center in a form of a bourse is provided in a network, and the transaction center provides an exchange platform for different tokens, so that both parties that participate in exchange can exchange according to a certain exchange rate, e.g., one A token for two B tokens.
[0005] In a prior exchange method, an exchange operation between two types of tokens depends on the conventional exchange platform or a third-party platform, and an exchange rate also depends on the exchange platform or the third-party platform (such as a Financial
Gateway). The exchange platform or the third-party platform is essentially a centralized platform, and thus may easily suffer from cyberattacks with security being difficult to be ensured. In addition, the conventional exchange platform requires that an exchange counterparty is determined. When a party that participates in the exchange desires a relatively uncommon token, it need take a long time to search for an exchange counterparty and to determine an exchange rate between tokens. As a result, an exchange process spends a relatively long period, and thus not only the exchange cannot beachieved in a timely manner but also more network resources are consumed,the exchange efficiency being reduced.
SUMMARY OF THE INVENTION
[0006] This application provides a public chain-based token exchange method and blockchain system, so as to resolve a problem of low exchange efficiency of a conventional token exchange method due to control by a centralized program.
[0007] According to a first aspect, the present application provides a public chain-based token exchange method, including:
[0008] initiating, by a transaction node in an exchange initiating chain, a query transaction to a public chain, the query transaction including an initial token type and an exchange token type;
[0009] querying, in a public chain network by the public chain, for supply quantities of initial tokens and exchange tokens according to the exchange token type;
[0010] calculating, by the public chain, a real-time exchange rate according to the supply quantities of the tokens, and sending the real- time exchange rate to the transaction node;
[0011] initiating, by the transaction node, an exchange transaction to the public chain according to the real-time exchange rate, including transferring a preset number of initial tokens to the public chain; and
[0012] transferring, by the public chain, exchange tokens equivalent to the preset number of initial tokens to the transaction node according to the exchange transaction and the real-time exchange rate.
[0013] Optionally, the step of the transferring, by the public chain, exchange tokens equivalent to the preset number of initial tokens to the transaction node according to the exchange transaction and the real- time exchange rate includes:
[0014] receiving, by the public chain, the initial tokens transferred by the transaction node, and calculating an exchange rate between the initial token and a public chain token based on a current supply quantity of the initial tokens in the public chain network;
[0015] issuing, by the public chain, public chain tokens equivalent to the preset number of initial tokens, and extracting a current exchange rate between the public chain token and the exchange token;
[0016] acquiring, by the public chain, the exchange tokens equivalent to a number of the issued public chain tokens, from the supplies of exchange tokens; and
[0017] transferring, by the public chain, the acquired exchange tokens to the exchange initiating chain.
[0018] Optionally, before the step of the initiating, by a transaction node in an exchange initiating chain, a query transaction to a public chain, the method further includes:
[0019] in a supply chain accessing to the public chain network, 5 initiating, by a supply node, a supply transaction to the public chain, the supply transaction including a supply token type and a number of supply tokens transferred to the public chain;
[0020] calculating, by the public chain, an exchange rate between the supply token and a public chain token according to a supply quantity of supply tokens in the public chain network; and
[0021] transferring, by the public chain, public chain tokens equivalent to the number of the supply tokens to the supply node according to the exchange rate between the supply token and the public chain token.
[0022] Optionally, the method further includes:
[0023] in a supply chain accessing to a public chain network, initiating, by a supply node, a selling transaction to the public chain, including transferring, by the supply chain, a preset number of public chain tokens to the public chain;
[0024] extracting, by the public chain, a current exchange rate between the public chain token and the exchange token corresponding to the supply chain; and [00251 transferring, by the public chain, exchange tokens equivalent to the supply node according to the exchange rate between the public chain token and the exchange token.
[0026] Optionally, the step of the querying, in a public chain networkby the public chain, for supply quantities of initial tokens and exchange tokens according to the exchange token type includes:
[0027] extracting, by the public chain, a current exchange rate between the initial token and a public chain token if the exchange token type is not found through query in the public chain network;
[0028] generating, by the public chain, a query result according to the exchange rate between the initial token and the public chain token, and sending the query result to the transaction node;
[0029] determining, by the transaction node according to the query result, whether to initiate the exchange transaction to the public chain; and
[0030] after the transaction node initiates the exchange transaction, transferring, by the public chain, a preset number of public chain tokens equivalent to the transaction node according to the exchange rate between the initial token and the public chain token.
[0031] Optionally, the step of the querying, in a public chain network by the public chain, for supply quantities of initial tokens and exchange tokens according to the exchange token type further includes:
[0032] querying, by the public chain, for a target exchange chain capable of supplying the exchange token type in the public chain network if the exchange token type is not found through query in the public chain network;
[0033] sending, by the public chain, a query result to the transaction node, the query result including address information and an exchange condition of the target exchange chain; and
[0034] initiating, by the transaction node, an exchange transaction designating the target exchange chain to the public chain according to the received query result.
[0035] According to a second aspect, the present application further provides a public chain-based token exchange method, including:
[0036] initiating, by a transaction node in an exchange initiating chain, a query transaction to a public chain, the query transaction including an initial token type and an exchange token type;
[0037] querying, in an exchange rate table by the public chain, for a current exchange rate between an initial token and an exchange token according to the exchange token type, and sending the current exchange rate to the transaction node;
[0038] initiating, by the transaction node, an exchange transaction to the public chain according to the current exchange rate, including transferring a preset number of initial tokens to the public chain; and
[0039] transferring, by the public chain, exchange tokens equivalent to the preset number of initial tokens to the transaction node according to the exchange transaction and the current exchange rate.
[0040] Optionally, before the step of the initiating, by a transaction node in an exchange initiating chain, a query transaction to a public chain, the method further includes:
[0041] in a supply chain accessing to a public chain network, initiating, by a supply node, a supply transaction to the public chain, the supply transaction including a supply token type and a number of supply tokens transferred to the public chain;
[0042] querying, in the exchange rate table by the public chain, for an exchange rate between the supply token and a public chain token according to the supply token type; and
[0043] transferring, by the public chain, public chain tokens equivalent to the number of the supply tokens to the supply node according to the exchange rate between the supply token and the public chain token.
[0044] Optionally, the method further includes:
[0045] in a supply chain accessing to a public chain network, initiating, by a supply node, a selling transaction to the public chain, the selling transaction including a number of public chain tokens transferred to the public chain and a repurchase token type;
[0046] querying, in the exchange rate table by the public chain, for an exchange rate between the public chain token and a repurchase token according to the repurchase token type; and
[0047] transferring, by the public chain, repurchase tokens equivalent to the number of the public chain tokens to the supply node according to the exchange rate between the public chain token and the repurchase token.
[0048] Optionally, the exchange rate table is a dynamic parameter list stored in a public chain network, and the method further includes:
[0049] configuring, by the public chain, a smart contract for a supply chain accessing to a public chain network;
[0050] supplying, by the supply chain, a preset number of supply tokens and a preset number of public chain tokens according to the smart contract;
[0051] calculating, by the public chain, an initial exchange rate according to the preset number of supply tokens and the preset number of public chain tokens, and adding the initial exchange rate to the exchange rate table; and
[0052] updating, by the public chain, the exchange rate in real time according to exchange content whenever the smart contract is invoked.
[0053] According to a third aspect, the present application further provides a public chain-based blockchain system, including an exchange initiating chain and a public chain, where both the exchange initiating chain and the public chain are in peer-to-peer network structures, and some of nodes of the exchange initiating chain access to a public chain network;
[0054] a transaction initiating chain is configured to: initiate a query transaction to the public chain, the query transaction including an initial token type and an exchange token type; and initiate an exchange transaction to the public chain according to a real-time exchange rate, including transferring a preset number of initial tokens to the public chain; and
[0055] the public chain is configured to: query, in the public chain network, for supply quantities of initial tokens and exchange tokens according to the exchange token type; calculate the real-time exchange rate according to the supply quantities of the initial tokens and the exchange tokens, and send the real-time exchange rate to the exchange initiating chain; and transfer exchange tokens equivalent to the preset number of initial tokens to the exchange initiating chainaccording to the exchange transaction and the real-time exchange rate.
[0056] According to a fourth aspect, the present application further provides a public chain-based blockchain system, including an exchange initiating chain and a public chain, where both the exchange initiating chain and the public chain are in peer-to-peer network structures, some of nodes of the exchange initiating chain access to a public chain network, and an exchange rate table is stored in the public chain network;
[0057] a transaction initiating chain is configured to: initiate a query transaction to the public chain, the query transaction including an initial token type and an exchange token type; and initiate an exchange transaction to the public chain according to a current exchange rate, including transferring a preset number of initial tokens to the public chain; and
[0058] the public chain is configured to: query, in the exchange rate table, for a current exchange rate between an initial token and an exchange token according to the exchange token type, and send the current exchange rate to a transaction node; and transfer exchange tokens equivalent to the preset number of initial tokens to the transaction node according to the exchange transaction and the current exchange rate.
[0059] It may be learned from the foregoing technical solutions that the present application provides a public chain-based token exchange method and blockchain system. In actual applications of the method, the exchange initiating chain first initiates the query transaction to thepublic chain, so that the public chain may calculate the real-time exchange rate according to the initial token type and supply quantities of tokens for the exchange in the query transaction, or acquire the real- time exchange rate from the exchange rate table; and subsequently, the real-time exchange rate is sent to the exchange initiating chain. The exchange initiating chain initiates the exchange transaction to the public chain according to the real-time exchange rate, that is, transfers a preset number of initial tokens to the public chain, so that the public chain transfers exchange tokens equivalent to the number of the initial tokens to the exchange initiating chain according to the exchange transaction and the real-time exchange rate, thusthe exchange transaction is completed. Accordign to the method, the exchange rate is determined according to supply quantities of the initial tokens and exchange tokens. In this way, exchange rights of both parties that participate in exchange are ensured, and the exchange efficiency is improved, thereby avoiding a problem of low exchange efficiency caused by a centralized exchange platform.
BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to describe the technical solutions of the present application to be more clear, the accompanying drawings to be used in the embodiments are described briefly below. Obviously, persons of ordinary skills in the art can also derive other accompanying drawings according to these accompanying drawings without an effective effort.
[0061] FIG. 1 is a schematic flowchart of a public chain-based tokenexchange method in accordance with the present application;
[0062] FIG. 2 is a schematic flowchart ofachieving a supply transaction by a supply chain in accordance with the present application;
[0063] FIG. 3 is a schematic flowchart ofachieving a selling transaction by a supply chain in accordance with the present application;
[0064] FIG. 4 is a schematic flowchart of transferring exchange tokens to a transaction node in accordance with the present application;
[0065] FIG. 5 is a schematic structural diagram of a public chain- based token exchange blockchain system in accordance with the present application;
[0066] FIG. 6 is a schematic flowchart of another public chain-based token exchange method in accordance with the present application;
[0067] FIG. 7 is a schematic flowchart of generating an exchange rate table in accordance with the present application;
[0068] FIG. 8 is another schematic flowchart ofachieving a supply transaction by a supply chain in accordance with the present application;
[0069] FIG. 9 is a another schematic flowchart ofachieving a selling transaction by a supply chain in accordance with the present application;
[0070] FIG. 10 is a schematic diagram of an exchange process in which an exchange token is not found through query in accordance with the present application;
[0071] FIG. 11 is a schematic diagram of another exchange process in which an exchange token is not found through query in accordance with the present application; and
[0072] FIG. 12 is a schematic structural diagram of another public chain-based token exchange blockchain system in accordance with the present application.
DETAILED DESCRIPTION OF THE EMBODIMENTS
[0073] Embodiments are described below in detail, and examples thereof are shown in the accompanying drawings. When the descriptions below relate to the accompanying drawings, same reference signs throughout the various accompanying drawings indicate same or similar elements, unless specified otherwise. Implementations described in the following embodiments do not represent all implementations in accordance with the present application. Merely examples in accordance with a system and a method that are described in detail in the claims and some aspects of the present application are provided.
[0074] In technical solutions provided in the present application, a blockchain network refers to a peer-to-peer (P2P) network that has a decentralized application architecture. The blockchain network can perform distributed storage, public consensus, digital encryption, transaction ledger, and verifications. In other words, the blockchain network is a transaction platform that covers a distributed technology, the cryptography, a P2P network architecture, and various consensusalgorithms that may possibly be applied. Blockchain data or blockchain information refers to ledger information generated based on transaction information when a transaction occurs in the blockchain network. That is, a plurality of specific transactions form a block, and a plurality of blocks form a blockchain. The blockchain network includes nodes that establish peer-to-peer network connections with each other, and each of the nodes is configured with a corresponding consensus mechanism, such as a smart contract and has a sufficient computing capability so as to perform a transaction verification and an ledger recording process. The nodes are further configured with interface specifications in conformity with a uniform standard, so that more nodes or other types of blockchain networks are accessed through the interface specifications.
[0075] In the present application, the mentioned public chain, exchange initiating chain, supply chain, and parallel chain all refer to the various blockchain networks that conform to a blockchain technology. In the present application, unless stated otherwise, the public chain, the exchange initiating chain, the supply chain, and the parallel chain all refer to the respective networks, that is, a public chain network, an exchange initiating chain network, a supply chain network, and a parallel chain network. The public chain network serving as a basic platform provided for an whole network has node interfaces accessing to a plurality of blockchain networks, for example, an industry chain network, a consortium chain network, and a private chain network that are established based on a public-chain interface specification, anda third-party blockchain network. Each blockchain network may serve as an independent development platform, and provides corresponding services for interior of the network. A standard interface manner is defined and specified for the public chain, thus facilitating interface with another blockchain. In the present application, the public chain has a capability of supporting cross-chain brokering as well as storing tokens, decentralized applications, and a smart contracting.
[0076] The exchange initiating chain and the supply chain refer to the respective ones of the blockchain networks accessing to the public chain network. To be specific, in the present application, the public chain provides a basic platform, and the exchange initiating chain and the supply chain, as accessing blockchain networks, have respective functions and services. The exchange initiating chain and the supply chain may be blockchain networks that are established based on standards and interface specifications of the public chain network. In other words, the exchange initiating chain and the supply chain may perform communication and service interfacing directly with the public chain network. The exchange initiating chain and the supply chain may also be networks that are independent with each other, and have the respective dedicated interface specifications, such as bitcoins or Ether for the existing blockchain network, or an industry chain and a consortium chain developed in some industries, or even a private chain established for satisfying a certain service demand. The existing blockchain, industry chain, consortium chain, and private chain generally cannot transact directly with each other or even cannottransact with the public chain network due to having the respective dedicated network interface specifications. Therefore, in the present application, the public chain may be connected to another network through the parallel chain.
[0077] The parallel chain may consist of some of nodes in the public chain network; and through the parallel chain, bridging may be performed between the public chain and other networks which cannot directly transact with each another. In the present application, for a network which cannot directly transact, each blockchain network corresponds to a parallel chain. The parallel chain is configured to have complete functions corresponding to the blockchain network, and can synchronously transform and transfer the transaction in the blockchain networks to the public chain network. Therefore, in the technical solutions provided in the present application, the parallel chain may be determined as a mirror image of the corresponding blockchain network, and for ease of description, the corresponding blockchain network is referred to as a parent chain. In the present application, the parallel chain consists of some nodes in the public chain network, and these nodes are also nodes in the parent chain, so as to transfer transaction information.
[0078] On the basis of the foregoing components, in actual applications, the public chain can provide cross-chain relay, toachieve tasks such as a transaction verification, data proof, asset transfer, implementations of the smart contract, and the like. The public chain has uniform interface specifications for external, so that otherblockchain networks can quickly access to the public chain network. The public chain further provides capabilities of a basic blockchain platform, that is, to quicklyachieve solution deployment and verifications, toachieve a distributed storage process and a ledger recording process in the public chain network. In addition, as a basic platform, the public chain may further provide a public development function, so as toachieve collaborative development and deployment of smart contracts of a plurality parallel chains at one time.
[0079] In addition to recording own blockchain information, the public chain may further be configured to store information abstract, that is, transaction abstract, of a corresponding cross-chain transaction. Relevant content of the cross-chain transaction is recorded through formatted transaction data. Meanwhile, in order to occupy less distributed storage space on the public chain, when recording some information, the public chain can further record information of a third- party blockchain through a particular compression algorithm. For example, block data formed and stored in the public chain may include the following content: a block identifier (such as a sequence number, a time stamp, a block hash value, and a previous block hash value), block attribution (that is, a block generator), other block information (such as a random value, a difficulty value, and additional information), block weight, information abstract (such as a transaction tree, a state tree, a receipt tree, and a data tree), transaction fees, rewards, sizes, and the like.
[0080] Refer to FIG. 1, which is a schematic flowchart of a publicchain-based token exchange method in accordance with the present application. It may be learned from FIG. 1 that in actual applications, the token exchange method provided in the present application intends to achieve token exchange between different blockchain networks, and includes the following steps.
[0081] S11: A transaction node in an exchange initiating chain initiates a query transaction including an initial token type and an exchange token type to a public chain.
[0082] S12: The public chain queries, in a public chain network, supply quantities of initial tokens and exchange tokens according to the exchange token type.
[0083] S13: The public chain calculates a real-time exchange rate according to the supply quantities of the tokens, and sends the real- time exchange rate to the transaction node.
[0084] S14: The transaction node initiates an exchange transaction to the public chain according to the real-time exchange rate, including transferring a preset number of initial tokens to the public chain.
[0085] S15: The public chain transfers exchange tokens equivalent to the preset number of initial tokens to the transaction node according to the exchange transaction and the real-time exchange rate.
[0086] In the technical solutions provided in the present application, the exchange initiating chain may be any blockchain network accessing to the public chain network, such as a third-party public chain network, an industry chain network, a consortium chain network, or a private- chain network. Because different blockchain networks have differentscales, a party initiating exchange may be the exchange initiating chain, or may be one or more nodes in the exchange initiating chain, that is, the transaction node. Before initiating a formal exchange transaction, the transaction node may trigger the public chain to determine an exchange rate for two types of tokens first by initiating the query transaction. Therefore, the initial token type and the exchange token type need to be included in the query transaction. The initial token is a token used by the exchange initiating chain for payments, may be a token circulating in an exchange initiating chain network, or may be a token of another type. The exchange token refers to a token desired by the exchange initiating chain, and may be any legal token authenticated by the public chain.
[0087] For example, there are six block blockchain networks such as network A to network F accessing to a public chain network P. Types of tokens circulating in the respective network A to network F (or token types supporting exchange transactions to external) respectively are Ta, Tb, Tc, Td, Te, and Tf. When token exchange needs to be performed in the accessing blockchain network, if a transaction node D712 in a network D hopes to exchange for Tf in equal value by using 100 tokens Td, the transaction node D712 first initiates a query transaction according to demands, and the initiated query transaction includes the initial token type as Td and the exchange token type as Tf. The transaction node sends the query transaction to the public chain network.
[0088] In the technical solutions provided in the present application,
both the exchange initiating chain and the public chain are blockchain networks. Therefore, when the transaction node initiates the query transaction to the public chain, the transaction node may generate a block data containing the query transaction, and broadcasts on both the exchange initiating chain network and the public chain network. On the one hand, upon receiving the block data broadcasted by the transaction node, other nodes in the exchange initiating chain verify the query transaction in the block data, and respectively store the block data to form a complete blockchain. On the other hand, when the transaction node broadcasts the block data to the public chain, the block data needs to be first broadcasted to an interface node at which the exchange initiating chain is connected to the public chain; after the interface node verifies and stores the block data, the block data proceed to be broadcasted to a node in the public chain; and other nodes (or some nodes participating in maintenance) in the public chain verify the block data, to form a complete blockchain in the public chain network. Therefore, in the present application, for a query transaction, two pieces of complete blockchain information may be respectively formed in the exchange initiating chain and the public chain, and are stored in a distributed manner. In this way, better non-repudiation effects are achieved. lt should be noted that the query transaction may be a transaction in a form of agreement, such as a transaction for which a number of tokens is 0, or may be a transaction in a form designated in a smart contract.
[0089] After the public chain receives the query transaction, executionnodes may be allocated for the query transaction, that is, when there is a relatively large number of nodes in the public chain, only some of the nodes are required to perform the query transaction without a requirement that all nodes participate in the query transaction, so as 10 avoid large-scale highly concurrent operations in the public chain network. The execution nodes extract the initial token type Td and the exchange token type Tf in the query transaction, determine and query for the supply quantities of the initial tokens and the exchange tokens among various token supply quantities stored in the public chain, and calculate an exchange rate between the initial token and the exchange tokenaccording to the supply quantities of supplies. Subsequently, the calculated exchange rate, as a query result, is fed back to the exchange initiating chain or the transaction node, and then the query transaction is finished.
[0090] In the technical solutions provided in the present application, a specific manner of calculating the exchange rate between the initial token Td and the exchange token Tf according to the supply quantities may be a calculation manner agreed for the public chain, or a value- exchange protocol that is publicly confirmed, such as a bancor protocol.
However, in actual applications, for the exchange initiating chain, the initial token type for exchange may be in a plurality of different forms. For example, for an exchange chain network A, an initial token type for exchange may be the token Ta circulating in the network A, may be a public chain token Tp, or even may be the token Tb, Te, or Tf circulating in another blockchain. Therefore, for different types of initial tokens, thepublic chain cannot directly determine the exchange rate between the initial token and the exchange token. In this case, before calculating an actual exchange rate, a token type of the initial token may further be determined according to the query transaction, that is, it is determined whether the initial token is the public chain token.
[0091] For example, if the initial token is the public chain token, that is, an exchange chain network D uses 100 public chain tokens Tp to exchange for the tokens Tf, the public chain needs to acquire only the supply quantity of the exchange tokens, that is, the supply quantity of the tokens Tf. Subsequently, an exchange rate between the exchange token Tf and the public chain token Tp is calculated according to the supply quantity of the exchange tokens. If the initial token is not the public chain token, that is, the exchange chain network D uses 100 tokens Td to exchange for the exchange tokens Tf, the public chain needs to query for the supply quantities of both the initial tokens Td and the exchange tokens Tt, and then respectively calculate an exchange rate between the initial token Td and the public chain token Tp and the exchange rate between the exchange token Tf and the public chain token Tp, so as to finally determine the exchange rate between the initial token Td and the exchange token Tf according to the two calculated exchange rates.
[0092] After the public chain returns the query result to the exchange initiating chain, the transaction node determines, according to the real- time exchange rate between the initial token and the exchange token in the returned result, whether to perform the exchange transaction. Afterthe transaction node receives the real-time exchange rate and determines to start to perform the exchange transaction, the transaction node initiates a formal exchange transaction to the public chain, that is, transfers the preset number of initial tokens to the public chain. Similarly, in order to trigger the public chain to perform a transfer operation, the exchange transaction needs to include the number of the initial tokens transferred to the public chain and the required exchange token type.
[0093] Still taking the foregoing example as an example, after receiving the exchange rate between the initial token Td and the exchange token Tf, a transaction node D712 in the exchange initiating chain network D accepts the exchange rate to initiate the exchange transaction to the public chain P, where the exchange transaction includes transferring 100 initial tokens Td to the public chain, and the exchange token type is Tf.
[0094] Similarly, when the transaction node initiates the exchange transaction to the public chain, the transaction node may generate block data containing the exchange transaction, and broadcasts on both the exchange initiating chain network and the public chain network. Similar to the broadcast manner for the query transaction, upon receiving the block data broadcasted by the transaction node, other nodes in the exchange initiating chain verify the exchange transaction in the block data, and respectively store the block data to form a complete blockchain. When the transaction node broadcasts the block data to the public chain, the block data needs to be firstbroadcasted to the interface node at which the exchange initiating chain is connected to the public chain; after the interface node verifies and stores the block data, the block data proceed to be broadcasted to a node in the public chain; and other nodes in the public chain verify the block data, to form a complete blockchain in the public chain network.
[0095] After receiving the exchange transaction initiated by the transaction node, the public chain can determine, a number of exchange tokens equivalent to the initial tokens, according to the number of the initial tokens and the exchange rate between the initial token and the exchange token in the exchange transaction, extract the corresponding number of exchange tokens from the exchange tokens stored in the public chain, and transfer the exchange tokens to the transaction node. For example, if the exchange rate, calculated by the public, between the initial token Td and the exchange token Tt, that is chain P is 3:2, upon receiving 100 initial tokens Td, the public chain P extracts 66.7 exchange tokens Tf from the stored exchange tokens Tf, and transfers the 66.7 exchange tokens Tf to the transaction node D712, and then the exchange transaction is completed.
[0096] It may be learned from the foregoing technical solutions that according to a manner of achieving token exchange by using the public chain, the query transaction is first initiated by the exchange initiating chain, and then the public chain perform a query for the supply quantities of the initial tokens and the exchange tokens. In the present application,the supply quantities of the initial tokens and the exchange tokens are important parameters for determining the real-timeexchange rate. Therefore, in some embodiments of the present application, as shown in FIG. 2, prior to the step that a transaction node in an exchange initiating chain initiates a query transaction to a public chain, the method further includes the following steps.
[0097] S101: In a supply chain accessing to the public chain network, a supply node initiates a supply transaction to the public chain, the supply transaction including a supply token type and a number of supply tokens transferred to the public chain.
[0098] S102: The public chain calculates an exchange rate between the supply token and a public chain token according to a supply quantity of supply tokens in the public chain network.
[0099] S103: The public chain transfers public chain tokens equivalent to the number of the supply tokens to the supply node according to the exchange rate between the supply token and the public chain token.
[00100] IK may be learned from the foregoing steps that in this embodiment, prior to occurrence of token exchange, it is required by the public chain networkthat various types of tokens are supplied by the respective accessing blockchain networks and are stored in the public chain network for subsequent exchange. In this embodiment, tokens supplied by the respective blockchains are referred to as supply tokens. Therefore, in actual applications, by the supply node in a blockchain network, serving as the supply chain, accessing to the public chain, the supply transaction is initiated to the public chain, the supply transaction including the supply token type and the number of the supply tokens.
After receiving the supply transaction, the public chain determines acurrent token supply quantity in the public chain network according to the supply token type, and calculates the exchange rate between the supply token and the public chain token on this basis. Finally, the public chain calculates an exchangeable number of public chain tokens according to the calculated exchange rate and the number of the supply tokens, and transfers the corresponding number of public chain tokens to the supply node, thenthe supply transaction is finished.
[00101] In this embodiment, various types of tokens are supplied to the public chain through a plurality of blockchain networks accessing to the public chain. The public chain stores these tokens, thus not only ensuring that there are various types of tokens for participating in an exchange, but also ensuring that there are enough tokens for participating in the exchange, so as to keep the various tokens for participating in the exchange stable in value. In addition, because the supplies of tokens are stored in the public chain network, in subsequent token exchange processes, the exchange initiating chain may not be in contact with the supply chain, and exchange without an counterparty is formed, and thereby the exchange efficiency is improved significantly.
[00102] In this embodiment, the blockchain network, as the supply chain, may also exchange the supply token into another type of token according to requirements, and the exchange process thereof is same as the exchange transaction process of the exchange initiating chain except that: after the public chain token is acquired, the public chain token is further exchanged into a designated exchange token by initiating a selling transaction. As shown in FIG. 3, the method furtherincludes the following steps.
[00103] S104: In a supply chain accessing to a public chain network, a supply node initiates a selling transaction to the public chain, including transferring, by the supply chain , a preset number of public chain tokens to the public chain.
[00104] S105: The public chain extracts a current exchange rate between the public chain token and an exchange token corresponding to the supply chain.
[00105] S106: The public chain transfers exchange tokens equivalent to the supply nodes according to the exchange rate between the public chain token and the exchange token.
[00106] In view of the above, in this embodiment, when the supply transaction is performed, the public chain token are not obtained by the supply chain, but the exchange tokens are obtained from the supply tokens. lt is just required that the public chain, by using the public chain tokens as a medium, exchanges the public chain tokens for the corresponding exchange tokens. Therefore, when supplying tokens, it is not required that the supply chain is in contact with an exchange counterparty, either, and thereby the token supplying efficiency is improved.
[00107} Further, due to a diversity of blockchain networks that access to the public chain, some of the blockchain networks do not have a capability of performing transactions directly with the public chain.
Therefore, it is required by such blockchain network toachieve the exchange transaction by means of bridging by using a parallel chain. Tobe specific, the step that the public chain calculates a real-time exchange rate according to the supply quantities of the tokens, and sends the real-time exchange rate to the transaction node further includes:
[00108] sending, by the public chain, the real-time exchange rate to a parallel chain corresponding to the exchange initiating chain;
[00109] according to the real-time exchange rate and a transfer number of the initial tokens, calculating, by the parallel chain, a number of exchange tokens that can be acquired; and sending the number of the exchange tokens that can be acquired to the transaction node; and
[00110] confirming the exchange transaction by the transaction node, and transferring the preset number of initial tokens to the public chain through the parallel chain.
[00111] In some embodiments of the present application, as shown in FIG. 4, the step that the public chain transfers exchange tokens equivalent to the preset number of initial tokens to the transaction node according to the exchange transaction and the real-time exchange rate includes:
[00112] S151: The public chain receives the initial tokens transferred by the transaction node, and calculates an exchange rate between the initial token and a public chain token according to a current supply quantity of the initial tokens in the public chain network.
[00113] S152: The public chain issues public chain tokens equivalent to the preset number of initial tokens, and extracts a current exchange rate between the public chain token and the exchange token.
[00114] S153: The public chain acquires exchange tokens, equivalent to a number of the issued public chain tokens, from the supplies of exchange tokens.
[00115] S154: The public chain transfers the acquired exchange tokens to the exchange initiating chain, and eliminates the issued public chain tokens.
[00116] In the embodiments, after receiving the initial tokens transferred by the transaction node, the public chain first calculates the exchange rate between the initial token and the public chain token, and then issues the equivalent public chain tokens from the public chain network, so as to keep the public chain tokens stable in value. Subsequently, the public chain extracts the current exchange rate between the public chain token and the exchange token; acquires the exchange tokens equivalent to the number of the issued public chain tokens, from the supplies of exchange tokens, and transfers the acquired exchange tokens to the exchange initiating chain, and then the exchange transaction is completed. In the embodiments, by issuing the equivalent public chain tokens, it is possible that the exchange rate between tokens in the whole blockchain networks may be kept stable within a period from a time when the initial tokens are received to a time when the exchange token is transferred, so as to avoid a relatively severe fluctuation of the exchange rate.
[00117] On the basis of the foregoing token exchange method, the present application further provides a public chain-based blockchain system. As shown in FIG. 5, the blockchain system includes anexchange initiating chain and a public chain, wherein both the exchange initiating chain and the public chain are in peer-to-peer network structures, and some nodes of the exchange initiating chain access to a public chain network. The public chain network has a capability of storing tokens provided by various accessing blockchains.
[00118] A transaction initiating chain is configured to: initiate a query transaction to the public chain, the query transaction including an initial token type and an exchange token type; and initiate an exchange transaction to the public chain according to a real-time exchange rate, including transferring a preset number of initial tokens to the public chain.
[00119] The public chain is configured to: query, in the public chain network, supply quantities of initial tokens and exchange tokens according to the exchange token type; calculate the real-time exchange rate according to the supply quantities of the initial tokens and the exchange tokens, and send the realtime exchange rate to the exchange initiating chain; and transfer exchange tokens equivalent to the preset number of initial tokens to the exchange initiating chain according to the exchange transaction and the real-time exchange rate.
[00120] Refer to FIG. 6, the present application further provides a public chain-based token exchange method, including the following steps.
[00121] S21: A transaction node in an exchange initiating chain initiates a query transaction to a public chain, the query transaction including an initial token type and an exchange token type.
[00122] S22: The public chain queries, in an exchange rate table, a current exchange rate between an initial token and an exchange token according to the exchange token type, and sends the current exchange rate to the transaction node.
[00123] S23: The transaction node initiates an exchange transaction to the public chain according to the current exchange rate, including transferring a preset number of initial tokens to the public chain.
[00124] S24: The public chain transfers exchange tokens equivalent to the preset number of initial tokens to the transaction node according to the exchange transaction and the current exchange rate.
[00125] This embodiment differs from the foregoing embodiments in that the exchange rate between the initial token and the exchange token is determined by using the exchange rate table built in the public chain network. The exchange rate table is a numeration table that is created in the public chain network and refreshed periodically. Exchange rates between various types of tokens may be provided. The exchange rates may be calculated and provided by some nodes in the public chain that are dedicated for balancing token value, or may be provided by a financial industry chain accessing to the public chain network. However, for the financial industry chain accessing to the public chain network, when accessing to the public chain network, maintenance nodes in the public chain and other interest-related blockchain networks may vote online for the industry chain to determine authority and effectiveness of the financial industry, thus providing more reasonable exchange rates.
[00126] In addition, the exchange rate table may achieve refreshing and calculating thereof further by some nodes designated in the public chain network. To be specific, in the public chain network, some nodes that are authoritative and have strong computing capabilities are designated to serve as the maintenance nodes for the exchange rate table, so as to caculate, by monitoring, in a real-time manner, supply quantities of the various tokens stored in the public chain network, exchange rates between the stored tokens and the public chain token, i.e., value of the tokens. Moreover, content in the exchange rate table is periodically updated in a preset period, to improve the efficiency of determining the real-time exchange rate by the public chain.
[00127] Obviously, in actual applications, when determining the exchange rate between two types of tokens, the public chain may further ensure exchange rights of both parties to a maximum extent according to the supply quantities and by referring to the exchange rate table while the exchange efficiency is improved.
[00128] In some embodiments of the present application, the exchange rate table is a dynamic parameter list stored in the public chain network. As shown in FIG. 7, the method further includes the following steps.
[00129] S211: The public chain configures a smart contract for a supply chain accessing to a public chain network.
[00130] S212: The supply chain provides a preset number of supply tokens and a preset number of public chain tokens according to the smart contract.
[00131] S213: The public chain calculates an initial exchange rateaccording to the preset number of supply tokens and the preset number of public chain tokens, and adds the initial exchange rate to the exchange rate table.
[00132] S214: The public chain updates the exchange rate in real time according to exchange content whenever the smart contract is invoked.
[00133] In this embodiment, in an initial state, an accessing node in the supply chain provides the preset number of supply tokens and the corresponding public chain tokens through the smart contract provided by the public chain, to determine the corresponding exchange rate. For example, the supply chain provides 1000 supply tokens and 10 public chain tokens, and it is determined that the corresponding exchange rate is 100:1. These initially supplied tokens may serve as backup tokens. In subsequent applications, the smart contract may be invoked for multiple times, and token exchange isachieved one time whenever the smart contract is invoked. In this way, exchange rate may be correspondingly updated through continual exchange.
[00134] In a case that there is an exchange counterparty, if a network A exchanges the supply tokens for the public chain tokens through the public chain, there may be a network B to provide the corresponding public chain tokens and accept the supply tokens of the network A, with a corresponding exchange rate. In a case that there is no exchange counterparty, exchange may be performed directly through the backup tokens, and the exchange rate is a current real-time rate. If the backup tokens are used up, two situations may occur. One situation is that overbought occurs when the supply tokens are used up, where thesupply tokens are short in supply, and may be upvalued, and as a result, an access-chain network may be excited to provide supply tokens, or otherwise prices may keep rising. The other situation is that oversold occurs when public chain token corresponding to the backup tokens are used up, where the supply tokens are undersold, resulting in a price crash, and as a result, value of the supply tokens returns to zero. Therefore, in such mechanism, all parties participating in token exchange may try the best to maintain a fair exchange rate to ensure rights of each party. In this embodiment, according to the foregoing manner of updating the exchange rate, rights of all exchange participants may be protected as possible, so as to ensure that value of the tokens of each party is maintained, and safety and fairness of the public chain are maintained.
[00135] Further, when the exchange rate between the initial token and the exchange token is determined by using the exchange rate table, as shown in FIG. 8, before the step that a transaction node in an exchange initiating chain initiates a query transaction to a public chain, the method further includes the following steps.
[00136] S201: In a supply chain accessing to a public chain network, a supply node initiates a supply transaction to the public chain, the supply transaction including a supply token type and a number of supply tokens transferred to the public chain.
[00137] S202: The public chain queries, in the exchange rate table, an exchange rate between the supply token and a public chain token according to the supply token type.
[00138] S203: The public chain transfers public chain tokens equivalent to the number of the supply tokens to the supply node according to the exchange rate between the supply token and the public chain token.
[00139] Similarly, it may be learned from the foregoing steps that in this embodiment, before token exchange occurs, a blockchain network accessing to the public chain may serve as the supply chain, and the supply node in the supply chain initiates the supply transaction to the public chain, the supply transaction including the supply token type and the number of the supply tokens. After receiving the supply transaction, the public chain queries, in the exchange rate table, the exchange rate between the supply token and the public chain token according to the supply token type. Finally, the public chain calculates an exchangeable number of public chain tokens according to the found exchange rate and the number of the supply tokens, and transfers the corresponding number of public chain tokens to the supply node, and thenthe supply transaction is completed.
[00140] In this embodiment, various types of tokens are supplied to the public chain through a plurality of blockchain networks accessing to the public chain. The public chain stores these tokens, thus not only ensuring that there are various types of tokens for participating in the exchange, but also ensuring that there are enough tokens for participating in the exchange, so as to keep the various tokens for participating in the exchange stable in value. In addition, because the supplies of tokens are stored in the public chain network, in subsequent token exchange processes, the exchange initiating chain may not be incontact with the supply chain, and exchange without an counterparty is formed, and thereby the exchange efficiency is improved significantly.
[00141] Further, as shown in FIG. 9, the method further includes the following steps.
[00142] S204: In a supply chain accessing to a public chain network, a supply node initiates a selling transaction to the public chain, the selling transaction including a number of public chain tokens transferred to the public chain and a repurchase token type.
[00143] S205: The public chain queries, in the exchange rate table, an exchange rate between the public chain token and a repurchase token according to the repurchase token type.
[00144] S206: The public chain transfers repurchase tokens equivalent to the number of the public chain tokens to the supply node according to the exchange rate between the public chain token and the repurchase token.
[00145] Similarly, in this embodiment, the supply chain may acquire another type of tokens by using the supply tokens when performing the supply transaction. The public chain only needs to use the public chain tokens as a medium, and then exchanges for the corresponding exchange tokens by using the public chain tokens. Therefore, in this embodiment, the exchange rate between the public chain token and the exchange token is determined by using the exchange rate table, and the public chain tokens are exchanged into another type of equivalent tokens. Compared with the foregoing embodiment, when supplying tokens, the supply chain also is not required to be in contact with theexchange counterparty, and an operation of querying for the supply quantities of the supply tokens and the exchange tokens may be avoided by using the exchange rate table, thereby further improving the token supplying efficiency.
[00146] According to the foregoing content provided in the present application, in some embodiments of the present application, as shown in FIG. 10, both the step that the public chain queries, in a public chain network, supply quantities of initial tokens and exchange tokens according to the exchange token type, and the step that the public chain queries, in an exchange rate table, a current exchange rate between an initial token and an exchange token according to the exchange token type, and sends the current exchange rate to the transaction node, include the following steps.
[00147] S301: The public chain extracts a current exchange rate between the initial token and a public chain token if the exchange token type is not found through query in the public chain network.
[00148] S302: The public chain generates a query result according to the exchange rate between the initial token and the public chain token, and sends the query result to the transaction node.
[00149] S303: The transaction node determines, according to the query result, whether to initiate an exchange transaction to the public chain.
[00150] S304: After the transaction node initiates the exchange transaction, the public chain transfers a preset number of public chain tokens equivalent to the transaction node according to the exchange rate between the initial token and the public chain token.
[00151] It may be learned from the foregoing technical solutions that when the exchange token type is not found through query in the public chain network, the query result may be generated according to the exchange rate between the initial token and the public chain token, and may be returned to the exchange initiating chain. While returning the query result, corresponding prompt information may further be carried, such as "a token for exchang is not found through query on current network, please redesignate an exchange token type" or " a token for exchang is not found through query on the current network, whether to exchange for a public chain token". If the transaction node determines to exchange for the public chain tokens, the equivalent public chain tokens are transferred to the transaction node according to the exchange rate between the initial token and the public chain token, and then the exchange transaction is completed.
[00152] Further, as shown in FIG. 11, the step that the public chain queries, in a public chain network, supply quantities of initial tokens and exchange tokens according to the exchange token type, and the step that the public chain queries, in an exchange rate table, a current exchange rate between an initial token and an exchange token according to the exchange token type, and sends the current exchange rate to the transaction node, may further include the following steps.
[00153] S305: If the exchange token type is not found through query in the public chain network, the public chain queries, in the public chain network, a target exchange chain capable of supplying the exchange token type.
[00154] S306: The public chain sends a query result to the transaction node, the query result including address information and an exchange condition of the target exchange chain.
[00155] S307: The public chain initiates an exchange transaction designating the target exchange chain to the public chain according to the received query result.
[00156] To be specific, in this embodiment, if the exchange token type is not found through query in the public chain network, it may further perform, in the public chain network, a query for the target exchange chain capable of supplying the exchange token type, and the address information and the exchange condition of the found target exchange chain are sent to the transaction node, so that a real-time transaction is initiated between a transaction initiating chain and a target transaction chain, and thus a corresponding token exchange transaction is completed.
[00157] It should be noted that after the target exchange chain capable of supplying the exchange token type is found through query, the public chain may enablethe exchange transaction to be performed directly between the exchange initiating chain and the target exchange chain by establishing a connection relationship between the exchange initiating chain and the target exchange chain; or the public chain may also transfer corresponding transaction information by means that the public chain transfers the corresponding exchange transaction, that is, the transaction node initiates the exchange transaction designating the target exchange chain to the public chain according to the receivedquery result. on the one hand, the public chain transfers the initial tokens transferred by the exchange initiating chain to the target transaction chain. On the other hand, the public chain transfers the equivalent exchange tokens that are transferred by the target exchange chain to the transaction initiating chain, and thusa final cross-chain exchange transaction is completed.
[00158] According to a fourth aspect, the present application further provides a public chain-based blockchain system, including an exchange initiating chain and a public chain, where both the exchange initiating chain and the public chain are in peer-to-peer network structures, some nodes of the exchange initiating chain access to a public chain network, and an exchange rate table is stored in the public chain network.
[00159] A transaction initiating chain is configured to: initiate a query transaction to the public chain, the query transaction including an initial token type and an exchange token type; and initiate an exchange transaction to the public chain according to a current exchange rate, including transferring a preset number of initial tokens to the public chain.
[00160] The public chain is configured to: query, in the exchange rate table, for a current exchange rate between an initial token and an exchange token according to the exchange token type, and send the current exchange rate to a transaction node; and transfer exchange tokens equivalent to the preset number of initial tokens to the transaction node according to the exchange transaction and the currentexchange rate.
[00161] It may be learned from the foregoing technical solutions that the present application provides a public chain-based token exchange method and blockchain system. In actual applications of the method, the exchange initiating chain first initiates the query transaction to the public chain, so that the public chain may calculate the real-time exchange rate according to the initial token type and supply quantities of tokens for the exchange in the query transaction, or acquire the real- time exchange rate from the exchange rate table; and subsequently, the real-time exchange rate is sent to the exchange initiating chain. The exchange initiating chain initiates the exchange transaction to the public chain according to the real-time exchange rate, that is, transfers a preset number of initial tokens to the public chain, so that the public chain transfers exchange tokens equivalent to the number of the initial tokens to the exchange initiating chain according to the exchange transaction and the realtime exchange rate, thus the exchange transaction is completed. Accroding to the method, the exchange rate is determined according to supply quantities of the initial tokens and exchange tokens. In this way, exchange rights of both parties that participate in exchange are ensured, and the exchange efficiency is improved, thereby avoiding a problem of low exchange efficiency caused by a centralized exchange platform.
[00162] For similar parts between the embodiments provided in the present application, reference may be made to each other. The specific implementations described above are merely some examples under ageneral concept of the present application, and do not constitute any limitation to the protection scope of the present application.
For a person skilled in the art, any other implementations derived, without an creative effort, according to the solutions of the present application all fall within the protection scope of the present application.

Claims (10)

ConclusiesConclusions 1. Op een publieke keten gebaseerde tokenuitwisselingswerkwijze, die de volgende stappen omvat: het opstarten, door een transactieknooppunt in een uitwisselingopstartende keten, van een opvragingstransactie naar een publieke keten, waarbij de opvragingstransactie een initieel tokentype en een uitwisselingstokentype omvat; het opvragen, door de publieke keten, van toevoerhoeveelheden van initiële tokens en uitwisselingstokens in een publieke-keten-netwerk in overeenstemming met het uitwisselingstokentype; het berekenen, door de publieke keten, van een realtime- wisselkoers in overeenstemming met de toevoerhoeveelheden van de tokens, en het versturen van de realtime-wisselkoers naar het transactieknooppunt; het opstarten, door het transactieknooppunt, van een uitwisselingstransactie naar de publieke keten in overeenstemming met de realtime-wisselkoers, wat het overdragen omvat van een vooraf bepaald aanta! initiële tokens naar de publieke keten; en het overdragen, door de publieke keten, van uitwisselingstokens equivalent aan het vooraf bepaalde aantal initiële tokens naar het transactieknooppunt in overeenstemming met de uitwisselingstransactie en de realtime-wisselkoers.A public chain token exchange method comprising the steps of: initiating, by a transaction node in an exchange initiation chain, a query transaction to a public chain, the query transaction comprising an initial token type and an exchange token type; requesting, by the public chain, supply amounts of initial tokens and exchange tokens in a public chain network according to the exchange token type; calculating, by the public chain, a real-time exchange rate in accordance with the supply amounts of the tokens, and sending the real-time exchange rate to the transaction node; initiating, by the transaction node, an exchange transaction to the public chain in accordance with the real-time exchange rate, which includes transferring a predetermined number! initial tokens to the public chain; and transferring, through the public chain, exchange tokens equivalent to the predetermined number of initial tokens to the transaction node in accordance with the exchange transaction and the real-time exchange rate. 2. De tokenuitwisselingswerkwijze volgens conclusie 1, waarbij de stap van het overdragen, door de publieke keten, van uitwisselingstokens equivalent aan het vooraf bepaalde aantal initiële tokens naar het transactieknooppunt in overeenstemming met de uitwisselingstransactie en de realtime-wisselkoers, de volgende stappen omvat: het ontvangen, door de publieke keten, van de initiële tokens die zijn overgedragen door het transactieknooppunt, en het berekenen van een wisselkoers tussen het initiële token en een publieke-keten-token inovereenstemming met een huidige toevoerhoeveelheid van de initiële tokens in het publieke-keten-netwerk; het in omloop brengen, door de publieke keten, van publieke- keten-tokens equivalent aan het vooraf bepaalde aantal initiële tokens, en het afleiden van een huidige wisselkoers tussen het publieke-keten-token en het uitwisselingstoken; het verkrijgen, door de publieke keten, van de uitwisselingstokens equivalent aan een aantal van de in omloop gebrachte publieke-keten-tokens, uit toevoeren van uitwisselingstokens; en het overdragen, door de publieke keten, van de verkregen uitwisselingstokens naar de uitwisselingopstartende keten.The token exchange method of claim 1, wherein the step of transferring, through the public chain, exchange tokens equivalent to the predetermined number of initial tokens to the transaction node in accordance with the exchange transaction and the real-time exchange rate, comprises the following steps: receive, by the public chain, the initial tokens transferred from the transaction node, and calculate an exchange rate between the initial token and a public chain token according to a current supply amount of the initial tokens in the public chain network; putting into circulation, by the public chain, public chain tokens equivalent to the predetermined number of initial tokens, and deriving a current exchange rate between the public chain token and the exchange token; obtaining, by the public chain, the exchange tokens equivalent to a number of the circulated public chain tokens, from supplying exchange tokens; and transferring, through the public chain, the obtained exchange tokens to the exchange initiating chain. 3. De tokenuitwisselingswerkwijze volgens conclusie 1, waarbij de werkwijze, voorafgaand aan de stap van het opstarten, door een transactieknooppunt in een uitwisselingopstartende keten, van een opvragingstransactie naar een publieke keten, voorts de volgende stappen omvat: in een toevoerketen die toegang heeft tot het publieke-keten- netwerk, het opstarten, door een toevoerknooppunt, van een toevoertransactie naar de publieke keten, waarbij de toevoertransactie een toevoertokentype en een aanta! toevoertokens die worden overgedragen naar de publieke keten omvat; het berekenen, door de publieke keten, van een wisselkoers tussen het toevoertoken en een publieke-keten-token in overeenstemming met een toevoerhoeveelheid van toevoertokens in het publieke-keten-netwerk; en het overdragen, door de publieke keten, van publieke-keten- tokens equivalent aan het aantal van de toevoertokens naar het toevoerknooppunt in overeenstemming met de wisselkoers tussen het toevoertoken en het publieke-keten-token.The token exchange method of claim 1, wherein the method, prior to the step of starting up, by a transaction node in an exchange initiating chain, of a query transaction to a public chain, further comprises the steps of: in a supply chain accessing the public chain network, the start-up, by a feeder node, of a feeder transaction to the public chain, the feeder transaction having a feeder token type and a number of items. includes supply tokens carried over to the public chain; calculating, by the public chain, an exchange rate between the supply token and a public chain token in accordance with a supply amount of supply tokens in the public chain network; and transferring, through the public chain, public chain tokens equivalent to the number of the feeder tokens to the feeder node according to the exchange rate between the feeder token and the public chain token. 4. De tokenuitwisselingswerkwijze volgens conclusie 1, waarbij de stap van het opvragen, door de publieke keten, van toevoerhoeveelheden van initiële tokens en uitwisselingstokens in een publieke-The token exchange method of claim 1, wherein the step of requesting, by the public chain, supply amounts of initial tokens and exchange tokens into a public keten-netwerk in overeenstemming met het uitwisselingstokentype voorts omvat: het opvragen, door de publieke keten, van een doeluitwisselingsketen die in staat is om het uitwisselingstokentype toe te voeren in het publieke-keten-netwerk indien het uitwisselingstokentype niet wordt gevonden door middel van een opvraging in het publieke-keten-netwerk; het verzenden, door de publieke keten, van een opvragingsresultaat naar het transactieknooppunt, waarbij het opvragingsresultaat adresinformatie en een uitwisselingsvoorwaarde van de doeluitwisselingsketen omvat; en het opstarten, door het transactieknooppunt, van een uitwisselingstransactie die de doeluitwisselingsketen aanduidt aan de publieke keten in overeenstemming met het ontvangen opvragingsresultaat.chain network according to the exchange token type further comprises: requesting, by the public chain, a target exchange chain capable of feeding the exchange token type in the public chain network if the exchange token type is not found by means of a query in the public chain network; sending, through the public chain, a query result to the transaction node, the query result including address information and an interface condition of the target exchange chain; and initiating, by the transaction node, an exchange transaction identifying the target exchange chain to the public chain in accordance with the received query result. 5. Op een publieke keten gebaseerde tokenuitwisselingswerkwijze, die omvat: het opstarten, door een transactieknooppunt in een uitwisselingopstartende keten, van een opvragingstransactie naar een publieke keten, waarbij de opvragingstransactie een initieel tokentype en een uitwisselingstokentype omvat; het opvragen, in een wisselkoerstabel door de publieke keten, van een huidige wisselkoers tussen een initieel token en een uitwisselingstoken in overeenstemming met het uitwisselingstokentype, en het verzenden van de huidige wisselkoers naar het transactieknooppunt; het opstarten, door het transactieknooppunt, van een uitwisselingstransactie naar de publieke keten in overeenstemming met de huidige wisselkoers, wat het overdragen omvat van een vooraf bepaald aantal initiële tokens naar de publieke keten; en het overdragen, door de publieke keten, van uitwisselingstokens equivalent aan het vooraf bepaalde aantal initiële tokens naar het transactieknooppunt in overeenstemming met de uitwisselingstransactie en de huidige wisselkoers.A public chain token exchange method, comprising: initiating, by a transaction node in an exchange initiation chain, a query transaction to a public chain, the query transaction comprising an initial token type and an exchange token type; requesting, in an exchange table by the public chain, a current exchange rate between an initial token and an exchange token in accordance with the exchange token type, and sending the current exchange rate to the transaction node; initiating, by the transaction node, an exchange transaction to the public chain in accordance with the current exchange rate, which includes transferring a predetermined number of initial tokens to the public chain; and transferring, through the public chain, exchange tokens equivalent to the predetermined number of initial tokens to the transaction node in accordance with the exchange transaction and the current exchange rate. 6. De tokenuitwisselingswerkwijze volgens conclusie 5, waarbij de werkwijze, voorafgaand aan de stap van het opstarten, door een transactieknooppunt in een uitwisselingopstartende keten, van een opvragingstransactie naar een publieke keten, voorts omvat: in een toevoerketen die toegang heeft tot een publieke-keten- netwerk, het opstarten, door een toevoerknooppunt, van een toevoertransactie naar de publieke keten, waarbij de toevoertransactie een toevoertokentype en een aantal toevoertokens die worden overgedragen naar de publieke keten omvat; het opvragen, in de wisselkoerstabel door de publieke keten, van een wisselkoers tussen het toevoertoken en een publieke-keten-token in overeenstemming met het toevoertokentype; en het overdragen, door de publieke keten, van publieke-keten- tokens equivalent aan het aantal van de toevoertokens naar het toevoerknooppunt in overeenstemming met de wisselkoers tussen het toevoertoken en het publieke-keten-token.The token exchange method of claim 5, wherein the method, prior to the step of starting up, by a transaction node in an exchange initiation chain, from a query transaction to a public chain, further comprises: in a supply chain accessing a public chain network, the start up, by a feeder node, of a feeder transaction to the public chain, the feeder transaction comprising a feeder token type and a number of feeder tokens transferred to the public chain; requesting, in the exchange table by the public chain, an exchange rate between the supply token and a public chain token according to the supply token type; and transferring, through the public chain, public chain tokens equivalent to the number of the feeder tokens to the feeder node according to the exchange rate between the feeder token and the public chain token. 7. De tokenuitwisselingswerkwijze volgens conclusie 5, waarbij de werkwijze voorts omvat: in een toevoerketen die toegang heeft tot een publieke-keten- netwerk, het opstarten, door een toevoerknooppunt, van een verkooptransactie naar de publieke keten, waarbij de verkooptransactie een aantal publieke- keten-tokens omvat die zijn overgedragen naar de publieke keten, en een wederaankooptokentype; het opvragen, in de wisselkoerstabel door de publieke keten, van een wisselkoers tussen het publieke-keten-token en een wederaankooptoken in overeenstemming met het wederaankooptokentype; en het overdragen, door de publieke keten, van wederaankooptokens equivalent aan het aantal van het publieke-keten-tokens naar het toevoerknooppunt in overeenstemming met de wisselkoers tussen het publieke- keten-token en het wederaankooptoken.The token exchange method of claim 5, wherein the method further comprises: in a supply chain accessing a public chain network, initiating, by a supply node, a sales transaction to the public chain, wherein the sales transaction includes a number of public includes chain tokens transferred to the public chain, and a repurchase token type; requesting, in the exchange table by the public chain, an exchange rate between the public chain token and a repurchase token according to the repurchase token type; and transmitting, by the public chain, redemption tokens equivalent to the number of the public chain tokens to the supply node in accordance with the exchange rate between the public chain token and the redemption token. 8. De tokenuitwisselingswerkwijze volgens conclusie 5,The token exchange method of claim 5, waarbij de wisselkoerstabel een dynamische parameterlijst is die is opgeslagen in een publieke-keten-netwerk, en de werkwijze voorts omvat: het configureren, door de publieke keten, van een slim contract voor een toevoerketen die toegang heeft tot een publieke-keten-netwerk; het toevoeren, door de toevoerketen, van een vooraf bepaald aantal toevoertokens en een vooraf bepaald aantal publieke-keten-tokens in overeenstemming met het slimme contract; het berekenen, door de publieke keten, van een initiële wisselkoers in overeenstemming met het vooraf bepaalde aantal toevoertokens en het vooraf bepaalde aantal publieke-keten-tokens, en het toevoegen van de initiële wisselkoers aan de wisselkoerstabel; en het bijwerken, door de publieke keten, van de wisselkoers in realtime in overeenstemming met uitwisselingsinhoud telkens wanneer het slimme contract wordt ingeroepen.wherein the exchange table is a dynamic parameter list stored in a public chain network, and the method further comprises: configuring, by the public chain, a smart contract for a supply chain accessing a public chain network; supplying, through the supply chain, a predetermined number of supply tokens and a predetermined number of public chain tokens in accordance with the smart contract; calculating, by the public chain, an initial exchange rate in accordance with the predetermined number of supply tokens and the predetermined number of public chain tokens, and adding the initial exchange rate to the exchange table; and updating, by the public chain, the exchange rate in real time in accordance with exchange content each time the smart contract is invoked. 9. Op een publieke keten gebaseerd blockchainsysteem, dat een uitwisselingopstartende keten en een publieke keten omvat, waarbij zowel! de uitwisselingopstartende keten als de publieke keten zich in peer-t0-peer- netwerkstructuren bevinden, en sommige van knooppunten van de uitwisselingopstartende keten toegang hebben tot een publieke-keten-netwerk; waarbij de uitwisselingopstartende keten geconfigureerd is voor: het opstarten van een opvragingstransactie naar de publieke keten, waarbij de opvragingstransactie een initieel tokentype en een uitwisselingstokentype omvat; en het opstarten van een uitwisselingstransactie naar de publieke keten in overeenstemming met een realtime-wisselkoers, wat het overdragen omvat van een vooraf bepaald aantal initiële tokens naar de publieke keten; en waarbij de publieke keten geconfigureerd is voor: het opvragen, in het publieke-keten-netwerk, van toevoerhoeveelheden van initiële tokens en uitwisselingstokens in overeenstemming met het uitwisselingstokentype; het berekenen van de realtime-wisselkoers in overeenstemming met de toevoerhoeveelheden van de initiële tokens en de uitwisselingstokens, en het verzenden van de realtime-wisselkoers naar de uitwisselingopstartende keten;9. Public chain based blockchain system comprising an exchange initiating chain and a public chain, where both! the exchange initiating chain if the public chain is in peer-to-peer network structures, and some of nodes of the exchange initiating chain have access to a public chain network; wherein the exchange initiator chain is configured to: initiate a query transaction to the public chain, the query transaction comprising an initial token type and an exchange token type; and initiating an exchange transaction to the public chain in accordance with a real-time exchange rate, which includes transferring a predetermined number of initial tokens to the public chain; and wherein the public chain is configured to: request, in the public chain network, supply amounts of initial tokens and exchange tokens in accordance with the exchange token type; calculating the real-time exchange rate in accordance with the supply amounts of the initial tokens and the exchange tokens, and transmitting the real-time exchange rate to the exchange initiating chain; en het overdragen van uitwisselingstokens equivalent aan het vooraf bepaalde aantal initiële tokens naar de uitwisselingopstartende keten in overeenstemming met de uitwisselingstransactie en de realtime-wisselkoers.and transferring exchange tokens equivalent to the predetermined number of initial tokens to the exchange initiating chain in accordance with the exchange transaction and the real-time exchange rate. 10. Op een publieke keten gebaseerd blockchainsysteem, dat een uitwisselingopstartende keten en een publieke keten omvat, waarbij zowel de uitwisselingopstartende keten als de publieke keten zich in peer-t0-peer- netwerkstructuren bevinden, sommige van knooppunten van de uitwisselingopstartende keten toegang hebben tot een publieke-keten-netwerk, en een wisselkoerstabel opgeslagen is in het publieke-keten-netwerk; waarbij de uitwisselingopstartende keten geconfigureerd is voor: het opstarten van een opvragingstransactie naar de publieke keten, waarbij de opvragingstransactie een initieel tokentype en een uitwisselingstokentype omvat; en het opstarten van een uitwisselingstransactie naar de publieke keten in overeenstemming met een huidige wisselkoers, wat het overdragen omvat van een vooraf bepaald aantal initiële tokens naar de publieke keten; en waarbij de publieke keten geconfigureerd is voor: het opvragen, in de wisselkoerstabel, van een huidige wisselkoers tussen een initieel token en een uitwisselingstoken in overeenstemming met het uitwisselingstokentype, en het verzenden van de huidige wisselkoers naar een transactieknooppunt; en het overdragen van uitwisselingstokens equivalent aan het vooraf bepaalde aantal initiële tokens naar het transactieknooppunt in overeenstemming met de uitwisselingstransactie en de huidige wisselkoers.10. Public chain based blockchain system comprising an exchange initiating chain and a public chain, where both the exchange initiating chain and the public chain are in peer-to-peer network structures, some of nodes of the exchange initiating chain have access to a public chain network, and an exchange table is stored in the public chain network; wherein the exchange initiator chain is configured to: initiate a query transaction to the public chain, the query transaction comprising an initial token type and an exchange token type; and initiating an exchange transaction to the public chain in accordance with a current exchange rate, which includes transferring a predetermined number of initial tokens to the public chain; and wherein the public chain is configured to: request, in the exchange table, a current exchange rate between an initial token and an exchange token in accordance with the exchange token type, and send the current exchange rate to a transaction node; and transferring exchange tokens equivalent to the predetermined number of initial tokens to the transaction node in accordance with the exchange transaction and the current exchange rate.
NL2024395A 2018-12-07 2019-12-06 Public chain-based token exchange method and blockchain system NL2024395B1 (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811496949.XA CN111292183A (en) 2018-12-07 2018-12-07 Certificate exchange method based on public chain and block chain system

Publications (2)

Publication Number Publication Date
NL2024395A NL2024395A (en) 2020-06-30
NL2024395B1 true NL2024395B1 (en) 2020-08-13

Family

ID=69187865

Family Applications (1)

Application Number Title Priority Date Filing Date
NL2024395A NL2024395B1 (en) 2018-12-07 2019-12-06 Public chain-based token exchange method and blockchain system

Country Status (3)

Country Link
CN (1) CN111292183A (en)
NL (1) NL2024395B1 (en)
WO (1) WO2020114241A1 (en)

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180197155A1 (en) * 2016-12-12 2018-07-12 Topl, Llc Method and Apparatus for Processing Mobile Payment Using Blockchain Techniques
CN110402449A (en) * 2017-01-08 2019-11-01 币柏特寇基金会 Method for exchanging and assessing ideal money
CN107122993A (en) * 2017-04-24 2017-09-01 杭州趣链科技有限公司 A kind of General integral system based on block chain
CN108470278A (en) * 2018-03-13 2018-08-31 成都零光量子科技有限公司 A kind of block chain Token is across chain and on-line off-line method of commerce
CN108647958A (en) * 2018-03-23 2018-10-12 北京大学深圳研究生院 A kind of digital asset method of commerce and system based on block chain
CN108846667A (en) * 2018-04-23 2018-11-20 上海分布信息科技有限公司 A kind of logical card regulation method based on block chain and logical card regulator control system
CN108764925A (en) * 2018-05-31 2018-11-06 李沁福 A kind of synthesis business platform based on block chain technology

Also Published As

Publication number Publication date
NL2024395A (en) 2020-06-30
CN111292183A (en) 2020-06-16
WO2020114241A1 (en) 2020-06-11

Similar Documents

Publication Publication Date Title
CN110866823B (en) Public link-based transaction method and block chain system
CN108256859B (en) Financial product transaction consensus method, node and system based on block chain
NL2024367B1 (en) Public chain-based token exchange method and blockchain system
CN107180350B (en) Method, device and system for multi-party sharing transaction metadata based on block chain
WO2020088109A1 (en) Blockchain-based private transactions and usage method and apparatus therefor
KR20200002227A (en) Platform for trading energy using block chain and method thereof
EP4318362A1 (en) Blockchain-based data processing method, apparatus and device, and storage medium
CN109274667A (en) A kind of copyright issue based on block chain deposits card method and system
CN109255084A (en) Electronic bill querying method, device, storage medium and computer equipment
WO2022161181A1 (en) Data processing method and apparatus based on blockchain, and electronic device
JP7198371B2 (en) How to elect a leader node using a role-based consensus protocol in a blockchain network
CN113672637B (en) Block chain-based product supply chain green electricity consumption accounting method, device and platform
WO2020140672A1 (en) Blockchain-based asset data processing method, system and storage medium
CN109447802B (en) Fund management system based on block chain technology
WO2020134631A1 (en) Block chain-based data processing method and apparatus
CN112613861A (en) Electric power pre-sale transaction method, device and system based on alliance chain
CN111506932A (en) Block chain calculation uplink implementation method
CN109919616B (en) Agricultural product transaction control method, device and maintenance system based on block chain
CN113610546A (en) Food production process tracing method, food circulation process tracing method and device
NL2024395B1 (en) Public chain-based token exchange method and blockchain system
WO2020147715A1 (en) Information promotion system, and exchange method for blockchain tokens
CN116596534A (en) Block chain safety fairness-based one-to-many data transaction method
CN115809440A (en) Method and device for managing copyrighted works based on block chain
CN115391650A (en) Privacy tag query method and system applied to financial scene
KR20220006463A (en) Apparatus and method for sharing resources of telecommunication subscribers for content service and rewarding telecommunication subscribers

Legal Events

Date Code Title Description
MM Lapsed because of non-payment of the annual fee

Effective date: 20230101