CN114338669B - Block chain-based data transmission method, device, equipment and storage medium - Google Patents

Block chain-based data transmission method, device, equipment and storage medium Download PDF

Info

Publication number
CN114338669B
CN114338669B CN202111515240.1A CN202111515240A CN114338669B CN 114338669 B CN114338669 B CN 114338669B CN 202111515240 A CN202111515240 A CN 202111515240A CN 114338669 B CN114338669 B CN 114338669B
Authority
CN
China
Prior art keywords
domain
node
target
current
public
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
CN202111515240.1A
Other languages
Chinese (zh)
Other versions
CN114338669A (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.)
China Zheshang Bank Co Ltd
Original Assignee
China Zheshang Bank 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 China Zheshang Bank Co Ltd filed Critical China Zheshang Bank Co Ltd
Priority to CN202111515240.1A priority Critical patent/CN114338669B/en
Publication of CN114338669A publication Critical patent/CN114338669A/en
Application granted granted Critical
Publication of CN114338669B publication Critical patent/CN114338669B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a data transmission method, device and equipment based on a block chain and a storage medium, and belongs to the technical field of block chains. The method comprises the following steps: responding to a data processing transaction request of a source node, and determining a target domain where a target node is located according to address information of the target node in the data processing transaction request; determining whether the target domain is the same as the current domain where the local node is located; if not, determining an intermediate bridging node according to the domain name of the current domain and the domain name of the target domain; transmitting the data processing transaction request to the intermediate bridge node to cause the intermediate bridge node to transmit the data processing transaction request to the target node. By the technical scheme, the bridge node is introduced, so that the efficiency of data synchronization of the block chain nodes is improved, and efficient and safe communication among the block chain nodes is ensured.

Description

