CN108777712B - Block chain node communication method and device and block chain node - Google Patents

Block chain node communication method and device and block chain node Download PDF

Info

Publication number
CN108777712B
CN108777712B CN201810555761.1A CN201810555761A CN108777712B CN 108777712 B CN108777712 B CN 108777712B CN 201810555761 A CN201810555761 A CN 201810555761A CN 108777712 B CN108777712 B CN 108777712B
Authority
CN
China
Prior art keywords
node
target
storage node
address
repeater
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
CN201810555761.1A
Other languages
Chinese (zh)
Other versions
CN108777712A (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 United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group 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 United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN201810555761.1A priority Critical patent/CN108777712B/en
Publication of CN108777712A publication Critical patent/CN108777712A/en
Application granted granted Critical
Publication of CN108777712B publication Critical patent/CN108777712B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions

Landscapes

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

Abstract

The embodiment of the invention provides a block link point communication method and device and a block link node. The method comprises the following steps: a main storage node receives a query request sent by a query node; according to the query request, determining identification information of a target slave storage node from the first list, and determining a first port identification and a second port identification of a target repeater from the second list; and sending the IP address and the first port identification of the target transponder to the target slave storage node, and sending the IP address and the second port identification of the target transponder to the query node, so that the target slave storage node and the target transponder establish a first communication tunnel, the query node and the target transponder establish a second communication tunnel, and the target slave storage node and the query node perform information interaction through the first communication tunnel and the second communication tunnel. The embodiment of the invention ensures that the node without the public network IP address can also become a slave storage node, thereby promoting the development of block chain service.

Description

Block chain node communication method and device and block chain node
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a block link point communication method and device and a block link node.
Background
In a blockchain network, a master storage node may store a complete blockchain ledger, a slave storage node may store a partial blockchain ledger, and the slave storage node may receive inquiry access of other nodes by providing inquiry services to the other nodes to obtain corresponding rewards.
In the prior art, in order to promote the block chain service, more nodes are required to become slave storage nodes, but the nodes are required to have public network IP addresses to become the slave storage nodes, but at present, many nodes do not have public network IP addresses, so that many nodes cannot become slave storage nodes, and the development of the block chain service is limited.
Disclosure of Invention
Embodiments of the present invention provide a method and an apparatus for block link point communication, and a block link node, so that a node without a public network IP address may also become a slave storage node, thereby promoting the development of a block link service.
In a first aspect, an embodiment of the present invention provides a block-node point communication method, including:
a master storage node receives a query request sent by a query node, wherein the master storage node stores a first list and a second list, the first list comprises identification information of at least one slave storage node, and the second list comprises identification information and an IP address of each repeater in at least one repeater;
the main storage node determines identification information of a target auxiliary storage node from the first list according to the query request, and determines a first port identification and a second port identification of a target repeater from the second list;
the master storage node sends the IP address of the target forwarder and the first port identification to the target slave storage node, and sends the IP address of the target forwarder and the second port identification to the inquiry node, so that the target slave storage node and the target forwarder establish a first communication tunnel, the inquiry node and the target forwarder establish a second communication tunnel, and the target slave storage node and the inquiry node perform information interaction through the first communication tunnel and the second communication tunnel.
In a second aspect, an embodiment of the present invention provides a block link point communication device, including:
a receiving module, configured to receive a query request sent by a query node, where a primary storage node stores a first list and a second list, the first list includes identification information of at least one secondary storage node, and the second list includes identification information and an IP address of each of at least one forwarder;
a determining module, configured to determine, according to the query request, identification information of a target slave storage node from the first list, and determine, from the second list, a first port identifier and a second port identifier of a target repeater;
a sending module, configured to send the IP address of the target forwarder and the first port identifier to the target secondary storage node, and send the IP address of the target forwarder and the second port identifier to the querying node, so that the target secondary storage node and the target forwarder establish a first communication tunnel, the querying node and the target forwarder establish a second communication tunnel, and the target secondary storage node and the querying node perform information interaction through the first communication tunnel and the second communication tunnel.
In a third aspect, an embodiment of the present invention provides a block link point, including:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, the computer program being executed by a processor to implement the method of the first aspect.
According to the block link point communication method, the block link point communication device and the block link node provided by the embodiment of the invention, the IP address and the first port identification of the repeater are sent to the slave storage node through the master storage node, the IP address and the second port identification of the repeater are sent to the query node, so that the master storage node and the first port of the repeater establish a first communication tunnel, and the query node and the second port of the repeater establish a second communication tunnel, so that the target node and the query node can perform information interaction through the first communication tunnel, the communication connection between the first port and the second communication tunnel, and the slave storage node can be a node without a public network IP address, so that the node without the public network IP address can also be a slave storage node, and the development of block link services is promoted.
Drawings
Fig. 1 is a schematic diagram of an application scenario provided in an embodiment of the present invention;
fig. 2 is a flowchart of a block link point communication method according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a block chain network according to an embodiment of the present invention;
fig. 4 is a flowchart of a block-node communication method according to another embodiment of the present invention;
fig. 5 is a schematic structural diagram of a block link point communication device according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a blockchain node according to an embodiment of the present invention.
With the foregoing drawings in mind, certain embodiments of the disclosure have been shown and described in more detail below. These drawings and written description are not intended to limit the scope of the disclosed concepts in any way, but rather to illustrate the concepts of the disclosure to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The block link point communication method provided by the invention can be applied to the communication system shown in fig. 1. As shown in fig. 1, the communication system includes: access network device 11, terminal device 12, and server 13. It should be noted that the communication System shown in fig. 1 may be applicable to different network formats, for example, may be applicable to Global System for mobile communication (GSM), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time Division-Synchronous Code Division Multiple Access (TD-SCDMA), Long Term Evolution (Long Term Evolution, LTE), and future 5G network formats. Optionally, the communication system may be a system in a scenario of high-reliability and Low latency communications (URLLC) transmission in a 5G communication system.
Therefore, optionally, the access Network device 11 may be a Base station (BTS) and/or a Base station Controller in GSM or CDMA, a Base station (NodeB, NB) and/or a Radio Network Controller (RNC) in WCDMA, an evolved Node B (eNB or eNodeB) in LTE, or a relay station or an access point, or a Base station (gbb) in a future 5G Network, and the present invention is not limited thereto.
The terminal device 12 may be a wireless terminal or a wired terminal. A wireless terminal may refer to a device that provides voice and/or other traffic data connectivity to a user, a handheld device having wireless connection capability, or other processing device connected to a wireless modem. A wireless terminal, which may be a mobile terminal such as a mobile telephone (or "cellular" telephone) and a computer having a mobile terminal, for example, a portable, pocket, hand-held, computer-included, or vehicle-mounted mobile device, may communicate with one or more core Network devices via a Radio Access Network (RAN), and may exchange language and/or data with the RAN. For another example, the Wireless terminal may also be a Personal Communication Service (PCS) phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA), and other devices. A wireless Terminal may also be referred to as a system, a Subscriber Unit (Subscriber Unit), a Subscriber Station (Subscriber Station), a Mobile Station (Mobile), a Remote Station (Remote Station), a Remote Terminal (Remote Terminal), an Access Terminal (Access Terminal), a User Terminal (User Terminal), a User agent (User agent), and a User Device or User Equipment, which are not limited herein. Optionally, the terminal device 12 may also be a smart watch, a tablet computer, or the like. In this embodiment, the terminal device 12 and the server 13 may be nodes in a blockchain network.
The invention provides a block link point communication method, which aims to solve the technical problems in the prior art.
The following describes the technical solutions of the present invention and how to solve the above technical problems with specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present invention will be described below with reference to the accompanying drawings.
Fig. 2 is a flowchart of a block link point communication method according to an embodiment of the present invention. The embodiment of the invention provides a block chain node communication method aiming at the technical problems in the prior art, and the method comprises the following specific steps:
step 201, a master storage node receives request information sent by a target node, where the request information indicates that the target node requests to become a slave storage node, the request information includes identification information and indication information of the target node, and the indication information is used to indicate that the target node has no public network IP address.
As shown in fig. 3, 31 denotes a master storage node in the blockchain network, 32 denotes a slave storage node in the blockchain network, and the slave storage node 32 has its own public network IP address. The target node 33 indicates a target node, the target node 33 requests to become a slave storage node, the target node 33 does not have a public Network IP address, the target node 33 communicates with the blockchain Network through Network Address Translation (NAT), 34 indicates a NAT, 35 indicates an inquiring node in the blockchain Network, in this embodiment, the inquiring node 35 also does not have its own public Network IP address, the inquiring node 35 also communicates with the blockchain Network through NAT, and 36 indicates a repeater. In this embodiment, the query node 35 is provided with a query service by a slave storage node. The method is only illustrative and does not limit the specific network architecture of the blockchain network. In other embodiments, the querying node 35 may not be a node under the NAT.
When the target node 33 first joins the block chain network, it is necessary to obtain the created blocks from the nodes adjacent to the target node 33, and optionally, all the nodes in the block chain network store the created blocks. In order to ensure that the target node 33 obtains a real created block, the target node 33 may send created block query requests to a plurality of neighboring nodes, for example, the target node 33 sends created block query requests to the neighboring node B and the neighboring node C, after receiving the created block query requests, the neighboring node B and the neighboring node C send respective locally stored created blocks to the target node 33, the target node 33 compares whether created blocks fed back by the neighboring node B and the neighboring node C are consistent, and if created blocks fed back by the neighboring node B and the neighboring node C are consistent, the target node 33 locally stores the created blocks; if the created blocks fed back by the adjacent node B and the adjacent node C are not consistent, the target node 33 may further continue to send created block query requests to the adjacent node D and the adjacent node E, and receive created blocks fed back by the adjacent node D and the adjacent node E, respectively, and if the created blocks fed back by adjacent nodes exceeding a preset proportion among the adjacent node B, the adjacent node C, the adjacent node D, and the adjacent node E are consistent, the target node 33 determines that the created blocks are real. Optionally, if the created blocks fed back by more than fifty percent of the neighboring nodes, such as the neighboring node C, the neighboring node D, and the neighboring node E, are consistent, the target node 33 determines that the created block fed back by the neighboring node C is real, and the created block fed back by the neighboring node B is false.
After the target node 33 acquires the real created block, the created block is stored locally, and the IP addresses of the main storage nodes are acquired from the created block, optionally, the IP addresses of one or more main storage nodes are stored in the created block, the target node 33 may send request information to one or more main storage nodes according to the IP addresses of one or more main storage nodes, in this embodiment, the target node 33 sends the request information to one main storage node as an example, for example, the target node 33 sends the request information to the main storage node 31, the request information is used to indicate that the target node 33 wants to become a slave storage node, and the request information includes identification information of the target node 33, a terminal device number corresponding to the target node 33, and indication information used to indicate that the target node 33 has no public network IP address, in this embodiment, the indication information used to indicate that the target node 33 has no public network IP address is marked as first indication information, the first indication information may be a pre-agreed field or character in the blockchain network.
Step 202, the master storage node records the identification information of the target node.
In this embodiment, the master storage node 31 locally stores a first list, where the first list includes identification information of a slave storage node corresponding to the master storage node 31, a terminal device number corresponding to the slave storage node, and a public network IP address, and for example, the first list includes identification information of the slave storage node 32, a terminal device number corresponding to the slave storage node 32, and a public network IP address.
When the main storage node 31 receives the request information sent by the target node 33, it is determined that the target node 33 does not have a public network IP address, but the target node 33 wants to become a slave storage node, the main storage node 31 records the identification information of the target node 33 and the terminal device number corresponding to the target node 33 in the first list.
Step 203, the main storage node receives a heartbeat message sent by the target node, where the heartbeat message includes address information of the target node.
In this embodiment, since the slave storage node 32 does not communicate with the blockchain network through the NAT, the slave storage node 32 has a public network IP address, and the master storage node 31 locally stores the public network IP address of the slave storage node 32; the target node 33 communicates with the blockchain network through the NAT, and the target node 33 does not have a public network IP address, and the main storage node 31 does not locally have the public network IP address of the target node 33; however, it is necessary to have a public network IP address as a slave storage node in order for the inquiring node to access the slave storage node based on the public network IP address. Therefore, in this embodiment, the target node 33 needs to send a heartbeat message to the main storage node 31 in real time or periodically, and it is assumed that the heartbeat message sent by the target node 33 and received by the main storage node 31 at a certain time is marked as a first heartbeat message, where the content included in the first heartbeat message may specifically be a content index, such as a block number, which can currently provide storage information query and is signed by the target node 33 using its own private key.
After the main storage node 31 receives the first heartbeat packet, according to the signed block number in the first heartbeat packet, the identity information of the target node 33 may be determined, and the source IP address and the source port number of the first heartbeat packet are further extracted, where the main storage node 31 may use the source IP address and the source port number of the first heartbeat packet as the address information of the target node 33, and optionally, the address information of the target node 33 includes: the public network IP address of the NAT corresponding to the target node 33 and the port number mapped on the NAT by the target node 33. In addition, the public network IP address may also be a public network IP address of a local area network to which the target node 33 belongs. That is to say, the source IP address of the first heartbeat packet may be a public network IP address of the NAT corresponding to the target node 33, or a public network IP address of a local area network to which the target node 33 belongs; the source port number of the first heartbeat packet may be the port number mapped on the NAT by the destination node 33.
After sending the first heartbeat packet described in the above embodiment to the main storage node 31, the target node 33 sends a second heartbeat packet to the main storage node 31, where a source IP address of the second heartbeat packet may be different from a source IP address of the first heartbeat packet, and a source port number of the second heartbeat packet may also be different from a source port number of the first heartbeat packet, that is, the source IP address and the source port number of the heartbeat packet may be changed.
When the main storage node 31 receives the second heartbeat packet, the source IP address and the source port number of the second heartbeat packet may be used as new address information of the destination node 33.
Before the main storage node 31 receives the second heartbeat message, the main storage node 31 locally stores identification information of the target node 33, a terminal equipment number corresponding to the target node 33, a public network IP address and a port number corresponding to the target node 33; after the main storage node 31 receives the second heartbeat message, the source IP address of the second heartbeat message is used as the new public network IP address of the target node 33, and the source port number of the second heartbeat message is used as the new port number of the target node 33, so that the public network IP address and the port number of the target node 33, which are already stored in the main storage node 31, are updated according to the new public network IP address and the new port number of the target node 33.
Step 204, the main storage node records the corresponding relationship between the identification information of the target node and the address information of the target node.
The main storage node 31 records the identification information of the target node 33, the terminal device number corresponding to the target node 33, and the public network IP address and port number corresponding to the target node 33 in the first list.
In the embodiment of the invention, the heartbeat message sent by the target node is received through the main storage node, and the heartbeat message comprises the address information of the target node, so that the main storage node records the corresponding relation between the identification information of the target node and the address information of the target node, and the target node can become a slave storage node in a block chain network, so that the node without a public network IP address can also become the slave storage node, and the development of block chain service is promoted.
Fig. 4 is a flowchart of a block-node communication method according to another embodiment of the present invention. On the basis of the foregoing embodiment, the block link point communication method provided in this embodiment specifically includes the following steps:
step 401, a master storage node receives a query request sent by a query node, where the master storage node stores a first list and a second list, the first list includes identification information of at least one slave storage node, and the second list includes identification information and an IP address of each of at least one forwarder.
When the query node 35 first joins the block chain network, it is necessary to obtain the created blocks from the nodes adjacent to the query node 35, and optionally, all the nodes in the block chain network store the created blocks. In order to ensure that the query node 35 obtains a real created block, the query node 35 may send created block query requests to a plurality of neighboring nodes, for example, the query node 35 sends created block query requests to the neighboring node B1 and the neighboring node C1, after receiving the created block query requests, the neighboring node B1 and the neighboring node C1 send respective locally stored created blocks to the query node 35, the query node 35 compares whether the created blocks fed back by the neighboring node B1 and the neighboring node C1 are consistent, and if the created blocks fed back by the neighboring node B1 and the neighboring node C1 are consistent, the query node 35 locally stores the created blocks; if the created blocks fed back by the neighboring node B1 and the neighboring node C1 are not consistent, the query node 35 may further continue to send created block query requests to the neighboring node D1 and the neighboring node E1, and receive created blocks fed back by the neighboring node D1 and the neighboring node E1, respectively, and if created blocks fed back by neighboring nodes exceeding a preset proportion among the neighboring node B1, the neighboring node C1, the neighboring node D1, and the neighboring node E1 are consistent, the query node 35 determines that the created blocks are real. Optionally, more than fifty percent of neighboring nodes, such as the neighboring node C1, the neighboring node D1, and the neighboring node E1, of the neighboring node B1, the neighboring node C1, the neighboring node D1, and the neighboring node E1 respectively feed back the same created blocks, and then the query node 35 determines that the created blocks fed back by the neighboring node C1 are real, and the created blocks fed back by the neighboring node B1 are false.
When the query node 35 obtains the real created block, it stores the created block locally, and obtains the IP address of the main storage node from the created block, optionally, the created block stores IP addresses of one or more main storage nodes, and the query node 35 may send a query request to the one or more main storage nodes, in this embodiment, the query node 35 sends the query request to one main storage node, for example, the created block stores the IP address of the main storage node 31, the query node 35 sends a query request to the main storage node 31 according to the IP address, the query request may include indication information for indicating that the querying node 35 does not have the public network IP address, or may not include indication information for indicating that the querying node 35 does not have the public network IP address, and the embodiment is not particularly limited in whether the query request includes the indication information. In addition, the query node 35 may also sign the query request by using its own private key, and send the signed query request to the main storage node 31. In this embodiment, the querying node 35 may declare itself under a NAT or declare itself under a symmetric NAT.
When the main storage node 31 receives the query request sent by the query node 35, and determines that the query node 35 has no public network IP address, the public network IP address and the port number of the NAT corresponding to the query node 35 at the current time are recorded.
In this embodiment, the master storage node 31 locally stores a first list, where the first list includes identification information of a slave storage node corresponding to the master storage node 31, a terminal device number corresponding to the slave storage node, and a public network IP address, and for example, the first list includes identification information of the slave storage node 32, a terminal device number corresponding to the slave storage node 32, and a public network IP address. When the master storage node 31 determines that the target node 33 may become a slave storage node, the master storage node 31 may further record the identification information of the target node 33, the terminal device number corresponding to the target node 33, and the public network IP address and port number of the NAT corresponding to the target node 33 into the first list. In addition, the primary storage node 31 locally stores a second list including identification information and IP addresses of forwarders corresponding to the primary storage node 31. Optionally, one or more repeaters corresponding to the primary storage node 31 may be provided, which is not specifically limited herein, for example, the repeater corresponding to the primary storage node 31 is the repeater 36 shown in fig. 3, that is, the second list includes the identification information and the IP address of the repeater 36.
Optionally, before the master storage node receives the query request sent by the query node, the method further includes: the main storage node sends a connection request to the forwarders according to the IP address of each forwarder in the at least one forwarder; and the main storage node receives the connection response sent by the repeater.
For example, before the primary storage node 31 receives the query request sent by the query node 35, the primary storage node 31 already stores the second list, and the primary storage node 31 may send a connection request to the forwarder 36 according to the IP address of the forwarder 36, where the connection request is specifically used for requesting to establish a Transmission Control Protocol (TCP) connection. When the forwarder 36 receives the connection request, if the forwarder 36 determines that the TCP connection is established with the primary storage node 31, a connection response is sent to the primary storage node 31, the connection response indicating that the forwarder 36 determines that the TCP connection is established with the primary storage node 31, and at this time, the TCP connection between the primary storage node 31 and the forwarder 36 is successfully established.
Further, after the connection between the main storage node and the repeater is successfully established, the main storage node sends a port opening instruction to the repeater, so that the repeater opens one or more ports of the repeater according to the port opening instruction.
For example, after the TCP connection between the main storage node 31 and the repeater 36 is successfully established, the main storage node 31 may further send a port open instruction to the repeater 36, where the port open instruction is used to instruct the repeater 36 to open one or more ports of the repeater 36, specifically, the port open instruction may include identification information of the one or more ports on the repeater 36 that the main storage node 31 instructs the repeater 36 to open, and after the repeater 36 receives the port open instruction, the one or more ports are opened according to the identification information of the one or more ports included in the port open instruction.
Step 402, the primary storage node determines the identification information of the target secondary storage node from the first list according to the query request, and determines the first port identification and the second port identification of the target repeater from the second list.
After receiving the query request sent by the query node 35, the master storage node 31 queries the first list and the second list of the local storage, specifically, determines identification information of an idle slave storage node according to the first list, and here, marks the idle slave storage node determined by the master storage node 31 as a target slave storage node, for example, the target slave storage node is the target node 33. In addition, the primary storage node 31 determines from the second list a first port identification, in particular a first port number, of 5050 and a second port identification, in particular a second port number, of 6060 for the forwarder 36.
Optionally, the primary storage node 31 elects to tunnel a communication tunnel, e.g., FFF, between the target node 33 and the first port 5050 of the repeater 36, where the tunnel tunneled between the target node 33 and the first port 5050 of the repeater 36 is denoted as the first communication tunnel. In addition, the master storage node 31 selects a communication tunnel, such as a HHH, to be opened between the target node 33 and the second port 6060 of the repeater 36, where the communication tunnel opened between the target node 33 and the second port 6060 of the repeater 36 is referred to as a second communication tunnel.
Optionally, the first communication tunnel or the second communication tunnel includes at least one of the following: a virtual Extensible local area network (VxLAN) tunnel, a Generic Routing Encapsulation (GRE) tunnel, and an IPinIP tunnel. The VxLAN is an overlay network technology, and is encapsulated by using a method of MACin UDP, and the encapsulated header is 50 bytes in total, and two ends of the tunnel are called VTEP. VTEP is a packet with a packet header added, and these new headers are removed after the data arrives at the destination VTEP. The network equipment of the intermediate path only forwards data according to the destination address in the outer layer packet header, and for the network on the forwarding path, a Vxlan data packet is slightly larger than a common IP packet. The data plane of VXLAN is a tunnel-based data plane because the packets of VXLAN remain intact with the internal data throughout the forwarding process.
Step 403, the master storage node sends the IP address of the target forwarder and the first port identifier to the target slave storage node, and sends the IP address of the target forwarder and the second port identifier to the query node, so that the target slave storage node and the target forwarder establish a first communication tunnel, the query node and the target forwarder establish a second communication tunnel, and the target slave storage node and the query node perform information interaction through the first communication tunnel and the second communication tunnel.
Specifically, the primary storage node 31 sends the IP address of the forwarder 36 and the first port identification, e.g., 5050, to the target node 33 and sends the IP address of the forwarder 36 and the second port identification, e.g., 6060, to the querying node 35, so that the target node 33 establishes a first communication tunnel with the first port 5050 of the forwarder 36 on the basis of the IP address of the forwarder 36 and the first port identification, e.g., 5050; query node 35 establishes a second communication tunnel with second port 6060 of forwarder 36 based on the IP address of forwarder 36 and the second port identification, e.g., 6060. In addition, inside the repeater 36, a communication connection may be established between the first port 5050 and the second port 6060, so that the first communication tunnel and the second communication tunnel may be interfaced through the communication connection between the first port 5050 and the second port 6060, so that the target node 33 and the querying node 35 may perform information interaction through the first communication tunnel, the communication connection between the first port 5050 and the second port 6060, and the second communication tunnel.
In addition, in the embodiment, only the repeater has the authority to establish the communication tunnel, so that a malicious user is prevented from establishing the communication tunnel.
In addition, the main storage node 31 may dynamically adjust the first port and the second port selected by the main storage node 31 according to the query request sent by the query node 35, thereby improving the flexibility and the utilization rate of the port of the repeater.
The IP address and the first port identification of the repeater are sent to the slave storage node through the master storage node, the IP address and the second port identification of the repeater are sent to the query node, the master storage node and the first port of the repeater establish a first communication tunnel, the query node and the second port of the repeater establish a second communication tunnel, and therefore the target node and the query node can carry out information interaction through the first communication tunnel, the communication connection between the first port and the second communication tunnel, the slave storage node can be a node without a public network IP address, the node without the public network IP address can also be a slave storage node, and development of block chain service is promoted.
Fig. 5 is a schematic structural diagram of a block link point communication device according to an embodiment of the present invention. The block link point communicator may be the main storage node in the above embodiments. As shown in fig. 5, the block link point communication device 50 according to an embodiment of the present invention may execute a processing procedure provided in the block link point communication method embodiment, and includes: a receiving module 51, a determining module 52 and a transmitting module 53; the receiving module 51 is configured to receive an inquiry request sent by an inquiry node, where the master storage node stores a first list and a second list, the first list includes identification information of at least one slave storage node, and the second list includes identification information and an IP address of each of at least one forwarder; the determining module 52 is configured to determine, according to the query request, identification information of a target slave storage node from the first list, and determine a first port identifier and a second port identifier of a target repeater from the second list; the sending module 53 is configured to send the IP address of the target forwarder and the first port identifier to the target secondary storage node, and send the IP address of the target forwarder and the second port identifier to the querying node, so that the target secondary storage node and the target forwarder establish a first communication tunnel, the querying node and the target forwarder establish a second communication tunnel, and the target secondary storage node and the querying node perform information interaction through the first communication tunnel and the second communication tunnel.
Optionally, the receiving module 51 is further configured to: receiving request information sent by a target node, wherein the request information indicates that the target node requests to become a slave storage node, the request information comprises identification information and indication information of the target node, and the indication information is used for indicating that the target node has no public network IP address; the block link point communication device 50 further comprises: a recording module 54; the recording module 54 is configured to record the identification information of the target node; the receiving module 51 is further configured to: receiving a heartbeat message sent by the target node, wherein the heartbeat message comprises address information of the target node; the recording module 54 is further configured to: and recording the corresponding relation between the identification information of the target node and the address information of the target node.
Optionally, the sending module 53 is further configured to: sending a connection request to the forwarder according to the IP address of each forwarder in the at least one forwarder; the receiving module 51 is further configured to: and receiving the connection response sent by the repeater.
Optionally, after the connection between the blockchain node communication device and the repeater is successfully established, the sending module 53 is further configured to: and sending a port opening instruction to the repeater so that the repeater opens one or more ports of the repeater according to the port opening instruction.
Optionally, the first communication tunnel or the second communication tunnel includes at least one of the following: a VxLAN tunnel of a virtual extensible local area network, a GRE tunnel encapsulated by a general routing and an IPiniP tunnel.
The block link point communication apparatus of the embodiment shown in fig. 5 can be used to implement the technical solution of the above method embodiment, and the implementation principle and technical effect are similar, and are not described herein again.
Fig. 6 is a schematic structural diagram of a blockchain node according to an embodiment of the present invention. The block link point provided by the embodiment of the present invention may execute the processing procedure provided by the block link point communication method embodiment, as shown in fig. 6, the block link point 60 includes a memory 61, a processor 62, a computer program, and a communication interface 63; wherein a computer program is stored in the memory 61 and is configured to be executed by the processor 62 for the block-linked point communication method as described in the above embodiments.
The block link points of the embodiment shown in fig. 6 can be used to implement the technical solution of the above method embodiment, and the implementation principle and technical effect are similar, and are not described herein again.
In addition, the present embodiment also provides a computer-readable storage medium on which a computer program is stored, the computer program being executed by a processor to implement the block link point communication method described in the above embodiments.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
It is obvious to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to perform all or part of the above described functions. For the specific working process of the device described above, reference may be made to the corresponding process in the foregoing method embodiment, which is not described herein again.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (12)

