A blockchain network architecture

By introducing the mesolayer controller and topology optimization mechanism into the blockchain network architecture, the problem of the traditional IP network architecture's insufficient perception of the blockchain system is solved, and efficient message synchronization and resource management of the blockchain network are achieved. .

CN118214751BActive Publication Date: 2024-08-23PEKING UNIV SHENZHEN GRADUATE SCHOOL +3
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410620126.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-20
Publication Date
2024-08-23
Estimated Expiration
2044-05-20

AI Technical Summary

Technical Problem

The traditional IP network architecture has weak perception of the blockchain system and cannot manage network data transmission and resource allocation in a timely manner, resulting in low blockchain network synchronization efficiency.

Method used

Design a blockchain network architecture, including an application plane and a control plane. Obtain the epoch information of the blockchain system through the mesolayer controller, evaluate the number and average number of blocks, and decide whether to optimize the blockchain network topology. , and use the bearer network topology map to optimize and expand the topology map, cluster nodes, determine cluster head nodes and candidate neighbor nodes, and optimize message synchronization.

Benefits of technology

It improves the perception ability of the blockchain system, optimizes the network topology, improves message synchronization efficiency, reduces data redundancy and delay, and enhances the overall performance of the blockchain network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118214751B
    Figure CN118214751B
Patent Text Reader

Abstract

The present invention provides a blockchain network architecture, including: an application plane, a control plane and a data plane; the application plane includes a blockchain system; the control plane is used to obtain the number of blocks corresponding to the current epoch of the blockchain system and the average number of blocks corresponding to the historical epoch, and determine whether to optimize the blockchain network topology map according to the number of blocks and the average number; if it is determined that optimization is required, the blockchain network topology map is optimized using the bearer network topology map to obtain a blockchain network extended topology map, and the bearer network topology map represents the physical connection relationship between the network infrastructure corresponding to each node in the blockchain bearer network; the data plane is used for the blockchain network to synchronize messages using the blockchain network extended topology map. This architecture can meet the special requirements of blockchain synchronization, achieve global optimal control, improve the synchronization speed of the blockchain network, and solve the problem that the existing technology has weak support for the blockchain system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of blockchain technology, and in particular to a blockchain network architecture. Background Art

[0002] Blockchain is a distributed ledger technology that implements decentralized trusted applications through P2P networks (a peer-to-peer network structure), cryptography and smart contracts. In the blockchain, each node ensures the consistency and integrity of the blockchain system through full network synchronization. Frequent transactions and block generation and propagation processes pose a huge challenge to data synchronization between nodes.

[0003] The traditional IP (an international interconnection protocol) network architecture is located at the network layer in the computer network architecture, responsible for routing and forwarding data packets, ensuring the effective transmission of data between different networks and subnets; the blockchain system runs at the application layer in the computer network architecture, processing operations such as blockchain transactions, smart contracts, and on-chain data. Since the traditional IP network architecture and the blockchain system are at different levels in the computer network architecture, the traditional IP network architecture has a weak perception of the blockchain system and cannot effectively obtain the synchronization requirements of the upper-level blockchain system, and the blockchain system cannot manage data transmission and resource allocation in the network in a timely manner.

[0004] Therefore, it is necessary to improve the prior art. Summary of the invention

[0005] The main technical problem solved by the present invention is to provide a blockchain network architecture that can enhance the perception of the blockchain system, and then timely optimize the blockchain network topology map, so that the blockchain network can timely use the optimized blockchain network topology map for message synchronization.

[0006] According to the first aspect, an embodiment provides a blockchain network architecture, including: an application plane and a control plane;

[0007] The application plane includes a blockchain system;

[0008] The control plane includes a meso-layer controller; wherein the meso-layer controller is used to obtain the number of blocks corresponding to the current epoch of the blockchain system and the average number of blocks corresponding to the historical epoch, and determine whether it is necessary to optimize the blockchain network topology corresponding to the blockchain system according to the number of blocks and the average number; wherein the epoch represents the time from the completion of the generation of the previous block to the completion of the generation of the new block in the main chain of the blockchain system; the blockchain network topology is used to characterize the first connection relationship between the nodes in the blockchain system, and the first connection relationship represents the logical connection relationship for message transmission between the nodes. In one embodiment, if it is determined that the blockchain network topology needs to be optimized, the blockchain network topology is optimized to obtain the optimized blockchain network topology; wherein the blockchain network uses the optimized blockchain network topology for message synchronization; the blockchain network refers to a distributed network composed of the nodes, and the above nodes are interconnected and jointly maintain and manage the data of the blockchain system.

[0009] In one embodiment, the step of optimizing the blockchain network topology graph to obtain the optimized blockchain network topology graph includes:

[0010] Obtain the blockchain network topology map and generate a bearer network topology map;

[0011] The bearer network topology diagram is used to characterize the second connection relationship of each of the nodes in the blockchain bearer network; the blockchain bearer network is a network composed of a network infrastructure supporting the blockchain system;

[0012] The blockchain network topology map is optimized by using the bearer network topology map to obtain a blockchain network extension topology map, and the blockchain network extension topology map is used as the optimized blockchain network topology map; wherein the blockchain network extension topology map is used to characterize the third connection relationship between each of the nodes in the blockchain network.

[0013] In one embodiment, the blockchain network topology map is optimized by using the bearer network topology map to obtain a blockchain network extension topology map, including:

[0014] The nodes in the blockchain network topology map are matched one-to-one with the nodes in the bearer network topology map through the IP addresses of the nodes;

[0015] If the two nodes have the first connection relationship in the blockchain network topology diagram but do not have the second connection relationship in the bearer network topology diagram, the first connection relationship between the two nodes is used as the third connection relationship between the two nodes in the blockchain network extension topology diagram;

[0016] If the first connection relationship between the two nodes does not exist in the blockchain network topology diagram but the second connection relationship exists in the bearer network topology diagram, the second connection relationship between the two nodes is used as the third connection relationship between the two nodes in the blockchain network extension topology diagram;

[0017] If the first connection relationship exists between two nodes in the blockchain network topology diagram and the second connection relationship also exists in the bearer network topology diagram, the first connection relationship or the second connection relationship between the two nodes shall be used as the third connection relationship between the two nodes in the blockchain network extension topology diagram.

[0018] In one embodiment, the meso-layer controller further comprises: a graph engine unit and a centralized rule engine unit;

[0019] The graph engine unit is further used to cluster the blockchain network extension topology graph to obtain a plurality of clusters and the clustered blockchain network extension topology graph; wherein each cluster includes a plurality of nodes;

[0020] Obtaining blockchain system information and blockchain bearer network information of the node; wherein the blockchain system information includes: the block generation number of the node; the blockchain bearer network information includes the network bandwidth of the node; wherein the block generation number is the number of blocks generated by the node;

[0021] Evaluate the blockchain system information and the blockchain bearer network information of the node to obtain a score of the node;

[0022] Determine the cluster head node of the cluster from the nodes in the cluster whose scores are higher than a preset threshold; send the clustered blockchain network extension topology map to the centralized rule engine unit;

[0023] The centralized rule engine unit is used to take each of the nodes as the current node, and use the blockchain network extended topology map to generate a set of candidate logical neighbor nodes for each of the current nodes; wherein the set of candidate logical neighbor nodes includes multiple candidate logical neighbor nodes; the logical neighbor node refers to the node used by the current node in the blockchain network to propagate the block.

[0024] In one embodiment, the blockchain network uses the optimized blockchain network topology graph to perform message synchronization, including:

[0025] The cluster head node is used to perform message synchronization between the clusters; and the candidate neighbor node is used to perform message synchronization within the cluster.

[0026] In one embodiment, the blockchain network architecture

[0027] Also includes: data plane;

[0028] The data plane includes an SDN switch; wherein the SDN switch includes: a distributed rule unit; the distributed rule unit is used to determine the actual neighbor node of the current node from the candidate logical neighbor node set by using the score;

[0029] The blockchain network uses the optimized blockchain network topology graph to perform message synchronization, including:

[0030] The cluster head node is used to perform message synchronization between the clusters; and the actual neighbor node is used to perform message synchronization within the cluster.

[0031] In one embodiment, generating a bearer network topology diagram includes:

[0032] Acquire the second connection relationship and the blockchain bearer network information;

[0033] The bearer network topology map is constructed using the second connection relationship and the blockchain bearer network information.

[0034] In one embodiment, the step of generating a set of candidate logical neighbor nodes of each current node using the blockchain network extended topology graph includes:

[0035] Generate a recommended neighbor node set of each current node using the blockchain network extended topology graph; wherein the recommended neighbor node set includes a plurality of recommended neighbor nodes; the recommended neighbor node is a node in the same cluster node set whose strength of the third connection relationship with the current node is not less than a preset strength threshold; the same cluster node set includes all the nodes belonging to the same cluster as the current node; the strength of the third connection relationship is determined based on the first connection relationship and the second connection relationship;

[0036] The recommended neighbor node set is used as a candidate logical neighbor node set; or, the candidate logical neighbor node set of the current node is determined from the same cluster node set using the weights corresponding to the current node and the recommended neighbor nodes; wherein the weights are obtained based on the communication delay of the blockchain link between the current node and the recommended neighbor nodes and / or the network delay of the network link between the current node and the recommended neighbor nodes; the blockchain link refers to the logical path for communication between the nodes in the blockchain network; the network link refers to the physical connection path for communication between different network infrastructures corresponding to the nodes.

[0037] In one embodiment, the recommended neighbor node set also includes one or more recommended random nodes;

[0038] The recommended random node is the node that has the same / similar status level as the current node and does not belong to the same cluster as the current node.

[0039] In one embodiment, the scoring expression is:

[0040] S = α × G + θ × B;

[0041] Wherein, α and θ are the first scoring coefficient and the second scoring coefficient respectively; G is the block generation number, and B is the network bandwidth of the node.

[0042] In one embodiment, the blockchain system information also includes the online time of the node; the blockchain bearer network information also includes the CPU processing performance of the node and the memory of the node; wherein the scoring expression is:

[0043] S=α×G+β×U+φ×C+θ×B+λ×M;

[0044] α+β+φ+θ+λ=1;

[0045] Wherein, α and θ are respectively the first scoring coefficient and the second scoring coefficient; β, φ and λ are respectively the third scoring coefficient, the fourth scoring coefficient and the fifth scoring coefficient; U is the online time, C is the CPU processing performance, and M is the memory;

[0046] The G is the block generation number, and the B is the network bandwidth of the node.

[0047] In one embodiment, the determining of a set of candidate logical neighbor nodes of the current node from the set of nodes in the same cluster by using the weights corresponding to the current node and the recommended neighbor nodes includes:

[0048] If the number of neighbor nodes actually required by the current node is less than or equal to the number of the recommended neighbor nodes in the recommended neighbor node set, then selecting a plurality of the recommended neighbor nodes with the largest corresponding weights from the recommended neighbor node set as the candidate logical neighbor nodes;