Block chain-based data transmission method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of blockchains, in particular to a blockchain-based data transmission method, a blockchain-based data transmission device, blockchain-based data transmission equipment and a storage medium.
Background
The blockchain is a distributed account book system, can realize multi-node joint accounting, and achieves the consensus among nodes by a certain algorithm, and has the characteristics of decentralization, non-tampering, anonymity and the like. The first condition that the blockchain network can operate is to establish point-to-point network connection between multiple nodes according to a certain topological relation, namely a commonly known P2P network. After the network is established, nodes in the blockchain network can perform consensus and billing operations.
Since blockchain tools are originally developed to solve the centralized trust problem, in a completely real environment, all nodes in a cluster should not generally be located in the network of the same organization system, but often need to be distributed across multiple inter-organization networks, such as disposing some nodes in the a-company's internal network, disposing other nodes in the B-company's internal network, and disposing some nodes in the sub-company's network. The nodes need to establish peer-to-peer network connections and communicate with each other according to the respective configurations. Because of the very high complexity of the actual network environment, there are many potential safety hazards that would be caused if the nodes were fully exposed to the public network.
Disclosure of Invention
The invention provides a data transmission method, a device, equipment and a storage medium based on a block chain, which are suitable for a complex network environment and ensure efficient and safe communication between block chain link points.
In a first aspect, an embodiment of the present invention provides a data transmission method based on a blockchain, which is applied to a bridge node, where the method includes:
responding to a data processing transaction request of a source node, and determining a target domain where a target node is located according to address information of the target node in the data processing transaction request;
determining whether the target domain is the same as the current domain where the local node is located;
if not, determining an intermediate bridging node according to the domain name of the current domain and the domain name of the target domain;
transmitting the data processing transaction request to the intermediate bridge node to cause the intermediate bridge node to transmit the data processing transaction request to the target node.
In a second aspect, an embodiment of the present invention further provides a data transmission device based on a blockchain, configured to be disposed at a bridge node, where the device includes:
the target domain determining module is used for responding to a data processing transaction request of a source node and determining a target domain where a target node is located according to address information of the target node in the data processing transaction request;
the judging module is used for determining whether the target domain is the same as the current domain where the local node is located;
the intermediate bridge node determining module is used for determining an intermediate bridge node according to the domain name of the current domain and the domain name of the target domain if not;
and the data transmission module is used for transmitting the data processing transaction request to the intermediate bridge node so that the intermediate bridge node transmits the data processing transaction request to the target node.
In a third aspect, an embodiment of the present invention further provides an electronic device, including:
one or more processors;
a memory for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement a blockchain-based data transmission method as provided by any of the embodiments of the present invention.
In a fourth aspect, embodiments of the present invention also provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a blockchain-based data transmission method as provided by any of the embodiments of the present invention.
According to the technical scheme of the embodiment of the invention, the target domain where the target node is located is determined according to the address information of the target node in the data processing transaction request by responding to the data processing transaction request of the source node, whether the target domain is the same as the current domain where the local node is located is determined, if not, the intermediate bridging node is determined according to the domain name of the current domain and the domain name of the target domain, and the data processing transaction request is transmitted to the intermediate bridging node, so that the intermediate bridging node transmits the data processing transaction request to the target node. According to the technical scheme, the bridge node is introduced, so that the efficiency of data synchronization of the block chain nodes is improved, meanwhile, under a complex network environment, efficient and safe communication among the block chain nodes is ensured, and the dependence of a node deployment mode on physical network topology is reduced.
Drawings
FIG. 1A is a flowchart of a block chain based data transmission method according to an embodiment of the present invention;
FIG. 1B is a network architecture diagram of a blockchain network node deployment provided in accordance with an embodiment of the present invention;
FIG. 2 is a flowchart of a block chain based data transmission method according to a second embodiment of the present invention;
FIG. 3 is a flowchart of a data transmission method based on a blockchain according to a third embodiment of the present invention;
FIG. 4 is a flowchart of a data transmission method based on a blockchain according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of a data transmission device based on a blockchain according to a fifth embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to a sixth embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
Example 1
Fig. 1A is a flowchart of a data transmission method based on a blockchain according to the first embodiment of the present invention, and fig. 1B is a network architecture diagram of a blockchain network node deployment according to the first embodiment of the present invention. Optionally, the nodes in the blockchain network are deployed in different public domains, each public domain includes at least one hierarchical sub-domain, so that the network environment can be divided into tree-like structures, each sub-domain has a domain name, and the domain name of the higher-level domain belonging to the same public domain is the prefix of the domain name of the sub-domain; the highest hierarchical domain in the public domain is the primary domain. Each sub-domain includes a bridge node and at least one consensus node is divided into a consensus node and a bridge node. As shown in fig. 1B, where the domain [ a ], the domain [ a, B ], and the domain [ a, B, a ] belong to the same common domain, the domain [ a ] is a first-level domain, and domains having different levels under the domain [ a ] such as domains [ a, a ], the domain [ a, B ], and the domain [ a, B, a ] are domains of the domain [ a ]; nodes 1-7 are consensus nodes. The bridging nodes do not participate in network consensus, only forward the data, and communicate with the bridging nodes of other domains; the consensus nodes between different domains cannot communicate directly, but only through bridging nodes.
The embodiment can be suitable for the situation of data transmission among nodes in a block chain network, and is particularly suitable for the situation of data transmission among nodes in the block chain network in a complex network environment. The method may be performed by a blockchain-based data transmission device, which may be implemented in software and/or hardware, and may be integrated in an electronic device of a bridge node in a blockchain network.
As shown in fig. 1A, the method specifically may include:
s110, responding to the data processing transaction request of the source node, and determining the target domain where the target node is located according to the address information of the target node in the data processing transaction request.
In this embodiment, the source node is a consensus node in the blockchain network that initiates the data transaction request, that is, an initiator of message consensus, and optionally, the source node may generate a consensus message according to local consensus calculation, and then construct the data transaction request according to the consensus message, the source node IP address, the source domain address, the destination node IP address, the destination domain address, and the like. The consensus message refers to message data that the source node and the target node need to perform consensus. By target node is meant the consensus node in the blockchain network that ultimately receives the consensus message.
By data transaction request is meant a request for instructing a blockchain node to process data, and optionally the data transaction request may include a consensus message, a source node address, source domain address information, a destination node address, destination domain address information, etc. Where the node address refers to the IP address of the node.
The address information of the target node is IP address information of the target node. Each bridging node is cached with node IP address and mapping information of domain.
Specifically, the local node responds to a data processing thing request initiated by the source node or a data processing thing request forwarded by other bridging nodes, further acquires IP address information of the target node from the data processing thing request, and searches a target domain where the target node is located from the mapping information of the node IP address and the domain of the local cache based on the IP address of the target node.
S120, determining whether the target domain is the same as the current domain where the local node is located.
In this embodiment, the current domain refers to the domain where the local node is located.
Specifically, the local node determines whether the target domain is the same as the current domain according to the domain name of the target domain and the domain name of the current domain where the local node is located, for example, if the domain name of the target domain is the same as the domain name of the current domain, the target domain is the same as the current domain.
And S130, if not, determining an intermediate bridging node according to the domain name of the current domain and the domain name of the target domain.
In this embodiment, the intermediate bridge node refers to a bridge node that needs to be passed when the source node and the target node perform cross-domain communication.
Optionally, if the current domain and the target domain are different, i.e. the current domain and the target domain do not belong to the same domain, i.e. the cross-domain transmission is required, the intermediate bridge node is determined according to the domain name of the current domain and the domain name of the target domain. And then S140 is performed.
Optionally, if the target domain is the same as the current domain, the data processing transaction request is transmitted to the target node. That is, if the local node (local bridge node) and the target node belong to the same network domain, the data processing transaction request is transmitted to the target node according to the Gossip protocol, so as to complete data transmission. S140 is not being performed.
S140, transmitting the data processing transaction request to the intermediate bridge node so that the intermediate bridge node transmits the data processing transaction request to the target node.
Illustratively, the local bridge node transmits a data transaction request to the intermediate bridge node; correspondingly, if the intermediate bridge node is not the target bridge node of the target domain where the target node is located, repeating the steps until the target bridge node of the target domain is determined, and then, the target bridge node transmits the data processing transaction request to the target node according to the Gossip protocol so as to complete the final data transmission.
If the intermediate bridge node is the target bridge node of the target domain where the target node is located, the intermediate bridge node, that is, the target bridge node, transmits the data processing transaction request to the target node according to the Gossip protocol so as to complete data transmission.
According to the technical scheme of the embodiment of the invention, the target domain where the target node is located is determined according to the address information of the target node in the data processing transaction request by responding to the data processing transaction request of the source node, whether the target domain is the same as the current domain where the local node is located is determined, if not, the intermediate bridging node is determined according to the domain name of the current domain and the domain name of the target domain, and the data processing transaction request is transmitted to the intermediate bridging node, so that the intermediate bridging node transmits the data processing transaction request to the target node. According to the technical scheme, the bridge node is introduced, so that the efficiency of data synchronization of the block chain nodes is improved, meanwhile, under a complex network environment, efficient and safe communication among the block chain nodes is ensured, and the dependence of a node deployment mode on physical network topology is reduced.
On the basis of the technical scheme, as an optional mode of the embodiment of the invention, the validity check can also be performed on the data processing transaction request.
For example, network security rules may be checked for data processing transaction requests, and if the check passes, the data processing transaction request is legitimate. If the verification is not passed, the data processing transaction request is not forwarded, namely discarded.
By way of example, it may also be determined whether the number of data forwarding times in the data processing transaction request meets a time threshold; if so, determining that the data processing transaction request is legal. Wherein the number of times threshold can be set by a person skilled in the art according to the actual situation. If not, the data processing transaction request is not forwarded, namely discarded.
In this embodiment, it should be noted that after the common message passes through the bridge node, the number of data forwarding times is recorded, and the number of data forwarding times is added to the data processing transaction request.
Based on the above embodiment, as an alternative manner of the embodiment of the present invention, a certain security policy may be set for a node in the blockchain network, and only the computer device in the local domain is responded to perform an operation request for the blockchain node in the local domain, where the operation request includes querying, sending a transaction, calling a contract, and so on.
It can be appreciated that by configuring security policies in nodes of the blockchain network, message awareness among the blockchain nodes of different domains can be reduced, the possibility of data storm occurrence can be reduced, and the security of the blockchain network can be protected.
Example two
Fig. 2 is a flowchart of a blockchain-based data transmission method according to a second embodiment of the present invention, and on the basis of the foregoing embodiment, an alternative implementation is provided for further optimizing "determining an intermediate bridge node according to the domain name of the current domain and the domain name of the target domain".
As shown in fig. 2, the method specifically may include:
s210, responding to a data processing transaction request of a source node, and determining a target domain where a target node is located according to address information of the target node in the data processing transaction request.
S220, determining whether the target domain is the same as the current domain where the local node is located.
If not, selecting an intermediate bridge node from the bridge nodes in the first public domain when the first public domain to which the current domain belongs and the second public domain to which the target domain belongs are the same public domain.
In this embodiment, the first public domain refers to a public domain to which the current domain belongs; the second common domain refers to a common domain to which the target domain belongs.
Optionally, in the case that the first public domain to which the current domain belongs and the second public domain to which the target domain belongs are the same public domain, selecting an intermediate bridge node from the bridge nodes in the first public domain may be determining whether the domain name of the current domain is a prefix of the domain name of the target domain; if yes, constructing a lower domain of the current domain according to the domain name of the current domain and the domain name of the target domain, and taking the bridge node in the lower domain as an intermediate bridge node. If not, the bridge node in the upper domain of the current domain is taken as an intermediate bridge node.
Illustratively, if the domain name of the current domain is a prefix of the domain name of the target domain, that is, an upper-level domain of the current domain and the target domain, a lower-level domain of the current domain is constructed according to the domain name of the current domain and the domain name of the target domain, and a bridge node of the lower-level domain is used as an intermediate bridge node.
Alternatively, constructing the lower domain of the current domain according to the domain name of the current domain and the domain name of the target domain may be that the domain name of the target domain is de-duplicated according to the domain name of the current domain to obtain the remaining domain name; and splicing the domain name of the current domain with the first element of the rest domain names to obtain the domain name of the lower domain. For example, the domain name of the current domain is [ A ], the domain name of the target domain is [ A, B, B ], the remaining domain name is [ B, B ], and the domain name of the lower domain of the current domain is [ A, B ].
Illustratively, if the domain name of the current domain is not a prefix of the domain name of the target domain, that is, the current domain is an upper-level domain of the target domain, the bridge node in the upper-level domain of the current domain is taken as an intermediate bridge node. For example, the domain name of the target domain is [ a ], the domain name of the current domain is [ a, B ], the domain name of the upper domain of the current domain is [ a, B ], and the bridge node in the domain [ a, B ] is taken as an intermediate bridge node. It should be noted that, the lower domain is transparent to the upper domain, so that the bridge node of the lower domain [ a, B ] may directly transmit data to the directly connected upper domain [ a, B ].
S240, transmitting the data processing transaction request to the intermediate bridge node so that the intermediate bridge node transmits the data processing transaction request to the target node.
According to the technical scheme of the embodiment of the invention, the target domain where the target node is located is determined according to the address information of the target node in the data processing transaction request by responding to the data processing transaction request of the source node, whether the target domain is the same as the current domain where the local node is located is determined, if not, the middle bridging node is selected from the bridging nodes in the first public domain under the condition that the first public domain where the current domain belongs to and the second public domain where the target domain belongs to are the same public domain, and then the data processing transaction request is transmitted to the middle bridging node, so that the middle bridging node transmits the data processing transaction request to the target node. According to the technical scheme, the bridge node is introduced, so that the efficiency of data synchronization of the block chain nodes is improved, meanwhile, under a complex network environment, efficient and safe communication among the block chain nodes is ensured, and the dependence of a node deployment mode on physical network topology is reduced.
Example III
Fig. 3 is a flowchart of a blockchain-based data transmission method according to a third embodiment of the present invention, and provides an alternative implementation manner for further optimizing "determining an intermediate bridge node according to the domain name of the current domain and the domain name of the target domain" based on the above embodiment.
As shown in fig. 3, the method specifically may include:
s310, responding to the data processing transaction request of the source node, and determining the target domain where the target node is located according to the address information of the target node in the data processing transaction request.
S320, determining whether the target domain is the same as the current domain where the local node is located.
S330, if not, selecting an intermediate bridge node from the bridge nodes in the first public domain or the second public domain when the first public domain to which the current domain belongs and the second public domain to which the target domain belongs are not the same public domain.
Optionally, in the case that the first public domain to which the current domain belongs and the second public domain to which the target domain belongs are not the same public domain, selecting an intermediate bridge node from the bridge nodes in the first public domain or the second public domain may be that the local bridge node determines whether the current domain is the current primary domain in the first public domain; if so, taking the first-stage bridging node in the second public domain as an intermediate bridging node; if not, the bridge node in the upper domain of the current domain is taken as an intermediate bridge node.
The current primary domain refers to a primary domain in the first public domain. The primary bridge node refers to a bridge node in the primary domain.
In the case where the first public domain to which the current domain belongs and the second public domain to which the target domain belongs are not the same public domain, the first-level bridge node in the second public domain is used as the intermediate bridge node if the current domain is the current first-level domain in the first public domain.
In an exemplary case where the first public domain to which the current domain belongs and the second public domain to which the target domain belongs are not the same public domain, if the current domain is not the current primary domain in the first public domain, the bridge node in the superior domain of the current domain is taken as an intermediate bridge node.
S340, transmitting the data processing transaction request to the intermediate bridge node so that the intermediate bridge node transmits the data processing transaction request to the target node.
According to the technical scheme of the embodiment of the invention, the target domain where the target node is located is determined according to the address information of the target node in the data processing transaction request by responding to the data processing transaction request of the source node, whether the target domain is the same as the current domain where the local node is located is determined, if not, the middle bridging node is selected from the bridging nodes in the first public domain or the second public domain under the condition that the first public domain where the current domain belongs to and the second public domain where the target domain belongs to are not the same public domain, and the data processing transaction request is transmitted to the middle bridging node, so that the middle bridging node transmits the data processing transaction request to the target node. According to the technical scheme, the bridge node is introduced, so that the efficiency of data synchronization of the block chain nodes is improved, meanwhile, under a complex network environment, efficient and safe communication among the block chain nodes is ensured, and the dependence of a node deployment mode on physical network topology is reduced.
Example IV
Fig. 4 is a flowchart of a data transmission method based on a blockchain according to a fourth embodiment of the present invention, which is further optimized based on the above embodiment, and provides a preferred embodiment.
When data in a block chain network is transmitted, firstly, a source node sends a data transaction processing request to a target node, and the source node judges whether the domain in which the source node is located and the domain in which the target node is located (target domain) are the same domain or not; if yes, the source node transmits a data processing transaction request to the target node according to the Gossip protocol; if not, the source node sends the data processing matter request to the bridge node of the domain where the source node is located, and the bridge node determines an intermediate bridge node according to the domain name of the domain where the source node is located and the domain name of the target domain until the data processing matter request is transmitted to the target bridge node of the target domain, so that the target bridge node transmits the data processing matter request to the target node according to the Gossip protocol.
As shown in fig. 4, the method specifically may include:
s401, starting data transmission.
S402, determining whether the current domain is the same as the target domain; if yes, S408 is executed, and if no, S403 is executed.
Illustratively, when data transmission begins, the current domain is the domain in which the source node is located; for example, referring to fig. 1B, if the source node is node 2, the target node is node 3, and the domain in which the source node is located (current domain) is the same as the target domain, which is domain a, then S408 is performed, that is, node 2 directly transmits the data transaction request to node 3 through the Gossip protocol.
In the data transmission process, the current domain may be the domain where the intermediate bridge node is located, and the intermediate bridge node may be one or a plurality of intermediate bridge nodes. For example, in connection with fig. 1B, the source node is node 2, and the target node is node 6, then the bridge node in domain [ a, a ], the bridge node in domain [ a ], and the bridge node in domain [ B ] need to be passed.
That is, to which node is executed, which domain the node is in is the current domain.
S403, judging whether the current domain is the current primary domain; if yes, S404 is executed, and if no, S405 is executed.
S404, forwarding a data processing transaction request to a primary bridging node of a public domain to which the target domain belongs; and returns to S402, that is, the current domain in S402 is updated to the target primary domain.
S405, judging whether the domain name of the current domain is the prefix of the domain name of the target domain, if so, executing S406; if not, S407 is performed.
S406, determining a lower domain of the current domain, and forwarding a data processing transaction request to a bridge node of the lower domain of the current domain; and returns to S402, i.e., the current domain in S402 is updated to the lower domain of S406.
S407, forwarding a data processing transaction request to a bridge node of a superior domain of the current domain; and returns to S402, i.e., the current domain in S402 is updated to the upper domain of S407.
S408, the data processing transaction request is directly transmitted to the target node, and data transmission is completed.
And the target bridge node of the target domain directly transmits the data processing transaction request to the target node according to the Gossip protocol, so that the data transmission is completed.
According to the technical scheme of the embodiment of the invention, the target domain where the target node is located is determined according to the address information of the target node in the data processing transaction request by responding to the data processing transaction request of the source node, whether the target domain is the same as the current domain where the local node is located is determined, if not, the intermediate bridging node is determined according to the domain name of the current domain and the domain name of the target domain, and the data processing transaction request is transmitted to the intermediate bridging node, so that the intermediate bridging node transmits the data processing transaction request to the target node. According to the technical scheme, the bridge node is introduced, after the network structure is changed, network equipment (namely electronic equipment of the blockchain node) in the domain does not need to be changed, all the equipment can be exposed to the public network, domain names are logically divided, and efficient routing and forwarding can be performed. If the data on the chain of the block chain consensus node is tampered maliciously, the data processing transaction request is preferentially forwarded in the domain due to the existence of the block chain consensus algorithm, so that the information perception of the error by the external node can be reduced, and the probability of being attacked maliciously can be reduced.
Example five
Fig. 5 is a schematic structural diagram of a data transmission device based on a blockchain according to a fifth embodiment of the present invention. The embodiment can be suitable for the situation of data transmission between nodes in a block chain network, particularly for the situation of data transmission between nodes in a block chain network in a complex network environment, and the device can be realized in a software and/or hardware mode and can be integrated in electronic equipment of a bridging node in the block chain network.
As shown in fig. 5, the apparatus may specifically include:
the target domain determining module 510 is configured to determine, in response to a data processing transaction request of the source node, a target domain in which the target node is located according to address information of the target node in the data processing transaction request;
a determining module 520, configured to determine whether the target domain is the same as the current domain where the local node is located;
an intermediate bridge node determining module 530, configured to determine an intermediate bridge node according to the domain name of the current domain and the domain name of the target domain if not;
the data transmission module 540 is configured to transmit the data processing transaction request to the intermediate bridge node, so that the intermediate bridge node transmits the data processing transaction request to the target node.
According to the technical scheme of the embodiment of the invention, the target domain where the target node is located is determined according to the address information of the target node in the data processing transaction request by responding to the data processing transaction request of the source node, whether the target domain is the same as the current domain where the local node is located is determined, if not, the intermediate bridging node is determined according to the domain name of the current domain and the domain name of the target domain, and the data processing transaction request is transmitted to the intermediate bridging node, so that the intermediate bridging node transmits the data processing transaction request to the target node. According to the technical scheme, the bridge node is introduced, so that the efficiency of data synchronization of the block chain nodes is improved, meanwhile, under a complex network environment, efficient and safe communication among the block chain nodes is ensured, and the dependence of a node deployment mode on physical network topology is reduced.
Further, the intermediate bridge node determining module 530 is specifically configured to:
selecting an intermediate bridge node from the bridge nodes in the first public domain when the first public domain to which the current domain belongs and the second public domain to which the target domain belongs are the same public domain;
in the case that the first public domain to which the current domain belongs and the second public domain to which the target domain belongs are not the same public domain, an intermediate bridge node is selected from the bridge nodes in the first public domain or the second public domain.
Further, the intermediate bridge node determination module 530 includes:
a domain name prefix determining unit for determining whether the domain name of the current domain is a prefix of the domain name of the target domain;
the intermediate bridge node determining unit is configured to:
if yes, constructing a lower domain of the current domain according to the domain name of the current domain and the domain name of the target domain, and taking a bridge node in the lower domain as an intermediate bridge node;
if not, the bridge node in the upper domain of the current domain is taken as an intermediate bridge node.
Further, the intermediate bridge node determining unit is further specifically configured to:
performing de-duplication on the domain name of the target domain according to the domain name of the current domain to obtain a residual domain name;
and splicing the domain name of the current domain with the first element of the rest domain names to obtain the domain name of the lower domain.
Further, the intermediate bridge node determination module 530 includes:
a first-level domain determining unit configured to determine whether the current domain is a current first-level domain in the first common domain;
the intermediate bridge node determining unit is further configured to:
if so, taking the first-stage bridging node in the second public domain as an intermediate bridging node;
if not, the bridge node in the upper domain of the current domain is taken as an intermediate bridge node.
Further, the data transmission module 540 is further configured to:
and if the target domain is the same as the current domain where the local node is located, transmitting the data processing transaction request to the target node.
Further, the source node and the target node are consensus nodes, and the consensus nodes and the bridging nodes are nodes in the blockchain network; the bridging nodes do not participate in network consensus.
Further, nodes in the blockchain network are deployed in different common domains, each common domain including at least one hierarchical sub-domain, each sub-domain including a bridging node and at least one consensus node.
Further, the device also comprises a validity checking module, and the module is used for:
and carrying out validity check on the data processing transaction request.
Further, the validity checking module is specifically configured to:
judging whether the data forwarding times in the data processing transaction request meet the times threshold;
if so, determining that the data processing transaction request is legal.
The data transmission device based on the block chain can execute the data transmission method based on the block chain provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example six
Fig. 6 is a schematic structural diagram of an electronic device provided in a sixth embodiment of the present invention, and fig. 6 is a block diagram of an exemplary device suitable for implementing an embodiment of the present invention. The device shown in fig. 6 is only an example and should not be construed as limiting the functionality and scope of use of the embodiments of the invention.
As shown in fig. 6, the electronic device 12 is in the form of a general purpose computing device. Components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, a bus 18 that connects the various system components, including the system memory 28 and the processing units 16.
Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, and a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, micro channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 12 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by electronic device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 30 and/or cache memory (cache 32). The electronic device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from or write to non-removable, nonvolatile magnetic media (not shown in FIG. 6, commonly referred to as a "hard disk drive"). Although not shown in fig. 6, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In such cases, each drive may be coupled to bus 18 through one or more data medium interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored in, for example, system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 42 generally perform the functions and/or methods of the embodiments described herein.
The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with the electronic device 12, and/or any devices (e.g., network card, modem, etc.) that enable the electronic device 12 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 22. Also, the electronic device 12 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet, through a network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 over the bus 18. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 12, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing a blockchain-based data transmission method provided by embodiments of the present invention.
Example seven
The seventh embodiment of the present invention also provides a computer readable storage medium having stored thereon a computer program (or referred to as computer executable instructions) which when executed by a processor is configured to perform the blockchain-based data transmission method provided by the embodiment of the present invention, the method including:
responding to a data processing transaction request of a source node, and determining a target domain where a target node is located according to address information of the target node in the data processing transaction request;
determining whether the target domain is the same as the current domain where the local node is located;
if not, determining an intermediate bridging node according to the domain name of the current domain and the domain name of the target domain;
the data processing transaction request is transmitted to the intermediate bridge node such that the intermediate bridge node transmits the data processing transaction request to the target node.
The computer storage media of embodiments of the invention may take the form of any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for embodiments of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the embodiments of the present invention have been described in connection with the above embodiments, the embodiments of the present invention are not limited to the above embodiments, but may include many other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A blockchain-based data transmission method, applied to a bridging node, comprising:
responding to a data processing transaction request of a source node, and determining a target domain where a target node is located according to address information of the target node in the data processing transaction request;
determining whether the target domain is the same as the current domain where the local node is located;
if not, determining an intermediate bridging node according to the domain name of the current domain and the domain name of the target domain;
transmitting the data processing transaction request to the intermediate bridge node to cause the intermediate bridge node to transmit the data processing transaction request to the target node;
and determining an intermediate bridge node according to the domain name of the current domain and the domain name of the target domain, including:
selecting an intermediate bridge node from bridge nodes in the first public domain when the first public domain to which the current domain belongs and the second public domain to which the target domain belongs are the same public domain;
the selecting an intermediate bridge node from the bridge nodes in the first public domain when the first public domain to which the current domain belongs and the second public domain to which the target domain belongs are the same public domain includes:
determining whether the domain name of the current domain is a prefix of the domain name of the target domain;
if yes, constructing a lower domain of the current domain according to the domain name of the current domain and the domain name of the target domain, and taking a bridge node in the lower domain as the intermediate bridge node;
if not, taking the bridge node in the upper domain of the current domain as the intermediate bridge node;
the source node and the target node are consensus nodes, and the consensus nodes and the bridging nodes are nodes in a blockchain network; the bridging node does not participate in network consensus;
nodes in the blockchain network are deployed in different public domains, each public domain including at least one hierarchical sub-domain, each sub-domain including a bridging node and at least one consensus node.
2. The method of claim 1, wherein the determining an intermediate bridge node based on the domain name of the current domain and the domain name of the target domain comprises:
and selecting an intermediate bridge node from bridge nodes in the first public domain or the second public domain when the first public domain to which the current domain belongs and the second public domain to which the target domain belongs are not the same public domain.
3. The method according to claim 1, wherein constructing a lower domain of the current domain from the domain name of the current domain and the domain name of the target domain comprises:
performing de-duplication on the domain name of the target domain according to the domain name of the current domain to obtain a residual domain name;
and splicing the domain name of the current domain with the first element of the residual domain name to obtain the domain name of the lower domain.
4. The method according to claim 2, wherein in the case that the first public domain to which the current domain belongs and the second public domain to which the target domain belongs are not the same public domain, selecting an intermediate bridge node from the bridge nodes in the first public domain or the second public domain comprises:
determining whether the current domain is a current primary domain within the first public domain;
if yes, taking the first-stage bridging node in the second public domain as an intermediate bridging node;
and if not, taking the bridge node in the upper domain of the current domain as the intermediate bridge node.
5. The method as recited in claim 1, further comprising:
and if the target domain is the same as the current domain where the local node is located, transmitting the data processing transaction request to the target node.
6. The method of claim 1, wherein after said responding to the source node's data processing transaction request, further comprising:
and carrying out validity check on the data processing transaction request.
7. The method of claim 6, wherein the performing a validity check on the data processing transaction request comprises:
judging whether the data forwarding times in the data processing transaction request meet a times threshold;
and if yes, determining that the data processing transaction request is legal.
8. A blockchain-based data transmission device configured at a bridging node, comprising:
the target domain determining module is used for responding to a data processing transaction request of a source node and determining a target domain where a target node is located according to address information of the target node in the data processing transaction request;
the judging module is used for determining whether the target domain is the same as the current domain where the local node is located;
the intermediate bridge node determining module is used for determining an intermediate bridge node according to the domain name of the current domain and the domain name of the target domain if not;
a data transmission module, configured to transmit the data processing transaction request to the intermediate bridge node, so that the intermediate bridge node transmits the data processing transaction request to the target node;
the intermediate bridge node determining module is specifically configured to: selecting an intermediate bridge node from the bridge nodes in the first public domain when the first public domain to which the current domain belongs and the second public domain to which the target domain belongs are the same public domain;
the intermediate bridge node determining module includes:
a domain name prefix determining unit for determining whether the domain name of the current domain is a prefix of the domain name of the target domain;
an intermediate bridge node determining unit configured to:
if yes, constructing a lower domain of the current domain according to the domain name of the current domain and the domain name of the target domain, and taking a bridge node in the lower domain as an intermediate bridge node;
if not, taking the bridge node in the upper domain of the current domain as an intermediate bridge node;
the source node and the target node are consensus nodes, and the consensus nodes and the bridging nodes are nodes in a blockchain network; the bridging node does not participate in network consensus;
nodes in the blockchain network are deployed in different public domains, each public domain including at least one hierarchical sub-domain, each sub-domain including a bridging node and at least one consensus node.
9. An electronic device, comprising:
one or more processors;
a memory for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the blockchain-based data transmission method of any of claims 1-7.
10. A computer readable storage medium having stored thereon a computer program, which when executed by a processor implements the blockchain-based data transmission method of any of claims 1-7.
CN202111515240.1A 2021-12-13 2021-12-13 Block chain-based data transmission method, device, equipment and storage medium Active CN114338669B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111515240.1A CN114338669B (en) 2021-12-13 2021-12-13 Block chain-based data transmission method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111515240.1A CN114338669B (en) 2021-12-13 2021-12-13 Block chain-based data transmission method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114338669A CN114338669A (en) 2022-04-12
CN114338669B true CN114338669B (en) 2024-03-26