1. A block-node communication method, comprising:
a master storage node receives a query request sent by a query node, wherein the master storage node stores a first list and a second list, the first list comprises identification information of at least one slave storage node, and the second list comprises identification information and an IP address of each repeater in at least one repeater;
the main storage node determines identification information of a target auxiliary storage node from the first list according to the query request, and determines a first port identification and a second port identification of a target repeater from the second list;
the master storage node sends the IP address of the target forwarder and the first port identification to the target slave storage node, and sends the IP address of the target forwarder and the second port identification to the inquiry node, so that the target slave storage node and the target forwarder establish a first communication tunnel, the inquiry node and the target forwarder establish a second communication tunnel, and the target slave storage node and the inquiry node perform information interaction through the first communication tunnel and the second communication tunnel.
2. The method of claim 1, wherein before the master storage node receives the query request sent by the query node, the method further comprises:
the method comprises the steps that a main storage node receives request information sent by a target node, wherein the request information represents that the target node requests to become a slave storage node, the request information comprises identification information and indication information of the target node, and the indication information is used for indicating that the target node has no public network IP address;
the main storage node records the identification information of the target node;
the main storage node receives a heartbeat message sent by the target node, wherein the heartbeat message comprises address information of the target node;
and the main storage node records the corresponding relation between the identification information of the target node and the address information of the target node.
3. The method of claim 1, wherein before the master storage node receives the query request sent by the query node, the method further comprises:
the main storage node sends a connection request to the forwarders according to the IP address of each forwarder in the at least one forwarder;
and the main storage node receives the connection response sent by the repeater.
4. The method of claim 3,
and when the connection between the main storage node and the repeater is successfully established, the main storage node sends a port opening instruction to the repeater so that the repeater opens one or more ports of the repeater according to the port opening instruction.
5. The method of claim 1, wherein the first communication tunnel or the second communication tunnel comprises at least one of:
a VxLAN tunnel of a virtual extensible local area network, a GRE tunnel encapsulated by a general routing and an IPiniP tunnel.
6. A block-link point communication device, comprising:
a receiving module, configured to receive a query request sent by a query node, where the block-node link communication device stores a first list and a second list, where the first list includes identification information of at least one slave storage node, and the second list includes identification information and an IP address of each of at least one transponder;
a determining module, configured to determine, according to the query request, identification information of a target slave storage node from the first list, and determine, from the second list, a first port identifier and a second port identifier of a target repeater;
a sending module, configured to send the IP address of the target forwarder and the first port identifier to the target secondary storage node, and send the IP address of the target forwarder and the second port identifier to the querying node, so that the target secondary storage node and the target forwarder establish a first communication tunnel, the querying node and the target forwarder establish a second communication tunnel, and the target secondary storage node and the querying node perform information interaction through the first communication tunnel and the second communication tunnel.
7. The block-link point communication device of claim 6, wherein the receiving module is further configured to: receiving request information sent by a target node, wherein the request information indicates that the target node requests to become a slave storage node, the request information comprises identification information and indication information of the target node, and the indication information is used for indicating that the target node has no public network IP address;
the block link point communication device further comprises: the recording module is used for recording the identification information of the target node;
the receiving module is further configured to: receiving a heartbeat message sent by the target node, wherein the heartbeat message comprises address information of the target node;
the recording module is further configured to: and recording the corresponding relation between the identification information of the target node and the address information of the target node.
8. The block-link point communication device of claim 6, wherein the sending module is further configured to: sending a connection request to the forwarder according to the IP address of each forwarder in the at least one forwarder;
the receiving module is further configured to: and receiving the connection response sent by the repeater.
9. The block-link point communication device of claim 8,
when the connection between the blockchain node communication device and the repeater is successfully established, the sending module is further configured to: and sending a port opening instruction to the repeater so that the repeater opens one or more ports of the repeater according to the port opening instruction.
10. The block-link point communication device of claim 6, wherein the first communication tunnel or the second communication tunnel comprises at least one of:
a VxLAN tunnel of a virtual extensible local area network, a GRE tunnel encapsulated by a general routing and an IPiniP tunnel.
11. A block link point, comprising:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of any one of claims 1-5.
12. A computer-readable storage medium, having stored thereon a computer program for execution by a processor to perform the method of any one of claims 1-5.
CN201810555761.1A 2018-05-31 2018-05-31 Block chain node communication method and device and block chain node Active CN108777712B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810555761.1A CN108777712B (en) 2018-05-31 2018-05-31 Block chain node communication method and device and block chain node

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810555761.1A CN108777712B (en) 2018-05-31 2018-05-31 Block chain node communication method and device and block chain node

