Information transmission method and device in blockchain network, equipment and medium

By selecting ledger nodes and secondary efficiency nodes in the blockchain network and using the minimum spanning tree and gossip algorithm to propagate information, the problems of slow data broadcasting speed and redundant data are solved, achieving efficient load balancing and information propagation.

CN115865935BActive Publication Date: 2026-03-27HANGZHOU QULIAN TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-30
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Blockchain networks suffer from problems such as slow data broadcasting speed, generation of a large amount of redundant data, and low node load balancing.

Method used

Ledger nodes and secondary efficiency nodes are selected based on node information density, and the minimum spanning tree algorithm and gossip algorithm are used for information propagation to reduce redundant transmission.

Benefits of technology

This improved the information transmission rate, reduced the load pressure on ledger nodes, achieved load balancing, and avoided performance bottlenecks and redundant data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115865935B_ABST
    Figure CN115865935B_ABST
Patent Text Reader

Abstract

The application is suitable for the field of blockchain technology, and provides an information transmission method and device in a blockchain network, equipment and a medium, wherein the method comprises: selecting a ledger node based on a first node information degree; selecting a set number of secondary performance nodes for each ledger node based on a second node information degree; propagating ledger information to each secondary performance node based on the ledger node; and propagating the ledger information to each ordinary node in the blockchain network based on the secondary performance node; wherein the ordinary node is a node in the blockchain network other than the central node and the secondary performance node. This scheme can achieve load balancing, accelerate the information propagation rate, and reduce message propagation redundancy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of blockchain technology, and in particular relates to an information transmission method, device, equipment and medium in a blockchain network. Background Technology

[0002] In peer-to-peer (P2P) blockchain networks, high-performance nodes are often used as Ledger nodes. Ledger nodes can efficiently forward messages and access all information within the network, enabling efficient message propagation while avoiding excessive redundant message transmission. Currently used network protocols still have much room for improvement.

[0003] In practice, 1) data will be sent in multiple rounds before the broadcast termination condition is met, consuming a large amount of bandwidth and reducing the speed of data broadcasting; 2) In blockchain systems, the gossip algorithm is generally used when propagating messages. When a ledger node has new data, the node becomes active and periodically contacts other nodes to send the new data until all nodes have stored the new data and achieve eventual consistency. This often takes a long time to achieve data consistency and generates a large amount of redundant data during propagation; 3) Due to the large number of nodes, there will be problems such as ledger nodes bearing a large amount of bandwidth and low load balancing. Furthermore, the selected ledger nodes bear all the pressure on the network, and once they fail, the system will become unavailable. Summary of the Invention

[0004] This application provides an information transmission method, apparatus, device, and medium in a blockchain network to solve the problems of slow data broadcasting speed, large amount of redundant data, and low node load balancing in blockchain networks.

[0005] The first aspect of this application provides a method for information transmission in a blockchain network, including:

[0006] Ledger nodes are selected based on the information content of the first node;

[0007] Based on the second node information degree, a set number of sub-efficiency nodes are selected for each of the ledger nodes;

[0008] Based on the ledger node, the ledger information is propagated to each of the sub-efficiency nodes, and based on the sub-efficiency nodes, the ledger information is propagated to each ordinary node in the blockchain network.

[0009] The ordinary node refers to any node in the blockchain network other than the central node and the secondary performance node.

[0010] Optionally, the information level of the first node includes:

[0011] The number of nodes a node visits within a set step size, and the node's own information load capacity;

[0012] The number of nodes visited by a node's neighboring nodes within a set step size, and the information load capacity of the node's neighboring nodes.

[0013] Optionally, the step of selecting ledger nodes based on the first node's information density includes:

[0014] Based on the information degree of the first node, the first performance score of each node in the blockchain network is determined.

[0015] Based on the first performance score, X nodes are selected from the blockchain network as ledger nodes, where X is the integer value of lgN, N is the total number of nodes in the blockchain network, and both X and N are positive integers.

