CN108777710A - Block chain communication method between nodes, device and block chain node - Google Patents

Block chain communication method between nodes, device and block chain node Download PDF

Info

Publication number
CN108777710A
CN108777710A CN201810552880.1A CN201810552880A CN108777710A CN 108777710 A CN108777710 A CN 108777710A CN 201810552880 A CN201810552880 A CN 201810552880A CN 108777710 A CN108777710 A CN 108777710A
Authority
CN
China
Prior art keywords
node
destination node
block chain
address
primary storage
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
CN201810552880.1A
Other languages
Chinese (zh)
Other versions
CN108777710B (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 CN201810552880.1A priority Critical patent/CN108777710B/en
Publication of CN108777710A publication Critical patent/CN108777710A/en
Application granted granted Critical
Publication of CN108777710B publication Critical patent/CN108777710B/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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/143Termination or inactivation of sessions, e.g. event-controlled end of session
    • H04L67/145Termination or inactivation of sessions, e.g. event-controlled end of session avoiding end of session, e.g. keep-alive, heartbeats, resumption message or wake-up for inactive or interrupted session

Abstract

A kind of block chain communication method between nodes of offer of the embodiment of the present invention, device and block chain node.This method includes:Primary storage node receives the inquiry request that query node is sent, and the inquiry request includes the identification information of the query node;The primary storage node obtains at least one address information from memory node according to the inquiry request, described at least one to be communicated from memory node with block chain network by symmetric NAT;The inquiry request is sent to described at least one from memory node according at least one address information from memory node by the primary storage node, and at least one query result the query node is sent to from memory node so that described.The embodiment of the present invention receives the heartbeat message that destination node is sent by primary storage node, which includes the address information of destination 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

Block chain communication method between nodes, device and block chain node
Technical field
The present embodiments relate to field of communication technology more particularly to a kind of block chain communication method between nodes, device and 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 communication method between nodes of offer of the embodiment of the present invention, device and block chain node, so that not having The node of public network 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 communication method between nodes, including:
Primary storage node receives the inquiry request that query node is sent, and the inquiry request includes the mark of the query node Know information;
The primary storage node obtains at least one address information from memory node according to the inquiry request, described It is at least one to be communicated from memory node with block chain network by symmetric NAT;
The primary storage node sends the inquiry request according at least one address information from memory node To described at least one from memory node, at least one query result is sent to the inquiry from memory node saves so that described Point.
Second aspect, the embodiment of the present invention provide communication device between a kind of block chain node, including:
Receiving module, the inquiry request for receiving query node transmission, the inquiry request includes the query node Identification information;
Acquisition module, for according to the inquiry request, obtaining at least one address information from memory node, it is described extremely Few one is communicated by symmetric NAT with block chain network from memory node;
Sending module, for according at least one address information from memory node, the inquiry request to be sent To described at least one from memory node, at least one query result is sent to the inquiry from memory node saves so that described Point.
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 communication method between nodes, device and block chain node provided in an embodiment of the present invention, pass through primary storage section Point receives the heartbeat message that destination node is sent, which includes the address information of destination node so that primary storage node Record the correspondence of the identification information of the destination node and the address information of the destination node so that destination node can become Slave memory node in block chain network promotees so that the node of public network IP address can also not become from memory node Into 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 communication method between nodes 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 communication method between nodes flow chart that another embodiment of the present invention provides;
The structural schematic diagram of Fig. 5 communication devices between block chain node provided in an embodiment of the present invention;
Fig. 6 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 communication method between nodes provided by the invention, can be adapted for communication system shown in FIG. 1.Such as Fig. 1 institutes Show, which includes:Access network equipment 11, terminal device 12 and server 13.It should be noted that shown in FIG. 1 Communication 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 communication method between nodes 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 communication method between nodes flow chart provided in an embodiment of the present invention.The embodiment of the present invention is for existing The technical problem as above for having technology, provides block chain communication method between nodes, and this method is as follows:
Step 201, primary storage node receive the inquiry request that query node is sent, and the inquiry request includes the inquiry The identification information of node.
As shown in figure 3,31 indicate the primary storage node in block chain network, 32 indicate being saved from storage in block chain network Point, 33 indicate that destination node, the request of destination node 33 become from memory node, and destination node 33 does not have public network IP address, target Node 33 is communicated by network address translation (Network Address Translation, NAT) with block chain network, 34 tables Show NAT, 35 indicate the query node in the block chain network, in the present embodiment, by being the query node 35 from memory node Inquiry service is provided.It only schematically illustrates herein, does not limit the specific network architecture of block chain network.
When block chain network is added for the first time in query node 35, need to obtain from the adjacent node of the query node 35 Generation block is created, optionally, the node in block chain network stores invasive generation block.In order to ensure that the query node 35 is got True wound generation block, which can send wound generation block inquiry request to multiple adjacent nodes, for example, inquiry section Point 35 sends wound generation block inquiry request to adjacent node B1 and adjacent node C1 respectively, and adjacent node B1 and adjacent node C1 connect After receiving the wound generation block inquiry request, the wound generation block being respectively locally stored is sent to query node 35, query node 35 Whether with wound generation block that adjacent node C1 feed back consistent, if adjacent node B1 and adjacent node C1 are anti-if comparing adjacent node B1 The wound generation block of feedback is consistent, then the wound generation block is stored in local by query node 35;If adjacent node B1 and adjacent node The wound generation block of C1 feedbacks is inconsistent, then query node 35 can also continue to send wound generation to adjacent node D1 and adjacent node E1 Block inquiry request, and receive the wound generation block that adjacent node D1 and adjacent node E1 are fed back respectively, if adjacent node B1, adjacent In node C1, adjacent node D1 and adjacent node E1 more than preset ratio adjacent node feed back wound generation block be it is consistent, then Query node 35 determines that the wound generation block is true.Optionally, adjacent node B1, adjacent node C1, adjacent node D1 and phase Adjacent node such as adjacent node C1, adjacent node D1 and adjacent node E1 difference in neighbors E1 more than 50 percent is anti- The wound generation block of feedback is consistent, then query node 35 determines that the wound generation block of adjacent node C1 feedbacks is true, adjacent node B1 The wound generation block of feedback is false.
After query node 35 gets true wound generation block, which is stored to local, and from the wound generation The IP address of primary storage node is obtained in block, and according to the IP address of the primary storage node, is looked into primary storage node transmission Request is ask, the inquiry request is for inquiring from memory node.It is asked for example, query node 35 sends inquiry to primary storage node 31 It asks, which includes the identification information of query node 35.
Step 202, the primary storage node obtain at least one from the address of memory node letter according to the inquiry request Breath, it is described at least one to be communicated from memory node with block chain network by symmetric NAT.
In the present embodiment, primary storage node 31 is locally stored there are one list, which includes and primary storage node 31 corresponding identification informations and public network IP address from memory node, for example, the list includes the mark from memory node 32 Information and public network IP address.
After primary storage node 31 receives the solicited message of the transmission of destination node 33, determine destination node 33 without public affairs Net IP address, but destination node 33 is wanted to be from memory node, then primary storage node 31 is by the identification information of destination node 33, mesh Mark 33 corresponding terminal device number of node record in the list.In addition, can also be stored in the list from memory node 32 Public key, destination node 33 public key.
In the present embodiment, due to not communicated from memory node 32 with block chain network by NAT, have from memory node 32 There are public network IP address, primary storage node 31 that the public network IP address from memory node 32 is locally stored;Destination node 33 passes through NAT It is communicated with block chain network, and destination node 33 does not have public network IP address, primary storage node 31 is locally without destination node 33 Public network IP address;But needed with public network IP address as from memory node, so that query node is according to the public network IP address Accessing should be from memory node.Therefore, in the present embodiment, destination node 33 needs in real time or periodical to primary storage node 31 Transmission 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 First heartbeat message, the content which includes can be specifically destination nodes 33 using after the private key signature of oneself The current information such as content indexing, such as block number that storage information inquiry is 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:The public network IP address of 33 corresponding access point AP of the destination node The port numbers mapped on the public network IP address with the destination node 33.In addition, the public network IP address can also be described The public network IP address of LAN belonging to destination node 33.That is, the source IP address of first heartbeat message can be mesh Mark the public network IP address of 33 corresponding access point AP of node or the public network IP address of the LAN belonging to destination node 33; The source port number of first heartbeat message can be the port numbers that destination node 33 maps on the public network IP address.
Primary storage node 31 records the identification information of destination node 33,33 corresponding terminal of destination node in local list Device number, 33 corresponding public network IP address of destination node and port numbers.
After primary storage node 31 receives the inquiry request of query node 35, judge whether destination node 33 is symmetrical Node under NAT, the specific method is as follows:Primary storage node 31 checks the block chain account book being locally stored, and detects the block chain account It whether there is a node M in this, node M with the communication process of node A, by the IP address of node A actively gone by node M Contact node A, rather than the node M that node A is first contacted, and if it exists, then primary storage node 31 determines that the destination node 33 is not Node under Symmetric NAT, if being not present, primary storage node 31 determines that the destination node 33 is the node under Symmetric NAT, into one Step, primary storage node 31 obtain 33 corresponding public network IP address of destination node and port numbers from local list, it will be understood that mesh It is that the heartbeat message that primary storage node 31 is reported by destination node 33 is true to mark 33 corresponding public network IP address of node and port numbers Fixed.
Step 203, the primary storage node are according at least one address information from memory node, by the inquiry Request is sent to described at least one from memory node, and at least one query result institute is sent to from memory node so that described State query node.
Specifically, the primary storage node is according at least one address information from memory node, by the inquiry Request be sent to it is described at least one from memory node, including:The primary storage node is believed according to the address of the destination node Breath, is sent to the destination node, the destination node passes through symmetric NAT and block chain by the inquiry request Network communication.
Primary storage node 31 after obtaining 33 corresponding public network IP address of destination node and port numbers in local list, according to 33 corresponding public network IP address of newest destination node and port numbers, target is sent to by the inquiry request that query node 35 is sent The inquiry request that node 33, i.e. primary storage node 31 can send query node 35 passes through primary storage node 31 and destination node Heartbeat channel between 33 is sent to destination node 33 will be corresponding after destination node 33 receives 35 inquiry request of query node Query result be sent to query node 35.
The embodiment of the present invention receives the heartbeat message that destination node is sent by primary storage node, which includes mesh Mark address of node information so that the address information of the identification information and the destination node of the primary storage nodes records destination node Correspondence so that destination node can become block chain network in slave memory node so that without public network IP The node of location can also become from memory node, promote the development of block chain business.
Fig. 4 is the block chain communication method between nodes flow chart that another embodiment of the present invention provides.In above-described embodiment On the basis of, the inquiry request that query node is sent is received in primary storage node, the inquiry request includes the query node Before identification information, block chain communication method between nodes provided in this embodiment further include 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 and instruction information of the destination node, described Instruction information is used to indicate the destination node without public network IP address.
In the present embodiment, it when block chain network is added for the first time in destination node 33, needs from the destination node 33 Adjacent node obtain wound generation block, optionally, the node in block chain network stores invasive generation block.In order to ensure the mesh Mark node 33 gets true wound generation block, which can send wound generation block inquiry to multiple adjacent nodes and ask Ask, for example, destination node 33 to adjacent node B and adjacent node C respectively send wound generation block inquiry request, adjacent node B and After adjacent node C receives the wound generation block inquiry request, the wound generation block being respectively locally stored is sent to destination node 33, Whether the wound generation block that destination node 33 compares adjacent node B with adjacent node C is fed back is consistent, if adjacent node B and adjacent The wound generation block of node C feedbacks is consistent, then the wound generation block is stored in local by destination node 33;If adjacent node B and phase The wound generation block of neighbors C feedbacks is inconsistent, then destination node 33 can also continue to send to adjacent node D and adjacent node E Generation block inquiry request is created, and receives the wound generation block that adjacent node D and adjacent node E are fed back respectively, if adjacent node B, phase The wound generation block fed back more than the adjacent node of preset ratio in neighbors C, adjacent node D and adjacent node E is consistent, then mesh It marks node 33 and determines that the wound generation block is true.Optionally, adjacent node B, adjacent node C, adjacent node D and adjacent node The adjacent node areas Chuan Shi that for example adjacent node C, adjacent node D and adjacent node E are fed back respectively in E more than 50 percent Block is consistent, then destination node 33 determines that the wound generation block of adjacent node C feedbacks is true, the areas Chuan Shi of adjacent node B feedbacks Block is false.
After destination node 33 gets true wound generation block, which is stored to local, and from the wound generation The IP address of primary storage node is obtained in block, and according to the IP address of the primary storage node, is asked to primary storage node transmission Information is sought, the solicited message is for indicating that destination node 33 is wanted to be from memory node, and the solicited message includes target The identification information of node 33,33 corresponding terminal device number of destination node and it is used to indicate destination node 33 without public network IP The instruction information of location, the instruction information can be the field made an appointment in the block chain network or character.
The identification information of destination node described in step 402, the primary storage nodes records.
In the present embodiment, primary storage node 31 is locally stored there are one list, which includes and primary storage node 31 corresponding identification informations from memory node, should be from the corresponding terminal device number of memory node and public network IP address, for example, should List includes from the identification information of memory node 32, from 32 corresponding terminal device number of memory node and public network IP address.
After primary storage node 31 receives the solicited message of the transmission of destination node 33, determine destination node 33 without public affairs Net IP address, but destination node 33 is wanted to be from memory node, then primary storage node 31 is by the identification information of destination node 33, mesh Mark 33 corresponding terminal device number of node record in the list.In addition, can also be stored in the list from memory node 32 Public key, destination node 33 public key.
Step 403, the primary storage node receive the first heartbeat message that the destination node is sent, first heartbeat Message includes the address information of the destination node.
Optionally, the address information of the destination node includes:The public network IP of the corresponding access point AP of the destination node The port numbers that address and the destination node map on the public network IP address.
In the present embodiment, due to not communicated from memory node 32 with block chain network by NAT, have from memory node 32 There are public network IP address, primary storage node 31 that the public network IP address from memory node 32 is locally stored;Destination node 33 passes through NAT It is communicated with block chain network, and destination node 33 does not have public network IP address, primary storage node 31 is locally without destination node 33 Public network IP address;But needed with public network IP address as from memory node, so that query node is according to the public network IP address Accessing should be from memory node.Therefore, in the present embodiment, destination node 33 needs in real time or periodical to primary storage node 31 Transmission 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 First heartbeat message, the content which includes can be specifically destination nodes 33 using after the private key signature of oneself The current information such as content indexing, such as block number that storage information inquiry is 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:The public network IP address of 33 corresponding access point AP of the destination node The port numbers mapped on the public network IP address with the destination node 33.In addition, the public network IP address can also be described The public network IP address of LAN belonging to destination node 33.That is, the source IP address of first heartbeat message can be mesh Mark the public network IP address of 33 corresponding access point AP of node or the public network IP address of the LAN belonging to destination node 33; The source port number of first heartbeat message can be the port numbers that destination node 33 maps on the public network IP address.
The address of the identification information and the destination node of destination node described in step 404, the primary storage nodes records The correspondence of information.
Primary storage node 31 records the identification information of destination node 33,33 corresponding terminal of destination node in local list Device number, 33 corresponding public network IP address of destination node and port numbers.
In addition, in other embodiments, the identification information of destination node described in primary storage nodes records described in step 404 and After the correspondence of the address information of the destination node, further include:The primary storage node receives the destination node hair The second heartbeat message sent;Believe the address for the destination node that the primary storage node includes according to second heartbeat message Breath, updates the address information of the stored destination node of the primary storage node.
In the present embodiment, destination node 33 can send heartbeat report to primary storage node 31 in real time or periodically Text, it is assumed that 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 is locally stored destination node 33 identification information, 33 corresponding terminal device number of destination node, 33 corresponding public network IP address of destination node and port numbers;When After primary storage node 31 receives the second heartbeat message, using the source IP address of second heartbeat message as the destination node 33 New public network IP address, using the source port number of second heartbeat message port numbers new as the destination node 33, to basis The new public network IP address of the destination node 33 and new port numbers update the destination node stored in primary storage node 31 33 public network IP address and port numbers.
The embodiment of the present invention receives the heartbeat message that destination node is sent by primary storage node, which includes mesh Mark address of node information so that the address information of the identification information and the destination node of the primary storage nodes records destination node Correspondence so that destination node can become block chain network in slave memory node so that without public network IP The node of location can also become from memory node, promote the development of block chain business.
The structural schematic diagram of Fig. 5 communication devices between block chain node provided in an embodiment of the present invention, the block chain node Between communication device be specially primary storage node described in above-described embodiment.Block chain inter-node communication provided in an embodiment of the present invention Device can execute the process flow of block chain communication method between nodes embodiment offer, as shown in figure 5, leading between block chain node T unit 50 includes:Receiving module 51, acquisition module 52 and sending module 53;Wherein, receiving module 51 is for receiving inquiry section The inquiry request that point is sent, the inquiry request includes the identification information of the query node;Acquisition module 52 is used for according to institute It states inquiry request, obtains at least one address information from memory node, it is described at least one to pass through symmetric net from memory node Network address conversion is communicated with block chain network;Sending module 53 is used for according to described at least one from the address of memory node letter Breath, the inquiry request is sent to described at least one from memory node, at least one will be looked into from memory node so that described It askes result and is sent to the query node.
Optionally, receiving module 51 is additionally operable to:The solicited message that destination node is sent is received, the solicited message indicates institute Stating destination node request becomes from memory node, and the solicited message includes that the identification information of the destination node and instruction are believed Breath, the instruction information are used to indicate the destination node without public network IP address;Communication device 50 further includes between block chain node: Logging modle 54;Logging modle 54 is used to record the identification information of the destination node;Receiving module 51 is additionally operable to:Described in reception The first heartbeat message that destination node is sent, first heartbeat message includes the address information of the destination node;Record mould Block 54 is additionally operable to:Record the correspondence of the identification information of the destination node and the address information of the destination node.
Optionally, receiving module 51 is additionally operable to:Receive the second heartbeat message that the destination node is sent;Block chain node Between communication device 50 further include:Update module 55;Update module 55 is used for the mesh for including according to second heartbeat message Address of node information is marked, the address information of the stored destination node of communication device between the block chain node is updated.
Optionally, sending module 53 is specifically used for:According to the address information of the destination node, the inquiry request is sent out The destination node is given, the destination node is communicated by symmetric NAT with block chain network.
Optionally, the address information of the destination node includes:The public network IP of the corresponding access point AP of the destination node The port numbers that address and the destination node map on the public network IP address.
Communication device can be used for executing the technical side of above method embodiment between the block chain node of embodiment illustrated in fig. 5 Case, implementing principle and technical effect are similar, and details are not described herein again.
Fig. 6 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 communication method between nodes embodiment offer, as shown in fig. 6, block chain node 60 Including memory 61, processor 62, computer program and communication interface 63;Wherein, computer program is stored in memory 61, And it is configured as executing the block chain communication method between nodes described in above example by processor 62.
The block chain node of embodiment illustrated in fig. 6 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 communication method between nodes 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 communication method between nodes, which is characterized in that including:
Primary storage node receives the inquiry request that query node is sent, and the inquiry request includes the mark letter of the query node Breath;
The primary storage node obtains at least one address information from memory node according to the inquiry request, it is described at least One is communicated by symmetric NAT with block chain network from memory node;
The primary storage node is sent to institute according at least one address information from memory node, by the inquiry request It states at least one from memory node, at least one query result the query node is sent to from memory node so that described.
2. according to the method described in claim 1, it is characterized in that, the primary storage node receives the inquiry that query node is sent Before request, further include:
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 that the identification information of the destination node and instruction information, the instruction information are used for Indicate the destination node without public network IP address;
The identification information of destination node described in the primary storage nodes records;
The primary storage node receives the first heartbeat message that the destination node is sent, and first heartbeat message includes described The address information of destination node;
The corresponding of the address information of the identification information and destination node of destination node described in the primary storage nodes records is closed System.
3. according to the method described in claim 2, it is characterized in that, the mark of destination node described in the primary storage nodes records After the correspondence of information and the address information of the destination node, further include:
The primary storage node receives the second heartbeat message that the destination node is sent;
The address information for the destination node that the primary storage node includes according to second heartbeat message, updates the master The address information of the stored destination node of memory node.
4. according to the method in claim 2 or 3, which is characterized in that the primary storage node according to it is described it is at least one from The address information of memory node, the inquiry request is sent to it is described at least one from memory node, including:
The inquiry request is sent to the target section by the primary storage node according to the address information of the destination node Point, the destination node are communicated by symmetric NAT with block chain network.
5. according to the method described in claim 4, it is characterized in that, the address information of the destination node includes:The target The port numbers that the public network IP address and the destination node of the corresponding access point AP of node maps on the public network IP address.
6. communication device between a kind of block chain node, which is characterized in that including:
Receiving module, the inquiry request for receiving query node transmission, the inquiry request includes the mark of the query node Know information;
Acquisition module, for according to the inquiry request, obtaining at least one address information from memory node, described at least one It is a to be communicated from memory node with block chain network by symmetric NAT;
Sending module, for according at least one address information from memory node, the inquiry request to be sent to institute It states at least one from memory node, at least one query result the query node is sent to from memory node so that described.
7. communication device between block chain node according to claim 6, which is characterized in that the receiving module is additionally operable to:
The solicited message that destination node is sent is received, the solicited message indicates that the destination node request becomes from storage and saves Point, the solicited message include that the identification information of the destination node and instruction information, the instruction information are used to indicate described Destination node is without public network IP address;
Communication device further includes between the block chain node:Logging modle, the identification information for recording the destination node;
The receiving module is additionally operable to:Receive the first heartbeat message that the destination node is sent, the first heartbeat message packet Include the address information of the destination node;
The logging modle is additionally operable to:Record pair of the identification information of the destination node and the address information of the destination node It should be related to.
8. communication device between block chain node according to claim 7, which is characterized in that the receiving module is additionally operable to:
Receive the second heartbeat message that the destination node is sent;
Communication device further includes between the block chain node:Update module, the institute for including according to second heartbeat message The address information for stating destination node updates the address letter of the stored destination node of communication device between the block chain node Breath.
9. communication device between block chain node according to claim 7 or 8, which is characterized in that the sending module is specific For:According to the address information of the destination node, the inquiry request is sent to the destination node, the destination node It is communicated with block chain network by symmetric NAT.
10. communication device between block chain node according to claim 9, which is characterized in that the address of the destination node Information includes:The public network IP address and the destination node of the corresponding access point AP of the destination node is in the public network IP address The port numbers of upper mapping.
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.
CN201810552880.1A 2018-05-31 2018-05-31 Inter-node communication method and device of block chain and block chain node Active CN108777710B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810552880.1A CN108777710B (en) 2018-05-31 2018-05-31 Inter-node communication method and device of block chain and block chain node

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810552880.1A CN108777710B (en) 2018-05-31 2018-05-31 Inter-node communication method and device of block chain and block chain node

Publications (2)

Publication Number Publication Date
CN108777710A true CN108777710A (en) 2018-11-09
CN108777710B CN108777710B (en) 2021-06-08

Family

ID=64028363

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810552880.1A Active CN108777710B (en) 2018-05-31 2018-05-31 Inter-node communication method and device of block chain and block chain node

Country Status (1)

Country Link
CN (1) CN108777710B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109714398A (en) * 2018-12-11 2019-05-03 新华三技术有限公司 Date storage method and device
CN111355789A (en) * 2020-02-24 2020-06-30 洪心科技(广州)有限公司 Communication method and device between block chain nodes
CN113901144A (en) * 2021-10-15 2022-01-07 北京智融云河科技有限公司 Query method, device and storage medium under non-whole network consensus block chain

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110258270A1 (en) * 2010-04-19 2011-10-20 Samsung Electronics Co., Ltd. Apparatus and method for establishing partnership with a peer-to-peer (p2p) service based on gossip
CN104580504A (en) * 2015-01-26 2015-04-29 北京迪创伟业科技有限公司 Network terminal information processing method used for remote meter reading and terminal information processing method
CN105142189A (en) * 2015-08-11 2015-12-09 深圳市华讯方舟科技有限公司 Method and device for roaming control of site
CN107079059A (en) * 2016-12-21 2017-08-18 深圳前海达闼云端智能科技有限公司 Block chain storage method and device and node equipment
CN107493340A (en) * 2017-08-23 2017-12-19 广州市易彩乐网络科技有限公司 Data distribution method of calibration in block chain network, apparatus and system
CN107911421A (en) * 2017-10-30 2018-04-13 上海点融信息科技有限责任公司 For configuring the method for internetwork communication, equipment and computer-readable storage medium in block chain

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110258270A1 (en) * 2010-04-19 2011-10-20 Samsung Electronics Co., Ltd. Apparatus and method for establishing partnership with a peer-to-peer (p2p) service based on gossip
CN104580504A (en) * 2015-01-26 2015-04-29 北京迪创伟业科技有限公司 Network terminal information processing method used for remote meter reading and terminal information processing method
CN105142189A (en) * 2015-08-11 2015-12-09 深圳市华讯方舟科技有限公司 Method and device for roaming control of site
CN107079059A (en) * 2016-12-21 2017-08-18 深圳前海达闼云端智能科技有限公司 Block chain storage method and device and node equipment
CN107493340A (en) * 2017-08-23 2017-12-19 广州市易彩乐网络科技有限公司 Data distribution method of calibration in block chain network, apparatus and system
CN107911421A (en) * 2017-10-30 2018-04-13 上海点融信息科技有限责任公司 For configuring the method for internetwork communication, equipment and computer-readable storage medium in block chain

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109714398A (en) * 2018-12-11 2019-05-03 新华三技术有限公司 Date storage method and device
CN111355789A (en) * 2020-02-24 2020-06-30 洪心科技(广州)有限公司 Communication method and device between block chain nodes
CN113901144A (en) * 2021-10-15 2022-01-07 北京智融云河科技有限公司 Query method, device and storage medium under non-whole network consensus block chain
CN113901144B (en) * 2021-10-15 2024-02-06 北京智融云河科技有限公司 Query method, device and storage medium under non-whole network consensus block chain

Also Published As

Publication number Publication date
CN108777710B (en) 2021-06-08

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
JP5947982B2 (en) Serving gateway, mobility management node, method and system for obtaining data gateway
CN108777710A (en) Block chain communication method between nodes, device and block chain node
CN108989048A (en) Cryptographic key distribution method, device, equipment and storage medium
CN108566275A (en) Identity identifying method, device and block chain node
WO2014180127A1 (en) Method for realizing multi-point cooperative transmission, access point, and station
CN109118360A (en) Block chain account checking method, device, equipment and storage medium
CN108173915A (en) Call chain processing method and processing device
CN109087100A (en) Cryptographic key distribution method, device, equipment and storage medium
CN108683727A (en) Block processes method and host node
CN108777712A (en) block chain node communication method, device and block chain node
CN110595481A (en) Positioning and ranging system, positioning tag, positioning synchronization method and positioning determination method
CN112583880B (en) Server discovery method and related equipment
CN108848144A (en) Block chain interior joint access method, device and block chain node
CN108876611A (en) Exchange information processing method, device and block chain node
CN109087096A (en) Block chain account checking method, device, equipment and storage medium
CN107734598A (en) A kind of system information change instruction method, UE, network side equipment and system
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
CN108768961A (en) storage processing method and home gateway
CN108833513A (en) Block chain communication method between nodes, device and block chain node
CN108898419A (en) Incentive message processing method, device and block chain node
CN104717640A (en) Realization method for wireless network communication based on positioning

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