WO2023124744A1 - Interaction inter-sous-réseau - Google Patents

Interaction inter-sous-réseau Download PDF

Info

Publication number
WO2023124744A1
WO2023124744A1 PCT/CN2022/135827 CN2022135827W WO2023124744A1 WO 2023124744 A1 WO2023124744 A1 WO 2023124744A1 CN 2022135827 W CN2022135827 W CN 2022135827W WO 2023124744 A1 WO2023124744 A1 WO 2023124744A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
subnet
blockchain
subnetwork
network
Prior art date
Application number
PCT/CN2022/135827
Other languages
English (en)
Chinese (zh)
Inventor
陶友贤
Original Assignee
支付宝(杭州)信息技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 支付宝(杭州)信息技术有限公司 filed Critical 支付宝(杭州)信息技术有限公司
Publication of WO2023124744A1 publication Critical patent/WO2023124744A1/fr

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/12Discovery or management of network topologies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/12Shortest path evaluation
    • H04L45/121Shortest path evaluation by minimising delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Definitions

  • the embodiments of this description belong to the technical field of blockchain, and in particular, relate to a cross-subnet interaction method, device, electronic equipment, and storage medium.
  • Blockchain is a new application model of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm.
  • the data blocks are combined into a chained data structure in a sequentially connected manner in chronological order, and a non-tamperable and unforgeable distributed ledger is cryptographically guaranteed. Due to the characteristics of decentralization, non-tamperable information, and autonomy, the blockchain has also received more and more attention and application.
  • some nodes sometimes need to implement small-scale transactions to prevent other nodes from obtaining these transactions and their related data. Therefore, a blockchain subnet can be further established on the basis of the blockchain main network.
  • the target blockchain subnet is a technical problem that needs to be solved urgently.
  • the purpose of the present invention is to provide a cross-subnet interaction method, device, electronic equipment and storage medium.
  • a cross-subnetwork interaction method is proposed, which is applied to the first subnetwork node in the first blockchain subnetwork in the blockchain system, and the block
  • the chain system includes the blockchain main network and its managed blockchain subnet; the first subnet node maintains the subnet topology of the first blockchain subnet, the network delay information corresponding to the subnet topology, and the first The node deployment situation on the node device where the subnet node in the block chain subnet is located; the method includes: obtaining the message to be forwarded that needs to be forwarded to the target block chain subnet; determining the node device where the first subnet node is located In the case that no subnet node in the target blockchain subnet is deployed on the network, the first subnet node and the subnet node in the target blockchain subnet are determined from the subnet topology based on the network delay information.
  • the forwarding path with the minimum total delay between network nodes, and forwards the message to be forwarded to the second subnetwork node in the first blockchain subnetwork as the next hop on the determined forwarding path; after determining the first subnetwork If the subnet node in the target blockchain subnet is deployed on the node device where the node is located, the message to be forwarded is forwarded to the subnet node in the target blockchain subnet.
  • a cross-subnetwork interaction device is proposed, which is applied to the first subnetwork node in the first blockchain subnetwork in the blockchain system, and the block
  • the chain system includes the blockchain main network and its managed blockchain subnet; the first subnet node maintains the subnet topology of the first blockchain subnet, the network delay information corresponding to the subnet topology, and the first The node deployment situation on the node device where the subnet node in the block chain subnet is located; the device includes: a message acquisition unit for obtaining a message to be forwarded to the target block chain subnet; a path forwarding unit for In the case where it is determined that no subnet node in the target blockchain subnet is deployed on the node device where the first subnet node is located, determine the first subnet from the subnet topology based on the network delay information The forwarding path with the minimum total delay between the node and the subnetwork nodes in the target blockchain subnetwork, and forwards the message to be forwarded to
  • an electronic device including: a processor; a memory for storing processor-executable instructions; wherein, the processor executes the executable instructions To realize the method as described in any one of the first aspect.
  • a computer-readable storage medium on which computer instructions are stored, and when the instructions are executed by a processor, the method as described in any one of the first aspect is implemented. A step of.
  • the first subnetwork node in the first blockchain subnet maintains the subnetwork topology of the first subnetwork node, network delay information, and the node where the subnetwork node in the first blockchain subnetwork is located.
  • Node deployment on the device in the case of receiving a message to be forwarded to the target blockchain subnet, determine the total delay between the first subnet node and the subnet nodes in the target blockchain subnet The smallest forwarding path, and deliver the message to be forwarded to the second subnetwork node of the next hop on the determined forwarding path in the form of rerouting and forwarding, and then the second subnetwork node gradually delivers it to the deployed target area
  • this solution can redirect messages that are wrongly routed to the first blockchain subnet back to the target blockchain network that it needs to go to, thus avoiding to a certain extent
  • the occasional event of message sending error in the blockchain system composed of blockchain subnets makes the blockchain system more reliable; on the other hand, because the first subnetwork node maintains the network delay information corresponding to the subnetwork topology, so It can ensure that the message to be forwarded can be forwarded through the forwarding path with the smallest total delay, which optimizes the forwarding efficiency of the message to be forwarded.
  • Fig. 1 is a schematic diagram of building a blockchain subnet based on the blockchain main network provided by an exemplary embodiment.
  • Fig. 2 is a flowchart of a cross-subnet interaction method provided by an exemplary embodiment.
  • Fig. 3 is a schematic diagram of a subnet topology provided by an exemplary embodiment.
  • Fig. 4 is a schematic structural diagram of a device provided by an exemplary embodiment.
  • Fig. 5 is a block diagram of a cross-subnet interaction device provided by an exemplary embodiment.
  • all blockchain nodes in the blockchain network will maintain the same block data, which cannot meet the special needs of some nodes.
  • all consortium members that is, node members in the consortium
  • all consortium members can form a blockchain network, and all consortium members have corresponding blockchain nodes in the blockchain network, and can pass the corresponding zone Block chain nodes obtain all transactions and related data that occur on the block chain network.
  • there may be some alliance members who want to complete some transactions that require confidentiality. These alliance members hope that these transactions can be stored on the blockchain or take advantage of other advantages of blockchain technology, and can avoid other transactions. affiliate members see these transactions and related data.
  • the establishment method is similar to the above-mentioned blockchain network that includes all alliance members, but building a new blockchain network from scratch requires a lot of resources, and regardless of The establishment process of the blockchain network or the configuration process after completion is very time-consuming.
  • the needs among alliance members are often temporary or have a certain timeliness, so that the newly built blockchain network will soon lose the meaning of existence due to the disappearance of demand, thus further increasing the chain construction cost of the above-mentioned blockchain network .
  • the needs of alliance members often change, and the alliance members corresponding to each demand are often different. Therefore, whenever the alliance members change, it may be necessary to form a new blockchain network, resulting in resource and time constraints. A lot of waste.
  • the established blockchain network can be used as the blockchain main network, and a blockchain subnet can be formed on the basis of the blockchain main network.
  • the consortium members can build the required blockchain subnet based on their own needs while already participating in the blockchain main network. Since the blockchain subnet is established on the basis of the blockchain main network, the construction process of the blockchain subnet is compared to the completely independent establishment of a blockchain network, the resources consumed and the time required, etc. Both are greatly reduced, and the flexibility is extremely high.
  • each blockchain node in the blockchain main network obtains a transaction for establishing a blockchain subnet, and the transaction includes the configuration information of the blockchain subnet , the configuration information includes the identity information of the node members participating in the formation of the block chain subnet, each block chain node in the block chain main network respectively executes the transaction to disclose the configuration information, when the When the configuration information includes the identity information of the node members corresponding to the first block chain node, the node device deploying the first block chain node starts the first block belonging to the block chain subnet based on the genesis block containing the configuration information.
  • Two blockchain nodes Two blockchain nodes.
  • the blockchain main network is subnet0
  • the blockchain nodes contained in subnet0 are nodeA, nodeB, nodeC, nodeD, and nodeE.
  • nodeA, nodeB, nodeC and nodeD want to form a blockchain subnet: if nodeA is an administrator and only allows the administrator to initiate a transaction to form a blockchain subnet, then nodeA can initiate the above-mentioned transaction to form a blockchain subnet to subnet0; If nodeE is an administrator and only allows the administrator to initiate the transaction of establishing a blockchain subnet, then nodeA ⁇ nodeD needs to make a request to nodeE, so that nodeE initiates the above transaction of establishing a blockchain subnet to subnet0; if nodeE is an administrator but allows Ordinary users initiate a transaction to establish a blockchain subnet, then nodeA ⁇ nodeE can initiate the above transaction to subnet0 to establish a blockchain subnet.
  • the blockchain node that initiates the transaction to form a blockchain subnet does not necessarily participate in the established blockchain subnet.
  • nodeE can initiate the above-mentioned transaction of establishing a blockchain subnet to subnet0, and nodeA ⁇ nodeD may not necessarily initiate the transaction of establishing a blockchain subnet.
  • the blockchain main network in this specification can be the underlying blockchain network, that is, the blockchain main network is not a blockchain subnet formed on the basis of other blockchain networks, such as the subnet0 can be regarded as the blockchain mainnet belonging to the underlying blockchain network type.
  • the blockchain main network in this specification can also be a subnet of other blockchain networks.
  • subnet1 is the blockchain main network corresponding to the blockchain subnet, and this does not affect that subnet1 also belongs to the blockchain subnet created on subnet0. It can be seen that the blockchain main network and the blockchain subnet are actually relative concepts. The same blockchain network can be the blockchain main network in some cases and the blockchain subnet in other cases.
  • the consensus nodes in the blockchain main network will conduct a consensus, and after the consensus is passed, each main network node will execute the transaction to complete the block The formation of the chain subnet.
  • the consensus process depends on the adopted consensus mechanism, which is not limited in this specification.
  • the configuration information can be used to configure the established blockchain subnet so that the established blockchain subnet meets the networking requirements. For example, by including the identity information of node members in the configuration information, it is possible to specify which blockchain nodes are included in the established blockchain subnet.
  • the identity information of the node members may include the public key of the node, or other information that can represent the identity of the node such as the node ID, which is not limited in this specification.
  • each blockchain node has one or more sets of corresponding public-private key pairs.
  • the blockchain node holds the private key and the public key is public and uniquely corresponds to the private key. Therefore, it can be passed
  • the public key is used to represent the identity of the corresponding blockchain node. Therefore, for blockchain nodes that want to be node members of the blockchain subnet, the public keys of these blockchain nodes can be added to the above-mentioned transaction of forming the blockchain subnet as the identity information of the above-mentioned node members.
  • the above-mentioned public-private key pair can be used in the process of signature verification.
  • nodeA1 in subnet1 uses its own private key to sign the message, and then broadcasts the signed message in subnet1, while nodeB1, nodeC1 and nodeD1 can use the public key of nodeA1 Signature verification is performed on the received message to confirm that the message received by itself is indeed from nodeA1 and has not been tampered with.
  • the first main network node may be a blockchain node on the blockchain main network that is a node member indicated by the configuration information.
  • the first subnet node needs to be generated by the node device used to deploy the first main network node , and the first subnetwork node becomes a node member in the blockchain subnetwork.
  • the first main network node and the first subnet node correspond to the same blockchain member, for example, in the alliance chain scenario, they correspond to the same alliance chain member, but the first main network node
  • the node belongs to the blockchain subnet, so that the blockchain members can participate in the transactions of the blockchain main network and the blockchain subnet respectively; and, since the blockchain main network and the blockchain subnet belong to two independent Blockchain network, so that the blocks generated by the first main network node and the blocks generated by the first subnet node are respectively stored in different storages on the node device (the storage used can be a database, for example), realizing the first
  • the storage used by the main network node and the first subnet node is isolated from each other, so the data generated by the blockchain subnet will only be synchronized among the node members of the blockchain subnet, so that only those who participate in the blockchain main
  • the blockchain members of the network cannot obtain the data generated on the blockchain subnet, which realizes the data isolation between the blockchain main network and the blockchain subnet, and satisfies the requirements
  • the first main network node and the first subnet node are logically divided blockchain nodes, and from the perspective of physical equipment, it is equivalent to deploying the first main network node and the first subnet node
  • the node devices participate in the blockchain main network and the blockchain subnet at the same time. Since the blockchain main network and the blockchain subnet are independent of each other, the identity systems of the two blockchain networks are also independent of each other, so even if the first main network node and the first subnet node can use exactly the same public key, the two should still be considered as different blockchain nodes. For example, in FIG.
  • nodeA in subnet0 is equivalent to the first main network node, and the node device deploying the nodeA generates nodeA1 belonging to subnet1, and the nodeA1 is equivalent to the first subnet node. It can be seen that since the identity systems are independent of each other, even if the public key used by the first subnet node is different from that of the first main network node, it will not affect the implementation of the scheme in this specification.
  • the node members of the blockchain subnet are not necessarily only part of the node members of the blockchain main network.
  • the node members of the blockchain subnet can be completely consistent with the node members of the blockchain main network.
  • all blockchain members can obtain the data on the blockchain main network and the blockchain subnet, but The data generated by the blockchain main network and the blockchain subnet can still be isolated from each other.
  • the two types of The business data generated by the business are isolated from each other.
  • the configuration information may also include at least one of the following: the network identifier of the blockchain subnet, the identity information of the administrator of the blockchain subnet, the The attribute configuration of the code, etc., is not limited in this manual.
  • the network identifier is used to uniquely represent the blockchain subnet, so the network identifier of the blockchain subnet should be distinguished from the blockchain main network and other blockchain subnets formed on the blockchain main network.
  • the identity information of the administrator of the blockchain subnet can be, for example, the public key of the node member who is the administrator; the administrators of the blockchain main network and the blockchain subnet can be the same or different.
  • One of the advantages of building a blockchain subnet through the blockchain mainnet is that since the first mainnet node has already been deployed on the node device that generates the first subnetwork node, the area used by the first mainnet node can be The block chain platform code is reused on the first subnet node, which eliminates the repeated deployment of the block chain platform code and greatly improves the efficiency of the block chain subnet.
  • the first subnet node can reuse the attribute configuration adopted on the first main network node; if the configuration information includes the attribute configuration for the blockchain platform code attribute configuration, the first subnetwork node can adopt the attribute configuration, so that the attribute configuration adopted by the first subnetwork node is not limited to the attribute configuration of the first main network node, and has nothing to do with the first main network node.
  • the attribute configuration for the blockchain platform code can include at least one of the following: code version number, whether consensus is required, consensus algorithm type, block size, etc., which are not limited in this specification.
  • Transactions that form blockchain subnets include transactions that call contracts.
  • the transaction can specify the address of the called smart contract, the method called and the parameters passed in.
  • the invoked contract can be the aforementioned genesis contract or system contract
  • the invoked method can be a method for building a blockchain subnet
  • the incoming parameters can include the above-mentioned configuration information.
  • the transaction may contain the following information:
  • the from field is the information of the initiator of the transaction.
  • Administrator indicates that the initiator is an administrator; the to field is the address of the called smart contract.
  • the smart contract can be a Subnet contract, and the to field is specifically the Subnet The address of the contract; the method field is the calling method.
  • the method used to build a blockchain subnet in the Subnet contract can be AddSubnet(string), and string is the parameter in the AddSubnet() method.
  • genesis is used to represent the The value of the parameter, the genesis is specifically the aforementioned configuration information.
  • nodeA ⁇ nodeE Take nodes nodeA ⁇ nodeE on Subnet0 executing a transaction calling the AddSubnet() method in the Subnet contract as an example. After the transaction passes the consensus, nodeA ⁇ nodeE respectively execute the AddSubnet() method and pass in the configuration information to obtain the corresponding execution results.
  • Contract execution results can be expressed as events in receipts.
  • the message mechanism can implement message delivery through events in the receipt to trigger blockchain nodes to perform corresponding processing.
  • the structure of an event can be, for example:
  • Blockchain nodes can listen to the topic of the event to perform preset processing when listening to a predefined topic, or read relevant content from the data field of the corresponding event, and can execute preset based on the read content deal with.
  • the monitoring code can be embedded in the blockchain platform code running on the blockchain node, so that the monitoring code can monitor the transaction content of the blockchain transaction, the contract status of the smart contract, the receipt generated by the contract, etc. or multiple types of data, and send the monitored data to a predefined listener.
  • the monitoring code is deployed in the blockchain platform code instead of the client of the listening party, this implementation based on the monitoring code is relatively more active than the event mechanism.
  • the above monitoring code can be added to the blockchain platform code by the developers of the blockchain platform during the development process, or can be embedded by the monitoring party based on its own needs, which is not limited in this manual.
  • the execution result of the above-mentioned Subnet contract may include the configuration information, and the execution result may be included in the above-mentioned receipt, and the receipt may include an event related to the execution of the AddSubnet() method, that is, a networking event.
  • the topic of networking events can contain predefined networking event identifiers to distinguish them from other events. For example, in the event related to the execution of the AddSubnet() method, the content of the topic is the keyword subnet, and this keyword is different from the topic in the event generated by other methods.
  • nodeA ⁇ nodeE can determine to monitor the event related to the execution of the AddSubnet() method, that is, the networking event, when the topic containing the keyword subnet is monitored.
  • the event in the receipt is as follows:
  • the content of the data field may include, for example:
  • subnet1 is the network identifier of the blockchain subnet you want to create.
  • Each blockchain node in the blockchain main network can record the network identifiers of all blockchain subnets that have been created on the blockchain main network, or other information related to these blockchain subnets, such information can be maintained in In the above-mentioned Subnet contract, it may specifically correspond to the values of one or more contract states included in the Subnet contract.
  • nodeA ⁇ nodeE can determine whether the above-mentioned subnet1 already exists according to the recorded network identifiers of all blockchain subnets that have been created; if it does not exist, it means that subnet1 is a new blockchain subnet that needs to be created currently, and if it exists, it means that subnet1 already exists.
  • a predefined new network identifier which indicates that the corresponding networking event is used to form a new blockchain subnet.
  • the above subnet1 can be replaced with newsubnet, which is a predefined new network identifier.
  • nodeA ⁇ nodeE recognizes that the data field contains newsubnet, they can determine that the event containing this newsubnet is a networking event, and a new one needs to be created.
  • Blockchain subnet When nodeA ⁇ nodeE recognizes that the data field contains newsubnet, they can determine that the event containing this newsubnet is a networking event, and a new one needs to be created.
  • the above data field also includes identity information of each node member and so on.
  • the node device deploying the first main network node can monitor the generated receipt, and when the networking event is monitored and the content of the networking event indicates that the first main network node belongs to the node member, the deployment second A node device of a main network node obtains the configuration information or the genesis block included in the networking event.
  • the first blockchain node can monitor the generated receipt, and when the networking event is monitored and the content of the networking event indicates that the first blockchain node belongs to the node member, trigger the deployment of the first blockchain node.
  • a node device of a blockchain node obtains the configuration information or the genesis block included in the networking event.
  • node devices can listen for receipts directly. Assuming that nodeA ⁇ nodeE are respectively deployed on node devices 1 ⁇ 5, and node devices 1 ⁇ 5 can monitor the receipts generated by nodeA ⁇ nodeE respectively, then when it is detected that subnet1 is a blockchain subnet that needs to be newly established, node device 1 ⁇ 5 will further identify the identity information of the node members contained in the data field to determine its own processing method.
  • nodeA and node device 1 Take nodeA and node device 1 as an example: if node device 1 finds that the data field contains identity information such as nodeA's public key, IP address, and port number, then node device 1 obtains configuration information from the data field based on the above message mechanism , generate a genesis block containing the configuration information, and node device 1 will deploy nodeA1 locally, and then nodeA1 will load the generated genesis block, thus becoming a subnet node of subnet1; similarly, node device 2 can generate nodeB1, node Device 3 can generate nodeC1, and node device 4 can generate nodeD1. And, node device 5 will find that the identity information contained in the data field does not match itself, then the node device 5 will not generate a genesis block according to the configuration information in the data field, nor will it generate a blockchain node in subnet1.
  • identity information such as nodeA's public key, IP address, and port number
  • the blockchain nodes in the blockchain main network can monitor receipts and trigger node devices to perform related processing according to the monitoring results.
  • nodeA ⁇ nodeE will further identify the identity information of the node members contained in the data field in order to determine their own processing methods when they determine that subnet1 is a blockchain subnet that needs to be newly established.
  • nodeA ⁇ nodeD will find that the data field contains their own identity information such as their public key, IP address, and port number. Assume that nodeA ⁇ nodeD are deployed on node devices 1 ⁇ 4 respectively.
  • nodeA will Trigger node device 1, so that node device 1 obtains configuration information from the data field based on the above-mentioned message mechanism and generates a genesis block containing the configuration information, and node device 1 will deploy nodeA1 locally, and nodeA1 will load the generated genesis block, Thus, it becomes a subnet node in subnet1; similarly, nodeB will trigger node device 2 to generate nodeB1, nodeC will trigger node device 3 to generate nodeC1, and nodeD will trigger node device 4 to generate nodeD1.
  • nodeE will find that the identity information contained in the data field does not match itself, assuming that nodeE is deployed on node device 5, then the node device 5 will not generate a genesis block based on the configuration information in the data field, nor will it generate subnet1 nodes in .
  • the data field may contain identity information generated in advance for nodeA1-nodeD1, which is different from the identity information of nodeA-nodeD.
  • nodeA and node device 1 as an example: if node device 1 finds the identity information of nodeA1 in the data field, it can generate a genesis block, deploy nodeA1, and nodeA1 loads the genesis block; or, if nodeA is in the data field If the identity information of nodeA1 is found in , then nodeA will trigger node device 1 to generate a genesis block, deploy nodeA1, and nodeA1 will load the genesis block.
  • the processing methods of other blockchain nodes or node devices are similar and will not be repeated here.
  • the execution result of the contract can include the genesis block.
  • the corresponding node devices 1-4 can directly obtain the genesis block from the data field through the message mechanism without generating it by themselves, which can improve the deployment efficiency of nodeA1-nodeD1.
  • the node device implements the deployment of a blockchain node on the node device by creating an instance of running the blockchain platform code in the process.
  • the node device creates the first instance in the above process, and the first instance runs the blockchain platform code to form.
  • the node device creates a second instance different from the first instance in the above process, and the second instance runs the blockchain platform code to form.
  • the node device can first create the first instance in the process to form the first blockchain node in the blockchain main network; In the above process, a second instance is created, which is different from the above-mentioned first instance, and the second instance forms a second blockchain node in the blockchain subnet.
  • the second instance may also be in separate nodes from the first instance
  • this specification does not limit this; for example, the node device can create the first instance in the first process to form the first blockchain node in the blockchain main network; and when the node When the node member corresponding to the device wants to participate in the establishment of a blockchain subnet, it can start a second process different from the first process, and create a second instance in the second process, which is different from the first instance above. Furthermore, the second instance forms a second blockchain node in the blockchain subnet.
  • each blockchain node deployed on any node device involved in the embodiments of this specification is a different blockchain instance running on any node device, and each blockchain node deployed on any node device
  • the blocks generated by the nodes are respectively stored in different storages (such as databases) on any node device, and the storages used by each blockchain node deployed by any node device are isolated from each other.
  • a blockchain subnet can be created on the blockchain mainnet.
  • subnet0 originally included nodeA ⁇ nodeE
  • subnet1 can be built on the basis of subnet0.
  • This subnet1 includes nodeA1 ⁇ nodeD1, and nodeA and nodeA1, nodeB and nodeB1, nodeC and nodeC1, nodeD and nodeD1 are respectively deployed in on the same node device.
  • subnet2 or more blockchain subnets can also be established on subnet0, where subnet2 includes nodeA2, nodeB2, nodeC2 and nodeE2, and nodeA and nodeA1, nodeA2, nodeB and nodeB1, nodeB2, nodeC and nodeC1, nodeD, nodeD1 and nodeD2, nodeE and nodeE2 are respectively deployed on the same node device.
  • subnet1, subnet2, etc. can be used as the new blockchain main network, and a blockchain subnet can be further formed on this basis. The process is similar to the formation of subnet1 or subnet2, and will not be repeated here.
  • the above-mentioned method of initiating transactions on the blockchain main network to select node members to create a blockchain subnet can make the subnet nodes of the newly created blockchain subnet all deployed on the main network nodes of the blockchain main network.
  • the node device where the subnet node of the blockchain subnet is located belongs to the subset of the node device where the main network node is located.
  • the main network node in the blockchain main network is deployed on the node device at .
  • a blockchain subnet can be established on the blockchain main network through registration (subsequently referred to as the registration network method), and the existing blockchain network can be directly registered to the blockchain main network, so that the newly registered blockchain network Managed by the blockchain main network, the newly registered blockchain network becomes a blockchain subnet of the blockchain main network.
  • the subnet information of the block chain subnet to be formed is directly registered to the block chain main network, so that the block chain main network can obtain the relevant information of the block chain subnet to be formed (by receiving and executing the A transaction issued by the block chain network for associating its identity information with the subnet identification assigned to the block chain network to be formed), such as the subnet identification and operating status of the block chain subnet to be formed, where
  • the public key and plug-in configuration information of each node member, the IP address and port information of each node device, etc. will be written into the contract state of the system contract corresponding to the blockchain main network, so that the blockchain main network will Obtain the management right of the blockchain subnet to be formed.
  • subnet0 creates a subnet4 (not shown in Figure 1) in the form of registration and networking.
  • subnet nodes corresponding to subnet4 can be deployed on any other node devices except node devices 1 to 5, or one or more subnet nodes in subnet4 are respectively deployed on node devices 1 to 5 Any node device within 5 (but it is still necessary to ensure that only one subnet node in subnet4 is deployed on a node device), and other subnet nodes in subnet4 are deployed on any other node device except node devices 1 to 5 , of course, the subnet nodes in subnet4 may also be deployed in node devices 1-5.
  • a blockchain system including the blockchain main network and its managed blockchain subnets can be formed.
  • different blockchain subnets are isolated from each other, which causes a certain blockchain subnet to receive forwarded messages that should be sent to other blockchain subnets, due to the lack of other blockchain subnets.
  • the routing information of the chain subnet can only discard the message to be forwarded, so that the message forwarded incorrectly due to various reasons cannot be rerouted to the correct blockchain network, which brings challenges to the robustness of the blockchain system .
  • subnet2 and subnet1 belong to independent blockchain networks.
  • subent2 For subent2, it only knows the existence of its subnet nodes nodeA2, nodeB2, nodeC2 and nodeE2, and transactions initiated in subnet2 will not be passed to subnet0 or subnet1, but will only be sent to subnet nodes in subnet2 for consensus and processing. Therefore, when subnet2 receives a transaction to be forwarded that should be sent to subnet1, it cannot find the corresponding routing information, so it can only be discarded .
  • this specification proposes a cross-subnet interaction method, by maintaining the subnet topology of the first blockchain subnet, the network delay information corresponding to the subnet topology and The node deployment situation on the node device where the subnetwork node in the first blockchain subnetwork is located makes the first subnetwork node determine the first subnetwork when obtaining the message to be forwarded to the target blockchain subnetwork The message to be forwarded is forwarded based on the forwarding path with the smallest total delay between the node and the subnetwork nodes in the target blockchain subnetwork.
  • Fig. 2 is a flowchart of a cross-subnet interaction method provided by an exemplary embodiment.
  • the method is applied to the first subnet node in the first blockchain subnet in the blockchain system, and the blockchain system includes the blockchain main network and the blockchain subnet it manages; the first subnet node Maintaining the subnet topology of the first blockchain subnet, the network delay information corresponding to the subnet topology, and the node deployment situation on the node device where the subnet nodes in the first blockchain subnet are located; the The method includes S202 to S206.
  • the message to be forwarded in this embodiment refers to a message whose destination address is the target blockchain subnet or at least one subnet node in the target blockchain subnet, where the target blockchain subnet is different from the first blockchain subnet .
  • nodeA1 in subnet1 intends to send a message to nodeB1, which is also in subnet1, but a forwarding error occurs during the forwarding process of the message, which causes nodeA1 to send the message to nodeA2, which is also on node device 1, by mistake.
  • nodeA2 belongs to subnet2, at this time, for nodeA2, the message it obtains belongs to the message to be forwarded to the target blockchain subnet involved in the embodiment of this specification, and the message to be forwarded involved in the embodiment of this specification Messages can include blockchain transactions.
  • the above-mentioned subnetwork topology is generated based on the network connection relationship among the subnetwork nodes in the first blockchain subnetwork, and the network links corresponding to the network connection relationship include: the first zone The consensus link established between the consensus subnet nodes in the block chain subnet, and the synchronization link established between the consensus subnet nodes and the non-consensus subnet nodes, among them, the consensus node refers to the participation in transaction consensus, block packaging, etc.
  • Process blockchain nodes, non-consensus nodes refer to blockchain nodes that do not participate in transaction consensus, and the block packaging process is only used to synchronize blocks.
  • the subnet nodes nodeA2, nodeB2, nodeC2 and nodeE2 in the blockchain subnet subnet2 are respectively deployed on node device 1, node device 2, node device 3 and node device 5, and the subnet nodes in subnet2 All are consensus nodes, and any subnet node in subnet2 maintains the network connection relationship between each subnet node in subnet2, as shown in Figure 1.
  • each subnet node in subnet2 can also separately collect the node deployment status of the node device where it is located (which blockchain nodes are deployed), and share them with each other inside subnet2, which enables any subnet node in subnet2 to also be able to Knowing the node deployment situation on the node device where each subnet node in subnet2 is located, the subnet topology that can be finally maintained by the first subnet node such as nodeE2 is shown in Figure 3, which is provided by an exemplary embodiment
  • a schematic diagram of a subnet topology specifically a schematic diagram of the subnet topology of subnet2 in Figure 1, the subnet topology includes network links between subnet nodes in subnet2, and records of each subnet Other blockchain nodes deployed on the node device where the node is located.
  • the subnet topology can be expressed graphically to represent the connection relationship between the subnet nodes in the first blockchain subnet.
  • the connection relationship between the subnet nodes in subnet2 shown in Figure 3 can be regarded as a
  • the expression form used to represent the above-mentioned subnet topology structure of course, the above-mentioned subnet topology structure may also be represented in the form of a matrix or a table, and there is no limitation here.
  • the first subnetwork node also maintains network delay information corresponding to the subnetwork topology, and the network delay information includes: link delays of network links in the subnetwork topology , and/or the node delay of the subnetwork nodes in the subnetwork topology when forwarding messages.
  • the first subnetwork node not only maintains the subnetwork topology between the subnetwork nodes, but also maintains the link delay of each network link included in the subnetwork topology and the link delay of each subnetwork node node delay.
  • the link delay of the network link refers to the delay information required for message forwarding on the network link, for example, the link delay of the network link between nodeA2 and nodeE2 in Figure 3 is 100;
  • Node delay refers to the delay information required for a message from entering the subnet node to being forwarded from the subnet node, specifically including the process of the subnet node parsing the message, checking the routing table, and forwarding the message, such as nodeA2 in Figure 3
  • the node delay is 3, and the forwarding delay of nodeE2 is 5.
  • the values corresponding to the link delay and the node delay may represent the specific delay length, and may also represent other delay indicators related to the specific delay length, but the link delay and node delay Units need to be unified.
  • the link delay 100 of the network link between nodeA2 and nodeE2 can be interpreted as 100 milliseconds (ms), that is, it takes 100 ms for a message to pass through the network link, then the node delay 3 of nodeA2 should be interpreted as 3 ms.
  • S204 When it is determined that no subnetwork node in the target blockchain subnetwork is deployed on the node device where the first subnetwork node is located, determine the first subnetwork topology from the subnetwork topology based on the network delay information The forwarding path with the minimum total delay between the network node and the subnet node in the target blockchain subnet, and forwards the message to be forwarded to the first blockchain subnet as the next hop on the determined forwarding path of the second subnetwork node.
  • the message to be forwarded includes the identity information of the target blockchain subnet
  • the method further includes: by deploying the node device where the first subnet node is located, the The identity information corresponding to the blockchain network is compared with the identity information of the target blockchain subnet, and it is determined whether the node device where the first subnet node is located is deployed with a subnet node in the target blockchain subnet.
  • the identity information carried in the message to be forwarded may include at least one of the following: the subnet identifier of the target blockchain subnet, the public key or node identifier of the target subnet node in the blockchain subnet.
  • the first subnet node In the case where it is determined that no subnet node in the target block chain subnet is deployed on the node device where the first subnet node is located, the first subnet node first determines according to the node device involved in the first block chain subnet (i.e.
  • the node deployment situation of the node device where each subnetwork node is located in the first block chain subnet judge whether the node device involved in the first block chain subnet is deployed with the subnet node in the target block chain subnet, In the case of determining the subnetwork nodes in the target block chain subnet deployed by the target node device, determine the subnetwork nodes in the target block chain subnetwork deployed in the target node device as the target subnetwork node, and then based on The subnet topology determines the forwarding path between the first subnetwork node and the target subnetwork node.
  • the determination rule of the forwarding path is: firstly, the message to be forwarded is sent to the first block in the target node device The intermediate subnet node in the chain subnet, and then forward the forwarded message from the intermediate subnet node to the target subnet node under the same node device.
  • the first subnet node is nodeE2 in subnet2, which receives a message to be forwarded to subnet1, so find out node device 1, node device 2 and Node device 3 is deployed with subnet nodes in subnet1.
  • nodeE2 determines that the target node device is node device 3 and the target subnet node is noedeC1
  • nodeE2 needs to determine the forwarding path between nodeC1 and nodeC1 according to the aforementioned forwarding path
  • nodeE2 first determines that the intermediate subnet node is nodeC2 that belongs to subnet2, and then determines that the forwarding path of the message to be forwarded needs to start from nodeE2, pass through nodeC2, and finally forward to nodeC1.
  • nodeE2 and nodeC2 there are two forwarding paths between nodeE2 and nodeC2: one is nodeE2 ⁇ nodeA2 ⁇ nodeC2 ⁇ nodeC1; the other is nodeE2 ⁇ nodeB2 ⁇ nodeC2 ⁇ nodeC1.
  • nodeE2 After nodeE2 determines the two optional forwarding paths, it further determines the forwarding path with the smallest total delay between nodeE2 and nodeC1 from the two optional forwarding paths based on the network delay information, wherein the total delay corresponding to the forwarding path is The link delay of at least one section of the network link passing through from the first subnetwork node to the target subnetwork node on the forwarding path and/or at least one subnetwork node passing through (excluding the first subnetwork node and the target subnetwork node ) sum of node delays.
  • nodeE2 can also select nodeA1 and/or nodeB1 as the target subnet node at the same time, and determine the total delay between nodeE2 and these target subnet nodes according to the above method of determining the forwarding path
  • the shortest forwarding path then, nodeE2 can select the global optimal forwarding path with the shortest total delay from the forwarding paths determined based on different target subnet nodes, for example, in the embodiment of this specification, based on the Subnet topology and network delay information, the global optimal forwarding path finally determined by nodeE2 should be nodeE2 ⁇ nodeB2 ⁇ nodeB1, and its total delay is 53.
  • each block chain node runs a virtual communication plug-in corresponding to its own block chain network; wherein, different block chain nodes in the same block chain network are implemented through their respective virtual communication plug-ins Intercommunication, the virtual communication plug-ins of blockchain nodes of different blockchain networks are isolated from each other in the communication scenario of cross-node devices, but can realize intercommunication in the communication scenario of the same node device.
  • each subnet node in subnet1 can realize network intercommunication through its own virtual communication plug-in, but the subnet node in subnet1 runs a virtual communication plug-in and the subnet node in subnet2 runs a virtual communication plug-in.
  • the virtual communication plug-in involved in the embodiment of this specification may refer to the corresponding communication plug-in actually running on a node device.
  • the node device will The number of communication plug-ins corresponding to the plurality of blockchain nodes needs to be deployed separately to be assigned to the corresponding plurality of blockchain nodes; or, the virtual communication plug-in can refer to the communication plug-ins deployed on the same node device in a logic
  • the node device only needs to run the same communication plug-in, and then virtualize the above-mentioned
  • the number of virtualized communication applications corresponding to the plurality of blockchain nodes can be allocated to the corresponding plurality of blockchain nodes.
  • the forwarding of the message to be forwarded to the second subnetwork node in the first blockchain subnetwork as the next hop on the determined forwarding path includes: forwarding the message to be forwarded by The first communication plug-in running on the first subnetwork node forwards to the second communication plug-in running on the second subnetwork node. Since the first subnetwork node and the second subnetwork node belong to the same block chain subnetwork, they can realize message forwarding through the virtual communication plug-ins running on each other.
  • the forwarding the message to be forwarded to the subnet node in the target blockchain subnet includes: forwarding the message to be forwarded by the first communication plug-in to the node device where the first subnet node is located A target communication plug-in running on a subnet node in the target blockchain subnet deployed on.
  • the subnet node (target subnet node) and the first subnet node in the target blockchain subnet belong to different blockchain networks, they are in the same node device, so it can also be realized through virtual communication plug-ins running on each other. message forwarding.
  • the first subnetwork node in the first blockchain subnet maintains the subnetwork topology of the first subnetwork node, network delay information, and the node where the subnetwork node in the first blockchain subnetwork is located.
  • Node deployment on the device in the case of receiving a message to be forwarded to the target blockchain subnet, determine the total delay between the first subnet node and the subnet nodes in the target blockchain subnet The smallest forwarding path, and deliver the message to be forwarded to the second subnetwork node of the next hop on the determined forwarding path in the form of rerouting and forwarding, and then the second subnetwork node gradually delivers it to the deployed target area
  • this solution can redirect messages that are wrongly routed to the first blockchain subnet back to the target blockchain network that it needs to go to, thus avoiding to a certain extent
  • the occasional event of message sending error in the blockchain system composed of blockchain subnets makes the blockchain system more reliable; on the other hand, because the first subnetwork node maintains the network delay information corresponding to the subnetwork topology, so It can ensure that the message to be forwarded can be forwarded through the forwarding path with the smallest total delay, which optimizes the forwarding efficiency of the message to be forwarded.
  • it also includes: when there is no forwarding path between the first subnetwork node and the subnetwork nodes in the target blockchain subnetwork, discarding the message to be forwarded, or discarding the message to be forwarded
  • the forwarding message is forwarded to the main network node in the block chain main network, so that the main network node in the block chain main network can use the main network topology structure maintained by itself and the block chain main network
  • the node deployment situation on the node device where the main network node is located if the forwarding path between the first subnet node and the subnet node in the target block chain subnet is determined, the message to be forwarded will be forwarded according to The determined forwarding path is forwarded to the subnetwork nodes in the target blockchain subnetwork.
  • the first subnetwork node determines the nodes involved in the first blockchain subnetwork through the node deployment on the node device where the subnetwork nodes in the first blockchain subnet maintained by itself are located If the subnet node in the target blockchain subnet is not deployed in the node device, it means that the correct forwarding of the message to be forwarded cannot be achieved only based on the first blockchain subnetwork, so the message to be forwarded can only be discarded, or the It is forwarded to the main network node in the blockchain main network, and then the main network node is based on the main network topology of the blockchain main network and the node device where the main network node in the blockchain main network is located.
  • the forwarding path between the first subnetwork node and the subnetwork nodes in the target blockchain subnetwork is determined, and the main network node forwards the message to be forwarded according to the determined forwarding path, thereby further increasing The robustness of the blockchain system.
  • the network delay information includes the link delay of the near-end network link and/or the link delay of the far-end network link in the subnet topology, and the near-end network link It is a network link between the first subnetwork node and its neighboring subnetwork nodes, and the remote network link is a network link in the subnetwork topology except the near-end network link.
  • the neighbor subnet nodes of the first subnet node refer to the subnet nodes directly connected to the first subnet node through a network link. Taking Figure 3 as an example, the neighbor subnet nodes corresponding to nodeA2 include nodeE2, nodeC2, and nodeC2 Neighboring subnet nodes include nodeA2 and nodeB2.
  • the first subnetwork node For the first subnetwork node, it maintains two different types of network links, including a near-end network link and a far-end network link.
  • the near-end network link refers to the network link directly connected to the first subnetwork node, that is, the network link between the first subnetwork node and its neighbor subnetwork nodes;
  • a network link directly connected to the first subnetwork node is a network link in the subnetwork topology except the near-end network link corresponding to the first subnetwork node.
  • the near-end network links corresponding to nodeA2 include the network links between nodeC2 and nodeE2 respectively, and the remote network links corresponding to nodeA2 include between nodeC2 and nodeB2, and between nodeE2 and nodeB2 network link.
  • the first subnetwork node obtains the link delay according to different strategies according to different types of network links.
  • the first sub-network node determines the link delay of the near-end network link according to the local-end link delay and/or the opposite-end link delay; wherein, the local-end link delay is responded by the first sub-network node through a request
  • the mechanism detects the near-end network link, and the peer link delay is obtained by the neighbor subnet node of the first subnetwork node through the request response mechanism to detect the near-end network link; and/or , receiving the link delay of the remote network link sent by the neighbor subnet node of the first subnetwork node, the link delay of the remote network link is determined by at least one subnetwork of the remote network link
  • the node determines the link delay obtained by detecting the remote network link through the request response mechanism.
  • the request-response mechanism involved in the embodiment of this specification involves the interaction between the requester and the responder, and it is considered that the initiator of the request-response mechanism is the above-mentioned requester.
  • the request-response mechanism is specifically implemented in the following way: the requester sends a The request message carries the time t1, and t1 is the requester's local time recorded by the requester when sending the request message.
  • the request message and response message involved in the request-response mechanism can be dedicated messages dedicated to calculating link delays, or other ordinary normal service requests, or heartbeat messages in the network, because when calculating link delays, the response
  • the local processing time t3-t2 of the party is taken into account, so no matter what type of request message and reply message can be applied to the above request-response mechanism to make the requester measure the relative link delay.
  • the first subnetwork node determines the link delay of the near-end network link, it can be determined through the above request response mechanism. For example, the first subnetwork node can actively initiate a request response mechanism to its neighbor subnetwork node, so as to determine the link delay of the near-end network link between the first subnetwork node and the neighbor subnetwork node.
  • the link delay of the near-end network measured by the first subnetwork node through the request response mechanism is referred to as the local link delay.
  • the two subnetwork nodes contained in it can measure the link delay of the network link by initiating a request response mechanism
  • the first subnetwork node can also receive
  • the link delay of the near-end network link between the first subnet node and the neighbor subnet node is measured by the request response mechanism of its neighbor subnet node, and the link delay of the near-end network link is obtained directly , the link delay measured by the neighbor subnetwork node and provided to the near-end network link of the first subnetwork node is called the opposite-end link delay.
  • the first subnetwork node can obtain the link delay of a certain near-end network link through two methods, so it can also choose between these two methods or consider comprehensively, for example, the first subnetwork node
  • the link delay of the near-end network link that is finally determined and recorded in the network delay information may include: the local-end link delay, the peer-end link delay, or the difference between the local-end link delay and the Weighted average of peer link delays.
  • the local link delay of the near-end network link between nodeA2 and nodeE2 measured by initiating the request-response mechanism is 102
  • the delay of the near-end network link measured by nodeE2 by initiating the request-response mechanism is 102.
  • the peer link delay of the network link is 98, then, for nodeA2, it can directly determine the local link delay 102 measured by itself as the link delay of the near-end network link with nodeE2, Or the peer link delay 98 measured by nodeE2 received from nodeE2 is determined as the link delay of the near-end network link, and the local link delay can also be compared with the peer link delay according to a weight ratio of 1:1.
  • the average value of link delay 100 is determined as the link delay of the near-end network link, and is recorded in the network delay information locally maintained by nodeA2.
  • the first subnetwork node can only directly measure the link delay of the near-end network link between its neighbor subnetwork nodes, but cannot measure the link delay with the far-end network link, it is necessary to receive neighbor subnetwork
  • the first subnetwork node receives the link delay of the remote network link sent by the neighbor subnetwork node of the first subnetwork node, and the link delay of the remote network link is determined by At least one subnet node of the remote network link is determined by the link delay obtained by detecting the remote network link through the request response mechanism, for example, the link delay of the remote network link may include : the link delay detected by any sub-network node of the remote network link, or the weighted average of the link delays detected by the sub-network nodes at both ends of the remote network link.
  • the link delay detected by any subnetwork node is the link delay for the remote network link
  • the link delay of the remote network link is the subnetwork node at both ends of the remote network link
  • the link delay of the remote network link between nodeE2 and nodeB2 cannot be directly measured through the request response mechanism, but needs to be measured by nodeE2 and/or nodeB2 calculate and determine by initiating a request response mechanism, and nodeE2 encapsulates the final determined link delay of the remote network link into a link delay sharing message and sends or forwards it to nodeA2, and nodeA2 based on the obtained
  • the link delay of the remote network link updates the network delay information maintained by itself.
  • the first subnetwork node may receive the remote link delay measured by the neighbor subnetwork node, and in one embodiment, it also includes: receiving the response message sent by the neighbor subnetwork node of the first subnetwork node in the request response mechanism , the response message includes the peer link delay and/or the link delay of the remote network link.
  • the peer link delay and/or the link delay of the remote network link received by the first subnetwork node can be directly carried in the request response mechanism initiated by the first subnetwork node to the neighbor subnetwork node
  • the first subnetwork node only needs to initiate a request response mechanism once to obtain the peer link delay and/or the remote network link delay while obtaining the local link delay. Link delay, thereby reducing the complexity of network internal interaction.
  • the peer link delay and/or the link delay of the remote network link may also be carried in other messages sent or forwarded by the neighbor subnet node to the first subnet node.
  • the network delay information includes: link delays of network links in the subnet topology, and/or node delays of subnet nodes in the subnet topology when forwarding messages.
  • it also includes: acquiring the node delay obtained by detecting any subnet node from at least one neighboring subnet node of any subnet node in the subnet topology, and determining the node delay according to the acquired node delay.
  • the node delay of any subnet node needs to be measured by any neighbor subnet node corresponding to any subnet node, specifically, any subnet node corresponding to any Neighbor nodes are measured through the return message mechanism.
  • the backflow message mechanism involved in the embodiment of this specification involves the interaction between the requester and the responder, and it is considered that the initiator of the backflow message mechanism is the above-mentioned requester.
  • the backflow message mechanism is specifically implemented in the following way: the requester first selects a The responder initiates a return message mechanism. First, the requester needs to construct a return message whose destination address points to the requester itself, and send the return message to the responder according to the network link directly connected to the responder, and record the return message sent at the same time. The requester's local time t5 at the time of the message.
  • the responder After receiving the backflow message, the responder knows that the destination address of the backflow message is the requester by looking up the routing table, so it will return the backflow message to the requester through the original route.
  • the backflow message mechanism requires that there are no other transit devices between the requester and the responder. This is because the object measured by the backflow message mechanism is the node delay of the responder's forwarded message. Therefore, adding other transit devices will result in failure to meet measurement expectations.
  • the detection of any neighbor subnet node of the any subnet node includes: the any neighbor subnet node sends a message to the any subnet node
  • For the return message determine the node delay of the any subnet node through the forwarding delay of the return message and the link delay of the network link between the any neighbor subnet node and the any subnet node
  • the return message is a message sent by any neighboring subnet node to the any subnet node with a destination address pointing to any neighboring subnet node.
  • any neighbor subnet node of the subnet node can initiate a return message mechanism to measure it.
  • the first subnet node can directly detect it by initiating a return message mechanism.
  • the first subnet node can also receive the node delay corresponding to the neighbor subnet node measured by these subnet nodes through the return message mechanism, and use it as a reference to finally determine the delay corresponding to the neighbor subnet node Node latency.
  • nodeA2 detects that the node delay of nodeE2 is 3 by initiating a backflow message mechanism to nodeE2, and also receives the node delay of nodeE2 detected by nodeB2 by initiating a backflow message mechanism to nodeE2 is 1, then For nodeA2, it can directly determine the node delay 3 measured by itself as the node delay with nodeE2, and record it in the network delay information locally maintained by nodeA2, or the nodeB2 received from nodeB2 and measured by nodeB2 The node delay 1 of nodeE2 is determined as the node delay of nodeE2, and is recorded in the network delay information locally maintained by nodeA2, and the average of the node delay 3 measured by itself and the node delay 7 measured by nodeB2 can be calculated according to the weight ratio of 1:1. A value of 5 is determined as the node delay of nodeE2 and recorded in the network delay information locally maintained by nodeA2.
  • the first subnetwork node it cannot detect the node delay of subnetwork nodes other than its neighbor subnetwork nodes through the backflow message mechanism, so the first subnetwork node can also obtain the node of any subnetwork node through other methods Delay, for example, the first subnetwork node may directly receive the node delay of any subnetwork node shared by other subnetwork nodes.
  • nodeA2 cannot directly detect the node delay of nodeB2, but nodeE2 can measure it, so nodeA2 can directly receive the node delay sharing message with nodeB2 node delay sent by nodeE2 to nodeA2, so as to obtain and determine the node of nodeB2 The delay is 3, and it is finally recorded in the local network delay information.
  • nodeA2 does not necessarily need to obtain the node delay of nodeB2 from nodeE2.
  • the network delay information maintained by nodeC2 actually includes the node delay of nodeB2, so nodeA2 can also receive nodeC2.
  • the node delay sharing message carrying the node delay of nodeB2 to obtain the node delay of nodeB2.
  • the node delay of any subnet node in the network delay information maintained by the first subnet node includes: any subnet node detected by any neighbor subnet node of the any subnet node Node delay, or a weighted average of node delays obtained by detecting any subnet node by at least one neighboring subnet node of the any subnet node.
  • any neighbor node of any subnetwork node can detect the node delay of any subnetwork node, so when the first subnetwork node finally determines the node delay of any subnetwork node , the node delay for any subnet node detected by any neighbor node of any subnet node can be directly recorded in the locally maintained network delay information, or one or The weighted average of node delays obtained by detecting any subnet node by multiple neighboring subnet nodes is determined as the node delay of any subnet node, and is recorded in the locally maintained network delay information.
  • the node delay of any subnet node is finally determined as a weighted average of node delays obtained by detecting any subnet node by at least one neighboring subnet node of the any subnet node.
  • the network delay information maintained by the first subnetwork node can be made more robust.
  • nodeA2 can respectively receive the node delay 1 of nodeA2 detected by nodeE2 and the node delay 5 of nodeA2 detected by nodeC2. At this time, nodeA2 can choose one of the measured node delays of nodeA2 as the locally maintained network For the node delay of nodeA2 in the delay information, the weighted average value 3 of the node delay measured by nodeE2 and the node delay measured by nodeC2 can also be determined as the node delay of nodeA2 in the network delay information according to a weight ratio of 1:1.
  • Fig. 4 is a schematic structural diagram of a device provided by an exemplary embodiment.
  • the device includes a processor 402 , an internal bus 404 , a network interface 406 , a memory 408 and a non-volatile memory 410 , and of course may also include hardware required by other services.
  • the processor 402 reads a corresponding computer program from the non-volatile memory 410 into the memory 408 and then executes it.
  • one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each A logic unit, which can also be a hardware or logic device.
  • Figure 5 is a block diagram of a cross-subnet interaction device provided in this specification according to an exemplary embodiment, which can be applied to the device shown in Figure 4 to implement the technical solution of this specification ;
  • the device is applied to the first subnet node in the first blockchain subnet in the blockchain system, and the blockchain system includes the blockchain main network and the blockchain subnet it manages; the first subnet
  • the network node maintains the subnet topology of the first blockchain subnet, the network delay information corresponding to the subnet topology, and the node deployment situation on the node device where the subnet nodes in the first blockchain subnet are located;
  • the device includes: a message acquisition unit 501, configured to acquire messages to be forwarded to the target blockchain subnet; a path forwarding unit 502, configured to determine that the target is not deployed on the node device where the first subnet node is located.
  • a subnet node in a blockchain subnet determine the total delay between the first subnet node and the subnet node in the target blockchain subnet from the subnet topology based on the network delay information The smallest forwarding path, and forward the message to be forwarded to the second subnet node in the first block chain subnet as the next hop on the determined forwarding path; the node forwarding unit 503 is used to determine the first subnet If the node device where the network node is located is deployed with a subnet node in the target blockchain subnet, the message to be forwarded is forwarded to the subnet node in the target blockchain subnet.
  • the network delay information includes the link delay of the near-end network link and/or the link delay of the far-end network link in the subnet topology
  • the near-end network link is the first A network link between a subnetwork node and its neighboring subnetwork nodes
  • the remote network link is a network link in the subnetwork topology except the near-end network link.
  • a link delay obtaining unit 504 configured to determine the link delay of the near-end network link according to the local-end link delay and/or the peer-end link delay; wherein, the local-end link The route delay is obtained by detecting the near-end network link through the request-response mechanism by the first subnetwork node, and the peer-end link delay is detected by the neighbor subnetwork node of the first subnetwork node through the request-response mechanism.
  • the link delay of the remote network link is determined by the It is determined by the link delay obtained by detecting the remote network link by at least one subnet node of the remote network link through a request response mechanism.
  • a response receiving unit 505 configured to receive a response message sent by a neighbor subnet node of the first subnetwork node in the request response mechanism, the response message including the peer link delay and/or all The link delay of the remote network link.
  • the link delay of the near-end network link includes: the local-end link delay, the peer-end link delay, or the local-end link delay and the peer-end link delay
  • the weighted average value of the remote network link includes: the link delay detected by any sub-network node of the remote network link, or the sub-network node at both ends of the remote network link The weighted average of the link delays detected by the network nodes respectively.
  • the network delay information includes: link delays of network links in the subnet topology, and/or node delays of subnet nodes in the subnet topology when forwarding messages.
  • a node delay acquisition unit 506 which acquires the node delay obtained by detecting any subnet node from at least one neighboring subnet node of any subnet node in the subnet topology, and according to The obtained node delay determines the node delay of any subnet node; and/or receives the node delay of any subnet node shared by other subnet nodes.
  • any neighbor subnet node of the any subnet node detecting the any subnet node includes: the any neighbor subnet node sends a return message to the any subnet node, According to the forwarding delay of the backflow message, the link delay of the network link between the any neighbor subnet node and the any subnet node, determine the node delay of the any subnet node, the backflow
  • the message is a message that the destination address sent by the any neighboring subnet node to the any subnet node points to the any neighboring subnet node.
  • the node delay of any subnet node includes: the node delay obtained by detecting any subnet node by any neighbor subnet node of the any subnet node, or the node delay of any subnet node A weighted average of node delays obtained by detection of any subnet node by at least one neighboring subnet node of the subnet node.
  • a main network forwarding unit 507 configured to transfer the message to be forwarded to Discard, or forward the message to be forwarded to the main network node in the blockchain main network, so that the main network node in the blockchain main network can In the case of determining the forwarding path between the first subnetwork node and the subnetwork node in the target blockchain subnetwork according to the node deployment situation on the node device where the mainnetwork node in the blockchain mainnet is located , forwarding the message to be forwarded to the subnet node in the target blockchain subnet according to the determined forwarding path.
  • the subnetwork topology is generated based on the network connection relationship between the subnetwork nodes in the first blockchain subnetwork.
  • the network link corresponding to the network connection relationship includes: the consensus link established between the consensus subnet nodes in the first block chain subnet, and the consensus link established between the consensus subnet node and the non-consensus subnet node synchronization link.
  • each blockchain node runs a virtual communication plug-in corresponding to its own blockchain network; among them, different blockchain nodes in the same blockchain network realize intercommunication through their respective virtual communication plug-ins, and different The virtual communication plug-ins of the blockchain nodes of the blockchain network are isolated from each other in the communication scenario of cross-node devices; the path forwarding unit 502 is specifically used to: run the message to be forwarded by the first subnetwork node The first communication plug-in forwards to the second communication plug-in running on the second subnet node; the node forwarding unit 503 is specifically configured to: forward the message to be forwarded from the first communication plug-in to the node where the first subnet node is located A target communication plug-in run by a subnet node in the target blockchain subnet deployed on the device.
  • a Programmable Logic Device such as a Field Programmable Gate Array (FPGA)
  • FPGA Field Programmable Gate Array
  • HDL Hardware Description Language
  • the controller may be implemented in any suitable way, for example the controller may take the form of a microprocessor or processor and a computer readable medium storing computer readable program code (such as software or firmware) executable by the (micro)processor , logic gates, switches, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable logic controllers and embedded microcontrollers, examples of controllers include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320, the memory controller can also be implemented as part of the control logic of the memory.
  • controller in addition to realizing the controller in a purely computer-readable program code mode, it is entirely possible to make the controller use logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded The same function can be realized in the form of a microcontroller or the like. Therefore, such a controller can be regarded as a hardware component, and the devices included in it for realizing various functions can also be regarded as structures within the hardware component. Or even, means for realizing various functions can be regarded as a structure within both a software module realizing a method and a hardware component.
  • the systems, devices, modules, or units described in the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions.
  • a typical implementation device is a server system.
  • the present invention does not exclude that with the development of computer technology in the future, the computer that realizes the functions of the above embodiments can be, for example, a personal computer, a laptop computer, a vehicle-mounted human-computer interaction device, a cellular phone, a camera phone, a smart phone, a personal digital assistant , media players, navigation devices, email devices, game consoles, tablet computers, wearable devices, or any combination of these devices.
  • one or more embodiments of the present specification provide the operation steps of the method described in the embodiment or the flowchart, more or fewer operation steps may be included based on conventional or non-inventive means.
  • the sequence of steps enumerated in the embodiments is only one of the execution sequences of many steps, and does not represent the only execution sequence.
  • the methods shown in the embodiments or drawings can be executed sequentially or in parallel (such as a parallel processor or multi-thread processing environment, or even a distributed data processing environment).
  • These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions
  • the device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
  • a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • processors CPUs
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • Memory may include non-permanent storage in computer readable media, in the form of random access memory (RAM) and/or nonvolatile memory such as read-only memory (ROM) or flash RAM. Memory is an example of computer readable media.
  • RAM random access memory
  • ROM read-only memory
  • flash RAM flash random access memory
  • Computer-readable media including both permanent and non-permanent, removable and non-removable media, can be implemented by any method or technology for storage of information.
  • Information may be computer readable instructions, data structures, modules of a program, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Flash memory or other memory technology, Compact Disc Read-Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, Magnetic cassettes, magnetic tape magnetic disk storage, graphene storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by computing devices.
  • computer-readable media excludes transitory computer-readable media, such as modulated data signals and carrier waves.
  • one or more embodiments of this specification may be provided as a method, system or computer program product. Accordingly, one or more embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of the present description may employ a computer program embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein. The form of the product.
  • program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types.
  • program modules may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network.
  • program modules may be located in both local and remote computer storage media including storage devices.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

La présente invention concerne un procédé et un appareil d'interaction inter-sous-réseaux, un dispositif électronique et un support de stockage. Le procédé est appliqué à un premier nœud de sous-réseau maintenant une structure de topologie de sous-réseau d'un premier sous-réseau de chaîne de blocs et des informations de retard de réseau correspondant à la structure de topologie de sous-réseau, ainsi qu'à une situation de déploiement de nœud sur un dispositif de nœud dans lequel un nœud de sous-réseau dans le premier sous-réseau de chaîne de blocs est situé. Le procédé consiste à : acquérir un message à transférer, lequel doit être transmis à un sous-réseau de chaîne de blocs cible ; lorsqu'il est déterminé qu'un nœud de sous-réseau dans le sous-réseau de chaîne de blocs cible n'est pas déployé sur un dispositif de nœud dans lequel le premier nœud de sous-réseau est situé, sur la base d'informations de retard de réseau, déterminer un chemin de transfert ayant un retard total minimal entre le premier nœud de sous-réseau et le nœud de sous-réseau dans le sous-réseau de chaîne de blocs cible et transférer le message à transférer à un second nœud de sous-réseau du premier sous-réseau de chaîne de blocs agissant comme saut suivant sur le chemin de transfert déterminé ; sinon, transférer le message à transférer à un nœud de sous-réseau dans le sous-réseau de chaîne de blocs cible.
PCT/CN2022/135827 2021-12-31 2022-12-01 Interaction inter-sous-réseau WO2023124744A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111663446.9 2021-12-31
CN202111663446.9A CN114285755A (zh) 2021-12-31 2021-12-31 一种跨子网交互方法、装置、电子设备和存储介质

Publications (1)

Publication Number Publication Date
WO2023124744A1 true WO2023124744A1 (fr) 2023-07-06

Family

ID=80879181

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/135827 WO2023124744A1 (fr) 2021-12-31 2022-12-01 Interaction inter-sous-réseau

Country Status (2)

Country Link
CN (1) CN114285755A (fr)
WO (1) WO2023124744A1 (fr)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116708464A (zh) * 2023-08-09 2023-09-05 杭州安碣信息安全科技有限公司 一种去中心化的区块链节点连接管理协议方法

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114285755A (zh) * 2021-12-31 2022-04-05 支付宝(杭州)信息技术有限公司 一种跨子网交互方法、装置、电子设备和存储介质
CN116170388A (zh) * 2022-12-30 2023-05-26 蚂蚁区块链科技(上海)有限公司 一种区块链网络的转发表生成方法及其数据传输方法
CN116192692A (zh) * 2022-12-30 2023-05-30 蚂蚁区块链科技(上海)有限公司 一种区块链网络中的共识数据分发方法和区块链网络

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108959621A (zh) * 2018-07-18 2018-12-07 百度在线网络技术(北京)有限公司 一种区块链网络的实现方法、装置、设备及存储介质
US20190311337A1 (en) * 2018-04-04 2019-10-10 Vijay K. Madisetti Method and System for Exchange of Value or Tokens Between Blockchain Networks
CN113259455A (zh) * 2021-06-02 2021-08-13 支付宝(杭州)信息技术有限公司 跨子网交互方法及装置
CN114285755A (zh) * 2021-12-31 2022-04-05 支付宝(杭州)信息技术有限公司 一种跨子网交互方法、装置、电子设备和存储介质
CN114301828A (zh) * 2021-12-31 2022-04-08 支付宝(杭州)信息技术有限公司 一种跨子网交互方法、装置、电子设备和存储介质

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190009958A (ko) * 2017-07-20 2019-01-30 주식회사 더블체인 확장형 블록체인 시스템 및 블록체인 확장방법
WO2020149786A1 (fr) * 2019-01-18 2020-07-23 Rise Research Institute Of Sweden Ab Déploiement dynamique d'applications de réseau présentant des garanties de performance et de fiabilité dans de grands réseaux informatiques
CN109889446B (zh) * 2019-03-11 2021-03-23 西安电子科技大学 基于sdn的异构融合网络最小时延路径确定方法
US20200334677A1 (en) * 2019-04-16 2020-10-22 Nokia Solutions And Networks Oy Transparent blockchain sidechains to support blockchain processing heterogeneity
CN110266655B (zh) * 2019-05-30 2021-11-12 中国工商银行股份有限公司 一种基于区块链的跨链互联方法、设备以及系统
RO134065A0 (ro) * 2019-08-14 2020-04-30 Ingenium Blockchain Technologies S.R.L. Platformă şi metodă de conectare a unui motor de blockchain
CN111447290B (zh) * 2020-06-12 2020-10-02 支付宝(杭州)信息技术有限公司 区块链网络中的通信方法、业务数据传输方法
CN112600699B (zh) * 2020-12-07 2022-04-01 华中科技大学 基于区块链跨链交互的动态覆盖网络拓扑构建方法及装置
CN113067902B (zh) * 2021-06-02 2021-07-30 支付宝(杭州)信息技术有限公司 区块链消息的传输方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190311337A1 (en) * 2018-04-04 2019-10-10 Vijay K. Madisetti Method and System for Exchange of Value or Tokens Between Blockchain Networks
CN108959621A (zh) * 2018-07-18 2018-12-07 百度在线网络技术(北京)有限公司 一种区块链网络的实现方法、装置、设备及存储介质
CN113259455A (zh) * 2021-06-02 2021-08-13 支付宝(杭州)信息技术有限公司 跨子网交互方法及装置
CN114285755A (zh) * 2021-12-31 2022-04-05 支付宝(杭州)信息技术有限公司 一种跨子网交互方法、装置、电子设备和存储介质
CN114301828A (zh) * 2021-12-31 2022-04-08 支付宝(杭州)信息技术有限公司 一种跨子网交互方法、装置、电子设备和存储介质

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116708464A (zh) * 2023-08-09 2023-09-05 杭州安碣信息安全科技有限公司 一种去中心化的区块链节点连接管理协议方法
CN116708464B (zh) * 2023-08-09 2023-10-31 杭州安碣信息安全科技有限公司 一种去中心化的区块链节点连接管理协议方法

Also Published As

Publication number Publication date
CN114285755A (zh) 2022-04-05

Similar Documents

Publication Publication Date Title
WO2023124744A1 (fr) Interaction inter-sous-réseau
CN113259455B (zh) 跨子网交互方法及装置
CN114301828A (zh) 一种跨子网交互方法、装置、电子设备和存储介质
CN113067902B (zh) 区块链消息的传输方法及装置
CN113259460B (zh) 跨链交互方法及装置
CN113067897B (zh) 跨链交互方法及装置
Karagiannis Compute node communication in the fog: Survey and research challenges
CN113067895B (zh) 组建区块链子网的方法和区块链系统
WO2024001022A1 (fr) Appel inter-sous-réseau
WO2023050966A1 (fr) Vérification de données de chaîne de blocs
CN113259118B (zh) 同步节点信息列表的方法
CN113259120B (zh) 同步节点信息列表的方法
CN113259457B (zh) 区块链子网的信息同步方法及装置
CN113259117B (zh) 同步节点信息列表的方法
WO2023124743A1 (fr) Synchronisation de blocs
CN114422520B (zh) 跨链交互方法及装置
CN114422526B (zh) 一种区块同步方法、装置、电子设备和存储介质
CN114363335B (zh) 跨链交互方法及装置
CN114338714B (zh) 一种区块同步方法、装置、电子设备和存储介质
CN113067772B (zh) 区块链网络间的交易转发方法
CN113259462B (zh) 区块链消息的分发方法及装置
CN113259236B (zh) 区块链网络间的交易转发方法
CN114866560A (zh) 区块链节点的迁移方法及装置
CN114338676B (zh) 一种区块同步方法、装置、电子设备和存储介质
CN116455900A (zh) 一种跨子网交互方法及装置、区块链系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22913999

Country of ref document: EP

Kind code of ref document: A1