[0049] If the number of neighbor nodes actually required by the current node is greater than the number of recommended neighbor nodes in the recommended neighbor node set, in addition to taking all the recommended neighbor nodes in the recommended neighbor node set as the candidate logical neighbor nodes, the remaining required candidate logical neighbor nodes are determined from the same cluster node set.

[0050] In one embodiment, the using the cluster head node to perform message synchronization between the clusters is performed before the using the actual neighboring node to perform message synchronization within the clusters;

[0051] The step of determining the actual neighbor node of the current node from the candidate logical neighbor node set by using the score includes:

[0052] Determining the state level of the candidate logical neighbor node using the score of the node;

[0053] Prioritizing the candidate logical neighbor nodes having the same status level as the current node as the actual neighbor nodes of the current node;

[0054] In one embodiment, determining whether to optimize the blockchain network topology graph according to the number of blocks and the average number includes:

[0055] Comparing the number of blocks with the average number to obtain a comparison result;

[0056] Among them, if the comparison result is that the number of blocks is greater than the average number, it is determined that the blockchain network topology needs to be optimized.

[0057] In one embodiment, the meso-layer controller is an SDN controller or a programmable high-performance switch.

[0058] The beneficial effects of this application are:

[0059] The blockchain network architecture of the present invention includes: an application plane and a control plane; the application plane includes a blockchain system; the control plane includes a meso-layer controller; wherein the meso-layer controller is used to obtain the number of blocks corresponding to the current epoch of the blockchain system and the average number of blocks corresponding to the historical epochs, and determine whether it is necessary to optimize the blockchain network topology according to the number of blocks and the average number; wherein the epoch represents the time from the completion of the generation of the previous block to the completion of the generation of the new block in the main chain of the blockchain system; the blockchain network topology is used to characterize the first connection relationship between the nodes in the blockchain system; the first connection relationship represents the logical connection relationship for message transmission between the nodes; the blockchain network architecture of the present invention can enhance the perception of the blockchain system, and then timely optimize the blockchain network topology, so that the blockchain network can timely use the optimized blockchain network topology for message synchronization. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 A schematic diagram of a module of a blockchain network architecture according to an embodiment;

[0061] Figure 2 A schematic diagram of an existing SDN network architecture;

[0062] Figure 3 A schematic diagram of a process of optimizing a blockchain network topology map to obtain an optimized blockchain network topology map according to an embodiment;

[0063] Figure 4 A schematic diagram of a blockchain network topology diagram of a blockchain system according to an embodiment;

[0064] Figure 5 A schematic diagram of a bearer network topology diagram of a blockchain system according to an embodiment;

[0065] Figure 6 A schematic diagram of a blockchain network expansion topology diagram according to an embodiment;

[0066] Figure 7 A schematic diagram of a module of a blockchain network architecture according to another embodiment;

[0067] Figure 8 A schematic diagram of candidate logical neighbor nodes of a current node in an embodiment;

[0068] Fig. 9 A schematic diagram of a module of a blockchain network architecture including a data plane according to an embodiment;

[0069] Fig.10 A specific schematic diagram of a blockchain network architecture including a data plane according to an embodiment;

[0070] Fig.11 A schematic diagram of reducing data redundancy by using a specific message synchronization rule according to an embodiment;

[0071] Fig.12 A schematic diagram of blocks corresponding to an epoch according to an embodiment. DETAILED DESCRIPTION

[0072] The present invention is further described in detail below by specific embodiments in conjunction with the accompanying drawings. Wherein similar elements in different embodiments adopt associated similar element numbers. In the following embodiments, many detailed descriptions are for making the present application better understood. However, those skilled in the art can easily recognize that some features can be omitted in different situations, or can be replaced by other elements, materials, methods. In some cases, some operations related to the present application are not shown or described in the specification, this is to avoid the core part of the present application being overwhelmed by too much description, and for those skilled in the art, it is not necessary to describe these related operations in detail, and they can fully understand the related operations according to the description in the specification and the general technical knowledge in the art.

[0073] In addition, the features, operations or characteristics described in the specification can be combined in any appropriate manner to form various implementations. At the same time, the steps or actions in the method description can also be interchanged or adjusted in a manner that is obvious to those skilled in the art. Therefore, the various sequences in the specification and the drawings are only for the purpose of clearly describing a certain embodiment and are not meant to be a required sequence, unless otherwise specified that a certain sequence must be followed.

[0074] The serial numbers assigned to the components herein, such as "first", "second", etc., are only used to distinguish the objects described and do not have any order or technical meaning. The "connection" and "coupling" mentioned in this application, unless otherwise specified, include direct and indirect connections (couplings).

[0075] The technical solution of the present application will be described in detail below in conjunction with embodiments.

[0076] Please refer to Figure 1 ,This application provides a blockchain network architecture, including: an application plane 100 and a control plane 200;

[0077] The application plane 100 includes a blockchain system 110;

[0078] The control plane 200 includes a meso-layer controller 210; wherein the meso-layer controller 210 is used to obtain the number of blocks corresponding to the current epoch of the blockchain system and the average number of blocks corresponding to the historical epoch, and determine whether it is necessary to optimize the blockchain network topology corresponding to the blockchain network according to the number of blocks and the average number; wherein the epoch represents the time from the main chain in the blockchain system completing the generation of the previous block to the completion of the generation of the new block; the blockchain network topology is used to characterize the first connection relationship between the nodes in the blockchain network. The first connection relationship represents the logical connection relationship for message transmission between the nodes. The blockchain network is the basic component of the blockchain system. The blockchain network refers to a distributed network composed of multiple nodes in the blockchain system, which are interconnected and jointly maintain and manage the data of the blockchain system.

[0079] In some embodiments, the historical era refers to a preset number of eras before the current era. The number of eras included in the historical era can be determined by those skilled in the art.

[0080] In some embodiments, if the graph engine unit 211 determines that the blockchain network topology graph needs to be optimized, the blockchain network topology graph is optimized to obtain an optimized blockchain network topology graph;

[0081] Among them, the blockchain network uses the optimized blockchain network topology diagram to synchronize messages.

[0082] It should be noted that the above-mentioned blockchain system can be one of various existing blockchain systems. Since the above-mentioned blockchain system belongs to common knowledge in the field, the specific composition of the above-mentioned blockchain system will not be described in detail here.

[0083] It should be noted that the above-mentioned blockchain system can adopt Intelligent EcoNetworking (IEN) as the system architecture framework.

[0084] Epoch represents an era, please refer to Fig.12 , X represents the first block in the blockchain, i.e., the genesis block, and A, B, C, D, E, F, G, H, I, J, and K all represent blocks; Fig.12The solid arrows in the middle represent the parent edge, and the dotted arrows represent the reference edge. Epochs are divided according to the pivot chain, or blocks on the main chain. Each block in the pivot chain corresponds to an Epoch, and the pivot block is the last block in each Epoch. The parent edge, reference edge, and pivot chain, or the main chain, together can split all blocks in DAG (a distributed ledger technology different from the mainstream blockchain that can upgrade synchronous accounting to asynchronous accounting) into Epochs. Each block in the pivot chain corresponds to an Epoch. In addition to the blocks on the pivot chain, each Epoch also contains the following blocks: 1) blocks that can be reached from the corresponding blocks in the pivot chain through a combination of parent edges and reference edges; and 2) blocks that are not included in the previous Epoch. Among them, "1) blocks that can be reached from the corresponding blocks in the pivot chain through a combination of parent edges and reference edges; and 2) blocks that are not included in the previous Epoch" here can be understood as blocks generated from the pivot chain, or the main chain, in the interval between the last two blocks. For example, please refer to Fig.12 , block J belongs to the epoch of block H, because block J can be reached from block H, but not from the previous pivot block E. Epoch can represent the time from the pivot link (main chain) in the tree graph blockchain to the completion of the generation of the previous block to the completion of the generation of the new block. The number of blocks corresponding to the epoch, that is, the number of blocks contained in each Epoch. For example, there are three blocks in the epoch corresponding to E, and there are four blocks in the epoch corresponding to H, that is, the number of blocks corresponding to the current epoch H increases. For another example, E and H are blocks on the main chain, but when block E is generated, blocks D and F are generated, and when block H is generated, blocks G, I, and J are generated. At this time, the number of blocks corresponding to the current epoch H increases. In short, Epoch is a time period (such as the time from the pivot link E block to the H block), which corresponds to a certain number of blocks, and three blocks G, J, and I are also generated during this period). If an Epoch is too large, it may be caused by the block in the Epoch being too large. A block that is too large is easily affected by various interferences and congestion in the network, resulting in an increase in packet loss rate. The number of blocks corresponding to the above epoch can be used as a blockchain system semaphore indicator. The blockchain system semaphore indicator is used to determine whether the blockchain network topology needs to be optimized.

[0085] In some embodiments, the fork rate can also be used as the blockchain system signal indicator. The fork rate refers to the fact that in the blockchain network, different blocks appear at different nodes at the same time, causing the blockchain to fork. The higher the fork rate, the greater the inconsistency in the blockchain network, which will also affect the security and stability of the blockchain.

[0086] In some embodiments, those skilled in the art can directly use existing technologies to complete “optimizing the blockchain network topology to obtain an optimized blockchain network topology” and “blockchain network using the optimized blockchain network topology to synchronize messages”. For example, clustering and other methods can be used to directly divide the blockchain network topology into multiple subnets. Different subnets can broadcast and verify transactions in parallel, thereby improving the parallelism of the network and accelerating the process of transaction confirmation and block generation. Through the above division, the paths between nodes in the subnet will be shorter, and data does not need to go through a longer transmission path, reducing the risk of data leakage, reducing transmission delays, and improving network efficiency. Among them, the above clustering can use the K-means algorithm, etc. The K-means algorithm is an iterative clustering analysis algorithm.

[0087] In some embodiments, determining whether to optimize the blockchain network topology diagram according to the number of blocks corresponding to the current epoch of the blockchain system and the average number of blocks corresponding to the historical epoch includes:

[0088] The number of blocks corresponding to the current epoch of the blockchain system is compared with the average number of blocks corresponding to the historical epoch to obtain a comparison result;

[0089] Among them, if the comparison result is that the number of the above blocks is greater than the above average number, it is determined that the blockchain network topology needs to be optimized.

[0090] In some embodiments, the meso-layer controller 210 is an SDN (Software Defined Network) controller or a programmable high-performance switch. A programmable high-performance switch is a network device used for forwarding electrical (optical) signals. It can provide an exclusive electrical signal path for any two network nodes connected to the switch. The most common switch is an Ethernet switch. Other common programmable high-performance switches include telephone voice switches, fiber optic switches, etc.