Publications (2)

Publication Number Publication Date
CN108777712A CN108777712A (en) 2018-11-09
CN108777712B true CN108777712B (en) 2020-04-07

Family

ID=64028247

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810555761.1A Active CN108777712B (en) 2018-05-31 2018-05-31 Block chain node communication method and device and block chain node

Country Status (1)

Country Link
CN (1) CN108777712B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110290168B (en) * 2019-05-08 2022-04-12 深圳壹账通智能科技有限公司 Data transmission method, device, server and storage medium
CN110445850A (en) * 2019-07-24 2019-11-12 深圳壹账通智能科技有限公司 Block chain node access method and device, storage medium, electronic equipment
CN111917868A (en) * 2020-07-29 2020-11-10 数网金融有限公司 Addressing method and device for block chain node, routing equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106716421A (en) * 2016-12-30 2017-05-24 深圳前海达闼云端智能科技有限公司 Data query method, device and node apparatus
CN106899680A (en) * 2017-03-09 2017-06-27 上海亿账通区块链科技有限公司 The burst treating method and apparatus of multi-tiling chain
WO2017109140A1 (en) * 2015-12-22 2017-06-29 Bigchaindb Gmbh Decentralized, tamper-resistant, asset-oriented database system and method of recording a transaction
CN107046542A (en) * 2017-04-24 2017-08-15 杭州云象网络技术有限公司 A kind of method that common recognition checking is realized using hardware in network level
CA3009731A1 (en) * 2016-02-23 2017-08-31 nChain Holdings Limited Secure multiparty loss resistant storage and transfer of cryptographic keys for blockchain based systems in conjunction with a wallet management system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017109140A1 (en) * 2015-12-22 2017-06-29 Bigchaindb Gmbh Decentralized, tamper-resistant, asset-oriented database system and method of recording a transaction
CA3009731A1 (en) * 2016-02-23 2017-08-31 nChain Holdings Limited Secure multiparty loss resistant storage and transfer of cryptographic keys for blockchain based systems in conjunction with a wallet management system
CN106716421A (en) * 2016-12-30 2017-05-24 深圳前海达闼云端智能科技有限公司 Data query method, device and node apparatus
CN106899680A (en) * 2017-03-09 2017-06-27 上海亿账通区块链科技有限公司 The burst treating method and apparatus of multi-tiling chain
CN107046542A (en) * 2017-04-24 2017-08-15 杭州云象网络技术有限公司 A kind of method that common recognition checking is realized using hardware in network level