Family

ID=81051050

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111515240.1A Active CN114338669B (en) 2021-12-13 2021-12-13 Block chain-based data transmission method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114338669B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110365790A (en) * 2019-07-23 2019-10-22 深圳市东微智能科技股份有限公司 Method for message transmission, device, cascade network equipment and readable storage medium storing program for executing
CN110609674A (en) * 2019-08-19 2019-12-24 杭州云象网络技术有限公司 Symbiotic information physical system construction method based on block chain technology
CN111355718A (en) * 2020-02-25 2020-06-30 中国工商银行股份有限公司 Block chain intelligent contract cloud deployment system and method
CN112243047A (en) * 2019-07-19 2021-01-19 傲为信息技术(江苏)有限公司 Public chain based block chain network addressing method
CN113507475A (en) * 2021-07-14 2021-10-15 杭州数梦工场科技有限公司 Cross-domain access method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112243047A (en) * 2019-07-19 2021-01-19 傲为信息技术(江苏)有限公司 Public chain based block chain network addressing method
CN110365790A (en) * 2019-07-23 2019-10-22 深圳市东微智能科技股份有限公司 Method for message transmission, device, cascade network equipment and readable storage medium storing program for executing
CN110609674A (en) * 2019-08-19 2019-12-24 杭州云象网络技术有限公司 Symbiotic information physical system construction method based on block chain technology
CN111355718A (en) * 2020-02-25 2020-06-30 中国工商银行股份有限公司 Block chain intelligent contract cloud deployment system and method
CN113507475A (en) * 2021-07-14 2021-10-15 杭州数梦工场科技有限公司 Cross-domain access method and device