[0091] In order to solve the problem that the traditional network architecture has weak support for the blockchain system, the network architecture needs to have the ability to tune the blockchain network topology and adjust the blockchain synchronization speed. It can be seen that in some embodiments, the blockchain network architecture provided by the present application can enhance the perception of the blockchain system, and then effectively obtain the synchronization requirements of the upper blockchain system, so that the blockchain network can timely use the optimized blockchain network topology map for message synchronization (for example, manage data transmission and resource allocation in the blockchain network, etc.), and reduce the problems caused by the limited synchronization speed of the blockchain system. Among them, the network topology of the blockchain system (such as the blockchain network topology map) determines the transmission path and range of the data, as well as the efficiency and reliability of data transmission. Adjusting the network topology, that is, using the optimized blockchain network topology map, can optimize the propagation path, efficiency and reliability of data synchronization, thereby improving the synchronization speed.

[0092] The traditional IP network architecture is designed to transmit data packets globally, and is as universal as possible. It adopts a decentralized management and control method, and each network device independently makes routing decisions and traffic control. Network devices simultaneously assume the functions of the control plane and the data plane, resulting in complex network management and serious bandwidth waste. Network administrators can only see local network topology and performance data, and cannot fully understand the status of the entire network. They lack macro-control capabilities and have limitations in node selection and routing optimization during data transmission. In addition, due to the weak support capabilities of the traditional IP network architecture for blockchain systems, for example, the demand perception capabilities of blockchain systems are weak, and the traditional SDN network architecture does not make specific optimizations for blockchain synchronization tasks, and the consensus efficiency of blockchain is affected by the synchronization speed of the entire network. When the network scale of the blockchain system becomes larger, the efficiency of the entire network synchronization task of the blockchain network faces huge performance challenges.

[0093] Software Defined Networking (SDN) is a network architecture and management method that achieves network flexibility, programmability, and centralized management by separating the control plane and the data forwarding plane. SDN centralizes the network control logic into a centralized entity, namely, the SDN controller, making network devices programmable data forwarding devices. The SDN controller exchanges control information with network devices through control channels, guides the forwarding behavior of data packets, and performs traffic scheduling and path management.

[0094] Programmable network devices process and forward data packets according to the instructions of the above SDN controller. Figure 2 , Figure 2The figure shows the existing SDN network architecture; the application end can be an application end such as a video website or an email application, terminal A and terminal B are access devices, and ordinary switches and SDN switches are used as network routing nodes. The existing SDN network architecture can dynamically adjust the network configuration and routing path according to the needs through the programmability of the central controller, optimize traffic distribution, improve resource utilization, and flexibly adapt to different needs; through the centralized control plane, it provides a comprehensive real-time map of the entire network, which can more accurately identify and solve problems. Compared with the traditional IP network architecture, the above SDN network architecture makes up for the lack of flexibility of the traditional network, provides better network visualization and management capabilities, and improves network resource utilization and load balancing.

[0095] In a blockchain network, each node that sends a transaction or creates a new block needs to notify other nodes in the entire network to ensure that all nodes maintain the same state. In the process of large-scale network synchronization, the entire network processes transactions and block data from all nodes, and the nodes may be transmitted over a long path, resulting in network congestion, extended transaction confirmation time, and performance degradation. A large-scale network (such as the network represented by the above blockchain network topology diagram) is divided into multiple subnets, and different subnets can broadcast and verify transactions in parallel, which improves the parallelism of the network and accelerates the process of transaction confirmation and block generation; through the above division, the path of each node in the subnet will be shorter, and the data does not need to pass through a long transmission path, which reduces the risk of data leakage, reduces transmission delays, and improves network efficiency. However, the existing methods for dividing subnets are all divided in the blockchain network, that is, only using the blockchain system information for division, but not using the blockchain bearer network information mentioned in this application on the basis of the blockchain system information for division, that is, the state of the blockchain system's bearer network is not obtained, and thus it cannot be ensured that the blockchain subnet is reasonably divided. For example, when only using blockchain system information for partitioning or only partitioning in the blockchain system, there may be a node with poor network conditions, but it plays an important role in the new network topology. Such a node will cause network congestion and network delay, which will lead to an increase in the latency of the entire network.

[0096] The distributed network architecture can automatically balance the workload of each subnet, ensuring that no single subnet is overloaded, and improving the scalability of the system. The distributed architecture also improves the stability and availability of the system. When a node fails, the system can continue to run, reducing the risk of system interruption and enhancing the availability of the system. By adding new controller nodes, the system capacity can be increased to meet the growing network needs. However, in data synchronization, the blockchain needs to meet special synchronization requirements such as all nodes maintaining consistent states through consensus, data in the blockchain cannot be changed, and the state of the blockchain node can change at any time. The SDN controller mainly manages network traffic and is responsible for formulating global network policies, routing decisions and configuration management. The SDN controller cannot meet the special synchronization requirements of the blockchain and process nodes with changing states. The simple introduction of SDN centralized control brings the disadvantages of long control cycle and slow response. More fine-grained coordinated control is needed to bring fast, comprehensive and intelligent characteristics to the architecture and lay the foundation for intelligent adaptation.

[0097] For example, in the research field of network resource scheduling, there are two related research results worthy of attention.

[0098] First, the Chinese patent document "A multi-objective hierarchical data center flow control method" performs priority scheduling of data flows of different sizes. Through reasonable bandwidth allocation and adjustment of data transmission rate, it aims to improve the transmission data task time of multiple flows, thereby optimizing the overall performance of the data center network.

[0099] Secondly, the Chinese patent document "A coordinated distributed in-network resource scheduling method, system and storage medium" with publication number CN112153153B designs a coordinated distributed in-network resource scheduling architecture for computing power networks, including two scheduling layers. The upper-level controller can periodically affect the scheduling decisions of the lower-level control units to optimize the scheduling performance of the entire network. The lower-level control unit periodically reports the comprehensive status evaluation information and network status information of the node, receives the adjustment message of the comprehensive status evaluation of the node from the upper-level controller, and makes rapid forwarding decisions on specific computing power requirements. It combines the global optimal control advantages of the centralized scheduling architecture with the flexibility advantages of the distributed scheduling architecture to overcome their respective problems of high feedback delay, poor security performance and local optimization.

[0100] The above research results provide innovative scheduling strategies and algorithms to improve the performance and efficiency of resource scheduling and data transmission in data centers and computing networks. However, these network architectures have limitations in supporting blockchain network data synchronization. Blockchain synchronization tasks require large-scale node synchronization across the entire network to be efficient, low-latency, secure, and scalable. In other words, the blockchain system requires all nodes to maintain a consistent state through consensus, and to meet requirements such as efficiency, low latency, and scalability during the synchronization process: the node synchronization process needs to be completed in a short time, so efficiency is required; the synchronization delay refers to the time required for all nodes to reach a consistent state, which is affected by the last node to receive the message, so low latency is required; as the number of users increases, the transaction volume is also increasing, and hundreds or thousands of nodes may need to be processed during the synchronization process, so scalability is required.

[0101] In summary, the current blockchain network architecture (such as the existing SDN network architecture mentioned above) cannot meet the synchronization requirements of the blockchain system. Therefore, the network architecture that supports blockchain network data synchronization needs further in-depth research and innovation.

[0102] Existing methods or network architectures for improving the synchronization speed of blockchains are all performed in the blockchain system, such as changing the network topology through clustering methods to improve the synchronization speed. Although they can improve the synchronization speed of blockchains by changing the network topology through clustering, clustering is only performed at the network layer of the blockchain system, and the status information of the blockchain system's carrying network cannot be obtained, and network resources cannot be fully utilized.

[0103] Since the blockchain bearer network plays an important role in the full network synchronization of the blockchain system, this application focuses on the blockchain bearer network. This application is different from the data center network and computing power network in terms of architecture tasks.

[0104] For some examples, please refer to Figure 3 , the blockchain network topology diagram is optimized to obtain an optimized blockchain network topology diagram, including:

[0105] Step S100: Obtain a blockchain network topology map and generate a bearer network topology map;

[0106] The blockchain network topology diagram is used to characterize the first connection relationship between nodes in the blockchain network; the bearer network topology diagram is used to characterize the second connection relationship between nodes in the blockchain bearer network; the blockchain bearer network is a network composed of network infrastructure supporting the blockchain system; the second connection relationship represents the physical connection relationship between the network infrastructure corresponding to the nodes;

[0107] Step S200: Optimize the blockchain network topology map using the bearer network topology map to obtain a blockchain network extension topology map, and use the blockchain network extension topology map as the optimized blockchain network topology map; wherein the blockchain network extension topology map is used to characterize the third connection relationship between the nodes in the blockchain system; the third connection relationship includes the above-mentioned logical connection relationship and the above-mentioned physical connection relationship. In some embodiments, the optimized blockchain network topology map obtained by optimizing the blockchain network topology map also includes:

[0108] Step S300: clustering all nodes in the blockchain network extension topology diagram to obtain multiple clusters; determining the cluster head node of the cluster from the nodes in the cluster whose scores are higher than a preset threshold; wherein the score is obtained by evaluating the blockchain system information and blockchain bearer network information of the node; the blockchain system information includes: the block generation number of the node; the blockchain bearer network information includes the network bandwidth of the node; wherein the block generation number is the number of blocks generated by the node;

[0109] Step S400: taking each node as the current node respectively; generating a set of candidate logical neighbor nodes of each current node using the blockchain network extended topology graph; the set of candidate logical neighbor nodes includes multiple candidate logical neighbor nodes; the logical neighbor node refers to the node used by the current node in the blockchain network to propagate blocks.

[0110] It should be noted that in the above step S200, the third connection relationship includes both the above logical connection relationship between nodes and the physical connection relationship of the above network infrastructure. In other words, the third connection relationship more specifically refers to the potential logical connection relationship between nodes. The present application hopes that the nodes with the above physical connection relationship can also establish the above logical connection relationship and then transmit messages.

[0111] In some embodiments, in the above step S100, obtaining the blockchain network topology map includes: collecting the first connection relationship and blockchain system information of all nodes of the blockchain network; and constructing the blockchain network topology map using the first connection relationship and blockchain system information.

[0112] In some embodiments, in the above step S100, a node deployed in the SDN controller may collect the first connection relationship and blockchain system information of all nodes in the blockchain system; or, all nodes of the blockchain network may actively submit the first connection relationship and blockchain system information of each node to the SDN controller.

[0113] In some embodiments, in the above step S100, the SDN controller can use the first connection relationship and the blockchain system information to construct a blockchain network topology map.

[0114] In some embodiments, the information collected by the node (such as the first connection relationship and blockchain system information) can be sent to the SDN controller by calling the RESTful API (RESTful API is an architectural style of an application program interface (API) that uses HTTP requests to access or use data), and the SDN controller reconstructs the topology map based on the relevant information to obtain the blockchain network topology map. Alternatively, each node can send a request to the SDN controller through the Http protocol (a transmission protocol for transmitting hypertext from a server to a local browser), and each node actively submits other nodes to which it is connected, and finally the SDN controller constructs the topology map to obtain the blockchain network topology map.