[0016] Optionally, the information content of the second node includes:

[0017] The first node's information level, and the distance between the node and each of the ledger nodes.

[0018] Optionally, the step of selecting a predetermined number of sub-performance nodes for each ledger node based on the second node information degree includes:

[0019] Based on the second node information degree, the second performance score of each other node in the blockchain network other than the ledger node is determined;

[0020] Based on the second performance score, Y nodes are selected from the other nodes in the blockchain network as secondary performance nodes, where Y is the integer value of 2LgM, M is the total number of other nodes in the blockchain network, and both Y and M are positive integers.

[0021] Optionally, the step of propagating ledger information to each of the sub-performance nodes based on the ledger node includes:

[0022] Based on the ledger node, the minimum spanning tree algorithm is used to propagate messages to each of the sub-efficiency nodes.

[0023] Optionally, the step of propagating the ledger information to various ordinary nodes in the blockchain network based on the secondary efficiency node includes:

[0024] Based on the aforementioned sub-efficiency node, the gossip algorithm is used to propagate the ledger information to each ordinary node in the blockchain network; or...

[0025] Based on the secondary performance node, upon receiving a block data retrieval request initiated by the ordinary node, a message is propagated to the ordinary node.

[0026] A second aspect of this application provides an information transmission device in a blockchain network, comprising:

[0027] The first node selection module is used to select ledger nodes based on the information content of the first node.

[0028] The second node selection module is used to select a set number of sub-efficiency nodes for each ledger node based on the information degree of the second node.

[0029] The information transmission module is used to propagate ledger information to each of the secondary efficiency nodes based on the ledger nodes, and to propagate ledger information to each ordinary node in the blockchain network based on the secondary efficiency nodes.

[0030] The ordinary node refers to any node in the blockchain network other than the central node and the secondary performance node.

[0031] A third aspect of this application provides a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method described in the first aspect.

[0032] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method described in the first aspect.

[0033] The fifth aspect of this application provides a computer program product that, when run on a computer device, causes the computer device to perform the steps of the method described in the first aspect.

[0034] As can be seen from the above, in this embodiment, ledger nodes are selected based on the first node information level, and a set number of secondary performance nodes are selected for each ledger node based on the second node information level. Ledger information is propagated to each secondary performance node based on the ledger node, and ledger information is propagated to each ordinary node in the blockchain network based on the secondary performance nodes. By adding secondary performance nodes to the ledger nodes, the load pressure on the ledger nodes is reduced, the performance bottleneck of a single node is avoided, and load balancing is achieved. Furthermore, different node information levels are introduced in the process of selecting ledger nodes and secondary performance nodes, which increases the reliability of node selection, accelerates the information propagation rate, and reduces message propagation redundancy. Attached Figure Description

[0035] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0036] Figure 1 This is a flowchart illustrating an information transmission method in a blockchain network provided in an embodiment of this application;

[0037] Figure 2 This is a flowchart of selecting ledger nodes provided in an embodiment of this application;

[0038] Figure 3 This is a flowchart of selecting sub-performance nodes provided in an embodiment of this application;

[0039] Figure 4 This is a structural diagram of an information transmission device in a blockchain network provided in an embodiment of this application;

[0040] Figure 5 This is a structural diagram of a computer device provided in an embodiment of this application. Detailed Implementation

[0041] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0042] It should be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0043] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0044] It should also be further understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0045] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrases "if determined" or "if [described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [described condition or event] is detected," or "in response to detection of [described condition or event]."

[0046] In specific implementations, the computer devices described in the embodiments of this application include, but are not limited to, other portable devices such as mobile phones, laptop computers, or tablet computers with touch-sensitive surfaces (e.g., touchscreen displays and / or touchpads). It should also be understood that in some embodiments, the device is not a portable communication device, but a desktop computer with touch-sensitive surfaces (e.g., touchscreen displays and / or touchpads).

