Disclosure of Invention
The application provides an address management system based on a public chain, which aims to solve the problems that a traditional block chain network occupies more network bandwidth and has low transaction efficiency.
In one aspect, the application provides an address management system based on a public chain, which comprises the public chain and a sub-chain connected with the public chain, wherein nodes in the public chain and the sub-chain mutually establish network connection, and the system is characterized in that part of nodes in the public chain are configured as address management nodes, and all node address data in the public chain and the sub-chain are stored and synchronized;
the address management node is further configured to receive an address inquiry transaction sent by a transaction initiation node or a neighboring node of the address management node when a transaction occurs; and sending address data corresponding to the transaction target node to the transaction initiating node according to the address inquiry transaction.
The address management node is further configured to receive address change information broadcast by the child link point and update stored address data according to the address change information.
Optionally, the address management node is generated by a node in the public chain through election in the public chain;
or, the configuration of the nodes is randomly generated by partial nodes in the public chain and periodically converted in the partial nodes in the public chain.
Optionally, a plurality of the address management nodes form a multi-level address management network;
in the address management network, at least one of the address management nodes is configured to store the address data; and at least one of the address management nodes is configured to: and sending address data corresponding to the transaction target node to the transaction initiating node according to the address inquiry transaction.
Optionally, the address data includes one of a network address of the node, a terminal MAC address, and a unified identification address; the address management node stores an address index table; the address index table comprises address data corresponding to each node and an address public key corresponding to the address data; the address public key consists of an encrypted HASH value; the address management node is further configured to:
traversing the address public key of each sub-link point;
and analyzing the address public key according to a preset encryption algorithm, acquiring address data corresponding to the address public key, and generating an address index table.
Optionally, before the transaction, the address management system initiates an address inquiry transaction to the address management node by a transaction initiating node, wherein the address inquiry transaction comprises a transaction abstract of pre-initiated cross-chain transaction;
the address management node is configured to store address data according to the address inquiry transaction traversal; and extracting the address data of the transaction target node corresponding to the transaction abstract, and sending the address data of the transaction target node to the transaction initiating point.
Optionally, the address management node is further configured to calculate a network idle degree according to the number of transactions occurring in the public network in a unit time; when the network idle degree is lower than a preset threshold value, broadcasting address confirmation information to all nodes in the public chain and the sub-chain;
the nodes in the public chain and the sub-chain are configured to send current address information to the address management node after receiving the address confirmation information.
Optionally, the address management node is further configured to match the stored address data according to the current address information; and deleting the address data which does not match the current address information.
On the other hand, the application also provides an address management system based on the public chain, which comprises the public chain and a third-party blockchain connected with the public chain, wherein nodes in the public chain and the third-party blockchain mutually establish network connection, partial nodes in the public chain are configured as address management nodes, and all node address data in the public chain and the third-party blockchain are stored and synchronized;
the address management node is further configured to receive an address inquiry transaction sent by a transaction initiation node or a neighboring node of the address management node when a transaction occurs; and sending address data corresponding to the transaction target node to the transaction initiating node according to the address inquiry transaction.
The address management node is further configured to receive address change information broadcast by the third-party block link point, and update the stored address data according to the address change information.
Optionally, the address management system further comprises a parallel chain composed of the public chain nodes and/or third-party block chain link points;
the parallel chain node is configured to be capable of executing all data operations of the common chain node and has all functions and information of the common chain node; and is further configured to be capable of performing all data operations of the third party blockchain node, having all functions and information of the third party blockchain node; at least one of the parallel chain nodes is configured as the address management node.
Optionally, when the address management system performs a transaction, a transaction initiating node initiates an address inquiry transaction to the address management node, where the address inquiry transaction includes a transaction abstract;
the address management node is configured to store address data according to the address inquiry transaction traversal;
searching a transaction target chain corresponding to the transaction abstract, extracting address data of parallel chain nodes corresponding to the transaction target chain, and sending the address data of the parallel chain nodes to the transaction initiating point.
According to the technical scheme, the address management system based on the public chain comprises the public chain and the sub-chain accessed to the public chain, wherein part of nodes in the public chain are configured as address management nodes, and all node address data in the public chain and the sub-chain are stored and synchronized; when a transaction occurs, the address management node may receive an address query transaction; and sending address data corresponding to the transaction target node to the transaction initiating node according to the address inquiry transaction. The address management node is further configured to receive address change information broadcast by the child link points and to update the stored address data in accordance with the address change information.
According to the address management system, part of nodes in a public chain can be configured as the address management nodes, and the transaction initiating node can quickly acquire the addresses of the transaction target nodes by combining with the characteristics of blockchain transaction, so that in the transaction initiating node, the address information of all nodes can be saved, the acquisition process of the addresses of the transaction target nodes only occurs between the transaction initiating node and the address management node, the addresses of the transaction target nodes are not acquired through broadcasting transaction, the occupation of network bandwidth can be remarkably reduced, and the transaction efficiency is improved.
Detailed Description
Reference will now be made in detail to the embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The embodiments described in the examples below do not represent all embodiments consistent with the present application. Merely as examples of systems and methods consistent with some aspects of the present application as detailed in the claims.
In the technical solution provided in the present application, the blockchain refers to accounting data generated by transactions in a network system on one hand, and refers to a network running blockchain technology, i.e. a blockchain network on the other hand. The blockchain network refers to a point-to-point (P2P) network with a decentralised application architecture, and the blockchain network can perform distributed storage, public consensus, digital encryption, transaction accounting and verification. I.e. transaction platforms covering distributed technology, cryptography, P2P network architecture and various consensus algorithms that may be applied.
The blockchain or blockchain information is billing information generated according to transaction information when transactions occur in a blockchain network, i.e. a plurality of specific transactions form a block, and a plurality of blocks form a blockchain. The blockchain network includes nodes that establish point-to-point network connections with each other, each configured with a corresponding consensus mechanism, such as a smart contract, and with sufficient computing power to perform transaction verification and accounting procedures. The nodes also have interface specifications thereon that conform to a unified standard to enable access to more nodes or other types of blockchain networks via the interface specifications.
Referring to fig. 1, a schematic structure diagram of a public-link-based address management system is shown. As can be seen from fig. 1, the address management system provided in the present application includes a public chain and a sub-chain accessing the public chain, where nodes in the public chain and the sub-chain establish network connection with each other. And the partial nodes in the public chain are configured as address management nodes, and all node address data in the public chain and the sub-chain are stored and synchronized. In practical application, the public chain and the sub-chain are P2P networks in a point-to-point mode, the P2P network is composed of a plurality of nodes, and each node has independent operation capability, application operation capability, storage capability and capability of providing man-machine interaction. The nodes in the P2P network are not only gateway devices that provide network information transfer, but may be any computer device authenticated by the blockchain network, such as personal computers, computer groups, servers, intelligent terminal devices, and the like.
In the address management system, the public chains are blockchain networks providing a basic platform, namely, by setting a unified transaction standard, under the transaction standard, the blockchain networks of all access public chains can transmit and uniformly verify transaction information through the public chains so as to realize cross-chain transaction. In practical applications, the blockchain network accessing the public chain may include a sub-chain and a third party blockchain, where the sub-chain is a blockchain network having the same transaction standard as the public chain, i.e. a private chain, an industry chain, a alliance chain, etc. established based on the form of the public chain network.
In the technical scheme provided by the application, the nodes serving as the public chains can perform various roles according to the positions of the nodes in the network and the hardware configuration condition of the nodes, namely, in the actual transaction process, not all the public chain nodes complete verification and accounting work of the same transaction, but perform different works according to different roles of the nodes so as to rapidly complete the transaction and avoid delay of high-concurrency transactions. Thus, in the present application, some nodes in the public chain may be further configured as address management nodes, i.e. during the actual transaction, the address management nodes may be used to store and synchronize all node address data in the public chain and the sub-chain.
As shown in fig. 2, upon occurrence of a transaction, the address management node is further configured to receive an address query transaction sent by a transaction initiating node or a neighboring node of the address management node; and sending address data corresponding to the transaction target node to the transaction initiating node according to the address inquiry transaction.
Specifically, before proceeding transaction, the address management system initiates an address inquiry transaction to the address management node by a transaction initiating node, wherein the address inquiry transaction comprises a transaction abstract of pre-initiated cross-chain transaction; the address management node is configured to store address data according to the address inquiry transaction traversal; and extracting the address data of the transaction target node corresponding to the transaction abstract, and sending the address data of the transaction target node to the transaction initiating point.
In practical application, the transaction initiating node may be a node in a sub-link network or a node in a public link network. Before the transaction initiating node initiates the formal transaction, an address inquiry transaction can be initiated to the address management node according to the content of the actual transaction information, wherein the address inquiry transaction needs to contain transaction content information in the pre-initiated formal transaction or information describing the formal transaction, for example, the transaction content of the formal transaction is compressed and packed in a transaction abstract mode and is sent to the address inquiry transaction.
The inquiry transaction form between the transaction initiating point and the address management node is different according to the different practical application environments. If the transaction initiating node can directly conduct transaction or information interaction with the address management node, query transaction can be directly initiated to the address management node through the transaction initiating node, and the mode is most suitable for the transaction in which the transaction initiating node and the address management node are located in the same blockchain network, namely the transaction initiating node is also a node in the range of a public chain network. If the transaction initiating node cannot directly conduct transaction or information interaction with the address management node, an address inquiry transaction can be broadcasted through the transaction initiating node, specifically, the inquiry transaction can be broadcasted to the adjacent node firstly, and then the adjacent node combines with the role of the adjacent node to determine whether to complete the transaction or continue broadcasting until the address management node receives the inquiry transaction.
After receiving the inquiry transaction, the address management node can extract a transaction abstract in the inquiry transaction, determine a designated transaction target function in the inquiry transaction, match a transaction target node corresponding to the function from a stored address information table, package corresponding address data into a transaction result and send the transaction result to the transaction initiating node so as to enable the transaction initiating node to obtain the address data. In the follow-up formal transaction, address data corresponding to the corresponding transaction target node can be directly specified so as to directly complete the transaction.
It should be noted that, in the technical solution provided in the present application, the address inquiry transaction is essentially the same transaction process as the formal transaction, that is, a transaction process without certification or with a specified certification quantity is completed through a built-in consensus mechanism and an intelligent contract of the public network.
Through the address query process, the address information of the transaction target node does not need to be stored in the transaction initiating node, only the address information of the address management node needs to be stored, even any address information does not need to be stored, and the address of the transaction target node is queried in a broadcast mode in a public network, so that the address management system provided by the application can reduce the requirement on the storage performance of the node. In the process of the cross-link transaction, the address information of the transaction target node can be obtained only by carrying out address inquiry before formal transaction, and the cross-link transaction also needs the front inquiry transaction, so that the address inquiry transaction and the front inquiry transaction can be combined into the same transaction to be broadcasted, no additional data transmission is needed, excessive network bandwidth is occupied during actual application is avoided, and the transaction efficiency is improved.
The address management node is further configured to receive address change information broadcast by the child link point and update stored address data according to the address change information. In practical applications, each time a node in a public or sub-link network goes on or off, it will cause a change in node address information. For example, a newly-online node needs to register with the public network to characterize the transaction types it supports, i.e., to generate an address change message. The newly-online node may broadcast address change information in a sub-link network or a public link network. Theoretically, all nodes in the public network can receive the broadcasted address change information, but only the node serving as the address management node can analyze, convert and store the address change information in the address management node in a unified manner.
The address management node updates the address data, so that the storage space of the address management node can be fully utilized, and the storage space of other nodes is not occupied. Meanwhile, the transfer of the address change information can only occur between the address management node and the node with changed address, and synchronization to all nodes is not needed, so that occupation of network bandwidth can be greatly reduced. In addition, in order to realize the storage and the rapid synchronization of the address information, the address management node can preferentially select the node with higher storage resource capacity as the address management node so as to provide the storage capacity of the address data; the sub-link and the public link connecting node or the nodes adjacent to the connecting node can be selected as the address management node, so that the address management node can quickly receive the address change information, and the information updating efficiency is improved.
Further, the address management node is generated by nodes in the public chain through election in the public chain; or, the configuration of the nodes is randomly generated by partial nodes in the public chain and periodically converted in the partial nodes in the public chain. In practical application, the address management node can elect the nodes with hardware conditions meeting the requirements through a voting mechanism in the public chain so as to finish address management service through safe and stable nodes.
In practical application, some nodes in the public chain node are used as alternative nodes, but not all nodes in the nodes serving as alternative nodes finish the address management service, and in the alternative nodes, a specified number of nodes are selected periodically and randomly to serve as address management nodes. The method of randomly changing the address management nodes can avoid the stored information from being tampered due to the attack of the network system, reduce the risk of illegal transaction, and finish the address management service through other nodes when individual nodes fail, thereby ensuring the smooth proceeding of the transaction process.
It should be noted that, in order to reduce the information redundancy degree, a data synchronization mechanism may be defined between all nodes that may be used as address management nodes, so that all the candidate nodes store address data of each node. When receiving the address inquiry transaction, the alternative node which is not used as the address management node can forward the address inquiry transaction just recently and send the address inquiry transaction to the nearest address management node so that the address management node can receive the address inquiry transaction as soon as possible.
In some embodiments of the present application, a plurality of the address management nodes form a multi-level address management network; in the address management network, at least one of the address management nodes is configured to store the address data; and at least one of the address management nodes is configured to: and sending address data corresponding to the transaction target node to the transaction initiating node according to the address inquiry transaction. That is, in this embodiment, the address management network formed by a plurality of address management nodes is also a blockchain network, in which address information can be stored in a distributed manner by the plurality of address management nodes, so as to enhance the storage capability of address data. In the actual transaction process, the address inquiry can be completed through part of nodes in the address management network, and other nodes are only stored as addresses, so that the distributed storage capacity of the network can be more efficiently utilized, and the inquiry transaction can be completed as soon as possible.
However, when a large number of transactions occur in a short time in the current network system, in order to avoid data congestion and delay caused by large-scale high concurrency operation, a plurality of nodes can be started to finish the operation of sending address data corresponding to a transaction target node to a transaction initiating node according to the actual transaction processing number or the current time period.
In some embodiments of the present application, as shown in fig. 3, the address data includes one of a network address, a terminal MAC address, and a uniform identification address of a node; the address management node stores an address index table; the address index table comprises address data corresponding to each node and an address public key corresponding to the address data; the address public key consists of an encrypted HASH value; the address management node is further configured to:
traversing the address public key of each sub-link point; and then analyzing the address public key according to a preset encryption algorithm, obtaining address data corresponding to the address public key, and generating an address index table.
In practical application, because the address information forms corresponding to different networks are different, and the setting modes of the different networks for the address information are also different, in the technical scheme provided by the application, in order to enable the address data stored in the address management node to be applicable to a plurality of different networks, one of the network address, the terminal MAC address and the unified identification address in the unified identification form can be adopted. In the actual inquiry transaction, address data in the same form as the address of the transaction initiating node may be preferentially inquired in the address index table, so as to be able to directly determine the transaction target node.
Before the address data is queried, an address index table can be created by facilitating the address public key of each sub-link point and according to the corresponding relation between the address public key and the address data, so that the address information of the transaction target node can be directly determined through the address index table during subsequent address data query.
In some embodiments of the present application, the address management node is further configured to calculate a network idle degree according to the number of transactions occurring in a unit time in the public network; when the network idle degree is lower than a preset threshold value, broadcasting address confirmation information to all nodes in the public chain and the sub-chain; the nodes in the public chain and the sub-chain are configured to send current address information to the address management node after receiving the address confirmation information.
In practical application, the address data stored in the address management node needs to be updated continuously according to practical situations, and the updating modes can include two modes, one mode is that a newly accessed public chain or sub-link point actively sends address change information to the address management node; the updating mode of the address information is more suitable for the condition that the address management forms of the public chain and each sub-chain are the same. In another way, the address management node actively issues acknowledgements to each node, and the update method is applicable to various public-link and sub-link network forms, but the update method occupies part of bandwidth resources when the number of transactions in the current system is large, so that the embodiment can implement synchronization again by calculating the network idle degree and under the condition of low number of transactions in the network.
Because the network of the present application is a blockchain network, all transactions need to be broadcast throughout the network to complete blockchain creation, thanks to the transaction billing form of the blockchain network. Therefore, the embodiment can indirectly obtain the transaction number through the creation condition of the blockchain, so that the embodiment can easily calculate the network idle degree. In practical application, different preset thresholds can be set according to different network characteristics so as to consider the update rate and the occupation condition of network bandwidth.
Further, the address management node is further configured to match the stored address data according to the current address information; and deleting the address data which does not match the current address information. After receiving the current address information sent by the node in the sub-chain or the public chain, the node can be matched with the information stored in the address index table through the current address information, and if the address information corresponding to the node is not changed, the corresponding data in the address index table is reserved; if the address information corresponding to the node is changed, the information in the address index table can be converted into the current address information. And, through the above address confirmation information process, if a node or corresponding address data which is not successfully matched appears in the confirmation information process, the data in the address index table can be deleted or added.
In another embodiment of the present application, the present application further provides a public chain-based address management system, including a public chain and a third party blockchain accessing the public chain, where nodes in the public chain and the third party blockchain establish network connection with each other, and a part of nodes in the public chain are configured as address management nodes, and all node address data in the public chain and the third party blockchain are stored and synchronized;
wherein the address management node is further configured to receive an address inquiry transaction sent by a transaction initiation node or a neighboring node of the address management node when a transaction occurs; and sending address data corresponding to the transaction target node to the transaction initiating node according to the address inquiry transaction. The address management node is further configured to receive address change information broadcast by the third-party block link point, and update the stored address data according to the address change information.
In the technical scheme provided by the application, the third party blockchain can have different transaction standards with the public chain, and mainly refers to butt joint of the existing blockchain network, such as an already mature Ethernet, a bit coin network and the like, and also can be a third party private chain, a third party industry chain, a third party alliance chain and the like which are self-networked according to the blockchain network principle. Such third party blockchain networks typically do not have the same consensus mechanism and intelligence contracts as the public chains and therefore have difficulty communicating directly and completing transactions directly.
Thus, as shown in FIG. 4, to enable communication between different third party blockchain networks and the public chains and to complete cross-chain transactions, the address management system further includes parallel chains comprised of the public chain nodes and/or third party blockchain nodes. The parallel chain node is configured to be capable of executing all data operations of the common chain node and has all functions and information of the common chain node; and is further configured to be capable of performing all data operations of the third party blockchain node, having all functions and information of the third party blockchain node; at least one of the parallel chain nodes is configured as the address management node. In practical application, the parallel chain nodes can transmit information of the transaction and bridge the transaction during the transaction.
For example, when a node in a sub-chain needs to trade across chains, broadcasting of block data can be completed within the sub-chain range, and then broadcasting of the trade within the public chain range is completed through parallel link points, namely, creation, verification, storage and the like of the block chain data of the same trade are completed in the sub-chain and the public chain network at the same time, so that block chain data is formed, and after transaction information is distributed and stored, the cross-chain trade is completed. The cross-link transaction mode bridging through the parallel links can achieve the purpose of cross-link transaction through the minimum node transformation amount.
When the address management system carries out transaction, a transaction initiating node initiates an address inquiry transaction to the address management node, wherein the address inquiry transaction comprises a transaction abstract; the address management node is configured to store address data according to the address inquiry transaction traversal; searching a transaction target chain corresponding to the transaction abstract, extracting address data of parallel chain nodes corresponding to the transaction target chain, and sending the address data of the parallel chain nodes to the transaction initiating point.
According to the technical scheme, the address management system based on the public chain comprises the public chain and the sub-chain accessed to the public chain, wherein part of nodes in the public chain are configured as address management nodes, and all node address data in the public chain and the sub-chain are stored and synchronized; when a transaction occurs, the address management node may receive an address query transaction; and sending address data corresponding to the transaction target node to the transaction initiating node according to the address inquiry transaction. The address management node is further configured to receive address change information broadcast by the child link points and to update the stored address data in accordance with the address change information.
According to the address management system, part of nodes in a public chain can be configured as the address management nodes, and the transaction initiating node can quickly acquire the addresses of the transaction target nodes by combining with the characteristics of blockchain transaction, so that in the transaction initiating node, the address information of all nodes can be saved, the acquisition process of the addresses of the transaction target nodes only occurs between the transaction initiating node and the address management node, the addresses of the transaction target nodes are not acquired through broadcasting transaction, the occupation of network bandwidth can be remarkably reduced, and the transaction efficiency is improved.
The foregoing detailed description of the embodiments is merely illustrative of the general principles of the present application and should not be taken in any way as limiting the scope of the invention. Any other embodiments developed in accordance with the present application without inventive effort are within the scope of the present application for those skilled in the art.