[0115] Among them, the SDN controller is an application in software-defined networking (SDN) that is responsible for traffic control to ensure an intelligent network. The SDN controller is based on protocols such as OpenFlow (a network communication protocol) that allow servers to tell switches where to send data packets.

[0116] In some embodiments, in the above step S100, other existing technologies can also be directly used to directly obtain the blockchain network topology map. The specific method of obtaining the blockchain network topology map is not limited here.

[0117] For some examples, please refer to Figure 4 , Figure 4 What is shown is the blockchain network topology diagram of the blockchain network; among them, A 链 , B 链 , C 链 , D 链 、E 链 、F 链 , G 链 , H 链 and I 链 Represents a node in the blockchain network. A solid or dotted line in the blockchain network topology diagram (such as I 链 and D 链 The solid line between 链 and B 链 The dotted line between 链 and C 链 The dotted line between ) indicates that there is a first connection relationship between the corresponding node pairs.

[0118] In some embodiments, in step S100, generating a bearer network topology diagram includes:

[0119] Step S110: Obtain the second connection relationship and blockchain bearer network information;

[0120] Step S120: Construct a bearer network topology map using the second connection relationship and the blockchain bearer network information.

[0121] In some embodiments, in the above step S110, the second connection relationship and blockchain bearer network information can be obtained through the SDN controller; the SDN controller then uses the second connection relationship and blockchain bearer network information to build a bearer network topology map. For example, the SDN controller can use the LLDP protocol, i.e., Link Layer Discovery Protocol, a data link layer protocol, to discover devices or nodes in the bearer network and the second connection relationship and blockchain bearer network information between them, and then build a bearer network topology map based on the second connection relationship and blockchain bearer network information.

[0122] It should be noted that in the above step S120, in the case of the second connection relationship between each node and the blockchain bearer network information (such as only including the network delay between the node pairs with the second connection relationship), those skilled in the art can refer to the specific process of “SDN controller using the first connection relationship and blockchain network information to construct a blockchain network topology map” to construct the bearer network topology map, so the specific process of constructing the bearer network topology map will not be repeated here.

[0123] For some examples, please refer to Figure 5 , Figure 5 The figure shows the topology of the bearer network of the blockchain system; 网 , B 网 , C 网 , D 网 、E 网 、F 网 , G 网 , H 网 and I 网 They are the symbols for nodes in the blockchain system in the blockchain bearer network; the switches (such as SDN switches) in the bearer network topology diagram are network devices that support the OpenFlow protocol; the solid lines (such as I 网 and C 网 The solid line between them) indicates the corresponding node pair (such as I 网 and C 网 )There is a second connection relationship between the two. The network infrastructure in the blockchain bearer network includes the above-mentioned SDN switch.

[0124] It should be noted that in the above step S200, the third connection relationship includes both the above logical connection relationship between nodes and the physical connection relationship of the above network infrastructure. In other words, the third connection relationship more specifically refers to the potential logical connection relationship between nodes. The present application hopes that the nodes with the above physical connection relationship can also establish the above logical connection relationship and then transmit messages.

[0125] In the above step S200, the essence of "optimizing the blockchain network topology map using the bearer network topology map to obtain the blockchain network extension topology map" is to superimpose the state of each node in the bearer network topology map (such as the second connection relationship) onto the blockchain network topology map. The blockchain network topology map is an undirected authorized graph.

[0126] Due to the current variety of blockchain scale operation network environments, a multi-channel parallel architecture with strong compatibility for heterogeneous networks is an inevitable development of the underlying network architecture, thereby overcoming the limitations of the traditional network's single service and single operation mode. Therefore, in some embodiments, each node in the blockchain system can be deployed through Docker containerization, and based on Docker's flexible network architecture and diverse network drivers, it can select the appropriate network interface according to different needs to meet the variety of blockchain operation network environments. Among them, Docker containerization deployment is a method of running applications on a server. It provides multiple virtual servers on a physical server through container technology. These virtual servers share the kernel and file system of the Linux (a free to use and freely disseminated operating system) operating system, thereby improving resource utilization.

[0127] For some examples, please refer to Figure 4 , Figure 5 and Figure 6 In step S200, the blockchain network topology map is optimized using the bearer network topology map to obtain a blockchain network extension topology map, including:

[0128] Step S210: Use the IP address of the node (IP address is a unified address format provided by the IP protocol, which assigns a logical address to each network and each host on the Internet to shield the difference in physical addresses) to match the nodes in the blockchain network topology map with the nodes of the network topology map (please refer to Figure 4 and Figure 5 , such as node I 链 and node D 链 Respectively with node I 网 and node D 网 One-to-one correspondence);

[0129] Step S220: If two nodes have a first connection relationship in the blockchain network topology diagram but do not have a second connection relationship in the bearer network topology diagram, the first connection relationship between the two nodes is used as the third connection relationship between the two nodes in the blockchain network extension topology diagram;

[0130] If two nodes do not have a first connection relationship in the blockchain network topology diagram but have a second connection relationship in the bearer network topology diagram, the second connection relationship between the two nodes is used as the third connection relationship between the two nodes in the blockchain network extension topology diagram;

[0131] If two nodes have a first connection relationship in the blockchain network topology diagram and a second connection relationship in the bearer network topology diagram, the first connection relationship or the second connection relationship between the two nodes shall be used as the third connection relationship between the two nodes in the blockchain network extension topology diagram.

[0132] In some embodiments, the first connection relationship, the second connection relationship and the third connection relationship may be represented by solid lines, dotted lines, etc. according to actual needs. The existence of the first connection relationship, the second connection relationship or the third connection relationship between two nodes indicates that there is a connection between the two nodes.

[0133] It should be noted that the specific process of the above step S210 belongs to common knowledge or conventional means in the art, so it will not be described in detail here.

[0134] In some embodiments, the number of nodes in the blockchain network extension topology diagram is the same as the number of nodes in the blockchain network topology diagram. In other words, the nodes in the blockchain network extension topology diagram correspond one-to-one to the nodes in the blockchain network topology diagram.

[0135] For some examples, please refer to Figure 7 , the meso-layer controller 210 further includes: a graph engine unit 211 and a centralized rule engine unit 212;

[0136] The graph engine unit 211 is further used to cluster the blockchain network extension topology graph to obtain multiple clusters and the clustered blockchain network extension topology graph; wherein each cluster includes a number of nodes; obtain the blockchain system information and blockchain bearer network information of the node; wherein the blockchain system information includes: the block generation number of the node; the blockchain bearer network information includes the network bandwidth of the node; wherein the block generation number is the number of blocks generated by the node; evaluate the blockchain system information and blockchain bearer network information of the node to obtain the node score; determine the cluster head node of the cluster from the nodes in the cluster whose scores are higher than a preset threshold; send the clustered blockchain network extension topology graph to the centralized rule engine unit 212;

[0137] The centralized rule engine unit 212 is used to use each node as the current node, and use the blockchain network extended topology map to generate a candidate logical neighbor node set of each current node; wherein the candidate logical neighbor node set includes multiple candidate logical neighbor nodes. The logical neighbor node refers to the node used by the current node in the blockchain network to propagate the block.

[0138] The purpose of "clustering the blockchain network extension topology graph" is: due to the large number of nodes in the blockchain network, the above clustering, i.e. clustering, is to cluster adjacent nodes into clusters, so that nodes in the same cluster can communicate directly more easily (because the closer the adjacent nodes are, the faster the message propagation speed between the adjacent nodes will be), thereby reducing the amount of data transmission in the entire blockchain system network and improving network efficiency. "Clustering all nodes in the blockchain network extension topology graph to obtain multiple clusters" can be regarded as dividing the blockchain network extension topology graph into multiple network extension topology subgraphs, so that multiple clusters can synchronize messages in parallel, etc., and the distance between each node in the cluster is shorter, so that the synchronization information can be obtained faster, reducing the synchronization delay of the blockchain. Among them, the above clusters are obtained by clustering using a clustering algorithm.

[0139] It should be noted that the process of "clustering all nodes in the blockchain network extension topology diagram to obtain multiple clusters" in step S300 above only utilizes the existing clustering algorithm. The clustering algorithm is used on the basis of the blockchain network extension topology diagram, and the blockchain network extension topology diagram has combined the blockchain system information and the bearer network information. The purpose of "determining the cluster head node of the cluster" above is for communication between different clusters.

[0140] In some embodiments, the cluster head node manages the nodes in the cluster. The purpose of "clustering all nodes in the blockchain network extension topology map to obtain multiple clusters" in the above step S300 is: due to the large number of nodes in the blockchain network, the above clustering (i.e. clustering) is to cluster adjacent nodes into clusters, so that nodes in the same cluster are easier to communicate directly (because the closer the adjacent nodes are, the faster the message propagation speed between the adjacent nodes will be), thereby reducing the amount of data transmission in the entire blockchain system network and improving network efficiency. "Clustering all nodes in the blockchain network extension topology map to obtain multiple clusters" can be regarded as dividing the blockchain network extension topology map into multiple network extension topology subgraphs, so that multiple clusters synchronize messages in parallel, etc., and the distance between each node in the cluster is shorter, so that synchronization information is obtained faster, reducing the synchronization delay of the blockchain. Among them, the above clusters are obtained by clustering using a clustering algorithm.

[0141] It should be noted that the process of "clustering all nodes in the blockchain network extension topology diagram to obtain multiple clusters" in the above step S300 only uses the existing clustering algorithm. The clustering algorithm is used on the basis of the blockchain network extension topology diagram, and the blockchain network extension topology diagram has combined the blockchain system information and the bearer network information. The purpose of "determining the cluster head node of the cluster" in the above step S300 is for communication between different clusters.

[0142] In some embodiments, the cluster head node can manage the nodes in the cluster. In some embodiments, the "clustering all nodes in the blockchain network extension topology diagram to obtain multiple clusters" in the above step S300 can use existing clustering / clustering algorithms (such as K-means algorithm, etc.). The above clustering (i.e. clustering) is to gather nodes with similar distances in the blockchain network extension topology diagram together. Nodes in the same cluster as the current node are in-cluster nodes; nodes in different clusters from the current node are out-of-cluster nodes.

[0143] In some embodiments, in the above step S300, those skilled in the art may determine the preset threshold in "determining the cluster head node of the cluster from the nodes in the cluster with scores higher than the preset threshold" according to actual needs. For example, the preset threshold may be 95% of the highest score in the cluster.

[0144] In some embodiments, in the above step S300, the node with the highest score in the cluster can be determined as the cluster head node of each cluster. It should be noted that those skilled in the art can determine the cluster head node of each cluster by themselves according to actual needs (such as randomly selecting one from several nodes with the highest score in the cluster, etc.), and the specific method of "determining the cluster head node of the cluster" is not limited here.