[0047] The following discussion describes computer devices including displays and touch-sensitive surfaces. However, it should be understood that computer devices may include one or more other physical user interface devices such as physical keyboards, mice, and / or joysticks.

[0048] Computer devices support a variety of applications, such as one or more of the following: drawing applications, presentation applications, word processing applications, website creation applications, disc burning applications, spreadsheet applications, game applications, telephone applications, video conferencing applications, email applications, instant messaging applications, exercise support applications, photo management applications, digital camera applications, digital camcorder applications, web browsing applications, digital music player applications, and / or digital video player applications.

[0049] Various applications that can run on a computer device can use at least one common physical user interface device, such as a touch-sensitive surface. One or more functions of the touch-sensitive surface and the corresponding information displayed on the computer device can be adjusted and / or changed between and / or within applications. In this way, the common physical architecture of the computer device (e.g., the touch-sensitive surface) can support various applications with user interfaces that are intuitive and transparent to the user.

[0050] It should be understood that the sequence number of each step in this embodiment does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of this application embodiment.

[0051] To illustrate the technical solution described in this application, specific embodiments are provided below.

[0052] See Figure 1 , Figure 1 This application provides a flowchart of an information transmission method in a blockchain network. Figure 1 .like Figure 1 As shown, an information transmission method in a blockchain network includes the following steps:

[0053] Step 101: Select ledger nodes based on the information level of the first node.

[0054] Information content is an indicator that measures the concentration of variables contained in a feature.

[0055] Different nodes will have different performance scores under the same information level, and ledger nodes can be selected based on the set node information level.

[0056] In the optional implementation process, in scenarios with a relatively small number of nodes in the blockchain network, users can select some high-performance nodes, such as those with high bandwidth, as ledger nodes. However, in scenarios with a large number of nodes in the blockchain network, ledger nodes can be selected using a probability matrix based on the information score corresponding to the first node.

[0057] When selecting ledger nodes based on node informatics, the factors considered include the set of informatics of the node's neighboring nodes and the node's own influence. A node's influence can be specifically reflected in how many different target nodes it can access within a specified step size, its information load capacity, etc. Finally, based on the obtained node informatics, the X nodes with the highest scores are selected as ledger nodes, where X is the integer part of lgN, N is the total number of nodes in the blockchain network, and both X and N are positive integers.

[0058] Correspondingly, in an optional implementation, the information level of the first node includes:

[0059] The number of nodes a node visits within a set step size, and the node's own information load capacity;

[0060] The number of nodes visited by a node's neighboring nodes within a set step size, and the information load capacity of the node's neighboring nodes.

[0061] By measuring the node's own information dissemination level, we can assess the node's information propagation capability. By measuring the information dissemination level of neighboring nodes, we can assess the propagation capability of the target node for the message, in order to find a suitable ledger node.

[0062] By combining its own information level with that of its neighboring nodes, the system selects nodes, thereby improving the effectiveness of node selection and the efficiency of message transmission.

[0063] Correspondingly, combined Figure 2 As shown, in an optional implementation, the step of selecting ledger nodes based on the first node information degree includes:

[0064] Step 201: Based on the information degree of the first node, determine the first performance score of each node in the blockchain network;

[0065] Step 202: Based on the first performance score, select X nodes from the blockchain network as ledger nodes.

[0066] Where X is the integer value of lgN, N is the total number of nodes in the blockchain network, and both X and N are positive integers.

[0067] This process can score each node based on the metrics included in the node information level, and obtain an effectiveness score.

[0068] Based on the first performance score, the top X nodes are selected as ledger nodes, thus achieving effective selection of nodes in the blockchain network.

[0069] Step 102: Based on the second node information degree, select a set number of sub-efficiency nodes for each ledger node.

[0070] Secondary performance nodes are nodes selected in addition to the ledger nodes to provide functional assistance to the ledger nodes.

[0071] Optionally, the performance of a secondary performance node may be lower than that of a ledger node.

[0072] The information degree of the second node includes the information degree of the first node mentioned above.

[0073] When selecting secondary performance nodes based on node information level, other metrics can be added to the first node information level to recalculate the performance scores of other different nodes besides the ledger node on the same second node information level, thereby selecting secondary performance nodes.

[0074] Other metrics that can be added here include the node's own hardware capabilities, the physical distance between nodes, the correctness of data transmission by the node, and the number of neighbors around the node.

[0075] Specifically, in one optional implementation, the second node information level includes:

[0076] The first node's information level, and the distance between the node and each of the ledger nodes.

[0077] Correspondingly, optionally, combined Figure 3 As shown, the step of selecting a set number of sub-performance nodes for each ledger node based on the second node information degree includes:

[0078] Step 301: Based on the second node information degree, determine the second performance score of each other node in the blockchain network other than the ledger node;

[0079] Step 302: Based on the second performance score, select Y nodes from the other nodes in the blockchain network as secondary performance nodes.

[0080] Where Y is the integer value of 2LgM, M is the total number of other nodes in the blockchain network, and both Y and M are positive integers.

[0081] By increasing the distance between the node and the ledger node as a reference value, the node information degree of each node is recalculated. Y secondary efficiency nodes are selected for each ledger node to bear the transmission pressure of the ledger node. Y is the value of 2LgM rounded down, and M is the number of other nodes in the blockchain network besides the ledger node. The high-performance nodes that are truly suitable for the current blockchain network are selected.

[0082] Each node can be scored based on the metrics included in its information content, resulting in an effectiveness score.

[0083] Based on the second performance score, the top Y nodes with the highest scores are selected as secondary performance nodes.

[0084] The above implementation steps incorporate more factors that affect node performance during node selection, ultimately achieving effective selection of nodes in the blockchain network.

[0085] Furthermore, optionally, a time degradation strategy can be set for the information content contained in the first node's information degree or the second node's information degree. Specifically, different weight values ​​can be assigned to the information content contained in the first node's information degree or the second node's information degree according to the length of the set time, or the information content contained in the first node's information degree or the second node's information degree can be updated and adjusted when it is determined that the set time exceeds a threshold. This is to prevent certain nodes in the blockchain network from becoming network hotspots.

[0086] Step 103: Based on the ledger node, propagate the ledger information to each of the secondary efficiency nodes, and based on the secondary efficiency nodes, propagate the ledger information to each ordinary node in the blockchain network.

[0087] The ordinary node refers to any node in the blockchain network other than the central node and the secondary performance node.

[0088] During information transmission between ledger nodes and secondary efficiency nodes, the ledger node reports its transactions during transmission, ensuring consistency of ledger-related information across all secondary efficiency nodes. Data consistency in secondary efficiency nodes is achieved through the ledger node. Similarly, data consistency in ordinary nodes is achieved through the secondary efficiency nodes.

[0089] In one specific implementation, the step of propagating ledger information to each of the sub-performance nodes based on the ledger node includes:

[0090] Based on the ledger node, the minimum spanning tree algorithm is used to propagate messages to each of the sub-efficiency nodes.

[0091] The minimum spanning tree algorithm is used here to reduce redundancy in the message transmission process.

[0092] In another optional implementation, the step of propagating the ledger information to various ordinary nodes in the blockchain network based on the secondary performance node includes:

[0093] Based on the aforementioned secondary efficiency node, the gossip algorithm is used to propagate the ledger information to each ordinary node in the blockchain network.

[0094] When secondary efficiency nodes and ordinary nodes transmit information, the gossip algorithm is used to synchronize data between them.

[0095] In distributed systems, the Gossip synchronization algorithm mainly consists of an event model and a message update model. Based on the event model, Gossip can be divided into synchronous Gossip and asynchronous Gossip. Based on the message update model, Gossip can be divided into unicast-based Gossip and broadcast-based Gossip. For blockchain P2P networks (such as Bitcoin and Ethereum), the Gossip algorithm typically employs an asynchronous and broadcast-based approach. In each time interval, a node is woken up to randomly select a neighboring node for data exchange.

[0096] In this embodiment, during message broadcasting, the secondary-efficiency node first selects a node from its neighboring ordinary nodes and propagates the data using a propagation protocol. The ordinary nodes that receive the data repeat this process until all nodes in the network have received the data, ensuring perfect propagation and achieving eventual consistency among the nodes.

[0097] Furthermore, in the gossip algorithm, the anti-entropy working mode has a significant "epidemic" characteristic, that is, it has the infectiousness and susceptibility of information between nodes, which can ensure the perfect propagation of information and make the information propagation reach final consistency between nodes.

[0098] In one embodiment of this application, the communication mode between nodes in the gossip algorithm can specifically be Push, Pull, or a combination of both.

[0099] Specifically, Push refers to N nodes communicating in periods, where in each period, the node with updated data sends the updated data to other random nodes, and those other nodes also update their data accordingly; Pull refers to N nodes communicating in periods, where in each period, the node with updated data sends the entire database (or a hash of the data) to other nodes, and the data receiving nodes update their own database by merging the data updates that are not visible to them.

[0100] When using the gossip algorithm to propagate messages, once a secondary node has new data, this node becomes active and periodically contacts other ordinary nodes to send the new data to it, until all ordinary nodes have stored the new data and reached eventual consensus.

[0101] Alternatively, in a different implementation, based on the secondary performance node, the ledger information is propagated to various ordinary nodes in the blockchain network, including:

[0102] Based on the secondary performance node, upon receiving a block data retrieval request initiated by the ordinary node, a message is propagated to the ordinary node.

[0103] This process corresponds to the automatic data retrieval process of ordinary nodes.

[0104] To ensure the integrity of the solution, ordinary nodes can also proactively initiate message requests to secondary performance nodes.

[0105] When a regular node joins the blockchain cluster for the first time, it learns about all the secondary nodes in the system through its configuration information and then initiates data pull requests to all of them. This allows for rapid message synchronization and the start of operations.

[0106] Alternatively, if a regular node does not receive messages from a secondary performance node for an extended period, the regular node will automatically initiate a data retrieval request to the secondary performance node. This can accelerate information convergence.

[0107] Specifically, in one optional implementation, a regular node maintains its connection with all secondary performance nodes of the ledger node through a heartbeat mechanism. When it finds that its block data is lagging behind the current network, it will automatically send a request to the secondary performance nodes to pull the block data, ensuring that it can have complete block information.

[0108] In the specific implementation process, the ledger node can first transmit messages to ordinary nodes according to the minimum spanning tree method. For ordinary nodes that do not receive messages due to network failures, after the message times out, they can initiate a block data retrieval request to the secondary performance node according to the node information table maintained by their own node.

[0109] In the process described above, the ledger node only needs to ensure that the information propagated to all secondary nodes achieves eventual consistency. The eventual consistency of messages in ordinary nodes is then handled by the secondary nodes.

[0110] The above information transmission method, for blockchain networks with smaller scale, will not add too many sub-efficient nodes, will not significantly affect propagation performance, and will ensure high data transmission efficiency.

[0111] For large-scale blockchain networks, this data synchronization method reduces the pressure on ledger nodes by adding secondary efficiency nodes, thereby reducing the load capacity of ledger nodes, reducing the redundancy of information propagation, and balancing data synchronization speed and node load.

[0112] In this embodiment, ledger nodes are selected based on a first node information level, and a set number of secondary performance nodes are selected for each ledger node based on a second node information level. Ledger information is then propagated to each secondary performance node based on the ledger node, and ledger information is also propagated to each ordinary node in the blockchain network based on the secondary performance nodes. By adding secondary performance nodes to the ledger nodes, the load pressure on the ledger nodes is reduced, performance bottlenecks of individual nodes are avoided, and load balancing is achieved. Furthermore, different node information levels are introduced in the process of selecting ledger nodes and secondary performance nodes to increase the reliability of node selection, accelerate the information propagation rate, and reduce message propagation redundancy.

[0113] See Figure 4 , Figure 4 This is a structural diagram of an information transmission device in a blockchain network provided in an embodiment of this application. For ease of explanation, only the parts related to the embodiment of this application are shown.

[0114] The information transmission device 400 in the blockchain network includes:

[0115] The first node selection module 401 is used to select ledger nodes based on the information content of the first node.

[0116] The second node selection module 402 is used to select a set number of sub-efficiency nodes for each ledger node based on the information degree of the second node.

[0117] The information transmission module 403 is used to propagate ledger information to each of the secondary efficiency nodes based on the ledger node, and to propagate the ledger information to each ordinary node in the blockchain network based on the secondary efficiency nodes.

[0118] The ordinary node refers to any node in the blockchain network other than the central node and the secondary performance node.

[0119] The information content of the first node includes:

[0120] The number of nodes a node visits within a set step size, and the node's own information load capacity;

[0121] The number of nodes visited by a node's neighboring nodes within a set step size, and the information load capacity of the node's neighboring nodes.

[0122] Specifically, the first node selection module 401 is used for:

[0123] Based on the information degree of the first node, the first performance score of each node in the blockchain network is determined.

[0124] Based on the first performance score, X nodes are selected from the blockchain network as ledger nodes, where X is the integer value of lgN, N is the total number of nodes in the blockchain network, and both X and N are positive integers.

[0125] The second node information degree includes:

[0126] The first node's information level, and the distance between the node and each of the ledger nodes.

[0127] The second node selection module 402 is specifically used for:

[0128] Based on the second node information degree, the second performance score of each other node in the blockchain network other than the ledger node is determined;

[0129] Based on the second performance score, Y nodes are selected from the other nodes in the blockchain network as secondary performance nodes, where Y is the integer value of 2LgM, M is the total number of other nodes in the blockchain network, and both Y and M are positive integers.

[0130] The information transmission module 403 is specifically used for:

[0131] Based on the ledger node, the minimum spanning tree algorithm is used to propagate messages to each of the sub-efficiency nodes.

[0132] The information transmission module 403 is specifically used for:

[0133] Based on the aforementioned sub-efficiency node, the gossip algorithm is used to propagate the ledger information to each ordinary node in the blockchain network; or...

[0134] Based on the secondary performance node, upon receiving a block data retrieval request initiated by the ordinary node, a message is propagated to the ordinary node.

[0135] The information transmission device in the blockchain network provided in this application embodiment can implement the various processes of the above-described information transmission method in the blockchain network embodiment and achieve the same technical effect. To avoid repetition, it will not be described again here.

[0136] Figure 5 This is a structural diagram of a computer device provided in an embodiment of this application. As shown in the figure, the computer device 5 of this embodiment includes: at least one processor 50 ( Figure 5 (Only one is shown in the diagram), memory 51, and computer program 52 stored in said memory 51 and executable on said at least one processor 50, wherein said processor 50 executes said computer program 52 to implement the steps in any of the above method embodiments.

[0137] The computer device 5 may be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device 5 may include, but is not limited to, a processor 50 and a memory 51. Those skilled in the art will understand that... Figure 5 This is merely an example of computer device 5 and does not constitute a limitation on computer device 5. It may include more or fewer components than shown, or combine certain components, or different components. For example, the computer device may also include input / output devices, network access devices, buses, etc.

[0138] The processor 50 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0139] The memory 51 can be an internal storage unit of the computer device 5, such as a hard disk or memory of the computer device 5. The memory 51 can also be an external storage device of the computer device 5, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the computer device 5. Furthermore, the memory 51 can include both internal and external storage units of the computer device 5. The memory 51 is used to store the computer program and other programs and data required by the computer device. The memory 51 can also be used to temporarily store data that has been output or will be output.

