The present application claims priority of chinese patent application entitled "blockchain standard application model and method for applying same" filed by chinese patent office on 28/8/2018 with application number 201810986825.3, the entire contents of which are incorporated herein by reference.
Disclosure of Invention
The application provides a block chain network system to solve the problem that the existing block chain network cannot communicate and interact with other block chain networks.
In one aspect, the present application provides a blockchain network system, including a male chain and a female chain accessing the male chain, where the female chain includes an accessible male chain and a third-party blockchain having a proprietary interface; the system further comprises: parallel chains consisting of partial nodes in the male chain and/or the female chain;
the parallel link nodes are configured to perform all data operations of the common link nodes, with all functions and information of the common link nodes; the parallel chain nodes are also configured to be capable of performing all data operations of the parent chain nodes, with all functions and information of the parent chain nodes;
the parallel chain node is provided with a public chain interface and a female chain special interface; and the parallel chains complete the butt joint operation between the male chain and the female chain in a bridging mode.
Optionally, the nodes on the parallel chain are composed of part of public chain nodes through election in the public chain;
or the nodes on the parallel chain are composed of partial female chain nodes recommended by the female chain and confirmed by the male chain;
alternatively, one part of the nodes on the parallel chain consists of the nodes of the male chain link elected, and the other part of the nodes of the female chain is recommended by the female chain and confirmed by the male chain.
Optionally, the parallel chain is a multi-stage network structure composed of a plurality of nodes.
Optionally, the parallel chain is a mixed chain network structure composed of a plurality of nodes, and the nodes in the parallel chain are connected with a plurality of female chains or a plurality of male chains in parallel.
Optionally, after the female link is connected to the male link, the interface node and/or a node adjacent to the interface node is preferentially selected as the parallel link node.
In another aspect, the present application further provides a blockchain network system, including a chain group composed of a plurality of third-party blockchain networks, and public chains distributed in the chain group, where the third-party blockchain networks have respective proprietary interfaces; further comprising: the parallel chain is composed of part of nodes in the public chain and/or third-party block chain network;
the parallel chain is arranged between the public chain and an accessed third-party block chain network, or between any two mutually connected third-party networks;
the nodes of the parallel chain are configured to be capable of performing all data operations of the common chain node, with all functions and information of the common chain node; the parallel chain nodes are further configured to be able to perform all data operations of the connected third party blockchain nodes, having all functions and information of the connected third party blockchain nodes;
the parallel link node is provided with a public link interface and a third party block link network proprietary interface; and the parallel chain completes the butt joint operation between the public chain and the third-party block chain or between two third-party block chain networks in a bridging mode.
Optionally, the blockchain system further includes an industry chain and a federation chain that meet a public link interface specification;
the industry chain and the alliance chain are connected to the public chain through nodes in the public chain; the industry chain and the alliance chain have independent distributed storage function and transaction and accounting function.
Optionally, the blockchain system further includes a sub-chain created based on a public link interface specification;
all or part of the nodes in the sub-chain are derived from the common chain, or the nodes of the sub-chain have the same interface specification as the common chain link points; the child chain has distributed storage functionality, transaction and accounting functionality independent of the public chain.
Optionally, the information stored by the common link point includes: the system comprises public chain transaction information, public chain contract information, public chain data storage index information, public chain receipt record information, public chain state record information and transaction result index information.
Optionally, the public link contract information is transaction information generated based on an intelligent contract provided by a public link;
the intelligent contracts provided by the public chain include third party blockchain network registration, registration and deregistration contracts, transaction service contracts, value conversion contracts and data storage contracts.
In view of the above technical solutions, the present application provides a block chain network system, including: male, female, and parallel chains. The public link is a point-to-point network structure formed by a plurality of nodes and can provide a uniform interface specification for the outside. The female link is a block link network accessing the male link. The parallel chain is a point-to-point network consisting of partial nodes in the male chain or the female chain, the nodes in the parallel chain are provided with access interfaces of the female chain, and the butt joint of the male chain and the female chain is completed in a bridging mode; and the parallel chain has the full function of the parent chain and can store all the information on the parent chain. According to the method and the device, part of nodes in the public chain or the female chain are transformed into the parallel chain, the female chain and the public chain or two female chains can be in butt joint, and data and information between different block chains can be transmitted through bridging of the parallel chain, so that cross-chain transaction is completed. The parallel chain can avoid large-scale reconstruction of the master chain, and the problem that the existing block chain network cannot communicate and interact with other block chain networks is solved.
Detailed Description
Reference will now be made in detail to embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following examples do not represent all embodiments consistent with the present application. But merely as exemplifications of systems and methods consistent with certain aspects of the application, as recited in the claims.
In the technical solution provided by the present application, a blockchain network refers to a point-to-point network with a decentralized application architecture, and the blockchain network can perform distributed storage, public consensus, digital encryption, transaction accounting, and verification inside the network. I.e., the blockchain network is a transaction platform that encompasses distributed technology, cryptography, P2P network architecture, and various consensus algorithms that may be applied.
In this application, the blockchain or blockchain data refers to accounting information generated according to transaction information when transactions occur in a blockchain network, that is, a plurality of transactions form a blockchain, and a plurality of blockchain data form a blockchain with a timestamp. The blockchain network comprises nodes which establish point-to-point network connection with each other, and each node is configured with a corresponding consensus mechanism, such as an intelligent contract, and has enough computing power to perform transaction verification and accounting procedures. The nodes also have interface specifications that conform to some uniform standard to enable access to more nodes or other types of blockchain networks through the interface specifications.
In the technical scheme provided by the application, the public chain, the mother chain and the parallel chain comprise a plurality of nodes, and each node can initiate transaction and receive a transaction result. In this case, the transaction occurring between different blockchain networks is called a cross-chain transaction, for example, the transaction is initiated by a node in a parent chain, and the object of the transaction is a node in a public chain, or the transaction is initiated by one parent chain and the object of the transaction is another parent chain.
In a first aspect, refer to fig. 1, which is a schematic structural diagram of a parallel chain based blockchain network system according to the present application. As can be seen from fig. 1, the present application provides a female link including a male link and an access male link, wherein the female link includes an accessible male link and a third party block link having a proprietary interface; the system further comprises: parallel chains consisting of partial nodes in the male chain and/or the female chain; the parallel link nodes are configured to perform all data operations of the common link nodes, with all functions and information of the common link nodes; the parallel chain nodes are also configured to be capable of performing all data operations of the parent chain nodes, with all functions and information of the parent chain nodes; the parallel chain node is provided with a public chain interface and a female chain special interface; and the parallel chains complete the butt joint operation between the male chain and the female chain in a bridging mode.
The public link is a point-to-point network structure formed by a plurality of nodes, and each node has a distributed storage function and transaction and accounting functions; the nodes on the public link provide a uniform interface specification to the outside. The master chain has an independent distributed storage function and a transaction and accounting function, and comprises a third-party public chain, a third-party industry chain, a third-party alliance chain and a private chain, wherein the third-party public chain, the third-party industry chain, the third-party alliance chain and the private chain can be accessed to the public chain; the parallel chain is composed of part of nodes in the public chain and/or the female chain; the parallel chains complete the butt joint of the male chain and the female chain in a bridging mode; the parallel chain has the complete function of the mother chain and stores all information on the mother chain; and nodes in the parallel chain are provided with access interfaces of the mother chain.
In this application, reference to male, parallel, and female chains refers to different blockchain networks that conform to blockchain technology. In the present application, unless otherwise stated, the male link, the female link, and the parallel link all refer to the corresponding networks, i.e., the male link network, the female link network, and the parallel link network. Each blockchain network can be used as an independent development platform and provides corresponding transaction verification and accounting services for the interior of the network. The male link is defined and specified with standard interfaces and modes so as to facilitate effective docking of other block links, such as the female link. The public chain in the application has the capability of supporting cross-chain intermediary and also has the capability of providing decentralized application and intelligent contractual.
The public link can be used for storing the information summary of the corresponding cross-link transaction, namely the transaction summary, besides recording the block chain information of the public link. And recording related content of cross-chain transaction in a form of formatted transaction data. Meanwhile, in order to reduce the requirement of distributed storage capacity on the public link, when the public link records certain information, the public link can also carry out secondary processing on the third-party block link information through a specific compression algorithm. Illustratively, the chunk data formed and stored in the public chain may include the following: block id (e.g., sequence number, timestamp, block hash value, and previous block hash value), block attribution (i.e., block generator), block other information (e.g., random value, difficulty value, and additional information), block weight, message digest (e.g., transaction tree, status tree, receipt tree, and data tree), transaction cost, reward, size, etc.
Further, in the block chain network system provided by the present application, the information stored by the common link node includes: the system comprises public chain transaction information, public chain contract information, public chain data storage index information, public chain receipt record information, public chain state record information and transaction result index information. Wherein the public link contract information is transaction information generated based on an intelligent contract provided by a public link; the intelligent contracts provided by the public chain include third party blockchain network registration, registration and deregistration contracts, transaction service contracts, value conversion contracts and data storage contracts.
In the present application, a parent link refers to a blockchain network accessed to a public link network, the public link provides a basic platform, the parent link serves as an accessed network, and the number of the parent links accessed to the public link can be multiple and have respective functions and services. The blockchain network accessed to the public chain can also be a blockchain network built based on public chain network standards and interface specifications, namely, the blockchain network can be directly communicated with the public chain network and can be in service connection with the public chain network. The blockchain network accessing the public chain may also be a third-party blockchain network independent of each other, such as existing blockchain network bitcoin, etherhouses, and the like, or an industry chain and a federation chain developed in some industries, even a private chain built for achieving a certain service requirement. These existing blockchains, industry chains, federation chains, and private chains generally cannot directly trade with each other or even with a public-link network, and therefore, in the present application, a public chain can be connected with other networks that cannot directly trade through parallel chains.
The parallel chain can be composed of part of nodes in a public chain network or a female chain network, and the public chain and other networks which cannot directly trade can be bridged through the parallel chain. In the application, for a network which cannot be directly transacted, each blockchain network accessing a public chain network corresponds to one parallel chain, and the parallel chain has the complete function of the corresponding blockchain network and can bridge transactions in the corresponding blockchain network into the public chain network. Therefore, in the technical solution provided in the present application, the parallel chain may be determined as a mirror image of the corresponding blockchain network, and for convenience of description, the corresponding blockchain network is referred to as a parent chain. In the application, the parallel chain is composed of partial nodes in a public chain network, and the nodes are also nodes in a mother chain, so that the transaction between networks which cannot be directly transacted is realized.
In some embodiments provided in the present application, the nodes on the parallel chain are composed of some public chain nodes through public chain internal election; or the nodes on the parallel chain are composed of partial female chain nodes recommended by the female chain and confirmed by the male chain; alternatively, one part of the nodes on the parallel chain consists of the nodes of the male chain link elected, and the other part of the nodes of the female chain is recommended by the female chain and confirmed by the male chain. Furthermore, after the female link is connected to the male link, the interface node and/or a node adjacent to the interface node are/is preferentially selected as a parallel link node.
In practical applications, after the blockchain network accesses the public-chain network, the public chain may first perform an election process that determines which nodes in the public chain are used as parallel-chain nodes. When parallel link nodes are elected, the adjacent nodes of the public link nodes which are connected with the node chain network node can be preferentially selected, so that data are prevented from being transmitted on a plurality of nodes in sequence, and the data transmission efficiency is improved. In this embodiment, the nodes on the public chain are used as the parallel chain nodes, so that the parallel chain nodes can be directly configured with the interface specification and the intelligent contract of the public chain without large-scale transformation.
If the parallel chain node is the node recommended by the female chain, the recommended node can be verified through the male chain, and the main verification contents comprise whether the configuration intelligent contract is supported, whether the data synchronization conversion capability is available, whether the hardware configuration is enough and the like. After the public link is verified, the recommended nodes are modified according to the interface specification of the public link, so that the nodes adapt to the data transmission form of the public link, have the data relay function provided by the public link and the like. Through the parallel chain link point selection mode of female chain recommendation and male chain verification, the butt joint between the male chain and the female chain can be realized by transforming partial nodes in the female chain, so that cross-chain transaction is carried out.
In addition, in some application scenarios in special cases, for example, when the number of nodes in the public chain and the number of redundant nodes in the female chain are both small, the parallel chain nodes may be set such that one part is derived from the nodes of the public chain and the other part is derived from the nodes of the female chain, thereby avoiding excessive occupation of computing resources of the public chain and the female chain.
In order to adapt the network form of the previous block chain, in some embodiments of the present application, the parallel chain is a mixed chain network structure composed of a plurality of nodes, and the nodes in the parallel chain are connected with a plurality of female chains or a plurality of male chains in parallel. In practical applications, the parallel chain is used as a block chain for bridging, and the number of nodes owned by the parallel chain is not large in order to simplify the network deployment process, so that in the application, the nodes in the parallel chain support parallel connection of a plurality of female chains and male chains.
Therefore, the public chain in the application can provide cross-chain relay, and work such as transaction verification, data certification, asset transfer, intelligent contract execution and the like can be completed. The public link unifies external interface specifications, so that other block link networks can be rapidly accessed into the public link network. The public link also provides basic blockchain platform capability, namely, rapidly completing scheme deployment and verification and completing distributed storage and billing programs in the public link network. In addition, as a basic platform, the public chain can also provide a public development function, so that the cooperative development and deployment of a plurality of parallel chain intelligent contracts can be completed at one time.
In practical application, to complete a cross-chain transaction, the block chain system firstly performs a cross-chain transaction between a female chain and a male chain, that is, the female chain serving as a transaction initiator initiates the transaction first, and if a final transaction target party is the male chain, a transaction result is directly returned through the male chain, that is, as shown in fig. 2, the block chain system completes the cross-chain transaction according to the following steps.
S11: in a parent chain as a transaction initiator, a transaction node creates a cross-chain transaction;
s12: the transaction node sends the cross-chain transaction to the parallel chain;
s13: the parallel chain synchronously converts the cross-chain transaction and sends the cross-chain transaction to a public chain;
s14: the public chain returns a transaction result to the parallel chain according to the received cross-chain transaction;
s15: and the parallel chain converts the transaction result and sends the transaction result to the transaction node to complete the transaction.
Therefore, for the cross-link transaction between the female link and the male link, the cross-link transaction is simple because only information exchange and data circulation between two blockchain networks are involved. In the above steps, the synchronous transformation of the parallel chain to the cross-chain transaction mainly includes the transformation of an information structure or a data structure, for example, block data conforming to a public chain storage specification is generated according to the block data in the parent chain.
For transactions conducted in the blockchain network system provided by the present application, it is necessary to perform authentication and storage in two blockchain networks bridged in parallel chain simultaneously to form two complete blockchains containing transactions, i.e. to perform an accounting procedure. Wherein, for a transaction occurring within the public chain, as shown in fig. 3, the blockchain network system performs the following procedural steps:
s21: generating block data by a node serving as a transaction initiator according to actual transaction information;
s22: broadcasting the generated block data to a node serving as a transaction target party and to an adjacent billable node serving as a transaction initiator node, wherein the billable node is a node randomly selected from public link nodes;
s23: the accounting node receiving the block data executes an accounting program according to the block data and continuously broadcasts to other accounting nodes to form complete block chain data.
And for a cross-chain transaction occurring in the blockchain network system, as shown in fig. 4, the blockchain network system performs the following program steps:
s31: in the master chain, a node serving as a transaction initiator generates master chain transaction data according to actual transaction information;
s32: broadcasting the generated transaction data to a mother chain verification node, and generating block data by the node and broadcasting the block data to the nodes in the parallel chain;
s33: and the nodes in the parallel chain determine the nodes serving as transaction target parties according to the block data of the female chain, and initiate transactions in the public chain according to the transaction rules of the public chain to form complete block chain data.
In the above steps, in order to reduce the occupation of the storage space in the parallel chain or the public chain, the blockchain data stores summary information of blockchain data based on the parent chain.
Further, as shown in fig. 5, for the cross-chain transaction occurring in the blockchain network system, if the node as the transaction target party is a parallel chain node corresponding to the target parent chain, that is, a parallel chain is also provided between the male chain and the target parent chain, the blockchain network system executes the following program steps:
s41: storing block chain data in parallel chain nodes serving as transaction targets;
s42: and the parallel chain node serving as a transaction target party initiates a transaction in the target parent chain according to the blockchain data and the transaction rule of the target parent chain so as to form complete blockchain data which accords with the target parent chain.
In a second aspect, as shown in fig. 6, the blockchain network system provided by the present application may further include a chain group composed of a plurality of third-party blockchain networks, and a public chain distributed in the chain group, where each third-party blockchain network has a respective proprietary interface. The block chain network system also comprises a parallel chain formed by a public chain and/or a part of nodes in a third-party block chain network.
The parallel chain is arranged between the public chain and the accessed third party block chain network, or between any two mutually connected third party networks. In practical application, the parallel chain is not limited to be applied to data synchronous conversion and transmission between a public chain and a third-party blockchain network, but also can be applied to data synchronous conversion and transmission between any two mutually connected third-party blockchain networks.
In the same way as applied between the male and female chains, the nodes of the parallel chain are configured to be able to perform all data operations of the male chain link point, with all functions and information of the male chain node. The parallel chain nodes are further configured to be able to perform all data operations of the connected third party blockchain nodes, with all functions and information of the connected third party blockchain nodes. The parallel link node is provided with a public link interface and a third party block link network proprietary interface; and the parallel chain completes the butt joint operation between the public chain and the third-party block chain or between two third-party block chain networks in a bridging mode.
It should be noted that, for the above-mentioned scheme, if the blockchain networks of both parties that the parallel chain establishes the bridge connection are the public chain and the third party blockchain, the data synchronization conversion mode and the node determination mode are the same as the parallel chain operation mode between the public chain and the female chain. At this time, the parallel chain node is configured to be able to perform all data operations of the common chain node, having all functions and information of the common chain node, and at the same time, the parallel chain node is further configured to be able to perform all data operations of the connected third party blockchain node, having all functions and information of the connected third party blockchain node.
If the two-party blockchain network which is connected in parallel and establishes the bridge connection is two third-party blockchains, on one hand, the parallel chain node is configured to be capable of executing all data operations of one connected third-party blockchain node and has all functions and information of the connected third-party blockchain node; another aspect is configured to be able to perform all data operations of the connected other third party blockchain (first blockchain) node, with all functions and information of the connected other third party blockchain (second blockchain) node. The synchronous translation of data is also from one blockchain network to another.
For parallel chain nodes, if the block chain networks of the two parties establishing the bridge connection in parallel connection are two third party block chain networks, the nodes on the parallel chain are composed of part of first block chain nodes through election in the first block chain network; or, the nodes on the parallel chain are composed of partial second blockchain link points recommended by the second blockchain network and confirmed by the first blockchain network; alternatively, one part of the nodes on the parallel chain is composed of the first blockchain link point election, and the other part is composed of the second blockchain link point recommended by the second blockchain and confirmed by the first blockchain. Furthermore, after the two third-party block link nodes are mutually connected, the interface node and/or the node adjacent to the interface node are preferentially selected as the parallel link nodes.
Further, if the two-party blockchain network for establishing the bridge connection in parallel is two third-party blockchain networks, the parallel chain may also be a multi-level network structure composed of a plurality of nodes, and in the multi-level network structure of the parallel chain nodes, the node serving as the upper level controls the bridge connection operation serving as the lower level node. Similarly, the parallel chain may also be a mixed chain network structure composed of a plurality of nodes, and the nodes in the parallel chain are connected with a plurality of third-party blockchain networks in parallel.
In some embodiments of the present application, the blockchain system further includes an industry chain and a federation chain that satisfy a public link interface specification; the industry chain and the alliance chain are connected to the public chain through nodes in the public chain; the industry chain and the alliance chain have independent distributed storage function and transaction and accounting function. The blockchain system further comprises a child chain created based on a public link interface specification; all or part of the nodes in the sub-chain are derived from the common chain, or the nodes of the sub-chain have the same interface specification as the common chain link points; the child chain has distributed storage functionality, transaction and accounting functionality independent of the public chain.
In practical application, a public link network is used as a basic platform arranged in the whole network, and a plurality of block link networks, such as an industry chain, a alliance chain and a private chain which are built based on public link interface specifications, can be accessed to node interfaces of the public link network; the node interfaces of the public link network are also linked into third-party public links, industry links, alliance links and private links which can not directly trade with each other through parallel links. If data transmission and cross-chain transaction cannot be directly carried out among the networks, synchronous conversion of transaction data can be completed by arranging the parallel chains so as to carry out transaction finally.
In view of the above technical solutions, the present application provides a block chain network system, including: male, female, and parallel chains. The public link is a point-to-point network structure formed by a plurality of nodes and can provide a uniform interface specification for the outside. The female link is a block link network accessing the male link. The parallel chain is a point-to-point network consisting of partial nodes in the male chain or the female chain, the nodes in the parallel chain are provided with access interfaces of the female chain, and the butt joint of the male chain and the female chain is completed in a bridging mode; and the parallel chain has the full function of the parent chain and can store all the information on the parent chain. According to the method and the device, part of nodes in the public chain or the female chain are transformed into the parallel chain, the female chain and the public chain or two female chains can be in butt joint, and data and information between different block chains can be transmitted through bridging of the parallel chain, so that cross-chain transaction is completed. The parallel chain can avoid large-scale reconstruction of the master chain, and the problem that the existing block chain network cannot communicate and interact with other block chain networks is solved.
The embodiments provided in the present application are only a few examples of the general concept of the present application, and do not limit the scope of the present application. Any other embodiments extended according to the scheme of the present application without inventive efforts will be within the scope of protection of the present application for a person skilled in the art.