Also Published As

Publication number Publication date
CN114338669A (en) 2022-04-12

Similar Documents

Publication Publication Date Title
JP7325506B2 (en) Business processing method, device, electronic device and computer program based on blockchain system
CN109462505B (en) Method and apparatus for implementing cross-link communication between multiple blockchain networks
CN110915188B (en) Method and system for efficiently propagated probabilistic relays in blockchain networks
US9306949B1 (en) Configure interconnections between networks hosted in datacenters
US10958725B2 (en) Systems and methods for distributing partial data to subnetworks
US8352729B2 (en) Secure application routing
US11005760B2 (en) Ensuring data locality for secure transmission of data
CN112150141A (en) Block chain consensus method, device and system
CN111460458B (en) Data processing method, related device and computer storage medium
CN102571972B (en) The distributed file system access of site-aware is carried out from outside enterprise network
CN107707557B (en) Anonymous access method, device, network equipment and readable storage medium
CN105490995A (en) Method and device for forwarding message by NVE in NVO3 network
CN110677337A (en) Data forwarding method and device, network equipment and computer readable storage medium
CN104580428A (en) Data routing method, data management device and distributed storage system
JP6114214B2 (en) Network device and communication method
CN114338669B (en) Block chain-based data transmission method, device, equipment and storage medium
CN110855810B (en) NAT (network Address translation) conversion method and device, network security equipment and storage medium
CN112671869A (en) Network bridge transparent proxy method, device, electronic equipment and storage medium
CN109218182B (en) Method and device for synchronizing routing information
US10237303B2 (en) Prevalence-based reputations
CN114338809A (en) Access control method, device, electronic equipment and storage medium
JP4365869B2 (en) ROUTE INFORMATION CHANGE METHOD, ROUTE INFORMATION CHANGE DEVICE, AND ROUTE INFORMATION CHANGE PROGRAM
CN110113202B (en) IPsec diagnosis method and device and home terminal equipment
US10924382B1 (en) Rapid and verifiable network configuration repair
WO2016086876A1 (en) Packet processing method, network server and virtual private network system

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