CN117499017B - Block chain network transmission method, system, storage medium and terminal equipment - Google Patents

Block chain network transmission method, system, storage medium and terminal equipment Download PDF

Info

Publication number
CN117499017B
CN117499017B CN202311860918.9A CN202311860918A CN117499017B CN 117499017 B CN117499017 B CN 117499017B CN 202311860918 A CN202311860918 A CN 202311860918A CN 117499017 B CN117499017 B CN 117499017B
Authority
CN
China
Prior art keywords
node
sub
transmission
space
nodes
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311860918.9A
Other languages
Chinese (zh)
Other versions
CN117499017A (en
Inventor
谭林
陈宛祯
钟思琪
周琴
陈益辉
刘齐军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hunan Tianhe Guoyun Technology Co Ltd
Original Assignee
Hunan Tianhe Guoyun Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hunan Tianhe Guoyun Technology Co Ltd filed Critical Hunan Tianhe Guoyun Technology Co Ltd
Priority to CN202311860918.9A priority Critical patent/CN117499017B/en
Publication of CN117499017A publication Critical patent/CN117499017A/en
Application granted granted Critical
Publication of CN117499017B publication Critical patent/CN117499017B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/44Star or tree networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/12Discovery or management of network topologies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1042Peer-to-peer [P2P] networks using topology management mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1059Inter-group management mechanisms, e.g. splitting, merging or interconnection of groups

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention relates to a block chain network transmission method, a system, a storage medium and a terminal device, comprising: space information of each block chain node is obtained, and the block chain nodes are divided into a plurality of sub-transmission spaces; acquiring performance information of each block chain node; in each sub-transmission space, determining a central node and a tree network topology structure in each sub-transmission space; when a new block is generated, updating a source node as a central node of a sub-transmission space where the source node is located, and updating a tree network topology structure of the sub-transmission space where the source node is located according to space information and performance information of the source node and other nodes in the sub-transmission space where the source node is located; according to the updated central node and tree network topology structure of each sub-transmission space, new blocks are transmitted, so that information redundancy and occupied network bandwidth caused by the block broadcasting process are effectively reduced, and the block broadcasting speed is improved.

Description

Block chain network transmission method, system, storage medium and terminal equipment
Technical Field
The invention relates to the field of blockchain networks, in particular to a blockchain network transmission method.
Background
Blockchains are a distributed database technology that enables the decentralization and distributed storage of data by sharing, copying, and synchronizing the data among multiple nodes in a network. Each data block, i.e., a "chunk", contains a number of transaction records and is linked to the previous chunk by an encryption algorithm to form a data chain. The structure enables the blockchain data to have extremely high transparency and non-tamper property, and is widely applied to the fields of supply chain management, intelligent contracts and the like.
The blockchain network propagation method is a key communication technology in the blockchain field, and is mainly based on a P2P (Peer-to-Peer) network model. In this model, all participants, also referred to as nodes, are equal, each of which can communicate, share and receive information directly with other nodes. When a new block is created and verified, it is sent to all other nodes in the network. Each node will add the new block to its own blockchain after receiving it and resend the new block to other nodes. This way, consistency and non-tamper resistance of the blockchain data throughout the network is ensured.
However, in different blockchain networks, there are thousands of blockchain nodes that are accessed. In a blockchain system, it is often necessary to propagate blocks among multiple nodes in the blockchain network as new blocks are generated. At present, the distance of the adjacency list transmission based on KAD is exclusive or, but a large amount of data redundancy exists in the transmission process, the occupied bandwidth is large, the transmission delay is large, and the blockage is easy to cause.
Patent publication No. CN112104558B discloses a method for implementing a blockchain distribution network, which divides a blockchain network topology into k sub-graphs, determines root nodes and broadcast trees, and improves the above-mentioned problems. However, the division of the network topology diagram, and the determination of the root node and the broadcast tree before the generation and propagation of the new block do not consider the information of the source node actually generating the new block, so that the propagation path still has the problems of large transmission delay and the like.
Therefore, how to further improve the transmission method of the blocks in the blockchain is a technical problem to be solved in the field.
Disclosure of Invention
In order to solve the above technical problems, the present invention provides a blockchain network transmission method, including:
s1: space information of each block chain node is obtained, and the block chain nodes are divided into a plurality of sub-transmission spaces;
s2: acquiring performance information of each block chain node; in each sub-transmission space, determining a central node and a tree network topology structure in each sub-transmission space according to the performance information of each blockchain node;
s3: when a new block is generated, updating a source node as a central node of a sub-transmission space where the source node is located, and updating a tree network topology structure of the sub-transmission space where the source node is located according to space information and performance information of the source node and other nodes in the sub-transmission space where the source node is located;
s4: transmitting the new block to the central node of each sub-transmission space when transmitting the new block according to the updated central node of each sub-transmission space and the tree network topology structure; and each central node transmits the new block to other nodes in each sub-transmission space according to the tree network topology structure.
Further, step S1 includes: the space information is the physical position of each block chain node, and the block chain nodes are divided into a plurality of sub-transmission spaces by adopting a physical position clustering mode.
Further, step S2 includes:
s21: arranging scoring contracts in the blockchain network, and calculating the performance score of each blockchain node according to the node performance information;
s22: according to the performance scores of the nodes, selecting the node with the highest performance score as the central node of the sub-transmission space in each sub-transmission space, determining an ordered node list, and sending the ordered node list to a blockchain network;
s23: each block chain node searches to obtain an ordered node list of the sub-transmission space, takes a central node as a root node, and constructs a tree topology structure of each sub-transmission space according to node ordering;
s24: the block link points add the child nodes in the tree topology and the central node of each child transmission space to the own adjacency list.
Further, the step of calculating the performance score of each blockchain node is to calculate the node performance score using equation (1):
(1)
wherein i is more than or equal to 1 and less than or equal to n, j is more than or equal to 1 and less than or equal to m, K is more than or equal to 1 and less than or equal to K, n is the number of sub-transmission spaces, m is the number of nodes in the sub-transmission spaces, and K is the number of performance information; w (w) ij A is the performance score of the jth node in the ith sub-transmission space ijk The weight coefficient of the kth performance information of the jth node in the ith sub-transmission space is used as the weight coefficient; a, a ijk A score for the kth performance information of the jth node in the ith sub-transmission space.
Further, step S3 includes:
s31: calculating the distance between other nodes and the physical position of the source node in the sub-transmission space where the source node is located, and determining a space score;
s32: calculating performance scores of other nodes in the sub-transmission space where the source node is located;
s33: determining the comprehensive scores of other nodes in the sub-transmission space where the source node is located according to the space score and the performance score; and updating the tree network topology structure of the sub-transmission space where the source node is located.
Further, step S33 includes:
calculating a composite score using formula (2):
(2)
wherein alpha and beta are space scores respectivelyAnd Performance score->Weight, v ij A space score for the j-th node in the i-th sub-transmission space; w (w) ij A performance score for the jth node in the ith sub-transmission space;E ij a composite score for the jth node in the ith sub-transmission space;
and according to the ordering of the comprehensive scores, after the tree network topology structure is orderly arranged at the source node, updating the sub-transmission space where the source node is positioned.
Further, the method further comprises the following steps:
s5: judging whether a node updating event exists in the block chain network, if not, not processing; if so, the method comprises the following steps:
s51: the update node which generates the node update event broadcasts the node update message to other nodes in the block chain network, and uploads the space information or/and performance information of the update node;
s52: nodes in the block chain network which receive the node update message send response messages to the update nodes;
s53: the updating node randomly selects a node which sends the response message, and establishes connection to join the blockchain network;
s54: and executing the steps S1-S2, and updating the updated nodes to the sub-transmission space and the tree topology structure.
On the other hand, the invention also provides a block chain network transmission system, which is used for executing any block chain network transmission method; comprising the following steps: the sub-transmission space dividing module, the tree topology constructing module, the tree topology updating module and the block transmission module are respectively used for executing the steps S1-S4.
In another aspect, the present invention also provides a computer storage medium storing executable program code; the executable program code is configured to perform any of the blockchain network transmission methods described above.
In another aspect, the present invention further provides a terminal device, including a memory and a processor; the memory stores program code executable by the processor; the program code is configured to perform any of the blockchain network transmission methods described above.
The invention provides a block chain network transmission method, a system, a storage medium and a terminal device, which provide a block fast broadcasting strategy based on node space information and performance information, wherein sub-transmission spaces are firstly macroscopically divided according to the space information, and then tree topology structures of the sub-transmission spaces are microscopically determined according to the performance information; updating the tree network topology structure of the sub-transmission space where the source node is located according to the source node generating the new block to obtain a final transmission path; and finally, according to the finally determined transmission path, the source node transmits the new block to each center node, and then the center node performs block transmission to other nodes in the tree topology structure according to the sequence, so that the block broadcasting speed in the network is improved.
Drawings
FIG. 1 is a flow chart of one embodiment of a blockchain network transmission method of the present invention;
fig. 2 is a schematic diagram of a block chain transmission system according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that, in the embodiment of the present invention, directional indications such as up, down, left, right, front, and rear … … are referred to, and the directional indications are merely used to explain the relative positional relationship, movement conditions, and the like between the components in a specific posture, and if the specific posture is changed, the directional indications are correspondingly changed. In addition, if there are descriptions of "first, second", "S1, S2", "step one, step two", etc. in the embodiments of the present invention, the descriptions are only for descriptive purposes, and are not to be construed as indicating or implying relative importance or implying that the number of technical features indicated or indicating the execution sequence of the method, etc. it will be understood by those skilled in the art that all matters in the technical concept of the present invention are included in the scope of this invention without departing from the gist of the present invention.
As shown in fig. 1 and 2, the present invention provides a blockchain network transmission method, including:
s1: space information of each block chain node is obtained, and the block chain nodes are divided into a plurality of sub-transmission spaces;
specifically, the spatial information of the blockchain node is optionally but only limited to any one or more of physical location, IP address, etc. of each node; more specifically, the specific number n of each sub-transmission space, the number m of blockchain nodes included in each sub-transmission space, is optionally but not limited to be arbitrarily set by those skilled in the art. For example, as shown in fig. 2, the original blockchain network is divided into 3 sub-transmission spaces, wherein the sub-transmission space 1 comprises 5 nodes, the sub-transmission space 2 comprises 4 nodes, and the sub-transmission space 3 comprises 6 nodes.
More specifically, the division mode and division basis of each sub-transmission space can be set arbitrarily by a person skilled in the art according to the number of blockchain nodes, transmission performance requirements, and the like.
More specifically, the method is optional but not limited to setting a sub-transmission space dividing module, inputting space information such as respective physical positions of uplinks of nodes in a block chain network, and the like, dividing and outputting sub-transmission space dividing results according to a set rule, and storing uplinks.
Preferably: step S1, optionally but not limited to dividing the blockchain nodes into a plurality of sub-transmission spaces according to the physical location of each blockchain node.
Specifically, each blockchain node, optionally but not limited to, obtains the current physical location of the node from the positioning unit, and uploads its own physical location as a transaction to the blockchain network.
More specifically, the clustering algorithm and the super parameters thereof are optionally but not limited to clustering according to physical positions, and optionally and not limited to being arbitrarily determined by users or developers according to the number of nodes, distribution conditions and the like. More exemplary, alternatively but not limited to:
setting an upper limit of a distance threshold, taking a certain node as a starting point, calculating the distance between the starting point and other nodes, and dividing the distance within the upper limit of the distance threshold into the same sub-transmission space; and setting a new starting point when the upper limit of the distance threshold is exceeded, and dividing all nodes into a plurality of sub-transmission spaces by the same way. Or, setting an upper limit of a quantity threshold, and dividing n nodes closest to the upper limit into the same sub-transmission space. It should be noted that the above two division manners according to physical locations are only exemplary, but the specific division manner of the sub-transmission space is not limited.
S2: acquiring performance information of each block chain node; in each sub-transmission space, determining a central node and a tree network topology structure in each sub-transmission space according to the performance information of each blockchain node;
specifically, the performance information of the blockchain node is optionally, but not limited to, computational performance, transmission performance, network bandwidth, and the like. More specifically, the performance information of the node is optionally but not limited to obtained by querying the system information unit, and the block link points upload the respective performance information, such as calculation performance, transmission performance, network bandwidth, etc., as a transaction to the block chain network. More specifically, performance data such as bandwidth, computing power, response time and the like of each node can be obtained by means of node self-reporting, monitoring tools or benchmark test and the like.
Specifically, as shown in fig. 2, a tree topology construction module is optionally but not limited to be provided, and the central node and the tree network topology structure in each sub-transmission space are determined by inputting performance information bits of each blockchain node.
Specifically, step S2, optionally but not limited to, includes:
s21: arranging scoring contracts in a blockchain network based on node performance information such as: calculating specific numerical values of performance information such as performance, transmission performance, network bandwidth and the like, and calculating performance scores of all nodes;
in particular, scoring contracts are optionally but not exclusively deployed in the blockchain network, and scoring functions used by the scoring contracts are optionally but not exclusively defined by users or developers, and by way of example, node performance scores are optionally but not exclusively calculated using equation (1).
(1)
Wherein i is more than or equal to 1 and less than or equal to n, j is more than or equal to 1 and less than or equal to m, K is more than or equal to 1 and less than or equal to K, n is the number of sub-transmission spaces, m is the number of nodes in the sub-transmission spaces, and K is the number of performance information; w (w) ij A is the performance score of the jth node in the ith sub-transmission space ijk The weight coefficient of the kth performance information of the jth node in the ith sub-transmission space is used as the weight coefficient; a, a ijk A score for the kth performance information of the jth node in the ith sub-transmission space.
S22: according to the performance scores of the nodes, selecting the node with the highest performance score as the central node of the sub-transmission space in each sub-transmission space, determining an ordered node list, and sending the ordered node list to a blockchain network;
specifically, the nodes in the same sub-transmission space are ordered according to the scores to obtain an ordered node list, the scores of the nodes with the higher rank are higher, the ordered node list of each sub-transmission space is uplink by a contract, wherein the node with the first rank in the list serves as a central node of the sub-transmission space, the ordered node list is ordered according to the performance scores, and the ordered node list is determined from high to low and is sent to the blockchain network.
S23: each block chain node retrieves an ordered node list of the sub-transmission space, takes a central node as a root node, and constructs a tree topology structure of each sub-transmission space according to node ordering.
Specifically, as shown in fig. 2, it is preferable that the central node of the first rank according to the score is used as the root node of the tree topology, the root node is located at the top layer in the tree topology structure, the tree network topology is constructed from top to bottom from left to right according to the rank, that is, the tree structure is constructed from the root node downwards in turn, and two child nodes are arranged under each parent node. And selecting the node with the next highest performance as a child node of the root node according to the performance score of the node. The selection of child nodes of the next level of nodes according to the performance score continues until all nodes in the child transmission space are assigned to the appropriate level and location. In the construction mode, as each node in the tree network topology has no repeated sub-nodes, and the data transmission path between any two nodes is unique, the condition that a plurality of paths can reach the same node does not exist, and therefore the problem of information redundancy does not exist.
S24: the block link points add the child nodes in the tree topology and the central node of each child transmission space to the own adjacency list.
Specifically, each blockchain node stores its child nodes and its home center node into its own adjacency list according to the tree topology structure, knows which child transmission space itself belongs to, and then when a new block is received, it should be transmitted to which subsequent node, and then the subsequent node can transmit according to this.
S3: when a new block is generated, updating a source node as a central node of a sub-transmission space where the source node is located, and updating a tree network topology structure of the sub-transmission space where the source node is located according to space information and performance information of the source node and other nodes in the sub-transmission space where the source node is located;
specifically, as shown in fig. 2, optionally but not limited to, a tree topology updating module is used, and when a new block is generated by a node 3 in the sub-transmission space 1, the tree topology in the sub-transmission space 1, where the node is located, is updated. Specifically, the node 3 generating the new block is updated to be the central node of the sub-transmission space, and the tree network topology structure of the sub-transmission space where the source node is located is updated according to the space information and the performance information of other nodes in the sub-transmission space where the source node is located. Illustratively, a central node is updated by node 1 to node 3 in the sub-transmission space 1; a tree network topology consisting of a root node 1 to child nodes 2, 3, followed by a parent node 2 to child nodes 5, 4; the updating is as follows: from root node 3 to child nodes 1, 4, then parent node 1 to child nodes 2, 5. Of course, the update result is illustrated, and not limited to this, and should be specifically determined according to the spatial information and performance information of the source node and other nodes in the sub-transmission space where the source node is located.
Specifically, taking the physical location clustering of step S1, calculating the performance score of each node according to the performance information in step S2 as an example, step S3 optionally but not limited to include:
s31: calculating the distance between other nodes and the physical position of the source node in the sub-transmission space where the source node is located, and determining a space score; specifically, the spatial score of other nodes in the sub-transmission space where the source node is located is optionally but not limited to be inversely proportional to the distance from the source node, and the closer the distance is, the higher the score is, and the farther the distance is, the lower the score is;
s32: calculating performance scores of other nodes in the sub-transmission space where the source node is located; specifically, optionally but not limited to, refer to step S21;
s33: and determining the comprehensive score of other nodes in the sub-transmission space where the source node is located according to the space score and the performance score, and updating the tree network topology structure of the sub-transmission space where the source node is located.
Specifically, the composite score is optionally calculated using, but not limited to, equation (2):
(2)
wherein alpha and beta are space scores respectivelyAnd Performance score->The weight of (2) can be customized by network personnel or a system; v ij A space score for the j-th node in the i-th sub-transmission space; w (w) ij For the j-th section in the i-th sub-transmission spacePerformance scores for points;E ij is the composite score for the jth node in the ith sub-transmission space.
More specifically, optionally but not limited to referring to steps S22-S24, in the sub-transmission space where the source node is located, the source node is taken as a central node, and an ordered node list is determined according to the ordering of the composite score and sent to the blockchain network; specifically, a tree topology structure is sequentially constructed downwards by taking a source node as a root node, and the child nodes of the next level node are selected according to the comprehensive score sequence until all the nodes of the child transmission space where the source node is located are updated.
S4: transmitting the new block to the central node of each sub-transmission space when transmitting the new block according to the updated central node of each sub-transmission space and the tree network topology structure; and each central node transmits the new block to other nodes in each sub-transmission space according to the tree network topology structure.
Specifically, in the block fast broadcasting strategy, that is, when the source node performs block broadcasting, for the sub-transmission space where the source node is located, the new block is transmitted according to the updated tree network topology structure, and for other sub-transmission spaces, the source node sends the new block to the central node of all the sub-transmission spaces. As shown in fig. 2, taking the node 3 of the sub-transmission space 1 as an example, a source node is used, the sub-transmission space where the source node is located updates the source node as a central node, and updates its tree topology structure for transmission, and at the same time, the source node transmits the new block to the central nodes of other sub-transmission spaces, namely: and the node 1 of the sub-transmission space 2-3 performs subsequent transmission.
Specifically, as shown in fig. 2, according to the tree network topology structure, the central node sends the new block to the nodes of the second layer, the nodes of the second layer send the new block to the nodes of the third layer, and the nodes reciprocate until the new block is transmitted to the last layer, and all the nodes in the sub-transmission space receive the new block or transmit the new block to the target node. In the method, the tree network topology is constructed from top to bottom and from left to right according to the ordering of the block chain nodes in the sub-transmission space, and the central node with the highest score and the strongest comprehensive performance is used as the root node of the tree topology, so that the blocks can be rapidly transmitted from the root node from top to bottom, and rapid block broadcasting is realized.
Preferably, the blockchain network transmission method of the present invention further includes:
s5: judging whether a node updating event exists in the block chain network, if not, not processing; if so, the method comprises the following steps:
s51: the update node which generates the node update event broadcasts the node update message to other nodes in the block chain network, and uploads the space information or/and performance information of the update node;
s52: nodes in the block chain network which receive the node update message send response messages to the update nodes;
s53: the updating node randomly selects a node which sends the response message, and establishes connection to join the blockchain network;
s54: and executing the steps S1-S2, and dividing the updated nodes into a sub-transmission space and a tree topology structure.
Specifically, the node update event is optionally, but not limited to adding a new node to the blockchain network, or some nodes have been disconnected or have their spatial information and performance information, such as physical location, computing performance, transmission performance, etc. changed, then the content updated by the update node needs to be uploaded, and the new node or the node with dynamic change (collectively referred to as the update node with the node update event) is re-determined according to steps S1-S2, where the new node belongs to which sub-transmission space and is located in which position of the tree topology structure of the sub-transmission space, so as to update the current sub-transmission space and the tree topology structure. That is to say: the current sub-transmission space and tree topology are dynamically adjusted according to the dynamic conditions of each node in the blockchain network (such as newly added node, dropped node, and change of physical position performance information of the node), and the whole blockchain network is maintained regularly.
In this embodiment, step S5 is additionally provided, which can periodically maintain the blockchain network, ensure the divided sub-transmission space and the constructed tree topology structure, and meet the actual situation of the current blockchain network, so as to further improve the accuracy and rapidity of the blockchain transmission.
The invention has the beneficial effects that:
1. aiming at the problem of larger network propagation delay when a block broadcasting is performed on a block chain network, the invention provides a block fast broadcasting strategy based on node space information and performance information, wherein nodes in the whole block chain network are divided into different sub-transmission spaces according to the space information on a macroscopic space; and then determining the central structure and the tree network topology structure of each sub-transmission space according to the performance information of the node, such as calculation performance, transmission performance, such as broadband, network propagation delay and the like, in the sub-transmission space on microscopic performance. The dual consideration of macroscopic space and microscopic performance can further reduce transmission delay, because if the space distance is particularly far from the macroscopic space, the transmission cannot be very rapid no matter how superior the performance is; and for the same sub-transmission space, whether the performance is superior or not is obviously more advantageous. Therefore, the sub-transmission spaces are divided according to the space, and then the performances are compared in each sub-transmission space, so that a multi-space and hierarchical tree topology structure is constructed, the transmission delay can be further reduced, and the transmission of a new block can be improved; in addition, the tree network topology structure is that the father node transmits to the child node during broadcasting and the transmission path between any two nodes is unique, so that the situation that a certain node receives multiple identical data from different nodes can not occur, and the problems of information redundancy and blockage are avoided. On one hand, the nodes of each sub-transmission space are ordered, the node with the optimal comprehensive performance is selected as the central node of the sub-transmission space, the source node initiating the block broadcasting broadcasts the block through the central node, and in the broadcasting process, the block is transmitted to the worse node by the node with the better comprehensive performance, so that the block transmission rate is effectively improved technically. On the other hand, the state of the network, including the generation and verification of the block and the security of the network, can be conveniently monitored and managed by the block chain manager through the central node, and the manager can monitor and manage the whole block chain network more efficiently and conveniently according to the data flow processed by the central node.
2. On the basis, when the source node generates a new block to be transmitted, the source node is used as a first transmitter of the new block and updated to be a central node of a sub-transmission space where the source node is located, so that the transmission times and redundancy can be reduced. More important is: for a single sub-transmission space where the source node is located, since the source node is used as the first transmitter of the new block, if the source node is in a given tree topology, the importance of the first transmission node and the influence of the importance on the transmission speed are ignored. Specifically, in the single sub-transmission space, since the spatial positions of the nodes are not far apart, the spatial information and the performance information of the source node and other nodes in the space are equally important, and the predetermined tree topology structure is updated according to the two determined together, so that the speed and the efficiency of the block in the sub-transmission space can be further improved; meanwhile, as the source node is used as the central node, the speed and efficiency of the new block transmitted to other sub-transmission spaces can be further improved through the fact that the source node transmits the block to the central node of other sub-transmission spaces.
3. Preferably, the node performance is ordered, the node with the highest performance is selected as a central node, a tree topology structure is constructed, when broadcasting is carried out, the source node preferentially transmits the blocks to the central node, and then the central node transmits the blocks to other nodes in the tree topology structure according to the ordering, so that the speed of block broadcasting in a network is improved.
In summary, the blockchain network transmission method comprehensively considers the space information and the performance information of the nodes, determines the sub-transmission space and the tree network topology structure, dynamically adjusts the central node and the tree network topology structure of the sub-transmission space where the source node is located according to the source node of the generated block, is a blockchain network transmission method with low data redundancy and high speed, so as to effectively reduce the information redundancy and the occupied network bandwidth caused by the blockbroadcasting process and improve the speed of blockbroadcasting.
On the other hand, as shown in fig. 2, the present invention further provides a blockchain network transmission system, which is configured to execute any of the above blockchain network transmission methods, and includes a sub-transmission space dividing module, a tree topology building module, a tree topology updating module, and a blockchain transmission module, and execute steps S1 to S4 respectively.
Preferably, the method further comprises a node updating module, configured to execute step S5.
In another aspect, the present invention also provides a computer storage medium storing executable program code; the executable program code is configured to perform any of the blockchain network transmission methods described above.
In another aspect, the present invention further provides a terminal device, including a memory and a processor; the memory stores program code executable by the processor; the program code is configured to perform any of the blockchain network transmission methods described above.
For example, the program code may be partitioned into one or more modules/units that are stored in the memory and executed by the processor to perform the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing the specified functions, which instruction segments describe the execution of the program code in the terminal device.
The terminal equipment can be computing equipment such as a desktop computer, a notebook computer, a palm computer, a cloud server and the like. The terminal device may include, but is not limited to, a processor, a memory. Those skilled in the art will appreciate that the terminal devices may also include input-output devices, network access devices, buses, and the like.
The processor may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage may be an internal storage unit of the terminal device, such as a hard disk or a memory. The memory may also be an external storage device of the terminal device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the terminal device. Further, the memory may also include both an internal storage unit of the terminal device and an external storage device. The memory is used for storing the program codes and other programs and data required by the terminal equipment. The memory may also be used to temporarily store data that has been output or is to be output.
The above-mentioned blockchain network transmission system, computer storage medium and terminal device are created based on the above-mentioned blockchain network transmission method, and the technical effects and advantages thereof are not repeated herein, and each technical feature of the above-mentioned embodiments may be arbitrarily combined, so that the description is concise, and all possible combinations of each technical feature in the above-mentioned embodiments are not described, however, as long as there is no contradiction between the combinations of these technical features, they should be considered as the scope described in the present specification.
The above examples illustrate only a few embodiments of the invention, which are described in detail and are not to be construed as limiting the scope of the invention. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the invention, which are all within the scope of the invention. Accordingly, the scope of protection of the present invention is to be determined by the appended claims.

Claims (10)

1. A blockchain network transmission method, comprising:
s1: space information of each block chain node is obtained, and the block chain nodes are divided into a plurality of sub-transmission spaces;
s2: acquiring performance information of each block chain node; in each sub-transmission space, determining a central node and a tree network topology structure in each sub-transmission space according to the performance information of each blockchain node;
s3: when a new block is generated, updating a source node as a central node of a sub-transmission space where the source node is located, and updating a tree network topology structure of the sub-transmission space where the source node is located according to space information and performance information of the source node and other nodes in the sub-transmission space where the source node is located;
s4: transmitting the new block to the central node of each sub-transmission space when transmitting the new block according to the updated central node of each sub-transmission space and the tree network topology structure; and each central node transmits the new block to other nodes in each sub-transmission space according to the tree network topology structure.
2. The blockchain network transmission method of claim 1, wherein step S1 includes: the space information is the physical position of each block chain node, and the block chain nodes are divided into a plurality of sub-transmission spaces by adopting a physical position clustering mode.
3. The blockchain network transmission method of claim 1, wherein step S2 includes:
s21: arranging scoring contracts in the blockchain network, and calculating the performance score of each blockchain node according to the node performance information;
s22: according to the performance scores of the nodes, selecting the node with the highest performance score as the central node of the sub-transmission space in each sub-transmission space, determining an ordered node list, and sending the ordered node list to a blockchain network;
s23: each block chain node searches to obtain an ordered node list of the sub-transmission space, takes a central node as a root node, and constructs a tree topology structure of each sub-transmission space according to node ordering;
s24: the block link points add the child nodes in the tree topology and the central node of each child transmission space to the own adjacency list.
4. The blockchain network transmission method of claim 3, wherein the step of calculating the performance score for each blockchain node is calculating the node performance score using equation (1):
(1)
wherein i is more than or equal to 1 and less than or equal to n, j is more than or equal to 1 and less than or equal to m, K is more than or equal to 1 and less than or equal to K, n is the number of sub-transmission spaces, m is the number of nodes in the sub-transmission spaces, and K is the number of performance information; w (w) ij A is the performance score of the jth node in the ith sub-transmission space ijk The weight coefficient of the kth performance information of the jth node in the ith sub-transmission space is used as the weight coefficient; a, a ijk A score for the kth performance information of the jth node in the ith sub-transmission space.
5. The blockchain network transmission method of claim 1, wherein step S3 includes:
s31: calculating the distance between other nodes and the physical position of the source node in the sub-transmission space where the source node is located, and determining a space score;
s32: calculating performance scores of other nodes in the sub-transmission space where the source node is located;
s33: determining the comprehensive scores of other nodes in the sub-transmission space where the source node is located according to the space score and the performance score; and updating the tree network topology structure of the sub-transmission space where the source node is located.
6. The blockchain network transmission method of claim 5, wherein step S33 includes:
calculating a composite score using formula (2):
(2)
wherein alpha and beta are space scores respectivelyAnd Performance score->Weight, v ij A space score for the j-th node in the i-th sub-transmission space; w (w) ij A performance score for the jth node in the ith sub-transmission space;E ij a composite score for the jth node in the ith sub-transmission space;
and according to the ordering of the comprehensive scores, after the tree network topology structure is orderly arranged at the source node, updating the sub-transmission space where the source node is positioned.
7. The blockchain network transmission method of any of claims 1-6, further comprising:
s5: judging whether a node updating event exists in the block chain network, if not, not processing; if so, the method comprises the following steps:
s51: the update node which generates the node update event broadcasts the node update message to other nodes in the block chain network, and uploads the space information or/and performance information of the update node;
s52: nodes in the block chain network which receive the node update message send response messages to the update nodes;
s53: the updating node randomly selects a node which sends the response message, and establishes connection to join the blockchain network;
s54: and executing the steps S1-S2, and updating the updated nodes to the sub-transmission space and the tree topology structure.
8. A blockchain network transmission system configured to perform the blockchain network transmission method of any of claims 1-7; comprising the following steps: the sub-transmission space dividing module, the tree topology constructing module, the tree topology updating module and the block transmission module are respectively used for executing the steps S1-S4.
9. A computer storage medium having executable program code stored therein; the executable program code for performing the blockchain network transmission method of any of claims 1-7.
10. A terminal device comprising a memory and a processor; the memory stores program code executable by the processor; the program code is configured to perform the blockchain network transmission method of any of claims 1-7.
CN202311860918.9A 2023-12-31 2023-12-31 Block chain network transmission method, system, storage medium and terminal equipment Active CN117499017B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311860918.9A CN117499017B (en) 2023-12-31 2023-12-31 Block chain network transmission method, system, storage medium and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311860918.9A CN117499017B (en) 2023-12-31 2023-12-31 Block chain network transmission method, system, storage medium and terminal equipment

Publications (2)

Publication Number Publication Date
CN117499017A CN117499017A (en) 2024-02-02
CN117499017B true CN117499017B (en) 2024-03-22

Family

ID=89674903

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311860918.9A Active CN117499017B (en) 2023-12-31 2023-12-31 Block chain network transmission method, system, storage medium and terminal equipment

Country Status (1)

Country Link
CN (1) CN117499017B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190124107A (en) * 2018-04-25 2019-11-04 가온미디어 주식회사 method of processing weight-based blockchain consensus by master nodes of subunit networks
WO2020173287A1 (en) * 2019-02-27 2020-09-03 Beijing Didi Infinity Technology And Development Co., Ltd. Systems and methods for determining network shards in blockchain network
CN111711567A (en) * 2020-06-12 2020-09-25 杭州溪塔科技有限公司 Block chain-based network message transmission method and device and electronic equipment
CN112104558A (en) * 2020-10-30 2020-12-18 上海交通大学 Method, system, terminal and medium for implementing block chain distribution network
CN112600699A (en) * 2020-12-07 2021-04-02 华中科技大学 Dynamic overlay network topology construction method and device based on block chain cross-chain interaction
CN114520810A (en) * 2022-01-27 2022-05-20 山东浪潮工业互联网产业股份有限公司 Block chain-based block data transmission method, equipment and medium
CN115314391A (en) * 2022-08-06 2022-11-08 北京工业大学 Block chain network topology dynamic establishment and data transmission optimization method
CN116170162A (en) * 2023-04-26 2023-05-26 湖南天河国云科技有限公司 Selective consensus method, computer storage medium, and terminal device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8880726B2 (en) * 2010-12-16 2014-11-04 Openet Telecom Ltd. Methods, systems and devices for dynamic context-based routing using a topology tree
CN110535697B (en) * 2019-08-22 2021-05-11 杭州趣链科技有限公司 Method for balancing block chain cross-domain broadcast network load

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190124107A (en) * 2018-04-25 2019-11-04 가온미디어 주식회사 method of processing weight-based blockchain consensus by master nodes of subunit networks
WO2020173287A1 (en) * 2019-02-27 2020-09-03 Beijing Didi Infinity Technology And Development Co., Ltd. Systems and methods for determining network shards in blockchain network
CN111711567A (en) * 2020-06-12 2020-09-25 杭州溪塔科技有限公司 Block chain-based network message transmission method and device and electronic equipment
CN112104558A (en) * 2020-10-30 2020-12-18 上海交通大学 Method, system, terminal and medium for implementing block chain distribution network
CN112600699A (en) * 2020-12-07 2021-04-02 华中科技大学 Dynamic overlay network topology construction method and device based on block chain cross-chain interaction
CN114520810A (en) * 2022-01-27 2022-05-20 山东浪潮工业互联网产业股份有限公司 Block chain-based block data transmission method, equipment and medium
CN115314391A (en) * 2022-08-06 2022-11-08 北京工业大学 Block chain network topology dynamic establishment and data transmission optimization method
CN116170162A (en) * 2023-04-26 2023-05-26 湖南天河国云科技有限公司 Selective consensus method, computer storage medium, and terminal device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
P2P覆盖网聚类服务;程实;吴产乐;程伟;乐俊;贺莲;;北京邮电大学学报;20101015(05);全文 *
基于信任委托的区块链分层共识优化;段靓;吕鑫;刘凡;;计算机工程;20201015(10);全文 *

Also Published As

Publication number Publication date
CN117499017A (en) 2024-02-02

Similar Documents

Publication Publication Date Title
JP6967615B2 (en) Distributed search and index update methods, systems, servers and computer equipment
CN112104558B (en) Method, system, terminal and medium for implementing block chain distribution network
US8180853B2 (en) Method and apparatus for transmitting data in a peer-to-peer network
US9596295B2 (en) Computing connected components in large graphs
US8898266B2 (en) Apparatus and method for setting role based on capability of terminal
CN105677447B (en) Time delay minimization of bandwidth virtual machine deployment method in distributed cloud based on cluster
US20120179778A1 (en) Applying networking protocols to image file management
CN111553670B (en) Transaction processing method and device and computer readable storage medium
Faragardi et al. An efficient placement of sinks and SDN controller nodes for optimizing the design cost of industrial IoT systems
KR101411321B1 (en) Method and apparatus for managing neighbor node having similar characteristic with active node and computer readable medium thereof
CN102404387A (en) Method, device and equipment for information synchronization with other nodes
CN112543151A (en) SDN controller deployment method and device, electronic equipment and storage medium
US10474644B2 (en) Systems and methods for optimizing selection of a replication data node in a distributed file system
CN114492849B (en) Model updating method and device based on federal learning
CN113542077B (en) Openstack encrypted link management method and system
Panadero et al. A two-stage multi-criteria optimization method for service placement in decentralized edge micro-clouds
CN117081983B (en) Data transmission method and device
CN111491020B (en) Data processing method, data processing device, computer equipment and storage medium
CN117499017B (en) Block chain network transmission method, system, storage medium and terminal equipment
CN110597808B (en) Distributed database table connection method, device, system, server and medium
CN103281395B (en) A kind of data slice based on client terminal quantity divides equally selective system and method
CN111614966B (en) Synchronization method, system, device, equipment and storage medium based on synchronization tree
JP2007272540A (en) Data distributing method and data distributing system
CN113891369A (en) Network optimization method, device and storage medium
CN116436978B (en) Cloud computing-oriented memory allocation method, memory acquisition method, device and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant