CN115297126A - Information transmission method, device, terminal and storage medium based on block chain - Google Patents

Information transmission method, device, terminal and storage medium based on block chain Download PDF

Info

Publication number
CN115297126A
CN115297126A CN202210810024.8A CN202210810024A CN115297126A CN 115297126 A CN115297126 A CN 115297126A CN 202210810024 A CN202210810024 A CN 202210810024A CN 115297126 A CN115297126 A CN 115297126A
Authority
CN
China
Prior art keywords
information
node
forwarding
forwarding node
transmitted
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.)
Granted
Application number
CN202210810024.8A
Other languages
Chinese (zh)
Other versions
CN115297126B (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.)
Hangzhou Qulian Technology Co Ltd
Original Assignee
Hangzhou Qulian 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 Hangzhou Qulian Technology Co Ltd filed Critical Hangzhou Qulian Technology Co Ltd
Priority to CN202210810024.8A priority Critical patent/CN115297126B/en
Publication of CN115297126A publication Critical patent/CN115297126A/en
Application granted granted Critical
Publication of CN115297126B publication Critical patent/CN115297126B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/1074Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
    • H04L67/1078Resource delivery mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast

Landscapes

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

Abstract

The application is applicable to the technical field of block chains, and provides an information transmission method, an information transmission device, a terminal and a storage medium based on the block chains, wherein the method comprises the following steps: acquiring information to be transmitted and a forwarding node list; extracting a first forwarding node having a network direct connection relation with the current node from the information forwarding nodes and extracting a second forwarding node having a network non-direct connection relation with the current node from the information forwarding nodes based on the forwarding node list; generating a first information transmission instruction based on the second forwarding node and the information to be transmitted; the first information transmission instruction carries the information to be transmitted and the node information of the second forwarding node; and sending the first information transmission instruction to the first forwarding node. The scheme can realize the deterministic delivery of the network message in the broadcasting or multicasting process in the state of the non-full connection network.

Description