[0140] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0141] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0142] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0143] In the embodiments provided in this application, it should be understood that the disclosed apparatus / computer devices and methods can be implemented in other ways. For example, the apparatus / computer device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings or direct couplings or communication connections may be through some interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.

[0144] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0145] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0146] If the integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.

[0147] The methods described in this application can be implemented in whole or in part by a computer program product. When the computer program product is run on a computer device, the computer device executes the steps in the various method embodiments described above.

[0148] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A method for information transmission in a blockchain network, characterized in that, The method comprises the following steps: selecting ledger nodes based on first node information degrees; the first node information degree comprises: the number of nodes accessed by the node itself within a set step length, and the information load capacity of the node itself; the number of nodes accessed by the neighbor node of the node within a set step length, and the information load capacity of the neighbor node of the node; selecting a set number of secondary performance nodes for each of the ledger nodes based on second node information degrees; the second node information degree comprises the first node information degree and the distance between the node and each of the ledger nodes; based on the ledger nodes, propagating ledger information to each of the secondary performance nodes, and based on the secondary performance nodes, propagating the ledger information to each of the ordinary nodes in the blockchain network; wherein the ordinary nodes are nodes in the blockchain network other than the central node and the secondary performance nodes.

2. The method of claim 1, wherein, The method of selecting ledger nodes based on the first node information degree comprises: determining first performance scores of each node in the blockchain network based on the first node information degree; selecting X nodes from the blockchain network as ledger nodes based on the first performance scores, wherein X is the integer part of lgN, N is the total number of nodes in the blockchain network, and X and N are both positive integers.

3. The method of claim 1, wherein, The method of selecting a set number of secondary performance nodes for each of the ledger nodes based on the second node information degree comprises: determining second performance scores of each of the other nodes in the blockchain network other than the ledger nodes based on the second node information degree; selecting Y nodes from the other nodes in the blockchain network as secondary performance nodes based on the second performance scores, wherein Y is the integer part of 2LgM, M is the total number of the other nodes in the blockchain network, and Y and M are both positive integers.

4. The method of claim 1, wherein, The method of propagating ledger information to each of the secondary performance nodes based on the ledger nodes comprises: propagating the ledger information to each of the secondary performance nodes based on the ledger nodes using a minimum spanning tree algorithm.

5. The method of claim 1, wherein, The method of propagating the ledger information to each of the ordinary nodes in the blockchain network based on the secondary performance nodes comprises: propagating the ledger information to each of the ordinary nodes in the blockchain network based on the secondary performance nodes using a gossip algorithm; or propagating the ledger information to the ordinary nodes based on the secondary performance nodes when a block data pulling request initiated by the ordinary node is received.

6. An information transmission apparatus in a blockchain network, characterized by, The method comprises the following steps: a first node selection module for selecting ledger nodes based on first node information degrees; the first node information degree comprises: the number of nodes accessed by the node itself within a set step length, and the information load capacity of the node itself; the number of nodes accessed by the neighbor node of the node within a set step length, and the information load capacity of the neighbor node of the node; a second node selection module for selecting a set number of secondary performance nodes for each of the ledger nodes based on second node information degrees; the second node information degree comprises the first node information degree and the distance between the node and each of the ledger nodes; An information transmission module is configured to propagate, based on the ledger node, ledger information to each of the secondary performance nodes, and propagate, based on the secondary performance node, the ledger information to each of the normal nodes in the blockchain network. The normal nodes are nodes in the blockchain network other than the central node and the secondary performance nodes.

7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor, when executing the computer program, implements the steps of the method of any one of claims 1 to 5.

8. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 7. The computer program, when executed by the processor, implements the steps of the method of any one of claims 1 to 5.

Citation Information

Patent Citations

  • Distributed data synchronization method

    CN109121176A

  • Block data transmission method and device based on block chain, and medium

    CN114520810A