[0145] In some embodiments, in the above step S300, the score can be obtained by evaluating the blockchain system information and the blockchain bearer network information through an existing node status evaluation algorithm (such as a weighted sum method after simple normalization).

[0146] In some embodiments, when the number of blocks corresponding to the current epoch of the blockchain system is equal to the average number of blocks corresponding to the historical epochs, the blockchain network extended topology diagram is used to generate a set of candidate logical neighbor nodes for each current node. The above historical epoch refers to a preset number of epochs before the current epoch. Those skilled in the art can determine the number of epochs included in the above historical epochs.

[0147] In some embodiments, the above-mentioned “clustering the blockchain network extension topology graph” can adopt existing clustering / clustering algorithms (such as K-means algorithm, etc.). The above-mentioned clustering, i.e. clustering, is to cluster nodes with similar distances in the blockchain network extension topology graph. Nodes in the same cluster as the current node are in-cluster nodes; nodes in different clusters from the current node are out-cluster nodes. K-means algorithm is an iterative clustering analysis algorithm.

[0148] In some embodiments, those skilled in the art may determine the preset threshold in “determining the cluster head node of a cluster from nodes in the cluster with scores higher than the preset threshold” according to actual needs. For example, the preset threshold may be 95% of the highest score in the cluster.

[0149] In some embodiments, the node with the highest score in the cluster may be determined as the cluster head node of each cluster.

[0150] It should be noted that those skilled in the art can determine the cluster head node of each cluster according to actual needs (such as randomly selecting one from several nodes with the highest scores in the cluster, etc.), and the specific method of "determining the cluster head node of the cluster" is not limited here.

[0151] In some embodiments, the above-mentioned score can be obtained by evaluating the blockchain system information and the blockchain-bearing network information through an existing node status evaluation algorithm (such as a weighted sum method after simple normalization).

[0152] In some embodiments, the blockchain system information of the node can be obtained through the application plane 100, that is, the meso-level. The blockchain bearer network information of the node can be obtained through the data plane, that is, the micro-level. In some embodiments, in the above step S400, when the number of blocks corresponding to the current epoch of the monitored blockchain system changes (for example, becomes larger), the blockchain network extension topology map is used to generate a set of candidate logical neighbor nodes for each current node.

[0153] In some embodiments, in the above step S400, the set of candidate logical neighbor nodes of each current node is generated using the blockchain network extension topology graph, including:

[0154] Step S410: Generate a recommended neighbor node set of each current node using the blockchain network extension topology graph; wherein the recommended neighbor node set includes a plurality of recommended neighbor nodes; the recommended neighbor node is a node in the same cluster node set whose third connection strength with the current node is not less than a preset strength threshold; the same cluster node set includes all nodes belonging to the same cluster as the current node; the strength of the third connection relationship is determined based on the first connection relationship and the second connection relationship;

[0155] Step S420: taking the recommended neighbor node set as a candidate logical neighbor node set;

[0156] Alternatively, the set of candidate logical neighbor nodes of the current node is determined from the set of nodes in the same cluster using the weights corresponding to the current node and the recommended neighbor nodes; wherein the weights are obtained based on the communication delay of the blockchain link between the current node and the recommended neighbor nodes and / or the network delay of the network link between the current node and the recommended neighbor nodes; the blockchain link refers to the logical path for communication between nodes in the blockchain network; the network link refers to the physical connection path for communication between different network infrastructures corresponding to each node.

[0157] In some embodiments, when the number of blocks corresponding to the current epoch of the blockchain system obtained by monitoring changes (for example, becomes larger), a set of candidate logical neighbor nodes of each current node is generated using the blockchain network extended topology graph.

[0158] In some embodiments, in the above step S410, the SDN controller may periodically recommend neighbor nodes of each node at the meso-level, i.e., the control plane, i.e., generate a set of recommended neighbor nodes for each current node. For example, in selecting the recommended neighbor nodes, nodes with a high or medium strength of the third connection relationship with the current node may be preferentially recommended based on the connection relationship between the nodes.

[0159] In some embodiments, in the above step S410, when the recommended neighbor node set includes recommended random nodes, the SDN controller can recommend nodes with the same or similar status level as each current node in other clusters of the current node based on the node score, and use them as recommended random nodes in the recommended neighbor node set.

[0160] It should be noted that "periodic recommendation" here means that the recommendation is made only when the number of blocks corresponding to the above epoch becomes larger, that is, meso-level recommendation. The "other clusters" here refer to nodes that are not in the same cluster as the current node.

[0161] In some embodiments, in the above step S410, those skilled in the art may determine the preset intensity threshold according to actual needs. For example, the preset intensity threshold may be the above medium intensity.

[0162] In some embodiments, candidate logical neighbor nodes for each node in the blockchain network can be provided directly by "using the recommended neighbor node set as a candidate logical neighbor node set" in the above step S420.

[0163] In some embodiments, the candidate logical neighbor nodes can be determined by coordinating the meso-level with the micro-level, i.e., "using the weights corresponding to the current node and the recommended neighbor nodes to determine the candidate logical neighbor node set of the current node from the same cluster node set" in step S420. The SDN controller can perform periodic neighbor node recommendations at the meso-level, i.e., the process of determining the recommended neighbor node set, and then each blockchain node performs real-time micro self-selection to determine the candidate logical neighbor node set of the current node from the same cluster node set, and then the current node establishes a connection with the candidate logical neighbor node in the candidate logical neighbor node set. By combining the meso-level with the micro-level, candidate logical neighbor nodes are provided for each node in the blockchain network, and global efficient broadcast is achieved through local optimization, thereby improving the overall performance of the network.

[0164] In some embodiments, the candidate logical neighbor node may be directly used as the actual neighbor node, that is, the current node may directly use the candidate logical neighbor node to propagate messages / transmit blocks.

[0165] In some embodiments, each node may perform real-time micro self-selection of its own neighbor nodes after each round of block broadcasting, that is, the process of determining the candidate logical neighbor node set of the current node in step S420.

[0166] In some embodiments, in step S410, the recommended neighbor node set also includes one or more recommended random nodes;

[0167] The recommended random node is a node that has the same / similar status level as the current node and does not belong to the same cluster as the current node.

[0168] In some embodiments, the number of recommended random nodes in the recommended neighbor node set is less than the number of recommended neighbor nodes. For example, in the recommended neighbor node set, the ratio of the number of recommended random nodes to the number of recommended neighbor nodes may be 1:3.

[0169] It should be noted that if only the neighbor node selection strategy is adopted, that is, the recommended neighbor node set only includes recommended neighbor nodes, the neighbor nodes of each node can be easily predicted by malicious nodes, resulting in Eclipse attacks. Therefore, in some of the above embodiments, a random plus neighbor node selection strategy is adopted, that is, the recommended neighbor node set includes recommended neighbor nodes and recommended random nodes. In addition to the recommended neighbor nodes, the neighbor nodes of each node also include a part of nodes from outside the cluster, that is, recommended random nodes, thereby ensuring the security of the blockchain system.

[0170] It should be noted that the reason for "recommending nodes with the same or similar status level as each current node in other clusters of the current node" is that the newly generated blocks of the nodes of the blockchain system need to be quickly synchronized to most nodes in the entire network. If the recommended random node of the node is a node with a poor status level, then the synchronization message of the node to the node with a poor status level will cause a long delay; and the technical idea of ​​the present application is to make the local optimality of the current node, that is, to determine the neighboring node actually selected by the current node, so as to make the global optimality of the synchronization message. Therefore, in other clusters of the current node, nodes with a score or status level lower than the current node cannot be used as the recommended random nodes of the current node. And nodes with a score or status level higher than the current node cannot be used as the recommended random nodes of the current node. Among them, the reason for "nodes with a score or status level higher than the current node cannot be used as the recommended random nodes of the current node" is that if a node with a score or status level higher than the current node is used as the recommended random node of the current node, data redundancy will be generated when the current node broadcasts / synchronizes messages through the node with a score or status level higher than the current node. In addition, if a node with a higher score or status level than the current node is used as a recommended random node for the current node, it will conflict with the message synchronization rules specified below (such as nodes with a low score or status level cannot forward to nodes with a high score or status level). Therefore, a node with a higher score or status level than the current node cannot be used as a recommended random node for the current node.