Information transmission method, device, terminal and storage medium based on block chain
Technical Field
The present application belongs to the field of block chain technology, and in particular, to a block chain-based information transmission method, apparatus, terminal, and storage medium.
Background
In a scenario of deployment of a alliance chain with multiple organizations, the types of physical networks and network security levels corresponding to the organizations are different, opening the physical network is difficult for some organizations with weak IT (information technology) capabilities, communication cost in the opening process of the physical network is high, time consumption is long, and networking cost of the alliance chain is high. With the expansion of alliance organization, it is not practical to require that every two networks among all the enterprise nodes added into the alliance chain are communicated. This results in a potentially non-fully connected network topology that is ultimately formed between the enterprise nodes in the federation chain.
However, in the alliance chain system, many messages need to be transmitted by broadcast, multicast, or the like. For example, in a federation chain consensus mechanism, a consensus node needs to send consensus information to other nodes in the chain to ensure that a block chain can reach a consistent state in a distributed network, and so on.
Therefore, how to implement broadcasting or multicasting of messages in a non-fully connected network state of a alliance chain is a problem to be solved.
Disclosure of Invention
The embodiment of the application provides an information transmission method, an information transmission device, a terminal and a storage medium based on a block chain, so that broadcasting or multicasting of a message is realized when a alliance chain is in a non-full connection network state.
A first aspect of an embodiment of the present application provides an information transmission method based on a block chain, including:
acquiring information to be transmitted and a forwarding node list, wherein the forwarding node list is used for recording node information of an information forwarding node corresponding to the information to be transmitted;
extracting a first forwarding node having a network direct connection relation with the current node from the information forwarding nodes and extracting a second forwarding node having a network non-direct connection relation with the current node from the information forwarding nodes based on the forwarding node list;
generating a first information transmission instruction based on the second forwarding node and the information to be transmitted; the first information transmission instruction carries the information to be transmitted and the node information of the second forwarding node;
and sending the first information transmission instruction to the first forwarding node. A second aspect of the embodiments of the present application provides an information transmission apparatus based on a block chain, including:
the device comprises a first acquisition module, a first transmission module and a second acquisition module, wherein the first acquisition module is used for acquiring information to be transmitted and a forwarding node list, and the forwarding node list is used for recording node information of an information forwarding node corresponding to the information to be transmitted;
the second acquisition module is used for extracting a first forwarding node which has a network direct connection relation with the current node from the information forwarding nodes and extracting a second forwarding node which has a network non-direct connection relation with the current node from the information forwarding nodes based on the forwarding node list;
a generating module, configured to generate a first information transmission instruction based on the second forwarding node and the information to be transmitted; the first information transmission instruction carries the information to be transmitted and the node information of the second forwarding node;
and the sending module is used for sending the first information transmission instruction to the first forwarding node.
A third aspect of embodiments of the present application provides a terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the method according to the first aspect when executing the computer program.
A fourth aspect of embodiments of the present application provides a computer-readable storage medium, in which a computer program is stored, which, when executed by a processor, performs the steps of the method according to the first aspect.
A fifth aspect of the present application provides a computer program product, which, when run on a terminal, causes the terminal to perform the steps of the method of the first aspect described above.
As can be seen from the above, in the embodiment of the present application, by obtaining information to be transmitted and a forwarding node list, a first forwarding node having a network direct connection relationship with a current node is extracted from an information forwarding node, a second forwarding node having a network non-direct connection relationship with the current node is extracted from the information forwarding node, an information transmission instruction carrying node information of the information to be transmitted and the second forwarding node is generated, the information transmission instruction is sent to the first forwarding node, the information to be transmitted is transferred to the network direct connection node while the information to be transmitted is transferred to the network direct connection node, transfer to the network non-direct connection node is achieved through a jump of the network direct connection node, and it is ensured that a deterministic delivery of a network message in a broadcast or multicast process is achieved in a non-fully connected network state.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a flowchart of an information transmission method based on a block chain according to an embodiment of the present application;
fig. 2 is a first flowchart of acquiring information to be transmitted and a forwarding node list according to an embodiment of the present application;
fig. 3 is a second flowchart of acquiring information to be transmitted and a forwarding node list according to an embodiment of the present application;
fig. 4 is a block diagram of an information transmission apparatus based on a block chain according to an embodiment of the present application;
fig. 5 is a structural diagram of a terminal according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
It should be understood that, the sequence numbers of the steps in this embodiment do not mean the execution sequence, and the execution sequence of each process should be determined by the function and the inherent logic of the process, and should not constitute any limitation to the implementation process of the embodiment of the present application.
In order to explain the technical means described in the present application, the following description will be given by way of specific examples.
Referring to fig. 1, fig. 1 is a flowchart of an information transmission method based on a block chain according to an embodiment of the present application. As shown in fig. 1, an information transmission method based on a block chain includes the following steps:
step 101, obtaining information to be transmitted and a forwarding node list.
The forwarding node list is used for recording node information of the information forwarding node corresponding to the information to be transmitted.
The information to be transmitted is, for example, information to be identified, information to be synchronized, and the like. The information to be transmitted needs to be broadcast or multicast transmitted from the current node to other nodes.
The node information of the information forwarding node comprises information such as a node name, a node address, and a corresponding mechanism of the node in the alliance chain.
In the embodiment of the present application, since the current node and the other nodes in the block chain are in a non-fully-connected network topology, when the information to be transmitted is broadcasted or multicasted to the other nodes, the information cannot be transmitted through a directly-connected network path, and therefore, the information needs to be forwarded to realize effective external broadcast or multicast transmission.
The information forwarding node is specifically a node which needs to forward and transmit information to be transmitted in the process of broadcasting or multicasting the information to be transmitted from the starting node to the destination node. More specifically, the information forwarding node is a node in an information forwarding path, and the information forwarding path is used for transmitting information to be transmitted to a destination node.
In a specific embodiment, after obtaining the information to be transmitted and the forwarding node list, the method further includes:
judging whether the node information of the information forwarding node is recorded in the forwarding node list;
if so, executing step 102, based on the forwarding node list, to extract a first forwarding node having a network direct connection relationship with the current node from the information forwarding nodes, and to extract a second forwarding node having a network non-direct connection relationship with the current node from the information forwarding nodes;
if not, it can be determined that the transmission of the information to be transmitted is finished.
The forwarding node list is used for recording node information of the information forwarding node corresponding to the information to be transmitted. When the node information of the information forwarding node is recorded in the forwarding node list, it is indicated that the information to be transmitted has other nodes to be transmitted besides the current node, that is, the information to be transmitted is not yet broadcast or multicast to all destination nodes. And when the node information of the information forwarding node is not recorded in the forwarding node list, it indicates that the current node is the last node for broadcasting or multicasting the information to be transmitted, and can judge that the transmission of the information to be transmitted is finished.
After the transmission of the information to be transmitted is determined to be completed, the information to be transmitted can be continuously subjected to consensus processing according to a consensus mechanism, or the information to be transmitted can be subjected to data processing according to the processing requirement of the current data processing item.
And 102, extracting a first forwarding node which has a network direct connection relation with the current node from the information forwarding nodes and extracting a second forwarding node which has a network non-direct connection relation with the current node from the information forwarding nodes based on the forwarding node list.
The current node is any node in the alliance chain with information transmission requirements. The current node is specifically a node itself which executes the information transmission method in the embodiment of the present application to realize information transmission when the node has an information transmission requirement.
And a network connection topological structure is formed among different nodes in the block chain, and each node can acquire a node having a network direct connection relation with the current node based on the network connection topological structure. And then determining a first forwarding node having a network direct connection relationship with the current node and a second forwarding node having a network non-direct connection relationship with the current node from the information forwarding nodes recorded in the forwarding node list.
The network connection relationship among the nodes is specifically a direct connection relationship or a non-direct connection relationship. The direct connection relation means that two nodes have a direct network connection relation; the non-direct connection relation means that two nodes do not have a direct network connection relation.
In a specific embodiment, based on the forwarding node list, extracting a first forwarding node having a network direct connection relationship with a current node from the information forwarding nodes, and extracting a second forwarding node having a network non-direct connection relationship with the current node from the information forwarding nodes includes:
determining a target node having a network direct connection relation with a current node;
acquiring a node intersection between the information forwarding node and the target node in the forwarding node list;
and taking the node contained in the node intersection as the first forwarding node, and determining the other nodes except the first forwarding node in the information forwarding nodes as the second forwarding nodes.
And determining a first forwarding node having a network direct connection relation with the current node from the information forwarding nodes by obtaining intersection operation between the information forwarding nodes in the forwarding node list and a target node directly connected with the current node, and determining the rest nodes in the information forwarding nodes as second forwarding nodes having a network non-direct connection relation with the current node.
The method realizes that the information forwarding nodes are divided into nodes which can directly transmit information by the current nodes and nodes which need to transmit information by the nodes in the direct network connection relation by the current nodes based on the forwarding node list.
Step 103, generating a first information transmission instruction based on the second forwarding node and the information to be transmitted.
The first information transmission instruction carries the information to be transmitted and the node information of the second forwarding node.
Specifically, the node information of the second forwarding node and the information to be transmitted may be packaged to generate a data packet, and the data packet is subjected to instruction encapsulation to obtain the first information transmission instruction.
Differently, in an optional embodiment, the generating a first information transmission instruction based on the second forwarding node and the information to be transmitted includes:
removing the node information of the first forwarding node from the forwarding node list to obtain an updated forwarding node list;
and generating a first information transmission instruction carrying the updated forwarding node list and the information to be transmitted.
In the process, the obtained forwarding node list is subjected to content updating, and only the node information of the second forwarding node having a network non-direct connection relation with the current node is left in the updated forwarding node list. And carrying the node information of the second forwarding node by carrying the updated forwarding node list in the first information transmission instruction.
In the processing process, after the current node acquires the information to be transmitted and the forwarding node list, a node in direct connection with the current node and a node in non-direct connection with the current node need to be extracted from the forwarding node list, the content of the forwarding node list is updated, the node information of a first forwarding node in the forwarding node list is removed, the information to be transmitted and the updated forwarding node list are transmitted to the first forwarding node in direct connection with the current node together through a first information transmission instruction, the first forwarding node can continue to repeat the operation process based on the forwarding node list carried by the first information transmission instruction after receiving the first information transmission instruction, the node in direct connection with the current node and the node in non-direct connection with the current node are extracted from the forwarding node list, the content of the forwarding node list is updated, the node information of the nodes in direct connection with the forwarding node list is removed, and the information to be transmitted and the updated forwarding node list are transmitted to the forwarding node in direct connection with the current node through the information transmission instruction until no information is recorded in the forwarding node list, and the information to be transmitted can be determined.
And step 104, sending the first information transmission instruction to the first forwarding node.
And when the first information transmission instruction is sent to the first forwarding node, the updated forwarding node list and the information to be transmitted are transmitted to the first forwarding node which has a network direct connection relation with the current node.
After the first forwarding node receives the first information transmission instruction, the forwarding node list which correspondingly acquires the information to be transmitted carried in the first information transmission instruction and records the node information of the second forwarding node can be obtained. Subsequently, the first forwarding node may perform information processing and outward transmission according to the processing flow from step 101 to step 104, until when a certain node detects that the node information of the information forwarding node is not recorded in the forwarding node list corresponding to the information to be transmitted, it indicates that the current node is the last node to broadcast or multicast the information to be transmitted, and may determine that the transmission of the information to be transmitted is completed.
In the steps, the information to be transmitted is transmitted to the network direct-connected node, and simultaneously, the information to be transmitted is jumped to the network direct-connected node, so that the information to be transmitted is transmitted to the network non-direct-connected node, and the deterministic delivery of the network information in the broadcasting or multicasting process is ensured to be realized in the state of the non-fully-connected network.
In an embodiment, as shown in fig. 2, the obtaining of the to-be-transmitted information and the forwarding node list includes:
step 201, constructing information to be transmitted and a transmission routing table based on user operation;
step 202, determining an information forwarding node required for sending the information to be transmitted to a destination node based on the transmission routing table;
step 203, obtaining the forwarding node list recorded with the node information of the information forwarding node.
Wherein, the transmission routing table may be a consensus routing table. The information of all the consensus nodes in the cluster is recorded in the consensus routing table. When the cluster is initially started, the consensus routing table is obtained by reading the configuration, then the cluster members dynamically join or quit, and the consensus routing table is also dynamically changed.
In the above implementation process, the current node is a production node of the information to be transmitted, that is, a start node of the information to be transmitted. At this time, the information to be transmitted and the forwarding node list are acquired by implementing the construction of the information to be transmitted and the determination of the destination node for transmitting the information to be transmitted outwards through the user operation in the node.
In another embodiment, as shown in fig. 3, the obtaining of the to-be-transmitted information and the forwarding node list includes:
step 301, acquiring a second information transmission instruction sent by a target node in a network direct connection relationship with a current node;
step 302, based on the second information transmission instruction, extracting information to be transmitted and an information forwarding node corresponding to the information to be transmitted, and obtaining the forwarding node list in which node information of the information forwarding node is recorded.
And the information forwarding node and the target node are in a network non-direct connection relationship.
In the process, the current node is an intermediate node related in the process of sending the information to be transmitted from the starting node to each destination node.
At this time, the information to be transmitted and the forwarding node list are sent by the previous node in the network direct connection relationship with the current node. The information transmission instruction sent by the previous node is analyzed, and the information to be transmitted carried in the information transmission instruction and the information forwarding node which is not in direct connection with the previous node in the network relation are extracted to obtain a forwarding node list.
Correspondingly, when a first forwarding node having a network direct connection relationship with the current node is extracted from the information forwarding nodes, and a second forwarding node having a network non-direct connection relationship with the current node is extracted from the information forwarding nodes, the method can be implemented in a multi-node polling mode.
In particular, a transmission routing table may be set to record to which nodes the message producer needs to broadcast the information to be transmitted. In a broadcast scenario, the transmission routing table may specifically be a consensus routing table, and information of the consensus node is recorded in the table. The message producer is typically a consensus node.
And a to-be-transmitted node information list can be set, the list can update and record the nodes to which the information to be transmitted in the round is actually transmitted, and the nodes usually establish a direct network connection with the current node.
A forwarding node list may also be set, and nodes to which the information to be transmitted in this round cannot be sent may be updated and recorded in the list, and these nodes usually do not have a direct network connection with the current node and need to be forwarded by other intermediate nodes.
In each round of information transmission process, polling and updating are carried out on nodes in each list, so that a first forwarding node which has a network direct connection relation with a current node is extracted from the information forwarding nodes based on the forwarding node list, a second forwarding node which has a network non-direct connection relation with the current node is extracted from the information forwarding nodes, node information of the first forwarding node is removed from the forwarding node list, updating of the forwarding node list is achieved, the updated forwarding node list is transmitted to the first forwarding node which has the network direct connection relation with the current node, and deterministic delivery in a network message broadcasting or multicasting process under a non-full-connection network topology is achieved.
In combination with the above different embodiments, in a specific application process, the following may be performed:
the method comprises the steps that an original message, namely to-be-transmitted information, is constructed by a message production node, carries a forwarding node list, and is sent to a network module in the node for processing in an event throwing mode, after the network module receives the original message, the network module calculates an intersection according to node information in the forwarding node list and node information of which network connection is established in a block chain, the intersection is put into the to-be-transmitted node information list, and the rest node information is continuously stored in the forwarding node list;
and the local node packs the original message and the forwarding node list and sends the packed original message and the forwarding node list to the nodes in the information list of the node to be sent.
After receiving the message, the opposite end node reads the forwarding node list and the original message, and a network module in the opposite end node sends the forwarding node list and the original message to an upper layer module for processing in an event throwing mode and then prepares for message forwarding;
and the opposite end node calculates intersection according to the forwarding node list and the node information of the established network connection in the block chain, puts the intersection into the node information list to be sent, and eliminates the node information put into the node information list to be sent from the forwarding node list. If there is no intersection, the processing flow of the node ends.
And the opposite end node packs the original message and the new forwarding node list and sends the packed original message and the new forwarding node list to the nodes in the information list of the nodes to be sent.
And the corresponding opposite node continues to repeat the process until the forwarding node list in the network message received by the node is empty, and the forwarding is finished.
The application process realizes a network broadcasting method under the non-full connection topology, only the physical network of partial nodes needs to be communicated, so that the whole cluster network topology forms a connected graph, each node can possibly play the role of network information forwarding, and the deterministic delivery of network information is realized.
According to the method and the device, the first forwarding node which has a network direct connection relation with the current node is extracted from the information forwarding node and the second forwarding node which has a network non-direct connection relation with the current node is extracted from the information forwarding node by obtaining the information to be transmitted and the forwarding node list, an information transmission instruction carrying the information to be transmitted and the node information of the second forwarding node is generated, the information transmission instruction is sent to the first forwarding node, the information to be transmitted is transmitted to the network direct connection node, meanwhile, the information to be transmitted is transmitted to the network non-direct connection relation node through the jump of the network direct connection node, the transmission to the network non-direct connection relation node is achieved, and the fact that the network information is delivered assuredly in the broadcasting or multicasting process is achieved under the state of a non-full-connection network.
Referring to fig. 4, fig. 4 is a structural diagram of an information transmission apparatus based on a block chain according to an embodiment of the present application, and for convenience of description, only a part related to the embodiment of the present application is shown.
The block chain based information transmission apparatus 400 includes:
a first obtaining module 401, configured to obtain information to be transmitted and a forwarding node list, where the forwarding node list is used to record node information of an information forwarding node corresponding to the information to be transmitted;
a second obtaining module 402, configured to extract, based on the forwarding node list, a first forwarding node having a network direct connection relationship with a current node from the information forwarding nodes, and extract, from the information forwarding nodes, a second forwarding node having a network non-direct connection relationship with the current node;
a generating module 403, configured to generate a first information transmission instruction based on the second forwarding node and the information to be transmitted; the first information transmission instruction carries the information to be transmitted and the node information of the second forwarding node;
a sending module 404, configured to send the first information transmission instruction to the first forwarding node.
The first obtaining module 401 is specifically configured to:
constructing information to be transmitted and a transmission routing table based on user operation;
determining an information forwarding node required for sending the information to be transmitted to a destination node based on the transmission routing table;
and obtaining the forwarding node list recorded with the node information of the information forwarding node.
The first obtaining module 401 is specifically configured to:
acquiring a second information transmission instruction sent by a target node which is in network direct connection with the current node;
extracting information to be transmitted and information forwarding nodes corresponding to the information to be transmitted based on the second information transmission instruction to obtain the forwarding node list recorded with node information of the information forwarding nodes;
and the information forwarding node and the target node are in a network non-direct connection relationship.
The second obtaining module 402 is specifically configured to:
determining a target node having a network direct connection relation with a current node;
acquiring a node intersection between the information forwarding node and the target node in the forwarding node list;
and taking the node contained in the node intersection as the first forwarding node, and determining the other nodes except the first forwarding node in the information forwarding nodes as the second forwarding nodes.
The generating module 403 is specifically configured to:
removing the node information of the first forwarding node from the forwarding node list to obtain an updated forwarding node list;
and generating a first information transmission instruction carrying the updated forwarding node list and the information to be transmitted.
Wherein, the device still includes:
a determination module to:
judging whether the node information of the information forwarding node is recorded in the forwarding node list;
if yes, executing the step of extracting a first forwarding node which has a network direct connection relationship with the current node from the information forwarding nodes and extracting a second forwarding node which has a network non-direct connection relationship with the current node from the information forwarding nodes based on the forwarding node list;
if not, determining that the transmission of the information to be transmitted is finished.
The block chain-based information transmission device provided in the embodiment of the present application can implement each process of the above block chain-based information transmission method, and can achieve the same technical effect, and is not described here again to avoid repetition.
Fig. 5 is a structural diagram of a terminal according to an embodiment of the present application. As shown in the figure, the terminal 5 of this embodiment includes: at least one processor 50 (only one shown in fig. 5), a memory 51, and a computer program 52 stored in the memory 51 and executable on the at least one processor 50, wherein the processor 50 implements the steps of any of the above-mentioned method embodiments when executing the computer program 52.
The terminal 5 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal 5 may include, but is not limited to, a processor 50, a memory 51. It will be appreciated by those skilled in the art that fig. 5 is only an example of a terminal 5 and does not constitute a limitation of the terminal 5 and may include more or less components than those shown, or some components in combination, or different components, for example the terminal may also include input output devices, network access devices, buses, etc.
The Processor 50 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 51 may be an internal storage unit of the terminal 5, such as a hard disk or a memory of the terminal 5. The memory 51 may also be an external storage device of the terminal 5, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) and the like provided on the terminal 5. Further, the memory 51 may also include both an internal storage unit and an external storage device of the terminal 5. The memory 51 is used for storing the computer program and other programs and data required by the terminal. The memory 51 may also be used to temporarily store data that has been output or is to be output.
It should be clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional units and modules is only used for illustration, and in practical applications, the above function distribution may be performed by different functional units and modules as needed, that is, the internal structure of the apparatus may be divided into different functional units or modules to perform all or part of the above described functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the description of each embodiment has its own emphasis, and reference may be made to the related description of other embodiments for parts that are not described or recited in any embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal and method may be implemented in other ways. For example, the above-described apparatus/terminal embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer-readable storage medium and can realize the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, read-Only Memory (ROM), random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer-readable medium may contain suitable additions or subtractions depending on the requirements of legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer-readable media may not include electrical carrier signals or telecommunication signals in accordance with legislation and patent practice.
When the computer program product runs on a terminal, the steps in the method embodiments can be realized when the terminal executes.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. An information transmission method based on a block chain is characterized by comprising the following steps:
acquiring information to be transmitted and a forwarding node list, wherein the forwarding node list is used for recording node information of an information forwarding node corresponding to the information to be transmitted;
extracting a first forwarding node which has a network direct connection relation with the current node from the information forwarding nodes and extracting a second forwarding node which has a network non-direct connection relation with the current node from the information forwarding nodes based on the forwarding node list;
generating a first information transmission instruction based on the second forwarding node and the information to be transmitted; the first information transmission instruction carries the information to be transmitted and the node information of the second forwarding node;
and sending the first information transmission instruction to the first forwarding node.
2. The method of claim 1, wherein obtaining the information to be transmitted and the forwarding node list comprises:
constructing information to be transmitted and a transmission routing table based on user operation;
determining an information forwarding node required for sending the information to be transmitted to a destination node based on the transmission routing table;
and obtaining the forwarding node list recorded with the node information of the information forwarding node.
3. The method of claim 1, wherein the obtaining the information to be transmitted and the forwarding node list comprises:
acquiring a second information transmission instruction sent by a target node which is in network direct connection with the current node;
extracting information to be transmitted and an information forwarding node corresponding to the information to be transmitted based on the second information transmission instruction to obtain the forwarding node list recorded with node information of the information forwarding node;
and the information forwarding node and the target node are in a network non-direct connection relationship.
4. The method of claim 1, wherein the extracting, based on the forwarding node list, a first forwarding node having a network-direct relationship with a current node from the information forwarding nodes and a second forwarding node having a network-non-direct relationship with the current node from the information forwarding nodes comprises:
determining a target node having a network direct connection relation with a current node;
acquiring a node intersection between the information forwarding node and the target node in the forwarding node list;
and taking the node contained in the node intersection as the first forwarding node, and determining the other nodes except the first forwarding node in the information forwarding nodes as the second forwarding nodes.
5. The method of claim 1, wherein generating a first information transmission instruction based on the second forwarding node and the information to be transmitted comprises:
removing the node information of the first forwarding node from the forwarding node list to obtain an updated forwarding node list;
and generating a first information transmission instruction carrying the updated forwarding node list and the information to be transmitted.
6. The method according to any one of claims 1 to 5, wherein after obtaining the information to be transmitted and the forwarding node list, further comprising:
judging whether the node information of the information forwarding node is recorded in the forwarding node list;
if the information forwarding nodes are judged to be the first forwarding nodes, extracting the first forwarding nodes which have network direct connection relation with the current nodes from the information forwarding nodes and extracting the second forwarding nodes which have network non-direct connection relation with the current nodes from the information forwarding nodes based on the forwarding node list;
if not, determining that the transmission of the information to be transmitted is finished.
7. An information transmission apparatus based on block chains, comprising:
the device comprises a first acquisition module, a first forwarding module and a second acquisition module, wherein the first acquisition module is used for acquiring information to be transmitted and a forwarding node list, and the forwarding node list is used for recording node information of an information forwarding node corresponding to the information to be transmitted;
the second obtaining module is used for extracting a first forwarding node which has a network direct connection relation with the current node from the information forwarding nodes and extracting a second forwarding node which has a network non-direct connection relation with the current node from the information forwarding nodes based on the forwarding node list;
a generating module, configured to generate a first information transmission instruction based on the second forwarding node and the information to be transmitted; the first information transmission instruction carries the information to be transmitted and the node information of the second forwarding node;
and the sending module is used for sending the first information transmission instruction to the first forwarding node.
8. The apparatus of claim 7, wherein the first obtaining module is specifically configured to:
constructing information to be transmitted and a transmission routing table based on user operation;
determining an information forwarding node required for sending the information to be transmitted to a destination node based on the transmission routing table;
and obtaining the forwarding node list recorded with the node information of the information forwarding node.
9. A terminal comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 6.
CN202210810024.8A 2022-07-11 2022-07-11 Information transmission method, device, terminal and storage medium based on block chain Active CN115297126B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210810024.8A CN115297126B (en) 2022-07-11 2022-07-11 Information transmission method, device, terminal and storage medium based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210810024.8A CN115297126B (en) 2022-07-11 2022-07-11 Information transmission method, device, terminal and storage medium based on block chain

