CN108712506A - block chain node communication method, device and block chain node - Google Patents

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

Info

Publication number
CN108712506A
CN108712506A CN201810553155.6A CN201810553155A CN108712506A CN 108712506 A CN108712506 A CN 108712506A CN 201810553155 A CN201810553155 A CN 201810553155A CN 108712506 A CN108712506 A CN 108712506A
Authority
CN
China
Prior art keywords
node
destination node
address
primary storage
block chain
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810553155.6A
Other languages
Chinese (zh)
Other versions
CN108712506B (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 CN201810553155.6A priority Critical patent/CN108712506B/en
Publication of CN108712506A publication Critical patent/CN108712506A/en
Application granted granted Critical
Publication of CN108712506B publication Critical patent/CN108712506B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/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
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/2517Translation of Internet protocol [IP] addresses using port numbers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/2514Translation of Internet protocol [IP] addresses between local and global IP addresses

Abstract

A kind of block chain node communication method of offer of the embodiment of the present invention, device and block chain node.This method includes:Primary storage node receives the solicited message that destination node is sent, which indicates that destination node request becomes from memory node, which includes the identification information of the destination node;Whether the IP address that the primary storage node compares the source IP address of the solicited message and the destination node is broadcasted when block chain network is added is identical;If the source IP address of the solicited message is different with the IP address that the destination node is broadcasted when block chain network is added, which determines the destination node without public network IP address;The heartbeat message that the primary storage node is sent according to the destination node determines the port numbers that the public network IP address of the LAN where the destination node and the destination node map in the LAN.The embodiment of the present invention makes the node of not public network IP address that can also become from memory node, promotes the development of block chain business.

Description

Block chain node communication method, device and block chain node
Technical field
The present embodiments relate to a kind of field of communication technology more particularly to block chain node communication method, device and areas Block chain node.
Background technology
In block chain network, primary storage node can store complete block chain account book, can be stored from memory node Partial block chain account book, the queried access of other nodes is can receive from memory node, should be from memory node by giving other sections Point provides inquiry service to obtain corresponding reward.
In the prior art, it in order to promote block chain business, needs more nodes to become from memory node, but to become From memory node, need the node that there is public network IP address, but many nodes are there is no public network IP address at present, so as to cause Many nodes can not become from memory node, limit the development of block chain business.
Invention content
A kind of block chain node communication method of offer of the embodiment of the present invention, device and block chain node, so that without public affairs The node of net IP address can also become from memory node, promote the development of block chain business.
In a first aspect, the embodiment of the present invention provides a kind of block chain node communication method, including:
Primary storage node receives the solicited message that destination node is sent, and the solicited message indicates the destination node request As from memory node, the solicited message includes the identification information of the destination node;
Block link network is being added in the source IP address and the destination node of the primary storage node solicited message Whether the IP address broadcasted when network is identical;
If the IP address that the source IP address of the solicited message and the destination node are broadcasted when block chain network is added Difference, then the primary storage node determine the destination node without public network IP address;
The heartbeat message that the primary storage node is sent according to the destination node, determines the office where the destination node The port numbers that the public network IP address and the destination node of domain net map in the LAN.
Second aspect, the embodiment of the present invention provide a kind of block chain node communication device, including:
Receiving module, the solicited message for receiving destination node transmission, the solicited message indicate the destination node Request becomes from memory node, and the solicited message includes the identification information of the destination node;
Block chain network is being added for the source IP address of the solicited message and the destination node in comparison module When the IP address broadcasted it is whether identical;
First determining module, if block link network is being added for the source IP address of the solicited message and the destination node The IP address broadcasted when network is different, it is determined that the destination node is without public network IP address;
Second determining module, the heartbeat message for being sent according to the destination node determine the destination node place LAN public network IP address and the port numbers that are mapped in the LAN of the destination node.
The third aspect, the embodiment of the present invention provide a kind of block chain node, including:
Memory;
Processor;And
Computer program;
Wherein, the computer program is stored in the memory, and is configured as being executed with reality by the processor Method described in existing first aspect.
Fourth aspect, the embodiment of the present invention provide a kind of computer readable storage medium, are stored thereon with computer program, The computer program is executed by processor to realize the method described in first aspect.
Block chain node communication method, device and block chain node provided in an embodiment of the present invention, pass through primary storage node The solicited message that destination node is sent is received, block link network is being added in the source IP address and the destination node for comparing the solicited message Whether the IP address broadcasted when network identical, so that it is determined that whether the destination node has public network IP address, if the destination node without Public network IP address determines the public affairs of the LAN where the destination node then by receiving the heartbeat message of destination node transmission The port numbers that net IP address and the destination node map in the LAN, so that the destination node can become from storage Node so that the node of public network IP address can also not become from memory node, promote the development of block chain business.
Description of the drawings
Fig. 1 is a kind of schematic diagram of application scenarios provided in an embodiment of the present invention;
Fig. 2 is block chain node communication method flow chart provided in an embodiment of the present invention;
Fig. 3 is a kind of schematic diagram of block chain network provided in an embodiment of the present invention;
Fig. 4 is the block chain node communication method flow chart that another embodiment of the present invention provides;
Fig. 5 is the block chain node communication method flow chart that another embodiment of the present invention provides;
Fig. 6 is the structural schematic diagram of block chain node communication device provided in an embodiment of the present invention;
Fig. 7 is the structural schematic diagram of block chain node provided in an embodiment of the present invention.
Through the above attached drawings, it has been shown that the specific embodiment of the disclosure will be hereinafter described in more detail.These attached drawings It is not intended to limit the scope of this disclosure concept by any means with verbal description, but is by referring to specific embodiments Those skilled in the art illustrate the concept of the disclosure.
Specific implementation mode
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all implementations consistent with this disclosure.On the contrary, they be only with it is such as appended The example of the consistent device and method of some aspects be described in detail in claims, the disclosure.
Block chain node communication method provided by the invention, can be adapted for communication system shown in FIG. 1.As shown in Figure 1, The communication system includes:Access network equipment 11, terminal device 12 and server 13.It should be noted that communication shown in FIG. 1 System can be adapted for different network formats, for example, can be adapted for global system for mobile telecommunications (Global System of Mobile communication, abbreviation GSM), CDMA (Code Division Multiple Access, referred to as CDMA), wideband code division multiple access (Wideband Code Division Multiple Access, abbreviation WCDMA), time division synchronous CDMA (Time Division-Synchronous Code Division Multiple Access, abbreviation TD- SCDMA), the network formats such as the 5G in long term evolution (Long Term Evolution, abbreviation LTE) system and future.Optionally, Above-mentioned communication system can be that highly reliable low time delay communicates (Ultra-Reliable and Low Latency in 5G communication systems Communications, abbreviation URLLC) transmission scene in system.
So optionally, above-mentioned access network equipment 11 can be base station (the Base Transceiver in GSM or CDMA Station, abbreviation BTS) and/or base station controller can also be base station (NodeB, abbreviation NB) in WCDMA and/or wireless Network controller (Radio Network Controller, abbreviation RNC), can also be the evolved base station in LTE (Evolutional Node B, abbreviation eNB or eNodeB) either base in relay station or access point or future 5G networks Stand (gNB) etc., and the present invention does not limit herein.
Above-mentioned terminal device 12 can be that wireless terminal can also be catv terminal.Wireless terminal can be directed to user and carry For voice and/or the equipment of other business datum connectivity, there is the portable equipment of wireless connecting function or be connected to wireless Other processing equipments of modem.Wireless terminal can be through wireless access network (Radio Access Network, abbreviation RAN it) is communicated with one or more equipments of the core network, wireless terminal can be mobile terminal, as mobile phone (or is " honeycomb " phone) and computer with mobile terminal, for example, it may be portable, pocket, hand-held, built-in computer Or vehicle-mounted mobile device, they exchange language and/or data with wireless access network.For another example wireless terminal can be with It is personal communication service (Personal Communication Service, abbreviation PCS) phone, wireless phone, session setup Agreement (Session Initiation Protocol, abbreviation SIP) phone, wireless local loop (Wireless Local Loop, abbreviation WLL) it stands, the equipment such as personal digital assistant (Personal Digital Assistant, abbreviation PDA).It is wireless whole End is referred to as system, subscriber unit (Subscriber Unit), subscriber station (Subscriber Station), movement station (Mobile Station), mobile station (Mobile), distant station (Remote Station), remote terminal (Remote Terminal), access terminal (Access Terminal), user terminal (User Terminal), user agent (User Agent), user equipment (User Device or User Equipment), is not limited thereto.Optionally, above-mentioned terminal is set Standby 12 can also be the equipment such as smartwatch, tablet computer.In the present embodiment, terminal device 12 and server 13 can be areas Node in block chain network.
Block chain node communication method provided by the invention, it is intended to solve the technical problem as above of the prior art.
How the technical solution of technical scheme of the present invention and the application is solved with specifically embodiment below above-mentioned Technical problem is described in detail.These specific embodiments can be combined with each other below, for same or analogous concept Or process may repeat no more in certain embodiments.Below in conjunction with attached drawing, the embodiment of the present invention is described.
Fig. 2 is block chain node communication method flow chart provided in an embodiment of the present invention.The embodiment of the present invention is for existing The technical problem as above of technology, provides block chain node communication method, and this method is as follows:
Step 201, primary storage node receive the solicited message that destination node is sent, and the solicited message indicates the target Node request becomes from memory node, and the solicited message includes the identification information of the destination node.
As shown in figure 3,31 indicate the primary storage node in block chain network, 32 indicate the target section in block chain network Point, the request of destination node 32 become from memory node, and destination node 32 has the public network IP address of oneself.33 indicate another target Node, the request of destination node 33 become from memory node, and destination node 33 does not have public network IP address, destination node 33 to pass through network Address conversion (Network Address Translation, NAT) is communicated with block chain network, and 34 indicate NAT, and 35 indicate to be somebody's turn to do Query node in block chain network.In the present embodiment, by being that the query node 35 provides inquiry service from memory node.This Place only schematically illustrates, and does not limit the specific network architecture of block chain network.In addition, query node 35 can be under NAT Node, may not be the node under NAT.
When block chain network is added for the first time in destination node 32 or destination node 33, need from the destination node 32 or The adjacent node of destination node 33 obtains wound generation block, and optionally, the node in block chain network stores invasive generation block.For Ensure that the destination node 32 or destination node 33 get true wound generation block, the destination node 32 or destination node 33 can To send wound generation block inquiry request to multiple adjacent nodes, for example, destination node 32 or destination node 33 to adjacent node B and Adjacent node C sends wound generation block inquiry request respectively, and adjacent node B and adjacent node C receive wound generation block inquiry and ask After asking, the wound generation block being respectively locally stored is sent to destination node 32 or destination node 33, destination node 32 or target section Whether point 33 compares adjacent node B consistent with the wound generation block that adjacent node C is fed back, if adjacent node B and adjacent node C are anti- The wound generation block of feedback is consistent, then the wound generation block is stored in local by destination node 32 or destination node 33;If adjacent node B Inconsistent with the wound generation block of adjacent node C feedbacks, then destination node 32 or destination node 33 can also continue to adjacent node D Wound generation block inquiry request is sent with adjacent node E, and receives the wound generation block that adjacent node D and adjacent node E are fed back respectively, If the wound generation fed back more than the adjacent node of preset ratio in adjacent node B, adjacent node C, adjacent node D and adjacent node E Block is consistent, then destination node 32 or destination node 33 determine that the wound generation block is true.Optionally, adjacent node B, phase Adjacent node such as adjacent node C, adjacent node D in neighbors C, adjacent node D and adjacent node E more than 50 percent Consistent with the wound generation block that adjacent node E is fed back respectively, then destination node 32 or destination node 33 determine adjacent node C feedbacks Wound generation block is true, and the wound generation block of adjacent node B feedbacks is false.
After destination node 32 or destination node 33 get true wound generation block, by wound generation block storage to originally Ground, and the IP address of acquisition primary storage node is optionally stored with one or more in the wound generation block from the wound generation block The IP address of primary storage node, the destination node 32 or destination node 33 can according to the IP of one or more primary storage nodes Location sends solicited message to one or more primary storage nodes, and the present embodiment is with destination node 32 or destination node 33 to one For primary storage node sends solicited message, for example, being stored with the IP address of primary storage node 31, target section in the wound generation block Point 32 sends solicited message to primary storage node 31, which is used to indicate that destination node 32 is wanted to be from memory node, And the solicited message includes the identification information of destination node 32,32 corresponding terminal device number of destination node.And/or mesh It marks node 33 and sends solicited message to primary storage node 31, which saves for indicating that destination node 33 is wanted to be from storage Point, and the solicited message includes the identification information of destination node 33,33 corresponding terminal device number of destination node.
Step 202, the source IP address of the primary storage node solicited message and the destination node are being added Whether the IP address broadcasted when block chain network is identical.
When primary storage node 31 receives the solicited message of the transmission of destination node 32, primary storage node 31 obtains the request The source IP address of information such as TTT, and search destination node 32 from the block chain account book that primary storage node 31 is locally stored and exist The IP address such as UUU broadcasted when block chain network is added, further compares the source IP address such as TTT and mesh of the solicited message Whether the IP address such as UUU that mark node 32 is broadcasted when block chain network is added is identical.
Similarly, when primary storage node 31 receives the solicited message of the transmission of destination node 33, primary storage node 31 obtains The source IP address of the solicited message such as TTT, and target section is searched from the block chain account book that primary storage node 31 is locally stored The IP address such as UUU that point 33 is broadcasted when block chain network is added, further compares the source IP address of the solicited message for example Whether the IP address such as UUU that TTT and destination node 33 are broadcasted when block chain network is added is identical.
If the source IP address and the destination node of step 203, the solicited message are broadcasted when block chain network is added IP address it is different, then the primary storage node determines the destination node without public network IP address.
As shown in figure 3, the not no public network IP address of oneself of destination node 33, therefore, destination node 33 is to primary storage node The source IP address of 31 solicited messages sent may not be the public network IP address of oneself of destination node 33, the source of the solicited message IP address may be the public network IP address that the access point in 33 corresponding LAN of destination node is distributed to destination node 33, The IP address that then source IP address from destination node 33 of the solicited message is broadcasted when block chain network is added is possible and different.Cause This, when primary storage node 31 compare destination node 33 transmission solicited message source IP address such as TTT and destination node 33 exist When the IP address such as UUU differences broadcasted when block chain network are added, primary storage node 31 determines destination node 33 at NAT, And the not no public network IP address of oneself of the destination node 33.
The heartbeat message that step 204, the primary storage node are sent according to the destination node, determines the destination node The port numbers that the public network IP address of the LAN at place and the destination node map in the LAN.
In the present embodiment, it is communicated with block chain network by NAT due to destination node 33, and destination node 33 is without public affairs Net IP address;But needed with public network IP address as from memory node, so that query node is visited according to the public network IP address Ask this from memory node.Therefore, in the present embodiment, destination node 33 needs in real time or periodic to primary storage node 31 Send heartbeat message, it is assumed that the heartbeat message that destination node 33 that primary storage node 31 at a time receives is sent is denoted as the One heartbeat message, the content which includes can be specifically destination nodes 33 using after the private key signature of oneself The information such as the content indexing, such as block number of storage information inquiry can be currently provided.
After primary storage node 31 receives first heartbeat message, according to the block after signing in first heartbeat message Number, it may be determined that go out the identity information of destination node 33, further extract the source IP address and source port number of first heartbeat message, Primary storage node 31 can using the source IP address of first heartbeat message and source port number as the address information of destination node 33, Optionally, the address information of the destination node 33 includes:33 corresponding LAN of the destination node or access point such as family The port numbers that the public network IP address of front yard gateway and the destination node 33 map on the LAN or the access point.Namely It says, the source IP address of first heartbeat message can be 33 corresponding LAN of destination node or access point such as home gateway Public network IP address;The source port number of first heartbeat message can be that destination node 33 maps on the LAN or the access point Port numbers.
Optionally, the method further includes:The primary storage node is according to the heartbeat of the destination node periodicity sending Message, update the LAN where the destination node of local record public network IP address and the destination node in the office The port numbers mapped in the net of domain.
After destination node 33 sends the first heartbeat message described in above-described embodiment to primary storage node 31, and to primary storage Node 31 sends the second heartbeat message, and the source IP address of second heartbeat message may be with the source IP address of the first heartbeat message not Together, the source port number of second heartbeat message may be also different from the source port number of the first heartbeat message, i.e. the source of heartbeat message IP address and source port number may be variation.
It, can be by the source IP address of second heartbeat message and source after primary storage node 31 receives the second heartbeat message The port numbers address information new as destination node 33.
Before primary storage node 31 receives the second heartbeat message, primary storage node 31 stores the mark of destination node 33 Information, 33 corresponding terminal device number of destination node, 33 corresponding LAN of destination node or access point public network IP address and Port numbers;After primary storage node 31 receives the second heartbeat message, using the source IP address of second heartbeat message as this The new public network IP address of destination node 33, using the source port number of second heartbeat message port new as the destination node 33 Number, to according to the new public network IP address of the destination node 33 and new port numbers, update stored in primary storage node 31 The LAN of the destination node 33 or the public network IP address of access point and port numbers.
If in addition, the IP that the source IP address of the solicited message and the destination node are broadcasted when block chain network is added Address is identical, then when the primary storage node receives the inquiry request of query node transmission, the primary storage node is by institute It states the source IP address of solicited message and source port number is sent to the query node, so that the query node asks the inquiry It asks and is sent to the destination node.
As shown in figure 3, destination node 32 has the public network IP address of oneself, therefore, destination node 32 is to primary storage node 31 The source IP address of the solicited message of transmission is the public network IP address of oneself of destination node 32, then the source IP address of the solicited message It is identical as the IP address that destination node 32 is broadcasted when block chain network is added.Therefore, when primary storage node 31 compares target section The IP address that the source IP address such as TTT and destination node 32 for the solicited message that point 32 is sent are broadcasted when block chain network is added Such as UUU it is identical when, primary storage node 31 determines destination node 32 not at NAT, and the destination node 32 has the public network of oneself The source IP address of IP address, the solicited message that destination node 32 is sent is the public network IP address of oneself of destination node 32, target section The source port number for the solicited message that point 32 is sent is the port numbers of the destination node 32.
When query node 35 needs to access the slave memory node in block chain network, the acquisition of query node 35 is locally stored Wound generation block, query node 35 stores method and process and the destination node 32 or the storage wound generation of destination node 33 of wound generation block The method and process of block are consistent, and details are not described herein again.Optionally, the wound generation block that query node 35 is locally stored includes master The IP address of memory node 31, query node 35 send inquiry to primary storage node 31 according to the IP address of primary storage node 31 and ask It asks, after primary storage node 31 receives the inquiry request, primary storage node 31 is by the public network IP address of destination node 32, port Number, identification information and 32 corresponding terminal device number of destination node be sent to query node 35, query node 35 is according to target section The public network IP address of point 32, port numbers, are sent to destination node 32, destination node 32 sends query result by the inquiry request To query node 35.
The embodiment of the present invention receives the solicited message that destination node is sent by primary storage node, compares the solicited message Whether the IP address that source IP address and the destination node are broadcasted when block chain network is added is identical, so that it is determined that the destination node Whether public network IP address is had, if the heartbeat report that the destination node is sent without public network IP address, by receiving the destination node Text determines the port that the public network IP address of the LAN where the destination node and the destination node map in the LAN Number so that the destination node can become from memory node so that not the node of public network IP address can also become from Memory node promotes the development of block chain business.
Fig. 4 is the block chain node communication method flow chart that another embodiment of the present invention provides.In the base of above-described embodiment On plinth, block chain node communication method provided in this embodiment specifically comprises the following steps:
Step 401, primary storage node receive the solicited message that destination node is sent, and the solicited message indicates the target Node request becomes from memory node, and the solicited message includes the identification information of the destination node.
Step 401 and the realization method of step 201 are consistent with concrete principle, and details are not described herein again.
Step 402, the source IP address of the primary storage node solicited message and the destination node are being added Whether the IP address broadcasted when block chain network is identical.
Step 402 and the realization method of step 202 are consistent with concrete principle, and details are not described herein again.
If the source IP address and the destination node of step 403, the solicited message are broadcasted when block chain network is added IP address it is different, then the primary storage node determines the destination node without public network IP address.
Step 403 and the realization method of step 203 are consistent with concrete principle, and details are not described herein again.
Step 404, the primary storage node are according to the source IP address and source port number of the solicited message, to the target Node sends connection request.
When primary storage node 31 determines destination node 33 at NAT, and the not no public network IP of oneself of the destination node 33 Behind location, primary storage node 31 further determines that the type of the NAT where destination node 33, and destination node 33 may be common Under NAT, it is also possible at symmetrical NAT.Specifically, the source for the solicited message that primary storage node 31 is sent according to destination node 33 IP address such as TTT and source port number such as 4040 sends connection request to destination node 33, which can be specifically TCP connection is asked.
Step 405, the primary storage node receive the connection response that the destination node is sent.
If destination node 33 has received the connection request of the transmission of primary storage node 31, and is sent to primary storage node 31 Connection response then illustrates destination node 33 at common NAT.
The heartbeat message that step 406, the primary storage node are sent according to the destination node, determines the destination node The port numbers that the public network IP address of the LAN at place and the destination node map in the LAN.
Step 406 and the realization method of step 204 are consistent with concrete principle, and details are not described herein again.
Step 407, the primary storage node receive the inquiry request of query node transmission.
For example, primary storage node 31 receives the inquiry request of the transmission of query node 35.
Step 408, the primary storage node are by the public network IP address of the LAN where the destination node and the mesh The port numbers that are mapped in the LAN of mark node are sent to the query node, so that the query node is to the target Node sends the inquiry request.
Primary storage node 31 is by the public network IP address and destination node of the LAN where the destination node 33 of state-of-the-art record 33 port numbers mapped in the LAN are sent to query node 35, and query node 35 is according to the office where destination node 33 The port numbers that the public network IP address and destination node 33 of domain net map in the LAN, the inquiry is sent to destination node 33 Request, so that query result is sent to query node 35 by destination node 33.
The embodiment of the present invention receives the solicited message that destination node is sent by primary storage node, compares the solicited message Whether the IP address that source IP address and the destination node are broadcasted when block chain network is added is identical, so that it is determined that the destination node Whether public network IP address is had, if the heartbeat report that the destination node is sent without public network IP address, by receiving the destination node Text determines the port that the public network IP address of the LAN where the destination node and the destination node map in the LAN Number so that the destination node can become from memory node so that not the node of public network IP address can also become from Memory node promotes the development of block chain business.
Fig. 5 is the block chain node communication method flow chart that another embodiment of the present invention provides.In the base of above-described embodiment On plinth, block chain node communication method provided in this embodiment specifically comprises the following steps:
Step 501, primary storage node receive the solicited message that destination node is sent, and the solicited message indicates the target Node request becomes from memory node, and the solicited message includes the identification information of the destination node.
Step 501 and the realization method of step 201 are consistent with concrete principle, and details are not described herein again.
Step 502, the source IP address of the primary storage node solicited message and the destination node are being added Whether the IP address broadcasted when block chain network is identical.
Step 502 and the realization method of step 202 are consistent with concrete principle, and details are not described herein again.
If the source IP address and the destination node of step 503, the solicited message are broadcasted when block chain network is added IP address it is different, then the primary storage node determines the destination node without public network IP address.
Step 503 and the realization method of step 203 are consistent with concrete principle, and details are not described herein again.
Step 504, the primary storage node are according to the source IP address and source port number of the solicited message, to the target Node sends connection request.
Step 504 and the realization method of step 404 are consistent with concrete principle, and details are not described herein again.
Step 505, the primary storage node do not receive the connection response that the destination node is sent in preset time.
The source IP address such as TTT and source port number example for the solicited message that primary storage node 31 is sent according to destination node 33 Such as 4040, after sending connection request to destination node 33, if primary storage node 31 does not receive target in preset time The connection response that node 33 is sent, then primary storage node 31 can be again to the transmission connection request of destination node 33, if main memory After storing up the connection request that node 31 sends preset quantity to destination node 33, target section is not received in preset time still The connection response that point 33 is sent, then illustrate destination node 33 at symmetrical NAT.
The heartbeat message that step 506, the primary storage node are sent according to the destination node, determines the destination node The port numbers that the public network IP address of the LAN at place and the destination node map in the LAN.
Step 506 and the realization method of step 204 are consistent with concrete principle, and details are not described herein again.
Step 507, the primary storage node receive the inquiry request of query node transmission.
For example, primary storage node 31 receives the inquiry request of the transmission of query node 35.
Step 508, the primary storage node are according to the public network IP address of the LAN where the destination node and described The port numbers that destination node maps in the LAN ask the IP address of the query node, port numbers and the inquiry It asks and is sent to the destination node.
The IP address of query node 35, port numbers and the inquiry request are passed through primary storage node 31 by primary storage node 31 The heartbeat channel maintained always with destination node 33 is sent to destination node 33, specifically, primary storage node 31 is according to newest note The port numbers that the public network IP address and destination node 33 of LAN where the destination node 33 of record map in the LAN, The IP address of query node 35, port numbers and the inquiry request are sent to destination node 33, optionally, query node 35 IP address can be the source IP address for the inquiry request that the query node 35 that primary storage node 31 receives is sent, query node 35 Port numbers can be the inquiry request that the query node 35 that receives of primary storage node 31 is sent source port number.
The embodiment of the present invention becomes according to request from whether the destination node of memory node has public network IP address, and works as When the destination node does not have public network IP address, the type of the corresponding NAT of the destination node, realizes the destination node and inquiry saves Different communication modes, saves the cost of investment of block chain network between point.
Fig. 6 is the structural schematic diagram of block chain node communication device provided in an embodiment of the present invention.The block chain node is logical T unit can be the primary storage node in above-described embodiment.Block chain node communication device provided in an embodiment of the present invention can be with The process flow that block chain node communication method embodiment provides is executed, as shown in fig. 6, block chain node communication device 60 wraps It includes:Receiving module 61, comparison module 62, the first determining module 63 and the second determining module 64;Wherein, receiving module 61 is for connecing The solicited message that destination node is sent is received, the solicited message indicates that the destination node request becomes from memory node, described Solicited message includes the identification information of the destination node;Comparison module 62 for the solicited message source IP address and Whether the IP address that the destination node is broadcasted when block chain network is added is identical;If the first determining module 63 is asked for described It seeks the source IP address of information and IP address that the destination node is broadcasted when block chain network is added is different, it is determined that the mesh Node is marked without public network IP address;Second determining module 64 is used for the heartbeat message that is sent according to the destination node, described in determination The port numbers that the public network IP address of LAN where destination node and the destination node map in the LAN.
Optionally, block chain node communication device 60 further includes:Sending module 65;Sending module 65 is used to ask according to The source IP address and source port number for seeking information send connection request to the destination node;Receiving module 61 is additionally operable to:Receive institute State the connection response of destination node transmission;Receive the inquiry request that query node is sent;Sending module 65 is additionally operable to:By the mesh The port numbers that the public network IP address and the destination node of LAN where mark node map in the LAN are sent to The query node, so that the query node sends the inquiry request to the destination node.
Optionally, sending module 65 is used for source IP address and source port number according to the solicited message, to the target Node sends connection request;Receiving module 61 does not receive the connection response that the destination node is sent in preset time;It connects Module 61 is received to be additionally operable to:Receive the inquiry request of query node transmission;Sending module 65 is additionally operable to:According to the destination node The port numbers that the public network IP address of the LAN at place and the destination node map in the LAN save the inquiry IP address, port numbers and the inquiry request of point are sent to the destination node.
Optionally, if what the source IP address of the solicited message and the destination node were broadcasted when block chain network is added IP address is identical, then when the receiving module receives the inquiry request of query node transmission, sending module 65 is used for institute It states the source IP address of solicited message and source port number is sent to the query node, so that the query node asks the inquiry It asks and is sent to the destination node.
Optionally, block chain node communication device 60 further includes:Update module 66, update module 66 are used for according to the mesh The heartbeat message for marking node periodicity sending, updates the public network IP address of the LAN where the destination node of local record The port numbers mapped in the LAN with the destination node.
The block chain node communication device of embodiment illustrated in fig. 6 can be used for executing the technical solution of above method embodiment, Its implementing principle and technical effect is similar, and details are not described herein again.
Fig. 7 is the structural schematic diagram of block chain node provided in an embodiment of the present invention.Block provided in an embodiment of the present invention Chain node can execute the process flow of block chain node communication method embodiment offer, as shown in fig. 7, block chain node 70 wraps Include memory 71, processor 72, computer program and communication interface 73;Wherein, computer program is stored in memory 71, and It is configured as executing the block chain node communication method described in above example by processor 72.
The block chain node of embodiment illustrated in fig. 7 can be used for executing the technical solution of above method embodiment, realize former Reason is similar with technique effect, and details are not described herein again.
In addition, the present embodiment also provides a kind of computer readable storage medium, it is stored thereon with computer program, the meter Calculation machine program is executed by processor to realize the block chain node communication method described in above-described embodiment.
In several embodiments provided by the present invention, it should be understood that disclosed device and method can pass through it Its mode is realized.For example, the apparatus embodiments described above are merely exemplary, for example, the division of the unit, only Only a kind of division of logic function, formula that in actual implementation, there may be another division manner, such as multiple units or component can be tied Another system is closed or is desirably integrated into, or some features can be ignored or not executed.Another point, it is shown or discussed Mutual coupling, direct-coupling or communication connection can be the INDIRECT COUPLING or logical by some interfaces, device or unit Letter connection can be electrical, machinery or other forms.
The unit illustrated as separating component may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, you can be located at a place, or may be distributed over multiple In network element.Some or all of unit therein can be selected according to the actual needs to realize the mesh of this embodiment scheme 's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it can also It is that each unit physically exists alone, it can also be during two or more units be integrated in one unit.Above-mentioned integrated list The form that hardware had both may be used in member is realized, can also be realized in the form of hardware adds SFU software functional unit.
The above-mentioned integrated unit being realized in the form of SFU software functional unit can be stored in one and computer-readable deposit In storage media.Above-mentioned SFU software functional unit is stored in a storage medium, including some instructions are used so that a computer It is each that equipment (can be personal computer, server or the network equipment etc.) or processor (processor) execute the present invention The part steps of embodiment the method.And storage medium above-mentioned includes:USB flash disk, mobile hard disk, read-only memory (Read- Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disc or CD etc. it is various The medium of program code can be stored.
Those skilled in the art can be understood that, for convenience and simplicity of description, only with above-mentioned each function module Division progress for example, in practical application, can be complete by different function modules by above-mentioned function distribution as needed At the internal structure of device being divided into different function modules, to complete all or part of the functions described above.On The specific work process for stating the device of description, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
Finally it should be noted that:The above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent Present invention has been described in detail with reference to the aforementioned embodiments for pipe, it will be understood by those of ordinary skill in the art that:Its according to So can with technical scheme described in the above embodiments is modified, either to which part or all technical features into Row equivalent replacement;And these modifications or replacements, various embodiments of the present invention technology that it does not separate the essence of the corresponding technical solution The range of scheme.

Claims (12)

1. a kind of block chain node communication method, which is characterized in that including:
Primary storage node receives the solicited message that destination node is sent, and the solicited message indicates that the destination node request becomes From memory node, the solicited message includes the identification information of the destination node;
The source IP address and the destination node of the primary storage node solicited message are when being added block chain network Whether the IP address of broadcast is identical;
If the IP address that the source IP address of the solicited message and the destination node are broadcasted when block chain network is added is different, Then the primary storage node determines the destination node without public network IP address;
The heartbeat message that the primary storage node is sent according to the destination node, determines the LAN where the destination node Public network IP address and the port numbers that are mapped in the LAN of the destination node.
2. according to the method described in claim 1, it is characterized in that, the primary storage node determines the destination node without public network After IP address, further include:
The primary storage node sends to the destination node and connects according to the source IP address and source port number of the solicited message Request;
The primary storage node receives the connection response that the destination node is sent;
The heartbeat message that the primary storage node is sent according to the destination node, determines the LAN where the destination node Public network IP address and the port numbers that are mapped in the LAN of the destination node after, further include:
The primary storage node receives the inquiry request that query node is sent;
The primary storage node is by the public network IP address of the LAN where the destination node and the destination node described The port numbers mapped in LAN are sent to the query node, so that the query node is to described in destination node transmission Inquiry request.
3. according to the method described in claim 1, it is characterized in that, the primary storage node determines the destination node without public network After IP address, further include:
The primary storage node sends to the destination node and connects according to the source IP address and source port number of the solicited message Request;
The primary storage node does not receive the connection response that the destination node is sent in preset time;
The heartbeat message that the primary storage node is sent according to the destination node, determines the LAN where the destination node Public network IP address and the port numbers that are mapped in the LAN of the destination node after, further include:
The primary storage node receives the inquiry request of query node transmission;
The primary storage node is according to the public network IP address and the destination node of the LAN where the destination node in institute The port numbers mapped in LAN are stated, the IP address of the query node, port numbers and the inquiry request are sent to described Destination node.
4. according to the method described in claim 1, it is characterized in that, the method further includes:
If the IP address that the source IP address of the solicited message and the destination node are broadcasted when block chain network is added is identical, Then when the primary storage node receives the inquiry request of query node transmission, the primary storage node is by the solicited message Source IP address and source port number be sent to the query node so that the inquiry request is sent to institute by the query node State destination node.
5. according to claim 1-3 any one of them methods, which is characterized in that the method further includes:
The primary storage node updates the target of local record according to the heartbeat message of the destination node periodicity sending The port numbers that the public network IP address of LAN where node and the destination node map in the LAN.
6. a kind of block chain node communication device, which is characterized in that including:
Receiving module, the solicited message for receiving destination node transmission, the solicited message indicate the destination node request As from memory node, the solicited message includes the identification information of the destination node;
Comparison module, it is wide when block chain network is added for the source IP address of the solicited message and the destination node Whether the IP address broadcast is identical;
First determining module, if for the source IP address of the solicited message and the destination node when block chain network is added The IP address of broadcast is different, it is determined that the destination node is without public network IP address;
Second determining module, the heartbeat message for being sent according to the destination node, determines the office where the destination node The port numbers that the public network IP address and the destination node of domain net map in the LAN.
7. block chain node communication device according to claim 6, which is characterized in that further include:Sending module is used for root According to the source IP address and source port number of the solicited message, connection request is sent to the destination node;
The receiving module is additionally operable to:Receive the connection response that the destination node is sent;Receive the inquiry that query node is sent Request;
The sending module is additionally operable to:The public network IP address of LAN where the destination node and the destination node are existed The port numbers mapped in the LAN are sent to the query node, so that the query node is sent to the destination node The inquiry request.
8. block chain node communication device according to claim 6, which is characterized in that further include:Sending module is used for root According to the source IP address and source port number of the solicited message, connection request is sent to the destination node;
The receiving module does not receive the connection response that the destination node is sent in preset time;
The receiving module is additionally operable to:Receive the inquiry request of query node transmission;
The sending module is additionally operable to:The public network IP address of LAN where the destination node and the destination node The IP address of the query node, port numbers and the inquiry request are sent to by the port numbers mapped in the LAN The destination node.
9. block chain node communication device according to claim 6, which is characterized in that further include:Sending module;
If the IP address that the source IP address of the solicited message and the destination node are broadcasted when block chain network is added is identical, Then when the receiving module receives the inquiry request of query node transmission, the sending module is used for the solicited message Source IP address and source port number be sent to the query node so that the inquiry request is sent to institute by the query node State destination node.
10. according to claim 6-9 any one of them block chain node communication devices, which is characterized in that further include:Update mould Block, for where according to the heartbeat message of the destination node periodicity sending, updating the destination node of local record The port numbers that the public network IP address of LAN and the destination node map in the LAN.
11. a kind of block chain node, which is characterized in that including:
Memory;
Processor;And
Computer program;
Wherein, the computer program is stored in the memory, and is configured as being executed to realize such as by the processor Claim 1-5 any one of them methods.
12. a kind of computer readable storage medium, which is characterized in that be stored thereon with computer program, the computer program It is executed by processor to realize method as described in any one in claim 1-5.
CN201810553155.6A 2018-05-31 2018-05-31 Block chain node communication method and device and block chain node Active CN108712506B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810553155.6A CN108712506B (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
CN201810553155.6A CN108712506B (en) 2018-05-31 2018-05-31 Block chain node communication method and device and block chain node

Publications (2)

Publication Number Publication Date
CN108712506A true CN108712506A (en) 2018-10-26
CN108712506B CN108712506B (en) 2021-02-02

Family

ID=63870999

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810553155.6A Active CN108712506B (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) CN108712506B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109639848A (en) * 2018-12-20 2019-04-16 全链通有限公司 Method, equipment, system and the storage medium of domain name are issued in block chain
CN109862135A (en) * 2019-03-19 2019-06-07 全链通有限公司 Group communication method, block chain node and medium based on domain name block chain
WO2019072273A3 (en) * 2018-11-16 2019-09-12 Alibaba Group Holding Limited Cross-chain interactions using a domain name scheme in blockchain systems
CN110677462A (en) * 2019-09-09 2020-01-10 上海共链信息科技有限公司 Access processing method, system, device and storage medium for multi-block chain network
US10680828B2 (en) 2018-11-16 2020-06-09 Alibaba Group Holding Limited Domain name management scheme for cross-chain interactions in blockchain systems
CN111464963A (en) * 2020-04-01 2020-07-28 中国联合网络通信集团有限公司 Registration method of card-free terminal and identity registration server
CN113132378A (en) * 2021-04-15 2021-07-16 无锡全面互链科技有限公司 Block chain link point equipment and block chain network system
WO2022148321A1 (en) * 2021-01-11 2022-07-14 杭州复杂美科技有限公司 Node communication methods, computer device, and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1697452A (en) * 2005-06-17 2005-11-16 中兴通讯股份有限公司 Method for protecting access security of IP multimedia subsystem based on IPSec passing through NAT
CN101141420A (en) * 2007-09-05 2008-03-12 杭州华三通信技术有限公司 Method and system for performing data communication between private network and public network
CN101350825A (en) * 2008-08-22 2009-01-21 中兴通讯股份有限公司 Method and system for crossing network address conversion, stream media server, set-top box
CN103200281A (en) * 2013-01-24 2013-07-10 中国联合网络通信集团有限公司 Method, device and system for accessing intranet server
CN104125145A (en) * 2014-08-12 2014-10-29 中国联合网络通信集团有限公司 Web browser based communication method, web browser based communication equipment and web browser based communication system
CN106716421A (en) * 2016-12-30 2017-05-24 深圳前海达闼云端智能科技有限公司 Data query method, device and node apparatus
US20180081955A1 (en) * 2016-09-19 2018-03-22 American Express Travel Related Services Company, Inc. System and method for test data management

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1697452A (en) * 2005-06-17 2005-11-16 中兴通讯股份有限公司 Method for protecting access security of IP multimedia subsystem based on IPSec passing through NAT
CN101141420A (en) * 2007-09-05 2008-03-12 杭州华三通信技术有限公司 Method and system for performing data communication between private network and public network
CN101350825A (en) * 2008-08-22 2009-01-21 中兴通讯股份有限公司 Method and system for crossing network address conversion, stream media server, set-top box
CN103200281A (en) * 2013-01-24 2013-07-10 中国联合网络通信集团有限公司 Method, device and system for accessing intranet server
CN104125145A (en) * 2014-08-12 2014-10-29 中国联合网络通信集团有限公司 Web browser based communication method, web browser based communication equipment and web browser based communication system
US20180081955A1 (en) * 2016-09-19 2018-03-22 American Express Travel Related Services Company, Inc. System and method for test data management
CN106716421A (en) * 2016-12-30 2017-05-24 深圳前海达闼云端智能科技有限公司 Data query method, device and node apparatus

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10680828B2 (en) 2018-11-16 2020-06-09 Alibaba Group Holding Limited Domain name management scheme for cross-chain interactions in blockchain systems
US11025438B2 (en) 2018-11-16 2021-06-01 Advanced New Technologies Co., Ltd. Cross-chain interactions using a domain name scheme in blockchain systems
WO2019072273A3 (en) * 2018-11-16 2019-09-12 Alibaba Group Holding Limited Cross-chain interactions using a domain name scheme in blockchain systems
RU2708350C1 (en) * 2018-11-16 2019-12-05 Алибаба Груп Холдинг Лимитед Cross-chain interactions using a domain name scheme in blockchain systems
US11212114B2 (en) 2018-11-16 2021-12-28 Advanced New Technologies Co., Ltd. Cross-chain interactions using a domain name scheme in blockchain systems
US10666445B2 (en) 2018-11-16 2020-05-26 Alibaba Group Holding Limited Cross-chain interactions using a domain name scheme in blockchain systems
US11102011B2 (en) 2018-11-16 2021-08-24 Advanced New Technologies Co., Ltd. Domain name management scheme for cross-chain interactions in blockchain systems
US10931462B2 (en) 2018-11-16 2021-02-23 Advanced New Technologies Co., Ltd. Domain name management scheme for cross-chain interactions in blockchain systems
CN109639848A (en) * 2018-12-20 2019-04-16 全链通有限公司 Method, equipment, system and the storage medium of domain name are issued in block chain
CN109862135A (en) * 2019-03-19 2019-06-07 全链通有限公司 Group communication method, block chain node and medium based on domain name block chain
CN110677462A (en) * 2019-09-09 2020-01-10 上海共链信息科技有限公司 Access processing method, system, device and storage medium for multi-block chain network
CN111464963A (en) * 2020-04-01 2020-07-28 中国联合网络通信集团有限公司 Registration method of card-free terminal and identity registration server
WO2022148321A1 (en) * 2021-01-11 2022-07-14 杭州复杂美科技有限公司 Node communication methods, computer device, and storage medium
CN113132378A (en) * 2021-04-15 2021-07-16 无锡全面互链科技有限公司 Block chain link point equipment and block chain network system

Also Published As

Publication number Publication date
CN108712506B (en) 2021-02-02

Similar Documents

Publication Publication Date Title
CN108712506A (en) block chain node communication method, device and block chain node
CN108810119A (en) block chain processing method, device and block chain node
CN108810120A (en) block chain node communication method, device and block chain node
CN109067724A (en) Block chain data trade method, apparatus, equipment and storage medium
JPWO2005076547A1 (en) Method and system for network connection detection in an IPv6 radio access network
CN108769142B (en) Transaction information processing method and block generation node
CN109118360A (en) Block chain account checking method, device, equipment and storage medium
CN108566275A (en) Identity identifying method, device and block chain node
CN108777710A (en) Block chain communication method between nodes, device and block chain node
CN108683727B (en) Block processing method and main node
CN109118076A (en) Parking stall dispatching method, device, equipment and storage medium
CN108777712A (en) block chain node communication method, device and block chain node
CN112583880B (en) Server discovery method and related equipment
CN108876611A (en) Exchange information processing method, device and block chain node
CN108877290A (en) Parking stall dispatching method, device, equipment and storage medium
CN109087096B (en) Block chain account checking method, device, equipment and storage medium
CN104348941A (en) Method for searching desired user by using mobile phone contacts and device thereof
CN108848144A (en) Block chain interior joint access method, device and block chain node
CN109639715A (en) Method, apparatus, equipment and the computer readable storage medium for avoiding honeysuckle from attacking
CN108985765A (en) Enterprise user information processing method, equipment and storage medium
CN101801058B (en) Method and device for refreshing media access control (MAC) items in Mesh mobile application network
CN108898419A (en) Incentive message processing method, device and block chain node
CN108712507A (en) block chain node access method, device and block chain node
CN104717640A (en) Realization method for wireless network communication based on positioning
CN108833513A (en) Block chain communication method between nodes, 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