CN115297126B - 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
CN115297126B
CN115297126B CN202210810024.8A CN202210810024A CN115297126B CN 115297126 B CN115297126 B CN 115297126B CN 202210810024 A CN202210810024 A CN 202210810024A CN 115297126 B CN115297126 B CN 115297126B
Authority
CN
China
Prior art keywords
information
node
forwarding
transmitted
forwarding node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210810024.8A
Other languages
Chinese (zh)
Other versions
CN115297126A (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

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 a block chain-based information transmission method, a device, a terminal and a storage medium, wherein the method comprises the following steps: acquiring information to be transmitted and a forwarding node list; based on the forwarding node list, extracting a first forwarding node with a network direct connection relation with a current node from the information forwarding nodes, and extracting a second forwarding node with a network non-direct connection relation with the current node from the information forwarding nodes; 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 under the non-fully connected network state.

Description

Information transmission method, device, terminal and storage medium based on block chain
Technical Field
The application belongs to the technical field of blockchain, and particularly relates to a blockchain-based information transmission method, a blockchain-based information transmission device, a blockchain-based information transmission terminal and a blockchain-based information storage medium.
Background
In a alliance chain deployment scene participated by multiple mechanisms, the types of physical networks and the network security levels corresponding to all the mechanisms are different, and IT is difficult for some mechanisms with weaker IT capability to open the physical network, so that the communication cost and time consumption of the physical network opening process are higher, and the networking cost of the alliance chain is higher. And with the expansion of alliance organizations, it is less practical to require that all the organization nodes added into the alliance chain are connected in pairs. This results in a potentially non-fully connected network topology that ultimately forms between the enterprise nodes in the federation chain.
In a federated chain system, however, there may be many messages that need to be delivered in the form of broadcast or multicast. For example, in a federated chain consensus mechanism, a consensus node needs to send consensus information to other nodes on the chain to ensure that the blockchain can reach a consistent state in the distributed network, and so on.
How to implement broadcasting or multicasting of messages in a state where the federation chain is in a non-fully connected network is a problem to be solved.
Disclosure of Invention
The embodiment of the application provides a block chain-based information transmission method, a block chain-based information transmission device, a block chain-based information transmission terminal and a block chain-based information transmission storage medium, so that broadcasting or multicasting of a message is realized when a alliance chain is in a non-fully connected network state.
A first aspect of an embodiment of the present application provides a blockchain-based information transmission method, 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;
Based on the forwarding node list, extracting a first forwarding node with a network direct connection relation with a current node from the information forwarding nodes, and extracting a second forwarding node with a network non-direct connection relation with the current node from the information forwarding nodes;
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 an embodiment of the present application provides an information transmission apparatus based on a blockchain, including:
The first acquisition module is used for 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;
The second acquisition module is used for extracting a first forwarding node with a network direct connection relation with the current node from the information forwarding nodes based on the forwarding node list, and extracting a second forwarding node with a network non-direct connection relation with the current node from the information forwarding nodes;
The generation module is used for 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 the sending module is used for sending the first information transmission instruction to the first forwarding node.
A third aspect of an embodiment of the present application provides a terminal comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the method according to the first aspect when executing the computer program.
A fourth aspect of the embodiments of the present application provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of the method according to the first aspect.
A fifth aspect of the application provides a computer program product for causing a terminal to carry out the steps of the method of the first aspect described above when the computer program product is run on the terminal.
From the above, according to the embodiment of the present application, by acquiring the information to be transmitted and the forwarding node list, extracting the first forwarding node having the network direct connection relationship with the current node from the information forwarding nodes, extracting the second forwarding node having the network non-direct connection relationship with the current node from the information forwarding nodes, generating the information transmission instruction carrying the information to be transmitted and the node information of the second forwarding node, sending the information transmission instruction to the first forwarding node, and transmitting the information to be transmitted to the network direct connection nodes, and at the same time, transmitting the information to be transmitted to the network non-direct connection relationship nodes through the hops of the network direct connection nodes, thereby ensuring that the deterministic delivery of the network message in the broadcast or multicast process is realized in the non-fully connected network state.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments or the description of the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a blockchain-based information transmission method provided by an embodiment of the present application;
fig. 2 is a flowchart of a first embodiment of the present application for obtaining information to be transmitted and a forwarding node list;
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 chain based information transmission device according to an embodiment of the present application;
fig. 5 is a block 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 the particular system architecture, 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 should 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 application herein is for the purpose of describing particular embodiments only and is not intended to be limiting 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 as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in this specification and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
It should be understood that, the sequence number of each step in this embodiment does not mean the execution sequence, and the execution sequence of each process should be determined by its function and internal logic, and should not limit the implementation process of the embodiment of the present application in any way.
In order to illustrate the technical scheme of the application, the following description is made by specific examples.
Referring to fig. 1, fig. 1 is a flowchart of a block chain based information transmission method according to an embodiment of the present application. As shown in fig. 1, a blockchain-based information transmission method includes the following steps:
And step 101, acquiring information to be transmitted and a forwarding node list.
The forwarding node list is used for recording node information of the information forwarding nodes corresponding to the information to be transmitted.
The information to be transmitted is, for example, information to be shared, information to be synchronized, and the like. The information to be transmitted needs to be broadcast or multicast transmitted to other nodes by the current node.
The node information of the information forwarding node comprises information such as node names, node addresses, organizations corresponding to the nodes in the alliance chain and the like.
In the embodiment of the application, because the current node and other nodes in the blockchain are in a non-fully connected network topology, when the information to be transmitted is broadcast or multicast to other nodes, the information cannot be transmitted through a directly connected network path, so that the information is required to be transmitted in an effective broadcast or multicast way by means of information forwarding.
The information forwarding node is specifically a node which needs to forward and transfer the 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 node information of the information forwarding node is recorded in the forwarding node list;
If yes, executing step 102 to extract a first forwarding node having a network direct connection relation with the current node from the information forwarding nodes based on the forwarding node list, and extract a second forwarding node having a network non-direct connection relation with the current node from the information forwarding nodes;
if not, the information to be transmitted can be determined to be transmitted completely.
The forwarding node list is used for recording node information of the information forwarding nodes corresponding to the information to be transmitted. When node information of the information forwarding node is recorded in the forwarding node list, it is indicated that the information to be transmitted needs to be transmitted by other nodes besides the current node, that is, broadcasting or multicasting of the information to be transmitted to all destination nodes is not completed yet. When the node information of the information forwarding node is not recorded in the forwarding node list, the current node is the last node for broadcasting or multicasting the information to be transmitted, and the information to be transmitted can be judged to be transmitted completely.
After the transmission of the information to be transmitted is determined, 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 requirements of the current data processing matters.
Step 102, based on the 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.
The current node is any node with information transmission requirement in the alliance chain. The current node is specifically a node itself for implementing information transmission by executing the information transmission method in the embodiment of the application when the information transmission requirement exists in the node.
And forming a network connection topological structure between different nodes in the block chain, wherein each node can acquire a node with a network direct connection relation with the current node based on the network connection topological structure. And further determining a first forwarding node with a network direct connection relation with the current node and a second forwarding node with a network non-direct connection relation with the current node from the information forwarding nodes recorded in the forwarding node list.
The network connection relationship between the nodes is specifically a direct connection relationship or a non-direct connection relationship. Wherein, the direct connection relationship refers to a direct network connection relationship between two nodes; a non-direct connection relationship refers to a relationship that does not have a direct network connection between two nodes.
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 with a network direct connection relation with the current node;
acquiring node intersections between the information forwarding nodes and the target nodes in the forwarding node list;
And taking the nodes contained in the node intersection as the first forwarding nodes, and determining the rest nodes except the first forwarding nodes in the information forwarding nodes as the second forwarding nodes.
And determining a first forwarding node with a network direct connection relation with the current node from the information forwarding nodes by acquiring intersection operation between the information forwarding nodes in the forwarding node list and the target node directly connected with the current node, and determining the rest nodes in the information forwarding nodes as second forwarding nodes with a network non-direct connection relation with the current node.
Based on the forwarding node list, the information forwarding nodes are divided into nodes which can directly transmit information by the current node and nodes which need to transmit information by the current node through the network direct connection relationship to realize information transmission.
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 node information of the second forwarding node.
Specifically, the node information and the information to be transmitted of the second forwarding node may be packaged to generate a data packet, and the data packet is subjected to instruction packaging to obtain the first information transmission instruction.
Differently, in an optional embodiment, generating a first information transmission instruction based on the second forwarding node and the information to be transmitted includes:
Removing node information of the first forwarding node from the forwarding node list to obtain an updated forwarding node list;
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 node information of a second forwarding node which has a network non-direct connection relation with the current node is remained 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 above processing procedure, after the current node obtains the information to be transmitted and the forwarding node list, it is necessary to extract the node having a direct connection relationship with the current node and the node having a non-direct connection relationship with the current node from the forwarding node list, further update the content of the forwarding node list, reject the node information of the first forwarding node in the forwarding node list, and transmit the information to be transmitted and the updated forwarding node list to the first forwarding node having a direct connection relationship with the current node together through the first information transmission instruction, so that the first forwarding node can continue to repeat the above operation procedure based on the forwarding node list carried by the first information transmission instruction after receiving the first information transmission instruction, extract the node having a direct connection relationship with the current node and the node having a non-direct connection relationship with the current node from the forwarding node list, further update the content of the forwarding node list, reject the node information having a direct connection relationship with the current node in the forwarding node list, and transmit the information to be transmitted and the updated forwarding node list to the forwarding node having a direct connection relationship with the current node through the information transmission instruction until the information to be transmitted by the forwarding node list has no record information in the forwarding node list, and the information to be transmitted can be determined.
Step 104, sending the first information transmission instruction to the first forwarding node.
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 is carried in the first information transmission instruction and records the node information of the second forwarding node can be correspondingly obtained. Then, the first forwarding node may perform information processing and outward transmission according to the processing flows from step 101 to step 104, until when a node detects that no node information of the information forwarding node is recorded in the forwarding node list corresponding to the information to be transmitted, it indicates that the current node is the last node for broadcasting or multicasting the information to be transmitted, and it may be determined that the information to be transmitted is transmitted completely.
The steps are that the information to be transmitted is transmitted to the network direct connection node, and 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, so that the deterministic delivery of the network information in the broadcasting or multicasting process is realized under the non-full connection network state.
In one embodiment, as shown in fig. 2, the foregoing obtaining the information to be transmitted 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 node information of the information forwarding node.
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 started initially, the consensus routing table is obtained through reading configuration, then cluster members are dynamically added or withdrawn, and the consensus routing table is also dynamically changed.
In the implementation process, the current node is a production node of the information to be transmitted, namely, a starting node of the information to be transmitted. At this time, the information to be transmitted and the forwarding node list are acquired, and the construction of the information to be transmitted and the determination of the destination node for transmitting the information to be transmitted outwards need to be realized through user operation in the nodes.
In another embodiment, in conjunction with fig. 3, the obtaining the information to be transmitted and the forwarding node list includes:
Step 301, obtaining a second information transmission instruction sent by a target node which is in a network direct connection relation 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 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.
In the process, the current node is an intermediate node involved in the process of sending 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 transmitted from the previous node which is in a network direct connection relationship with the current node. And analyzing the information transmission instruction sent by the previous node, extracting information to be transmitted carried in the information transmission instruction and the information forwarding node which is in a network non-direct connection relation with the previous node, and obtaining a forwarding node list.
Correspondingly, when a first forwarding node with a network direct connection relation with the current node is extracted from the information forwarding nodes, and a second forwarding node with a network non-direct connection relation 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, recording to which nodes the message producer needs to broadcast the information to be transmitted. In the broadcasting scenario, the transmission routing table may specifically be a consensus routing table, where the table records consensus node information. The message producer is typically a consensus node.
A list of nodes to be transmitted may also be provided, in which a record may be updated of which nodes the information to be transmitted for this round will actually be transmitted to, which nodes typically have established a direct network connection with the current node.
A forwarding node list may also be provided, in which nodes to which the information to be transmitted in this round cannot be sent may be updated, and these nodes typically have no direct network connection with the current node and need to be forwarded by other intermediate nodes.
The nodes in each list are polled and updated in the information transmission process of each round, so that a first forwarding node with a network direct connection relation with a current node can be extracted from the information forwarding nodes based on the forwarding node list, a second forwarding node with 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 with the network direct connection relation with the current node, and deterministic delivery in the network message broadcasting or multicasting process under the non-full-connection network topology is achieved.
In connection with the various embodiments described above, it may be that, in one particular application:
The message production node constructs an original message, namely information to be transmitted, carries a forwarding node list, sends the original message to a network module in the node for processing in a throwing event mode, calculates an intersection according to node information in the forwarding node list and node information in a blockchain, which is connected with a network, and puts the intersection into the information list of the nodes to be transmitted, and the rest node information is continuously stored in the forwarding node list;
And the local node packages the original message and the forwarding node list and sends the packaged original message and the forwarding node list to the nodes in the node information list 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 message to an upper layer module for processing in a event throwing mode, and then prepares for forwarding the message;
The opposite node calculates an intersection set according to the forwarding node list and the node information of which the network connection is established in the blockchain, places the intersection set in the to-be-sent node information list, and eliminates the node information placed in the to-be-sent node information list from the forwarding node list. If there is no intersection, the process flow of the node ends.
And the opposite node packages the original message and the new forwarding node list and sends the packaged message and the new forwarding node list to the nodes in the information list of the nodes to be sent.
And the corresponding opposite end node continuously repeats 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 a non-full connection topology, and only needs to open the physical network of part of nodes, so that the whole cluster network topology forms a connection graph, each node can possibly take the role of forwarding network information, and the deterministic delivery of network information is realized.
According to the embodiment of the application, the information to be transmitted and the forwarding node list are obtained, the first forwarding node which has the network direct connection relation with the current node is extracted from the information forwarding nodes, the second forwarding node which has the network non-direct connection relation with the current node is extracted from the information forwarding nodes, the 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 nodes, and meanwhile, the information to be transmitted is transmitted to the network non-direct connection relation nodes through the network direct connection nodes in a jumping manner, so that the transmission of the network information in a broadcast or multicast process is realized under the non-full connection network state.
Referring to fig. 4, fig. 4 is a block chain-based information transmission apparatus according to an embodiment of the present application, and only a portion related to the embodiment of the present application is shown for convenience of explanation.
The blockchain-based information transmission device 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;
and the sending module 404 is configured to send the first information transmission instruction to the first forwarding node.
The first obtaining module 401 is specifically configured to:
Based on user operation, constructing information to be transmitted and a transmission routing table;
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 a network direct connection relation with the current node;
Based on the second information transmission instruction, extracting information to be transmitted and information forwarding nodes corresponding to the information to be transmitted, and obtaining 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 with a network direct connection relation with the current node;
acquiring node intersections between the information forwarding nodes and the target nodes in the forwarding node list;
And taking the nodes contained in the node intersection as the first forwarding nodes, and determining the rest nodes except the first forwarding nodes in the information forwarding nodes as the second forwarding nodes.
The generating module 403 is specifically configured to:
Removing node information of the first forwarding node from the forwarding node list to obtain an updated forwarding node list;
Generating a first information transmission instruction carrying the updated forwarding node list and the information to be transmitted.
Wherein the apparatus further comprises:
The judging module is used for:
judging whether node information of the information forwarding node is recorded in the forwarding node list;
If yes, executing the steps of extracting a first forwarding node with a network direct connection relation with the current node from the information forwarding nodes based on the forwarding node list and extracting a second forwarding node with a network non-direct connection relation with the current node from the information forwarding nodes;
if not, determining that the information to be transmitted is transmitted completely.
The information transmission device based on the block chain provided by the embodiment of the application can realize each process of the embodiment of the information transmission method based on the block chain, can achieve the same technical effect, and is not repeated here for avoiding repetition.
Fig. 5 is a block 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 is 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, the processor 50 implementing the steps in any of the various method embodiments described above when executing the computer program 52.
The terminal 5 may be a computing device such as a desktop computer, a notebook computer, a palm computer, a cloud server, etc. 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 merely an example of the terminal 5 and is not limiting of the terminal 5, and may include more or fewer components than shown, or may combine some components, or different components, e.g., the terminal may further include input and output devices, network access devices, buses, etc.
The Processor 50 may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (DIGITAL SIGNAL Processor, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 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 memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, a flash memory card (FLASH CARD) or the like, which are 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 as well as 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 will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, the specific names of the functional units and modules are only for distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
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 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 manners. For example, the apparatus/terminal embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown 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 may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated modules/units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the computer readable medium contains content that can be appropriately scaled according to the requirements of jurisdictions in which such content is subject to legislation and patent practice, such as in certain jurisdictions in which such content is subject to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
The present application may also be implemented as a computer program product for implementing all or part of the procedures of the methods of the above embodiments, which when run on a terminal causes the terminal to perform the steps of the method embodiments described above.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (9)

1. A blockchain-based information transmission method, comprising:
The method comprises the steps of obtaining information to be transmitted and a forwarding node list, wherein the forwarding node list is used for recording node information of information forwarding nodes corresponding to the information to be transmitted, and the forwarding node list is also used for updating nodes to which the information to be transmitted cannot be sent in a record round;
Based on the forwarding node list, extracting a first forwarding node with a network direct connection relation with a current node from the information forwarding nodes, and extracting a second forwarding node with a network non-direct connection relation with the current node from the information forwarding nodes;
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; the generating a first information transmission instruction based on the second forwarding node and the information to be transmitted includes: removing node information of the first forwarding node from the forwarding node list to obtain an updated forwarding node list; generating a first information transmission instruction carrying the updated forwarding node list and the information to be transmitted;
and sending the first information transmission instruction to the first forwarding node.
2. The method according to claim 1, wherein the obtaining the information to be transmitted and the forwarding node list comprises:
Based on user operation, constructing information to be transmitted and a transmission routing table;
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 according to 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 a network direct connection relation with the current node;
Based on the second information transmission instruction, extracting information to be transmitted and information forwarding nodes corresponding to the information to be transmitted, and obtaining 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.
4. The method according to claim 1, wherein the extracting, 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 extracting, from the information forwarding nodes, a second forwarding node having a network non-direct connection relationship with the current node, comprises:
determining a target node with a network direct connection relation with the current node;
acquiring node intersections between the information forwarding nodes and the target nodes in the forwarding node list;
And taking the nodes contained in the node intersection as the first forwarding nodes, and determining the rest nodes except the first forwarding nodes in the information forwarding nodes as the second forwarding nodes.
5. The method according to any one of claims 1 to 4, further comprising, after the obtaining the information to be transmitted and the forwarding node list:
judging whether node information of the information forwarding node is recorded in the forwarding node list;
If yes, executing the steps of extracting a first forwarding node with a network direct connection relation with the current node from the information forwarding nodes based on the forwarding node list and extracting a second forwarding node with a network non-direct connection relation with the current node from the information forwarding nodes;
if not, determining that the information to be transmitted is transmitted completely.
6. A blockchain-based information transmission device, comprising:
The first acquisition module is used for acquiring information to be transmitted and a forwarding node list, wherein the forwarding node list is used for recording node information of information forwarding nodes corresponding to the information to be transmitted, and the forwarding node list is also used for updating the nodes to which the information to be transmitted cannot be sent in the round of record;
The second acquisition module is used for extracting a first forwarding node with a network direct connection relation with the current node from the information forwarding nodes based on the forwarding node list, and extracting a second forwarding node with a network non-direct connection relation with the current node from the information forwarding nodes;
The generation module is used for 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; the generating module is specifically configured to: removing node information of the first forwarding node from the forwarding node list to obtain an updated forwarding node list; generating a first information transmission instruction carrying the updated forwarding node list and the information to be transmitted;
And the sending module is used for sending the first information transmission instruction to the first forwarding node.
7. The apparatus of claim 6, wherein the first acquisition module is specifically configured to:
Based on user operation, constructing information to be transmitted and a transmission routing table;
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.
8. 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 one of claims 1 to 5 when the computer program is executed.
9. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the method according to any one of claims 1 to 5.
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 CN115297126A (en) 2022-11-04
CN115297126B true 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 (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111683013A (en) * 2020-06-08 2020-09-18 腾讯科技(深圳)有限公司 Routing method of acceleration network and acceleration network

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101426031B (en) * 2008-12-09 2011-09-21 中兴通讯股份有限公司 Novel method and apparatus for Ether ring network address updating
CN104243284B (en) * 2014-09-19 2018-04-24 王淦坤 The transmission method and system of a kind of network information
CN107509226A (en) * 2016-06-14 2017-12-22 屈银翔 A kind of route addressing method and device that there is selection to transmit
CN111327527B (en) * 2018-12-14 2022-03-18 中国电信股份有限公司 Flow forwarding method and system, SDN controller and computer readable storage medium
CN111934825B (en) * 2020-09-23 2021-03-02 南京金宁汇科技有限公司 Information transmission method based on block chain and storage medium
CN112565395B (en) * 2020-12-01 2022-05-13 浙商银行股份有限公司 Broadcasting convergence alliance chain P2P networking method and device and readable storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111683013A (en) * 2020-06-08 2020-09-18 腾讯科技(深圳)有限公司 Routing method of acceleration network and acceleration network

Also Published As

Publication number Publication date
CN115297126A (en) 2022-11-04

Similar Documents

Publication Publication Date Title
CN107888562B (en) Data verification and transceiving method, node and system for parallel link access to interconnection chain
CN110288345B (en) Cross-link communication method, device, main chain node and storage medium
CN107276765B (en) Processing method and device for consensus in block chain
CN112615871B (en) Method and device for transmitting authenticatable message across chains
CN108230047B (en) Lottery drawing data processing method and device
CN113347164B (en) Block chain-based distributed consensus system, method, device and storage medium
CN108881354B (en) Push information storage method and device, server and computer storage medium
CN105162879B (en) Realize the method, apparatus and system of multimachine room data consistency
CN108712491A (en) Block chain node, exchange information processing method, terminal device and medium
CN110445719B (en) Routing table management method, device, equipment and storage medium
CN111163130A (en) Network service system and data transmission method thereof
CN109756566B (en) Block chain based data storage method, related equipment and storage medium
CN108880972B (en) Information processing method, server and terminal
CN109104368B (en) Connection request method, device, server and computer readable storage medium
CN112817602A (en) JSON format data sending and receiving method, device and medium
CN114390044B (en) File uploading method, system, equipment and storage medium
CN113179215B (en) Networking communication method, system, node device, storage medium and electronic device
CN115297126B (en) Information transmission method, device, terminal and storage medium based on block chain
CN112615868B (en) Method and device for transmitting authenticatable message across chains
CN115250247B (en) Discovery protocol testing method, system, electronic device and readable storage medium
CN112688870B (en) Routing method, routing device and node equipment
CN114897532A (en) Operation log processing method, system, device, equipment and storage medium
CN110876852B (en) Network game data processing method and system for micro-service
CN113014610A (en) Remote access method, device and system
CN110266599B (en) MAC address learning method and system based on distributed equipment

Legal Events

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