Publications (2)

Publication Number Publication Date
CN115297126A true CN115297126A (en) 2022-11-04
CN115297126B CN115297126B (en) 2024-06-14

Family

ID=83822758

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210810024.8A Active CN115297126B (en) 2022-07-11 2022-07-11 Information transmission method, device, terminal and storage medium based on block chain

Country Status (1)

Country Link
CN (1) CN115297126B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101426031A (en) * 2008-12-09 2009-05-06 中兴通讯股份有限公司 Novel method and apparatus for Ether ring network address updating
CN104243284A (en) * 2014-09-19 2014-12-24 王淦坤 Network information transmission method and system
CN107509226A (en) * 2016-06-14 2017-12-22 屈银翔 A kind of route addressing method and device that there is selection to transmit
CN111327527A (en) * 2018-12-14 2020-06-23 中国电信股份有限公司 Flow forwarding method and system, SDN controller and computer readable storage medium
CN111683013A (en) * 2020-06-08 2020-09-18 腾讯科技(深圳)有限公司 Routing method of acceleration network and acceleration network
CN111934825A (en) * 2020-09-23 2020-11-13 南京金宁汇科技有限公司 Information transmission method, system and storage medium based on block chain
CN112565395A (en) * 2020-12-01 2021-03-26 浙商银行股份有限公司 Broadcasting convergence alliance chain P2P networking method and device and readable storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101426031A (en) * 2008-12-09 2009-05-06 中兴通讯股份有限公司 Novel method and apparatus for Ether ring network address updating
CN104243284A (en) * 2014-09-19 2014-12-24 王淦坤 Network information transmission method and system
CN107509226A (en) * 2016-06-14 2017-12-22 屈银翔 A kind of route addressing method and device that there is selection to transmit
CN111327527A (en) * 2018-12-14 2020-06-23 中国电信股份有限公司 Flow forwarding method and system, SDN controller and computer readable storage medium
CN111683013A (en) * 2020-06-08 2020-09-18 腾讯科技(深圳)有限公司 Routing method of acceleration network and acceleration network
CN111934825A (en) * 2020-09-23 2020-11-13 南京金宁汇科技有限公司 Information transmission method, system and storage medium based on block chain
CN112565395A (en) * 2020-12-01 2021-03-26 浙商银行股份有限公司 Broadcasting convergence alliance chain P2P networking method and device and readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
孙延涛;吴志美;石志强;: "基于地址转发表的交换式以太网拓扑发现方法", 软件学报, no. 12, 23 December 2006 (2006-12-23) *