[0171] In some embodiments, in the above step S410, if two nodes have a first connection relationship in the blockchain network topology diagram but do not have a second connection relationship in the bearer network topology diagram, the two nodes (for example, reference Figure 4 and Figure 5 Node I and node D in, node I 链 and node D 链 There is a first connection relationship between nodes I 网 and node D 网 The strength of the third connection relationship between the two nodes is low; if the two nodes do not have a first connection relationship in the blockchain network topology diagram but have a second connection relationship in the bearer network topology diagram, the two nodes (such as reference Figure 4 and Figure 5 Node I and Node C in the 链 and node C 链 There is no first connection relationship between them, and node I 网 and node C 网 The strength of the third connection relationship between two nodes is medium; if two nodes have a first connection relationship in the blockchain network topology diagram and a second connection relationship in the bearer network topology diagram, the two nodes (please refer to Figure 4 and Figure 5 , such as the node pair of node I and node B, and the node pair of node I and node C) has a high strength of the third connection relationship.

[0172] In some embodiments, in the above step S420, if two nodes have a first connection relationship in the blockchain network topology graph but do not have a second connection relationship in the bearer network topology graph, the expression of the weights corresponding to the two nodes is:

[0173] ;

[0174] Wherein, A is the communication delay of the blockchain link between the two nodes; a is the first weight coefficient;

[0175] If two nodes do not have the first connection relationship in the blockchain network topology diagram but have the second connection relationship in the bearer network topology diagram, the expression of the weights corresponding to the two nodes is:

[0176] ;

[0177] Wherein, B is the network delay of the network link between the two nodes; b is the second weight coefficient;

[0178] If two nodes have a first connection relationship in the blockchain network topology graph and a second connection relationship in the bearer network topology graph, the expression of the weights corresponding to the two nodes is:

[0179] ;

[0180] Among them, C is the average value of the communication delay of the blockchain link and the network delay of the network link between the two nodes, that is, C=(A+B) / 2; c is the third weight coefficient.

[0181] It should be noted that the communication delay of the above blockchain link refers to the total time delay experienced by data in the blockchain network during transmission from the sender to the receiver. The communication delay of the above blockchain link includes the transmission delay in the network and the processing delay of the data at the sending and receiving ends. The network delay of the above network link is a component of the communication delay of the blockchain link, which refers to the time delay experienced when data is transmitted in a computer network.

[0182] In some embodiments, the distance between two nodes having a first connection relationship in the blockchain network topology graph is proportional to the communication delay of the blockchain link between the two nodes.

[0183] In some embodiments, the distance between two nodes having a second connection relationship in the bearer network topology graph is proportional to the network delay of the network link between the two nodes.

[0184] In some embodiments, in the above step S420, technical personnel in this field can determine the specific values ​​of the first weight coefficient a, the second weight coefficient b and the third weight coefficient c according to actual needs. For example, the first weight coefficient a can be 1, the second weight coefficient b can be 0.1, and the third weight coefficient c can be 0.01.

[0185] For some examples, please refer to Figure 4 , A in the blockchain network expansion topology diagram 融 , B 融 , C 融 , D 融 、E 融 、F 融 , G 融 , H 融 and I 融 are the symbols representing the nodes in the blockchain network in the blockchain network extension topology diagram; 融 Respectively with A 链 and A 网 One-to-one correspondence, I 融 Respectively with I 链 and I 网 One to one correspondence, and so on.

[0186] In some embodiments, in the above step S420, determining a set of candidate logical neighbor nodes of the current node from a set of nodes in the same cluster using weights corresponding to the current node and the recommended neighbor nodes includes:

[0187] Step S421: if the number of neighbor nodes actually required by the current node is less than or equal to the number of recommended neighbor nodes in the recommended neighbor node set, then select a plurality of recommended neighbor nodes with the largest corresponding weights from the recommended neighbor node set as candidate logical neighbor nodes;

[0188] If the number of neighbor nodes actually required by the current node is greater than the number of recommended neighbor nodes in the recommended neighbor node set, in addition to taking all recommended neighbor nodes in the recommended neighbor node set as candidate logical neighbor nodes, the remaining required candidate logical neighbor nodes are determined from the same cluster node set.

[0189] It should be noted that the determination of the above-mentioned "number of neighbor nodes actually required by the current node" belongs to the prior art in this field. For example, the "number of neighbor nodes actually required by the current node" can be obtained through the conclusion of the existing paper "A Theoretical Model for Block Propagation Analysis in Bitcoin Network", which points out that the optimal number of neighbor nodes actually required by the current node is 32, and this conclusion is obtained through simulation experiments on a simulation platform. In some embodiments, the "number of neighbor nodes actually required by the current node" can also be a number preset by people in this field, such as 8.

[0190] For some examples, please refer to Figure 8 , nodes B, C and D are nodes of the same status level as the current node A, and are in different clusters from the current node A. Nodes E, F, G and H are nodes with high strength of the third connection relationship with the current node A, nodes a, b, c and d are nodes with medium strength of the third connection relationship with the current node A, and the remaining other nodes (such as i) are nodes with low strength of the third connection relationship with the current node A. In the selection of recommended neighbor nodes, the SDN controller recommends the above eight nodes E, F, G, H, a, b, c and d to the current node A, that is, these eight nodes are used as recommended neighbor nodes. If the number of neighbor nodes required by the current node A (e.g., 6 neighbor nodes are required) is less than 8, then the 6 recommended neighbor nodes with the largest corresponding weights are selected from the recommended neighbor node set as candidate logical neighbor nodes; if the number of neighbor nodes required by the current node A (e.g., 10 neighbor nodes are required) is greater than 8, then in addition to using all the recommended neighbor nodes in the recommended neighbor node set as candidate logical neighbor nodes, the remaining 2 candidate logical neighbor nodes can be determined from the same cluster node set according to the existing method of establishing connections with other nodes in the blockchain system. Among them, the existing method of establishing connections with other nodes is: when a node (such as the current node) establishes a connection with an adjacent node, it will ask the adjacent node for a list of IP addresses of nodes known to the adjacent node. When the current node obtains the above IP address list, the current node can actively establish connections with these nodes known to the adjacent node.

[0191] In some embodiments, in the above step S420, when the recommended neighbor node set also includes recommended random nodes, each node randomly selects a corresponding number of recommended random nodes from the recommended neighbor node set (for example, when the ratio of the number of recommended random nodes to the number of recommended neighbor nodes is known, the corresponding number can be determined) as candidate logical neighbor nodes in the candidate logical neighbor node set. For example, please refer to Figure 8,If the recommended neighbor node set also includes recommended random nodes, the SDN controller can select a corresponding number of nodes from the nodes B, C and D that have the same / similar status level as the current node A and do not belong to the same cluster as the current node A, as the recommended random nodes.

[0192] In some embodiments, the blockchain system information also includes: the block generation number of the node; the blockchain bearer network information also includes the network bandwidth of the node; wherein the block generation number is the number of blocks generated by the node; the scoring expression is:

[0193] S = α × G + θ × B;

[0194] Among them, α and θ are the first scoring coefficient and the second scoring coefficient respectively; G is the number of blocks generated, and B is the network bandwidth of the node.

[0195] In some embodiments, the blockchain system information also includes: the number of blocks generated by the node and the online time of the node;

[0196] The blockchain carries network information including the node's network bandwidth, the node's CPU (central processing unit) processing performance, and the node's memory;

[0197] The scoring expression is:

[0198] S=α×G+β×U+φ×C+θ×B+λ×M;

[0199] α+β+φ+θ+λ=1;

[0200] Among them, α and θ are the first and second scoring coefficients respectively; β, φ and λ are the third, fourth and fifth scoring coefficients respectively, U is the online time, C is the CPU processing performance, M is the memory; G is the number of blocks generated, and B is the network bandwidth of the node.

[0201] In some embodiments, the above-mentioned scoring expression can be combined with other information (such as connectivity, latency, etc.) for comprehensive evaluation based on the blockchain system information of the node and the blockchain-bearing network information. Among them, the above-mentioned "connectivity" refers to the number of nodes connected to the current node; "connectivity" is collected in the blockchain system; the above-mentioned "latency" refers to the above-mentioned network latency. People in this field can determine the specific form of the scoring expression at this time according to actual needs, and the specific form of the scoring expression is not specifically limited here.

[0202] In some embodiments, the blockchain network uses the optimized blockchain network topology graph to synchronize messages, including:

[0203] Step S500: using the cluster head node to synchronize messages between clusters; using the candidate logical neighbor nodes to synchronize messages within each cluster.

[0204] In some embodiments, in the above step S500, candidate logical neighbor nodes are used, that is, candidate logical neighbor nodes are directly used as actual neighbor nodes to perform message synchronization within the cluster, including: the current node preferentially performs message synchronization within the cluster through candidate logical neighbor nodes with the same status level as the current node; wherein the status level of the node is determined based on the score of the node respectively.

[0205] Since blockchain systems generally use the Gossip protocol (a protocol for information exchange between nodes or processes based on the way epidemics spread), a common problem with the Gossip protocol is data redundancy. The working principle of the above Gossip protocol is that when a node has new data that needs to be distributed to other nodes in the network, it will first randomly select several nodes connected to itself to send the message out; then other nodes that receive the message will update the message locally, and then continue to distribute the message to several random neighboring nodes in the same way as the previous node, and keep distributing it in this way. Eventually, all nodes in the network will receive the message. Since the message distribution of the Gossip protocol reaches all nodes in the entire network through a continuous and repeated distribution process, and is random, the message delay of some nodes will be relatively high, and the repeated propagation of the above Gossip protocol will also cause a large amount of message redundancy. Therefore, in some embodiments, the Gossip protocol after the set of candidate logical neighbor nodes is determined, that is, the priority Gossip broadcast operation, performs actual broadcast object selection according to the status level of the candidate logical neighbor nodes, that is, the actual logical neighbor node selection, and each node (such as the current node) preferentially broadcasts to the candidate logical neighbor nodes with the same status level, and the candidate logical neighbor nodes with low status levels cannot broadcast to the candidate logical neighbor nodes with high status levels. Then, by optimizing or optimizing the local blockchain network, the global blockchain network can be efficiently broadcasted, thereby improving the overall performance of the blockchain system, thereby avoiding data redundancy in nodes with high status levels, that is, reducing the data redundancy generated by the broadcast protocol (such as the Gossip protocol).

[0206] For some examples, please refer to Fig. 9, the blockchain network architecture also includes: a data plane 300; the data plane 300 includes an SDN switch 310. The SDN switch 310 includes: a distributed rule unit 311; the distributed rule unit 311 is used to determine the actual neighbor node of the current node from the candidate logical neighbor node set by using the score; wherein, the blockchain network uses the optimized blockchain network topology map to synchronize messages, including: step S500: using the cluster head node to synchronize messages between clusters; using the actual neighbor node to synchronize messages within each cluster.

[0207] For some examples, please refer to Fig. 9 and Fig.10 , Fig.10 Shown is a further schematic diagram of a blockchain network architecture including a data plane, Fig.10 Terminal A and Terminal B are access devices, and ordinary switches and SDN switches serve as network routing nodes.

[0208] In some embodiments, message synchronization between clusters using cluster head nodes is performed before message synchronization within clusters using actual neighbor nodes; wherein, actual neighbor nodes of the current node are determined from a set of candidate logical neighbor nodes using scores, including: determining status levels of candidate logical neighbor nodes using node scores; and giving priority to candidate logical neighbor nodes having the same status level as the current node as actual neighbor nodes of the current node.

[0209] In some embodiments, in the above-mentioned priority Gossip broadcast operation, it can also be set that the candidate logical neighbor nodes with low scores cannot propagate blocks to the candidate logical neighbor nodes with high scores according to the scores of the candidate logical neighbor nodes; the current node can only propagate messages to the candidate logical neighbor nodes with the same status level or lower status level (preferably, the candidate logical neighbor nodes with the same status level as the current node are preferentially used as the actual neighbor nodes of the current node), reducing the partial redundancy of the candidate logical neighbor nodes with high scores, that is, avoiding the data redundancy caused by the low-scoring candidate logical neighbor nodes propagating to the high-scoring candidate logical neighbor nodes; if the block is generated by the candidate logical neighbor node with a score lower than the preset score threshold, the level of the low-scoring candidate logical neighbor node is increased to avoid the high-scoring candidate logical neighbor node not receiving the block.

[0210] It should be noted that the cluster division is completed before the block is generated, and the cluster head node is also determined before the block is generated. In other words, the cluster division and the determination of the cluster head node are completed before the message synchronization. If a node generates a block (and the node is not a cluster head node), then: (1) the node needs to determine whether its neighboring nodes include the cluster head node; if it does not include the cluster head node, the node needs to establish a connection with the cluster head node, and synchronize the message to the cluster head node first, while synchronizing the message to the cluster head node, it also synchronizes the message within the cluster; (2) the cluster head node then synchronizes the message with the cluster head nodes of other clusters. Among them, the neighboring nodes of the cluster head node include not only the cluster head nodes of other clusters, but also the nodes in the same cluster as the cluster head node, that is, the nodes within the cluster, so the message synchronization within the cluster can be performed through the cluster head node.

[0211] In some embodiments, in the above step S400, when the number of blocks corresponding to the current epoch of the blockchain system monitored changes (for example, becomes larger), a set of candidate logical neighbor nodes of each current node is generated using the blockchain network extended topology graph.

[0212] In some embodiments, in the above step S500, message synchronization between clusters precedes message synchronization within each cluster.

[0213] In some embodiments, in the above step S500, the actual neighbor nodes are used to synchronize messages within the cluster, including: the current node preferentially synchronizes messages within the cluster through the actual neighbor nodes with the same status level as the current node; wherein the status level of the node is determined based on the score of the node.

[0214] In some embodiments, when the score of each node has been obtained, each node can be graded according to the score of each node. The specific method of grading is not limited here, and those skilled in the art can perform the above grading according to actual needs, for example, they can determine the specific range of the score of high / medium / low status level by themselves.

[0215] In some embodiments, the current node cannot perform message synchronization within the cluster through candidate logical neighbor nodes with a higher status level than the current node.

[0216] It should be noted that the specific implementation process of "using the cluster head node to synchronize messages between the clusters" in the above step S500 belongs to the prior art in the art, so it will not be described in detail here.

[0217] It should be noted that the “cluster head node” in the above step S500 may be the same node as the “candidate logical neighbor node”.

[0218] It should be noted that the cluster head node can perform message synchronization between clusters through cluster head nodes with a higher status level than the cluster head node.

[0219] It can be seen that in some embodiments, after the status level of each node is obtained according to the score of each node, a specific message synchronization rule is formulated, that is, a candidate logical neighbor node with a low status level cannot transmit blocks to a candidate logical neighbor node with a high status level, that is, a node (such as the current node) can only transmit blocks to a candidate logical neighbor node with the same status level or a candidate logical neighbor node with a lower status level, so as to avoid data redundancy caused by the transmission of data from a node with a lower status level to a node with a higher status level.

[0220] In some embodiments, if a candidate logical neighbor node with a score lower than a preset score threshold generates a block, the state level of the candidate logical neighbor node is increased. Those skilled in the art can determine the preset score threshold according to actual needs.

[0221] In some embodiments, if a node with a low status level generates a block, the status level of the node with a low status level can be increased (for example, to the highest status level) (for example, by the distributed rule unit 311), so that the block generated by the node still transmits messages according to the above-mentioned specific message synchronization rules, thereby preventing nodes with high scores or high status levels from not receiving blocks generated by nodes with low status levels.

[0222] It should be noted that in the blockchain system, the blocks generated by each node need to be broadcast to the entire network. Although this application takes into account the number of blocks generated by each node when scoring each node, and nodes with high scores are more likely to generate blocks, low-scoring nodes still have a certain possibility of generating blocks; if a node with a low status level generates a block, the status level of the node is not improved. According to the above-mentioned specific message synchronization rules, the node with a low status level can only broadcast to nodes with the same or lower status level, then the node with a high status level cannot receive the block generated by the node with a low status level, and all nodes in the blockchain network cannot receive the new block. In other words, there are certain loopholes in the above-mentioned specific message synchronization rules. Therefore, if a node with a low status level generates a block, the status level of the node with a low status level is improved, so that the block generated by the node still transmits messages according to the above-mentioned specific message synchronization rules, and finally all nodes in the blockchain network receive the new block. The reason for "raising the status level of the node with a low status level" here is to make up for the loopholes in the above-mentioned specific message synchronization rules, that is, to avoid the situation where the node with a low status level generates a block and the node with a high status level cannot receive the block generated by the node with a low status level.

[0223] For some examples, please refer to Fig.11 ,Should Fig.11 The different sizes of the circles where the nodes are located represent the different status levels of the nodes. For example, the larger the circle where the node is located, the higher the status level of the node. Since the Gossip protocol randomly selects nodes to send, it is possible that a node will receive the same message multiple times, which will cause data redundancy. For example, node g and node e receive blocks transmitted by node a respectively. According to the Gossip protocol, node g randomly selects nodes to send after receiving the block. It may select node e to send, but node e has already received the block sent by node a, so node e is redundant. After setting the above-mentioned specific message synchronization rules, node g cannot send blocks to node e, thereby avoiding data redundancy caused by node g sending blocks to node e, that is, reducing the data redundancy generated by broadcast protocols (such as Gossip protocols). If node h with a low status level generates a new block, according to the above-mentioned specific message synchronization rules, node h cannot forward messages (such as blocks) to nodes with two status levels of nodes d and b. In order to avoid this situation, when the SDN controller finds that node h with a low status level generates a block, it raises node h to the highest status level.

[0224] It can be seen that in some embodiments, the present application uses the bearer network topology map to optimize the blockchain network topology map to obtain a blockchain network extension topology map, while the traditional method used by the existing blockchain data synchronization method mainly relies on blockchain system information for clustering and neighbor node selection, and does not use the blockchain bearer network information and the bearer network topology map obtained based on the blockchain bearer network information to select neighbor nodes.

[0225] It can be seen that in some embodiments, the neighbor nodes of each node are periodically recommended through the above-mentioned meso-level (such as the process of generating a recommended neighbor node set of each current node) for global planning, and the recommended neighbor node set is directly used as a candidate logical neighbor node set, and then the current node uses the candidate logical neighbor nodes in the candidate logical neighbor node set to transmit blocks, etc., to improve the overall transmission rate of blocks in the blockchain network and improve the throughput of the blockchain system. However, the traditional blockchain data synchronization method only performs local selection and lacks a global perspective.

[0226] It can be seen that in some embodiments, different coarse and fine granularities are taken into account in the selection of neighbor nodes (such as the above-mentioned meso-level and micro-level processing processes), that is, the above-mentioned meso-level neighbor nodes of each node are periodically recommended (such as the process of generating a recommended neighbor node set for each current node) for global planning, and the flexible selection ability of local nodes is guaranteed (such as determining a candidate logical neighbor node set from the recommended neighbor node set), and then the current node uses the candidate logical neighbor node in the candidate logical neighbor node set to transmit blocks, etc., and finally improves the overall transmission rate of blocks in the blockchain network and improves the throughput of the blockchain system. However, the traditional blockchain data synchronization method only performs local selection and lacks a global perspective.

[0227] It can be seen that in some embodiments, each node is scored by using the blockchain of each node to carry network information (such as the network delay of the network link) and the corresponding status level is determined based on the score, and it is stipulated that the current node cannot synchronize messages within the cluster through candidate logical neighbor nodes with a higher status level than the current node, thereby avoiding the frequency of repeated transmission to nodes with good network status, thereby reducing unnecessary bandwidth occupation of nodes with good network status and avoiding network congestion.

[0228] It can be seen that in some embodiments, the present application starts from the technical perspective of optimizing the blockchain bearer network to accelerate blockchain data synchronization, supports blockchain system applications upward, manages the blockchain bearer network downward, and provides a meso-micro coordinated blockchain network architecture. The network architecture includes an application plane and a control plane (meso-layer). The meso-layer regulates the overall network topology and optimizes the synchronization performance of the entire network.

[0229] It can be seen that in some embodiments, the present application starts from the technical perspective of optimizing the blockchain bearer network to accelerate blockchain data synchronization, supports blockchain system applications upward, manages the blockchain bearer network downward, and provides a meso-micro coordinated blockchain network architecture, which includes an application plane 100, a control plane 200, and a data plane 300. The meso layer regulates the overall network topology, and the micro layer regulates data synchronization forwarding. The control plane 200 is the meso layer; the data plane 300 is the micro layer. The meso layer can influence the synchronization decision of the data plane 300 according to the blockchain system signal collected by the application plane, and optimize the synchronization performance of the entire network.

[0230] It can be seen that in some embodiments, a blockchain network architecture provided by the present application optimizes the traditional SDN network architecture for blockchain synchronization tasks (such as directly using the candidate logical neighbor nodes to synchronize messages within each cluster after determining the candidate logical neighbor nodes of the current node). The blockchain network architecture provided by the present application can meet the special requirements of blockchain synchronization tasks, improve the full network synchronization speed of the blockchain network, reduce the full network synchronization delay, and solve the problem of weak support capabilities of the existing blockchain network architecture for the blockchain system.

[0231] It can be seen that in some embodiments, a blockchain network architecture provided by the present application optimizes the traditional SDN network architecture for blockchain synchronization tasks (after determining the candidate logical neighbor nodes of the current node, the actual neighbor nodes are determined from the candidate logical neighbor nodes, and then the actual neighbor nodes are used to synchronize messages within each cluster). The blockchain network architecture provided by the present application can meet the special requirements of blockchain synchronization tasks, integrate and coordinate the global optimal control of the distributed architecture, improve the synchronization speed of the entire blockchain network, reduce the synchronization delay of the entire network, and solve the problem of weak support capabilities of the existing blockchain network architecture for the blockchain system.

[0232] It can be seen that in some embodiments, the existing blockchain network architecture improves the synchronization speed by dividing the subnets, which are all divided in the blockchain network and cannot obtain the status of the bearer network. The blockchain network architecture proposed in this application takes into account the blockchain system information and the blockchain bearer network information, and divides the large-scale network (such as the network where the existing blockchain system is located) into multiple subgraphs through the graph engine unit 211, so as to globally plan the topology of the entire network and improve network performance; effectively reduce network congestion and network delay, improve the parallelism of synchronization, and reduce the synchronization delay of the entire network.

[0233] Since the blockchain needs all nodes to maintain consistent states through consensus during data synchronization, the data to be synchronized in the blockchain cannot be changed and other special synchronization requirements, but the current blockchain network lacks global control capabilities, and data synchronization changes in real time. It can be seen that in some embodiments, the blockchain network architecture proposed in this application is coordinated through the meso-level where the centralized rule engine unit 212 is located and the micro-level where the distributed rule unit 311 is located, so that the blockchain network can have global macro-control capabilities at the meso-level during data synchronization (such as the above-mentioned process of generating a recommended neighbor node set for each current node), and can also perform real-time control and rapid response at the micro-level (such as the above-mentioned determination of a candidate logical neighbor node set from the recommended neighbor node set, and then directly using the candidate logical neighbor node as the actual neighbor node, or determining the actual neighbor node from the candidate logical neighbor node, and using the actual neighbor node to synchronize messages within each cluster).

[0234] This document is described with reference to various exemplary embodiments. However, those skilled in the art will recognize that changes and modifications may be made to the exemplary embodiments without departing from the scope of this document. For example, various operating steps and components for performing the operating steps may be implemented in different ways (e.g., one or more steps may be deleted, modified, or combined into other steps) depending on the specific application or considering any number of cost functions associated with the operation of the system.

[0235] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. In addition, as understood by those skilled in the art, the principles of this article can be reflected in a computer program product on a computer-readable storage medium, which is pre-installed with a computer-readable program code. Any tangible, non-temporary computer-readable storage medium can be used, including magnetic storage devices (hard disks, floppy disks, etc.), optical storage devices (CD (compact laser disk) to ROM, DVD (read-only memory), Blu Ray disk (Blu-ray disc)), flash memory and / or the like. These computer program instructions can be loaded onto a general-purpose computer, a special-purpose computer or other programmable data processing device to form a machine, so that these instructions executed on a computer or other programmable data processing device can generate a device that implements a specified function. These computer program instructions can also be stored in a computer-readable memory, which can instruct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory can form a manufactured product, including an implementation device that implements a specified function. Computer program instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are performed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device may provide steps for implementing specified functions.

[0236] Although the principles of this invention have been shown in various embodiments, many modifications of structures, arrangements, proportions, elements, materials and components particularly suitable for specific environments and operational requirements can be used without departing from the principles and scope of this disclosure. The above modifications and other changes or modifications will be included in the scope of this invention.

[0237] The foregoing specific description has been described with reference to various embodiments. However, those skilled in the art will recognize that various modifications and changes can be made without departing from the scope of the present disclosure. Therefore, the consideration of the present disclosure will be illustrative rather than restrictive, and all these modifications will be included in its scope. Similarly, the advantages, other advantages and solutions to the problems of various embodiments have been described above. However, the benefits, advantages, solutions to the problems and any elements that can produce these, or make them more clear, should not be interpreted as critical, necessary or necessary. The term "include" and any other variants used in this article are all non-exclusive inclusions, so that the process, method, article or device including the list of elements not only includes these elements, but also includes other elements that are not explicitly listed or do not belong to the process, method, system, article or device. In addition, the term "coupled" and any other variants used in this article refer to physical connections, electrical connections, magnetic connections, optical connections, communication connections, functional connections and / or any other connections.

[0238] Those skilled in the art will appreciate that many changes may be made to the details of the above-described embodiments without departing from the basic principles of the invention. Therefore, the scope of the present invention should be determined solely by the claims.

Claims

1. A blockchain network architecture, characterized in that: include: Application plane and control plane; The application plane includes a blockchain system; The control plane includes a meso-layer controller; wherein the meso-layer controller is used to obtain the number of blocks corresponding to the current epoch of the blockchain system and the average number of blocks corresponding to the historical epochs, and determine whether it is necessary to optimize the blockchain network topology corresponding to the blockchain system according to the number of blocks and the average number; The epoch represents the time from when the main chain in the blockchain system completes the generation of the previous block to when the generation of the new block is completed; the blockchain network topology diagram is used to characterize the first connection relationship between the nodes in the blockchain system, and the first connection relationship represents the logical connection relationship for message transmission between the nodes; Wherein, if it is determined that the blockchain network topology needs to be optimized, the blockchain network topology is optimized to obtain the optimized blockchain network topology; wherein the blockchain network uses the optimized blockchain network topology to synchronize messages; the blockchain network refers to a distributed network composed of the nodes, which are interconnected and jointly maintain and manage the data of the blockchain system; The optimized blockchain network topology diagram obtained by optimizing the blockchain network topology diagram includes: Obtain the blockchain network topology map and generate a bearer network topology map; wherein the bearer network topology map is used to characterize the second connection relationship of each of the nodes in the blockchain bearer network; the blockchain bearer network is a network composed of network infrastructure supporting the blockchain system; the second connection relationship represents the physical connection relationship between the network infrastructures corresponding to the nodes; The blockchain network topology map is optimized by using the bearer network topology map to obtain a blockchain network extension topology map, and the blockchain network extension topology map is used as the optimized blockchain network topology map; wherein the blockchain network extension topology map is used to characterize the third connection relationship between each of the nodes in the blockchain network, and the third connection relationship includes the above-mentioned logical connection relationship and the above-mentioned physical connection relationship; Among them, the bearer network topology map is obtained based on the blockchain bearer network information and the second connection relationship, and the blockchain bearer network information includes the network bandwidth of the node.

2. The blockchain network architecture as claimed in claim 1, characterized in that: The method of optimizing the blockchain network topology map by using the bearer network topology map to obtain a blockchain network extension topology map includes: The nodes in the blockchain network topology map are matched one-to-one with the nodes in the bearer network topology map through the IP addresses of the nodes; If the two nodes have the first connection relationship in the blockchain network topology diagram but do not have the second connection relationship in the bearer network topology diagram, the first connection relationship between the two nodes is used as the third connection relationship between the two nodes in the blockchain network extension topology diagram; If the first connection relationship between the two nodes does not exist in the blockchain network topology diagram but the second connection relationship exists in the bearer network topology diagram, the second connection relationship between the two nodes is used as the third connection relationship between the two nodes in the blockchain network extension topology diagram; If the first connection relationship exists between two nodes in the blockchain network topology diagram and the second connection relationship also exists in the bearer network topology diagram, the first connection relationship or the second connection relationship between the two nodes shall be used as the third connection relationship between the two nodes in the blockchain network extension topology diagram.

3. The blockchain network architecture as claimed in claim 2, characterized in that: The meso-layer controller includes: a graph engine unit and a centralized rule engine unit; The graph engine unit is used to cluster the blockchain network extension topology graph to obtain a plurality of clusters and the clustered blockchain network extension topology graph; each cluster includes a plurality of nodes; the blockchain system information and blockchain bearer network information of the node are obtained; the blockchain system information includes: the block generation number of the node; the block generation number is the number of blocks generated by the node; the blockchain system information and the blockchain bearer network information of the node are evaluated to obtain the score of the node; the cluster head node of the cluster is determined from the nodes in the cluster whose scores are higher than a preset threshold; the clustered blockchain network extension topology graph is sent to the centralized rule engine unit; In which, the centralized rule engine unit is used to take each of the nodes as the current node respectively, and use the blockchain network extended topology map to generate a set of candidate logical neighbor nodes for each of the current nodes; wherein, the candidate logical neighbor node set includes multiple candidate logical neighbor nodes, and the logical neighbor node refers to the node used by the current node in the blockchain network to propagate the block.

4. The blockchain network architecture as claimed in claim 3, characterized in that: The blockchain system uses the optimized blockchain network topology graph to perform message synchronization, including: The cluster head node is used to perform message synchronization between the clusters; and the candidate logical neighbor nodes are used to perform message synchronization within the clusters.

5. The blockchain network architecture as claimed in claim 3, characterized in that: The blockchain network architecture Also includes: data plane; The data plane includes an SDN switch; wherein the SDN switch includes: a distributed rule unit; the distributed rule unit is used to determine the actual neighbor node of the current node from the candidate logical neighbor node set by using the score; The blockchain system uses the optimized blockchain network topology graph to perform message synchronization, including: The cluster head node is used to perform message synchronization between the clusters; and the actual neighbor node is used to perform message synchronization within the cluster.

6. The blockchain network architecture as claimed in claim 3, characterized in that: The generating of the bearer network topology diagram includes: Acquire the second connection relationship and the blockchain bearer network information; The bearer network topology map is constructed using the second connection relationship and the blockchain bearer network information.

7. The blockchain network architecture as claimed in claim 3, characterized in that: The step of generating a set of candidate logical neighbor nodes of each current node by using the blockchain network extended topology graph includes: Generate a recommended neighbor node set of each current node using the blockchain network extended topology graph; wherein the recommended neighbor node set includes a plurality of recommended neighbor nodes; the recommended neighbor node is a node in the same cluster node set whose strength of the third connection relationship with the current node is not less than a preset strength threshold; the same cluster node set includes all the nodes belonging to the same cluster as the current node; the strength of the third connection relationship is determined based on the first connection relationship and the second connection relationship; The recommended neighbor node set is used as a candidate logical neighbor node set; or, the candidate logical neighbor node set of the current node is determined from the same cluster node set using the weights corresponding to the current node and the recommended neighbor nodes; wherein the weights are obtained based on the communication delay of the blockchain link between the current node and the recommended neighbor nodes and / or the network delay of the network link between the current node and the recommended neighbor nodes; the blockchain link refers to the logical path for communication between the nodes in the blockchain network; the network link refers to the physical connection path for communication between different network infrastructures corresponding to the nodes.

8. The blockchain network architecture as claimed in claim 7, characterized in that: The recommended neighbor node set also includes one or more recommended random nodes; the recommended random nodes are nodes that have the same / similar status level as the current node and do not belong to the same cluster as the current node; wherein the status level of the node is determined based on the score of the node.

9. The blockchain network architecture as claimed in claim 3, characterized in that: The scoring expression is: S = α × G + θ × B; Wherein, α and θ are the first scoring coefficient and the second scoring coefficient respectively; G is the block generation number, and B is the network bandwidth of the node.

10. The blockchain network architecture according to claim 3, characterized in that: The blockchain system information also includes the online time of the node; the blockchain bearer network information also includes the CPU processing performance of the node and the memory of the node; The scoring expression is: S=α×G+β×U+φ×C+θ×B+λ×M; α+β+φ+θ+λ=1; Among them, the α and θ are the first scoring coefficient and the second scoring coefficient respectively; the β, φ and λ are the third scoring coefficient, the fourth scoring coefficient and the fifth scoring coefficient respectively, the U is the online time, the C is the CPU processing performance, and the M is the memory; the G is the number of block generation, and the B is the network bandwidth of the node.

11. The blockchain network architecture according to claim 7, characterized in that: The determining of a set of candidate logical neighbor nodes of the current node from the set of nodes in the same cluster by using the weights corresponding to the current node and the recommended neighbor nodes includes: If the number of neighbor nodes actually required by the current node is less than or equal to the number of the recommended neighbor nodes in the recommended neighbor node set, then selecting a plurality of the recommended neighbor nodes with the largest corresponding weights from the recommended neighbor node set as the candidate logical neighbor nodes; If the number of neighbor nodes actually required by the current node is greater than the number of recommended neighbor nodes in the recommended neighbor node set, in addition to taking all the recommended neighbor nodes in the recommended neighbor node set as the candidate logical neighbor nodes, the remaining required candidate logical neighbor nodes are determined from the same cluster node set.

12. The blockchain network architecture according to claim 5, characterized in that: The using the cluster head node to perform message synchronization between the clusters is performed before the using the actual neighbor node to perform message synchronization within the clusters; The step of determining the actual neighbor node of the current node from the candidate logical neighbor node set by using the score includes: Determining the state level of the candidate logical neighbor node using the score of the node; The candidate logical neighbor nodes having the same status level as the current node are preferentially selected as actual neighbor nodes of the current node.

13. The blockchain network architecture according to claim 1, characterized in that: The determining whether to optimize the blockchain network topology diagram according to the number of blocks and the average number includes: Comparing the number of blocks with the average number to obtain a comparison result; Among them, if the comparison result is that the number of blocks is greater than the average number, it is determined that the blockchain network topology needs to be optimized.

14. The blockchain network architecture according to claim 1, characterized in that: The meso-layer controller is an SDN controller or a programmable high-performance switch.