Also Published As

Publication number Publication date
CN108777712A (en) 2018-11-09

Similar Documents

Publication Publication Date Title
CN108712506B (en) Block chain node communication method and device and block chain node
WO2019153428A1 (en) Wireless communication method, network device and terminal device
US11528225B2 (en) Communication method, session management device, and system for packet routing by access network devices belonging to a same network instance having different network addresses
WO2022257549A1 (en) Network slicing method and device, and storage medium
US20220272607A1 (en) Network Access Method and Communication Apparatus
CN108777712B (en) Block chain node communication method and device and block chain node
CN111132134B (en) PDT (PDT) packet cross-system interconnection implementation method
CN105874756B (en) The transmission method and equipment of control signaling
CN108810120B (en) Block chain node communication method and device and block chain node
CN108683727B (en) Block processing method and main node
US11838969B2 (en) Method for accessing local network, and related device
EP3755015A1 (en) Communication method, first terminal device and second terminal device
CN108777710B (en) Inter-node communication method and device of block chain and block chain node
CN112312481B (en) Communication method and system for MEC and multi-operator core network
CN108848144B (en) Method and device for accessing nodes in block chain and block chain link point
CN112291845B (en) Paging method and communication device
US20220272608A1 (en) Network access method and apparatus
CN108833513B (en) Inter-node communication method and device of block chain and block chain node
US9247483B2 (en) Method and system for data traffic offload
CN108712507B (en) Block link point access method and device and block link point
US10880862B2 (en) Paging for converged enterprise private radio service and Wi-Fi access deployments
CN108881414B (en) Block chain node communication method and device and block chain node
CN108777711B (en) Block chain node communication method and device and block chain node
CN108401228B (en) Communication method and device
CN108810186B (en) Block chain node communication method and device and block chain node

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