Also Published As

Publication number Publication date
CN115297126B (en) 2024-06-14

Similar Documents

Publication Publication Date Title
CN112003703B (en) Method and device for transmitting authenticatable message across chains
CN107888562B (en) Data verification and transceiving method, node and system for parallel link access to interconnection chain
CN112615871B (en) Method and device for transmitting authenticatable message across chains
CN108881354B (en) Push information storage method and device, server and computer storage medium
CN115004673B (en) Message pushing method, device, electronic equipment and computer readable medium
CN111399756B (en) Data storage method, data downloading method and device
CN111163130B (en) Network service system and data transmission method thereof
CN108880972B (en) Information processing method, server and terminal
CN110445719B (en) Routing table management method, device, equipment and storage medium
CN110875850A (en) Firmware upgrading method and system, readable storage medium and terminal equipment
CN108259348B (en) Message transmission method and device
CN113179215B (en) Networking communication method, system, node device, storage medium and electronic device
CN112422485B (en) Communication method and device of transmission control protocol
CN107577822A (en) A kind of method of data synchronization, data synchronization unit and mobile terminal
WO2017032110A1 (en) Application message processing system and method, and application device
CN112615868B (en) Method and device for transmitting authenticatable message across chains
CN115297126A (en) Information transmission method, device, terminal and storage medium based on block chain
CN112688870B (en) Routing method, routing device and node equipment
CN113794566B (en) Re-voting binary consensus method, device and storage medium
CN115297054A (en) Information transmission method, device, terminal and storage medium
CN114897532A (en) Operation log processing method, system, device, equipment and storage medium
CN114301989A (en) Information transmission method, device and system
CN113596123A (en) Software downloading method, communication device and storage medium
CN114900710B (en) Multi-device synchronization method and device, electronic device and storage medium
CN107770265A (en) A kind of method of data synchronization, data synchronization unit and mobile terminal

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