Background
The main task of the blockchain technology is to create a relatively objective anti-repudiation digital environment based on public consensus according to the decentralized system requirements. Based on the block chain technology, the authenticity of network information can be ensured, for example, a transaction occurs in a block chain network, a node in the network can generate block data for recording transaction contents according to transaction information, the block data is broadcasted in the whole network, and other nodes in the network simultaneously store the block data to form an unalterable block chain. The transaction is generalized, and does not refer to the traditional meaning of "commodity buying and selling" or "commodity exchange", but refers to some 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 the performance of a communication device of some model, and the query request a is a transaction for a blockchain node B which undertakes a query service. Similarly, the node B sends the performance table B of the communication device of the type obtained by query to the node a, which is also a transaction. Information A, a and information B, b may be written as transaction information in data blocks of a block chain.
It can be seen that a transaction based on blockchain technology is essentially a transaction between two nodes. In the traditional transaction, the initiating node needs to be clear or the address information of the target node is known, so that the target node is found through the address information, and the transaction is completed. However, since the inter-chain transaction occurs between two different blockchains, and the information of each blockchain is independent and incompatible with each other, in the case of inter-chain transaction, a node of one blockchain as a transaction initiator cannot directly acquire address information of a node of another blockchain as a transaction target.
In order to obtain the address information of the target node, an address list of other blockchain nodes may be stored in the current blockchain network, and the address list records the address information of any blockchain in the blockchain set, which can be a transaction target. If the initiating node initiates the transaction, the address information of the corresponding target node needs to be inquired in the address list, and the transaction is carried out with the target node according to the inquired address information. However, this method is only applicable in a network environment where a cross-chain transaction can be performed, which has been signed up. In the actual block chain deployment process, different types of public chains, alliance chains or industry chains are arranged according to different application fields, cross-chain transactions are possible to occur among the chains, and therefore, an address list needs to be stored in each node in each chain, and a large amount of storage resources are occupied.
In addition, most of the blockchains have a dynamic adjustment function, that is, each blockchain has a node to go online or offline at any time, so that the address of the node changes dynamically, and therefore, for any node in the blockchain, the stored address list needs to be updated continuously to adapt to the online or offline of nodes in other blockchains or the change of addresses. This makes the blockchain network need to continuously update the address list, which wastes or occupies more network bandwidth and reduces the transaction efficiency.
Disclosure of Invention
The application provides an address management system based on a public link, which aims to solve the problems that a traditional block link network occupies more network bandwidth and has low transaction efficiency.
In one aspect, the present application provides a public link-based address management system, including a public link and a sub-link accessing the public link, where nodes in the public link and the sub-link establish network connection with each other, and a part of nodes in the public link are configured as address management nodes, and store and synchronize address data of all nodes in the public link and the sub-link;
the address management node is further configured to receive address query transactions sent by a transaction initiating node or a node adjacent to 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 query transaction.
The address management node is further configured to receive address change information broadcast by the child chain node, and update the stored address data according to the address change information.
Optionally, the address management node is generated by a node in the public link through election inside the public link;
or, the public chain is randomly generated by part of nodes in the public chain, and the node configuration is periodically converted in the part of 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 query transaction.
Optionally, the address data includes one of a network address of a node, a terminal MAC address, and a uniform 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-chain node;
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 address management system performs a transaction, a transaction initiation node initiates an address query transaction to the address management node, where the address query transaction includes a transaction summary of a pre-initiated cross-link transaction;
the address management node is configured to traverse storage address data according to the address query transaction; and extracting the transaction target node address data corresponding to the transaction abstract, and sending the transaction target node address data to the transaction starting point.
Optionally, the address management node is further configured to calculate a network idleness according to a number of transactions occurring in a public link network per unit time; when the network vacancy is lower than a preset threshold value, broadcasting address confirmation information to all nodes in the public chain and the sub-chain;
and 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 address data that is not matched to the current address information.
On the other hand, the application also provides an address management system based on a public link, which comprises a public link and a third-party block chain accessing the public link, wherein nodes in the public link and the third-party block chain mutually establish network connection, and part of nodes in the public link are configured as address management nodes and store and synchronize all node address data in the public link and the third-party block chain;
the address management node is further configured to receive address query transactions sent by a transaction initiating node or a node adjacent to 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 query transaction.
The address management node is further configured to receive address change information broadcast by the third-party blockchain node, and update the stored address data according to the address change information.
Optionally, the address management system further includes a parallel chain composed of the public chain nodes and/or third-party block link points;
the parallel chain nodes are configured to be capable of performing all data operations of the common chain nodes, with all functions and information of the common chain nodes; is also configured to be able to perform 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 initiation node initiates an address query transaction to the address management node, where the address query transaction includes a transaction summary;
the address management node is configured to traverse storage address data according to the address query transaction;
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 starting point.
According to the technical scheme, the address management system based on the public link comprises the public link and the sub-link accessing the public link, and part of nodes in the public link are configured as address management nodes and store and synchronize all node address data in the public link and the sub-link; 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 query transaction. The address management node is further configured to receive address change information broadcast by the child chain node, and 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 are configured as address management nodes, and the address of a transaction target node can be quickly acquired by a transaction initiating node by combining the characteristics of blockchain transaction, so that the address information of all nodes does not need to be stored in the transaction initiating node, the acquisition process of the address of the transaction target node only occurs between the transaction initiating node and the address management node, the address of the transaction target node does not need to be acquired through broadcast 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 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 in the present application, the blockchain refers to accounting data generated by a transaction in a network system, and refers to a network operating a blockchain technology, that is, a blockchain network. The blockchain network refers to a point-to-point (P2P) network with decentralized application architecture, and the blockchain network can perform distributed storage, public consensus, digital encryption, transaction accounting and verification. I.e., a transaction platform that encompasses distributed technology, cryptography, P2P network architecture, and various consensus algorithms that may be applied.
The blockchain or blockchain information is accounting information generated according to transaction information when transactions occur in the blockchain network, namely a plurality of specific transactions form a blockchain, and the plurality of blocks form a blockchain. 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.
Referring to fig. 1, a schematic diagram of a public link-based address management system according to the present application is shown. As can be seen from fig. 1, the address management system provided in the present application includes a public link and a sub-link accessing the public link, where nodes in the public link and the sub-link establish network connection with each other. 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. In practical application, the public chain and the sub-chain are point-to-point P2P networks, and the P2P network is composed of a plurality of nodes, and each node has independent computing capability, application running 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 also any computer devices authenticated by the blockchain network, such as personal computers, computer groups, servers, and intelligent terminal devices.
In the address management system, the public link is a block chain network providing a basic platform, that is, by setting a uniform transaction standard, each block chain network accessing the public link can transmit and uniformly verify transaction information through the public link under the transaction standard, so as to realize cross-link 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, that is, a private chain, an industry chain, a alliance chain, and the like established based on a public chain network form.
In the technical scheme provided by the application, the nodes serving as public links can be divided into multiple roles according to the positions of the nodes in the network and the hardware configuration conditions of the nodes, namely in the actual transaction process, not all public link nodes complete the verification and accounting work of the same transaction, but different work is performed according to different roles of the nodes, so that the transaction is completed quickly, and the delay of high-concurrency transaction is avoided. Therefore, in the present application, some nodes in the public chain may be further configured as address management nodes, that is, during the actual transaction process, the address management nodes may be used to store and synchronize all node address data in the public chain and the child chain.
As shown in fig. 2, when a transaction occurs, the address management node is further configured to receive an address query transaction sent by a transaction initiation node or a node adjacent to the address management node; and sending address data corresponding to the transaction target node to the transaction initiating node according to the address query transaction.
Specifically, before the address management system performs a transaction, a transaction initiating node initiates an address query transaction to the address management node, where the address query transaction includes a transaction summary of a pre-initiated cross-link transaction; the address management node is configured to traverse storage address data according to the address query transaction; and extracting the transaction target node address data corresponding to the transaction abstract, and sending the transaction target node address data to the transaction starting point.
In practical applications, the transaction initiation node may be a node in the sub-chain network or a node in the public chain network. Before the transaction initiating node initiates the formal transaction, an address query transaction may be initiated to the address management node according to the content of the actual transaction information, where the address query transaction needs to include 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 packaged in a transaction summary manner, and sent to the address query transaction.
According to different practical application environments, the inquiry transaction form between the transaction initiating point and the address management node is different. If the transaction initiating node can directly perform transaction or information interaction with the address management node, the transaction initiating node can directly initiate query transaction to the address management node, and the method is most suitable for the transaction in which the transaction initiating node and the address management node are in the same block chain network, namely the transaction initiating node is also a node in the public chain network range. If the transaction initiating node cannot directly perform transaction or information interaction with the address management node, an address query transaction can be broadcast through the transaction initiating node, specifically, the query transaction can be broadcast to the neighboring node first, and the neighboring node determines whether to complete the transaction or continue broadcasting by combining the role of the neighboring node until the address management node receives the query transaction.
After receiving the inquiry transaction, the address management node can extract the transaction abstract in the inquiry transaction, determine the designated transaction target function in the inquiry transaction, match the transaction target node corresponding to the function from the stored address information table, package the corresponding address data into a transaction result and send the transaction result to the transaction initiating node, so that the transaction initiating node obtains the address data. During subsequent formal transaction, the 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 by the present application, the address query transaction is essentially a transaction process that is the same as the formal transaction, that is, a transaction process without evidence or with a specified amount of evidence is completed through a consensus mechanism and an intelligent contract built in the public link network.
Through the address query process, the transaction initiating node does not need to store the address information of the transaction target node, only needs to store the address information of the address management node, even does not need to store any address information, and queries the address of the transaction target node in a public link network in a broadcasting mode, 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 cross-chain transaction, address information of a transaction target node can be obtained only by performing address query before formal transaction, and cross-chain transaction also needs preposed query transaction, so that the address query transaction and the preposed query transaction can be combined into the same transaction for broadcasting without extra data transmission, excessive network bandwidth is avoided during practical application, and transaction efficiency is improved.
The address management node is further configured to receive address change information broadcast by the child chain node, and update the stored address data according to the address change information. In practical applications, each time a node in a public link or a sub-link network goes on or off, the node address information is changed. For example, a newly online node needs to register with the public link network to characterize the type of transactions it supports, i.e., to generate a change of address message. The newly online node may broadcast the address change information in the sub-link network or the public link network. Theoretically, all nodes in the public link network can receive the broadcasted address change information, but only the node serving as the address management node analyzes and converts the address change information, and stores the address change information in the address management node in a unified manner.
The address data is updated by the address management node, 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 transmission of the address change information can only occur between the address management node and the node for changing the address, and the synchronization to all the nodes is not needed, so that the occupation of the 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 a node with higher storage resource capacity as the address management node so as to provide the storage capacity of the address data; the sub-chain and public chain connection node or the node adjacent to the connection node can also 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 inside the public chain; or, the public chain is randomly generated by part of nodes in the public chain, and the node configuration is periodically converted in the part of nodes in the public chain. In practical application, the address management node can elect a node with a hardware condition meeting the requirement through a voting mechanism in a public link, so that the address management service is completed through the safe and stable node.
In practical application, part of the nodes in the public link node may be used as alternative nodes, but in the nodes used as the alternative nodes, not all the nodes complete the address management service, but in the alternative nodes, a specified number of nodes are periodically and randomly selected as address management nodes. Therefore, the mode of randomly changing the address management node can prevent the network system from being attacked to cause the stored information to be falsified, reduce the risk of generating illegal transactions, and also can finish the address management service through other nodes when the individual node goes wrong so as to ensure 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 can be used as address management nodes, so that all the candidate nodes store address data of each node. When the alternative node which is not used as the address management node receives the address query transaction, the address query transaction can be forwarded to the nearest address management node, so that the address management node can receive the address query 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 query transaction. That is, in the present embodiment, the address management network composed of a plurality of address management nodes is also a block chain network, and in the address management network, 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, address query can be completed through part of nodes in the address management network, and other nodes are only used as addresses for storage, so that the distributed storage capacity of the network can be more efficiently utilized, and query transaction can be completed as fast 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 complete the operation of sending address data corresponding to the transaction target node to the transaction initiating node according to the actual transaction processing quantity 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 unified identification address of the 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-chain node; 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.
In practical applications, different networks have different corresponding address information forms, and different networks have different setting manners for address information, so in the technical solution provided in the present application, in order to enable address data stored in an address management node to be applicable to a plurality of different networks, one of a network address, a terminal MAC address, and a unified identification address in a unified identification form may be used. In the actual query transaction, address data in the same form as the address of the transaction initiating node can be preferentially queried in the address index table, so that the transaction target node can be directly determined.
Before address data query, an address index table can be created by using the address public keys of the sub-chain nodes and according to the corresponding relation between the address public keys and the address data, so that the address information of a 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 idleness based on a number of transactions occurring in a public link network per unit time; when the network vacancy is lower than a preset threshold value, broadcasting address confirmation information to all nodes in the public chain and the sub-chain; and 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 mode can include two modes, wherein one mode is that a newly accessed public link or sub-link node actively sends address change information to the address management node; the updating method 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. The other mode is a mode that the address management node actively issues confirmation to each node, and the updating mode is applicable to various public link and sub-link network forms, but when the transaction number in the current system is large, the updating mode occupies part of bandwidth resources, so that the embodiment can implement synchronization again by calculating the network idleness and under the condition that the transaction number in the network is low.
Because the network is a blockchain network, all transactions need to be broadcast in the whole network to complete blockchain creation due to the transaction accounting form of the blockchain network. Therefore, the embodiment can indirectly obtain the transaction quantity through the creation condition of the block chain, so that the embodiment can easily calculate the network idleness. In practical application, different preset thresholds can be set according to different network characteristics so as to take the updating rate and the occupation condition of the network bandwidth into consideration.
Further, the address management node is further configured to match the stored address data according to the current address information; and deleting address data that is not matched to the current address information. After receiving current address information sent by nodes in the sub-chain or the public chain, the current address information can be matched with information stored in an address index table, and if the address information corresponding to the nodes is not changed, 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 exchanged into the current address information. And, through the above address confirmation information process, if the unmatched successful node or corresponding address data occurs 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 link-based address management system, which includes a public link and a third-party blockchain accessing the public link, where nodes in the public link and the third-party blockchain establish network connection with each other, and a part of nodes in the public link are configured as address management nodes, and store and synchronize address data of all nodes in the public link and the third-party blockchain;
wherein the address management node is further configured to receive an address query transaction sent by a transaction initiating node or a node adjacent to 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 query transaction. The address management node is further configured to receive address change information broadcast by the third-party blockchain node, and update the stored address data according to the address change information.
In the technical scheme provided by the application, the third-party blockchain and the public chain have different transaction standards, and mainly refer to the connection of the existing blockchain network, such as a mature ethernet, a bitcoin 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 automatically networked according to the blockchain network principle. Such third party blockchain networks typically do not have the same consensus mechanisms and intelligent contracts as public chains and therefore are more difficult to communicate directly and to complete transactions directly.
Thus, as shown in fig. 4, to enable communication between different third party blockchain networks and a public chain and to complete cross-chain transactions, the address management system further includes parallel chains composed of the public chain nodes and/or third party blockchain nodes. The parallel chain nodes are configured to be capable of performing all data operations of the common chain nodes, with all functions and information of the common chain nodes; is also configured to be able to perform 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 during the transaction and bridge the transaction.
For example, when a node in a sub-chain needs to perform a cross-chain transaction, the broadcasting of the blocky data can be completed within the sub-chain range, and then the transaction is broadcasted within the public chain range through the parallel chain nodes, that is, the creation, verification, storage and the like of the blocky chain data of the same transaction are completed in the sub-chain and the public chain network at the same time to form blocky chain data, and the cross-chain transaction is completed after the transaction information is distributed and stored. The cross-chain transaction mode of bridging through the parallel chain can achieve the purpose of cross-chain transaction through the minimum node transformation amount.
When the address management system carries out transaction, a transaction initiating node initiates an address query transaction to the address management node, wherein the address query transaction comprises a transaction abstract; the address management node is configured to traverse storage address data according to the address query transaction; 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 starting point.
According to the technical scheme, the address management system based on the public link comprises the public link and the sub-link accessing the public link, and part of nodes in the public link are configured as address management nodes and store and synchronize all node address data in the public link and the sub-link; 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 query transaction. The address management node is further configured to receive address change information broadcast by the child chain node, and 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 are configured as address management nodes, and the address of a transaction target node can be quickly acquired by a transaction initiating node by combining the characteristics of blockchain transaction, so that the address information of all nodes does not need to be stored in the transaction initiating node, the acquisition process of the address of the transaction target node only occurs between the transaction initiating node and the address management node, the address of the transaction target node does not need to be acquired through broadcast transaction, the occupation of network bandwidth can be remarkably reduced, and the transaction efficiency is improved.
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.