CN108833513A - 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
CN108833513A
CN108833513A CN201810555958.5A CN201810555958A CN108833513A CN 108833513 A CN108833513 A CN 108833513A CN 201810555958 A CN201810555958 A CN 201810555958A CN 108833513 A CN108833513 A CN 108833513A
Authority
CN
China
Prior art keywords
node
destination node
address
block chain
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
CN201810555958.5A
Other languages
Chinese (zh)
Other versions
CN108833513B (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 CN201810555958.5A priority Critical patent/CN108833513B/en
Publication of CN108833513A publication Critical patent/CN108833513A/en
Application granted granted Critical
Publication of CN108833513B publication Critical patent/CN108833513B/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
    • 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
    • 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]

Abstract

The embodiment of the present invention provides a kind of block chain communication method between nodes, device and block chain node.This method includes:Primary storage node receives the solicited message that destination node is sent, the solicited message indicates that 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 to indicate the destination node without public network IP address;The identification information of the primary storage nodes records destination node;The primary storage node receives the first heartbeat message of destination node transmission, which includes the address information of the destination node;The corresponding relationship of the address information of the identification information and destination node of the primary storage nodes records destination node.The embodiment of the present invention become the node of not public network IP address can also 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 technique
In block chain network, primary storage node can store complete block chain account book, can store from memory node Partial block chain account book, can receive the queried access of other nodes from memory node, should be from memory node by giving other sections Point provides query 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.
Summary of the invention
The embodiment of the present invention provides a kind of block chain communication method between nodes, 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 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 and instruction information of the destination node, the instruction information The destination node is used to indicate 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 The address information of the destination node;
Pair of the address information of the identification information and destination node of destination node described in the primary storage nodes records It should be related to.
Second aspect, the embodiment of the present invention provide communication device between a kind of block chain node, including:
Receiving module, for receiving the solicited message of destination node transmission, the solicited message indicates the destination node Request becomes from memory node, and the solicited message includes the identification information and instruction information of the destination node, the instruction Information is used to indicate the destination node without public network IP address;
Logging modle, for recording the identification information of the destination node;
The receiving module is also used to:Receive the first heartbeat message that the destination node is sent, the first heartbeat report Text includes the address information of the destination node;
The logging modle is also used to:Record the identification information of the destination node and the address information of the destination node Corresponding relationship.
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 stores in the memory, and is configured as being executed by the processor with reality 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 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 The corresponding relationship for recording the identification information of the destination node and the address information of the destination node, becomes destination node 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.
Detailed description of the invention
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 structural schematic diagram of block chain network provided in an embodiment of the present invention;
Fig. 4 be another embodiment of the present invention provides block chain communication method between nodes flow chart;
Fig. 5 be another embodiment of the present invention provides block chain communication method between nodes flow chart;
The structural schematic diagram of Fig. 6 communication device between block chain node 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 embodiment
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 institute 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 communicate (Ultra-Reliable and Low Latency for low time delay highly reliable in 5G communication system 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, it is also possible to 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) perhaps base in relay station or access point or future 5G network Stand (gNB) etc., and the present invention does not limit herein.
Above-mentioned terminal device 12 can be wireless terminal and be also possible to catv terminal.Wireless terminal can be directed to user and mention For voice and/or the equipment of other business datum connectivity, there is the handheld device 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 area 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 to be solved with technical solution of the specifically embodiment to technical solution of the present invention and the application below above-mentioned Technical problem is described in detail.These specific embodiments can be combined with each other below, for the same or similar 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 There is the technical problem as above of technology, provides block chain communication method between nodes, specific step is as follows for this method:
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 and instruction information of the destination node, described Instruction information is used to indicate the destination node without public network IP address.
As shown in figure 3,31 indicate the primary storage node in block chain network, 32 indicate saving in block chain network from storage Point, 33 indicate that destination node, destination node 33 request to become from memory node, and destination node 33 does not have public network IP address, target Node 33 is communicated, 34 tables by network address translation (Network Address Translation, NAT) with block chain network 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 Query service is provided.It only schematically illustrates herein, does not limit the specific network architecture of block chain network.
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 guarantee 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 destination node 33 compares adjacent node B consistent with the wound generation block that adjacent node C is fed back, if adjacent node B and adjacent The wound generation block of node C feedback 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 feedback 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 in neighbors C, adjacent node D and adjacent node E more than the adjacent node of preset ratio 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 area Chuan Shi that adjacent node such as adjacent node C, adjacent node D and adjacent node E in E more than 50 percent are fed back respectively Block is consistent, then destination node 33 determines that the wound generation block of adjacent node C feedback is true, the area Chuan Shi of adjacent node B feedback 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, which includes target in the solicited message for indicating that destination node 33 is wanted to be from memory node The identification information of node 33, the corresponding terminal device number of destination node 33 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 202, the primary storage nodes records.
In the present embodiment, a list has been locally stored in primary storage node 31, which includes and primary storage node 31 corresponding identification informations and public network IP address from memory node, for example, including the mark from memory node 32 in the list 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 the corresponding terminal device number of node 33 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 203, 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.
In the present embodiment, due to not communicated from memory node 32 by NAT with block chain network, have from memory node 32 There is public network IP address, the public network IP address from memory node 32 is locally stored in primary storage node 31;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 need as from memory node with public network IP address, so that query node is according to the public network IP address Access 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, after the content which includes specifically can be private key signature of the destination node 33 using oneself The information such as content indexing, such as block number that currently can provide storage information inquiry.
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 the identity information for going out destination node 33 further extracts 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 the corresponding access point AP of the destination node 33 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 local area network 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 local area network belonging to the public network IP address or destination node 33 of the corresponding access point AP of 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 identification information of destination node described in step 204, the primary storage nodes records and the address of the destination node The corresponding relationship of information.
Primary storage node 31 records the identification information of destination node 33, the corresponding terminal of destination node 33 in local list Device number, the corresponding public network IP address of destination node 33 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 Address of node information is marked, so that the address information of the identification information of the primary storage nodes records destination node and the destination node Corresponding relationship, allow destination node 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 be another embodiment of the present invention provides block chain communication method between nodes flow chart.In above-described embodiment On the basis of, block chain communication method between nodes provided in this embodiment specifically comprise 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 and instruction information of the destination node, described Instruction information is used to indicate the destination node without public network IP address.
Step 401 and the implementation of step 201 are consistent with concrete principle, and details are not described herein again.
The identification information of destination node described in step 402, the primary storage nodes records.
Step 402 and the implementation of step 202 are consistent with concrete principle, and details are not described herein again.
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.
Step 403 and the implementation of step 203 are consistent with concrete principle, and details are not described herein again.
The identification information of destination node described in step 404, the primary storage nodes records and the address of the destination node The corresponding relationship of information.
Step 404 and the implementation of step 204 are consistent with concrete principle, and details are not described herein again.
Step 405, the primary storage node receive the second heartbeat message that the destination node is sent.
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 destination node 33 is sent described in above-described embodiment after the first heartbeat message 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.
Believe the address for the destination node that step 406, the primary storage node include according to second heartbeat message Breath, updates the address information of the stored destination node of the primary storage node.
Before primary storage node 31 receives the second heartbeat message, primary storage node 31 is locally stored destination node 33 identification information, the corresponding terminal device number of destination node 33, the corresponding public network IP address of destination node 33 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, thus according to 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 Address of node information is marked, so that the address information of the identification information of the primary storage nodes records destination node and the destination node Corresponding relationship, allow destination node 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. 5 be another embodiment of the present invention provides block chain communication method between nodes flow chart.In above-described embodiment On the basis of, block chain communication method between nodes provided in this embodiment specifically comprise the following steps:
Step 501, the primary storage node receive the inquiry request that query node is sent, and the inquiry request is for inquiring From memory node.
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 guarantee 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 feedback 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 feedback 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.
Step 502, the primary storage node according to the inquiry request, by be locally stored at least one from memory node Identification information and address information be sent to the query node.
The inquiry request that primary storage node 31 is sent according to query node 35 saves at least one being locally stored from storage The identification information and address information of point are sent to query node 35, for example, primary storage node 31 can will be from memory node 32 Identification information and public network IP address are sent to query node 35, so as to provide inquiry clothes from memory node 32 to query node 35 Business.
Optionally, the primary storage node is according to the inquiry request, by be locally stored at least one from memory node Identification information and address information be sent to the query node, including:The primary storage node, will according to the inquiry request The identification information for the destination node being locally stored and the address information of the destination node are sent to the query node.
According to above-described embodiment it is found that destination node 33, which can also be used as from memory node to query node 35, provides inquiry Service, therefore, primary storage node 31 can also be by the identification information of destination node 33, the corresponding terminal device number of destination node 33 It is sent to query node 35 with address information, at this point, the ground for the destination node 33 that primary storage node 31 is sent to query node 35 Location information is the local area network either public network IP and target of AP (namely home gateway) where current target node 33 The port numbers at the current time that node 33 maps on the public network IP address.
When identification information, the destination node 33 that query node 35 receives the destination node 33 of the transmission of primary storage node 31 are right When terminal device number, the corresponding public network IP address of destination node 33 and the port numbers answered, query node 35 is according to destination node 33 Corresponding public network IP address and port numbers are to the transmission inquiry request of destination node 33, to inquire the block stored in destination node 33 Content in chain account book is used as query node 35 from memory node the destination node 33 under NAT.
The embodiment of the present invention receives the heartbeat message that destination node is sent by primary storage node, which includes mesh Address of node information is marked, so that the address information of the identification information of the primary storage nodes records destination node and the destination node Corresponding relationship, allow destination node 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. 6 communication device between block chain node provided in an embodiment of the present invention.The block chain node Between communication device specifically can be primary storage node described in above-described embodiment.Between block chain node provided in an embodiment of the present invention Communication device can execute the process flow of block chain communication method between nodes embodiment offer, as shown in fig. 6, block chain node Between communication device 60 include:Receiving module 61 and logging modle 62;Wherein, receiving module 61 is used to receive destination node transmission Solicited message, the solicited message indicate that the destination node request becomes from memory node, and the solicited message includes described The identification information and instruction information, the instruction information of destination node are used to indicate the destination node without public network IP address;Note Record module 62 is used to record the identification information of the destination node;Receiving module 61 is also used to:The destination node is received to send The first heartbeat message, first heartbeat message includes the address information of the destination node;Logging modle 62 is also used to:Note Record the corresponding relationship of the identification information of the destination node and the address information of the destination node.
Optionally, receiving module 61 is also used to:Receive the second heartbeat message that the destination node is sent;Block chain node Between communication device 60 further include:Update module 63;Update module 63 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, 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.
Optionally, receiving module 61 is also used to:The inquiry request that query node is sent is received, the inquiry request is for looking into It askes from memory node;Communication device 60 further includes between block chain node:Sending module 64;Sending module 64 according to for looking into Request is ask, at least one being locally stored is sent to the query node from the identification information and address information of memory node.
Optionally, sending module 64 is specifically used for:According to the inquiry request, by the destination node being locally stored The address information of identification information and the destination node is sent to the query node.
Communication device can be used for executing the technical side of above method embodiment between the block chain node of embodiment illustrated in fig. 6 Case, it is similar that the realization principle and technical effect are 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 communication method between nodes embodiment offer, as shown in fig. 7, block chain node 70 Including memory 71, processor 72, computer program and communication interface 73;Wherein, computer program is stored in memory 71, And it is configured as executing block chain communication method between nodes described in above embodiments as 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 technical 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 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 logical function partition, there may be another division manner in actual implementation, such as multiple units or components 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 through some interfaces, the INDIRECT COUPLING or logical of device or unit Letter connection can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize 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 store and computer-readable deposit at one 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 or disk etc. it is various It can store the medium of program code.
Those skilled in the art can be understood that, for convenience and simplicity of description, only with above-mentioned each functional module Division progress for example, in practical application, can according to need and above-mentioned function distribution is complete by different functional modules At the internal structure of device being divided into different functional 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, those skilled in the art should understand that:Its according to So be possible to modify the technical solutions described in the foregoing embodiments, or to some or all of the technical features into Row equivalent replacement;And these are modified or replaceed, 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 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.
2. the method according to claim 1, wherein the mark of destination node described in the primary storage nodes records After the corresponding relationship 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.
3. method according to claim 1 or 2, which is characterized in that the address information of the destination node includes:The mesh The port numbers that the public network IP address and the destination node of the corresponding access point AP of mark node maps on the public network IP address.
4. the method according to claim 1, wherein the method also includes:
The primary storage node receives the inquiry request that query node is sent, and the inquiry request is for inquiring from memory node;
The primary storage node according to the inquiry request, by be locally stored at least one from the identification information of memory node and Address information is sent to the query node.
5. according to the method described in claim 4, it is characterized in that, the primary storage node incite somebody to action this according to the inquiry request At least one of ground storage is sent to the query node from the identification information and address information of memory node, including:
The primary storage node is according to the inquiry request, by the identification information and the mesh of the destination node being locally stored Mark address of node information is sent to the query node.
6. communication device between a kind of block chain node, which is characterized in that including:
Receiving module, for receiving the solicited message of destination node transmission, the solicited message indicates the destination node request As from memory node, the solicited message includes the identification information and instruction information of the destination node, the instruction information The destination node is used to indicate without public network IP address;
Logging modle, for recording the identification information of the destination node;
The receiving module is also used 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 also used to:Record pair of the identification information of the destination node and the address information of the destination node It should be related to.
7. communication device between block chain node according to claim 6, which is characterized in that the receiving module is also used 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.
8. communication device between block chain node according to claim 6 or 7, which is characterized in that the ground of the destination node Location 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 The port numbers mapped on location.
9. communication device between block chain node according to claim 6, which is characterized in that the receiving module is also used to: The inquiry request that query node is sent is received, the inquiry request is for inquiring from memory node;
Communication device further includes between the block chain node:Sending module is used for according to the inquiry request, by what is be locally stored At least one is sent to the query node from the identification information and address information of memory node.
10. communication device between block chain node according to claim 9, which is characterized in that the sending module is specifically used In:According to the inquiry request, the address of the identification information for the destination node being locally stored and the destination node is believed Breath is sent to the query node.
11. a kind of block chain node, which is characterized in that including:
Memory;
Processor;And
Computer program;
Wherein, the computer program stores in the memory, and is configured as being executed by the processor to realize such as The described in any item methods of claim 1-5.
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 the method according to claim 1 to 5.
CN201810555958.5A 2018-05-31 2018-05-31 Inter-node communication method and device of block chain and block chain node Active CN108833513B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810555958.5A CN108833513B (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
CN201810555958.5A CN108833513B (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
CN108833513A true CN108833513A (en) 2018-11-16
CN108833513B CN108833513B (en) 2021-01-26

Family

ID=64147141

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810555958.5A Active CN108833513B (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) CN108833513B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111355789A (en) * 2020-02-24 2020-06-30 洪心科技(广州)有限公司 Communication method and device between block chain nodes

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101094171A (en) * 2006-06-22 2007-12-26 华为技术有限公司 Method and system for implementing interaction of media streams, controller of media gateway, and media gateway
CN103001966A (en) * 2012-12-11 2013-03-27 杭州迪普科技有限公司 Processing and identifying method and device for private network IP
CN104980528A (en) * 2015-06-26 2015-10-14 广州华多网络科技有限公司 Method, system and apparatus for realizing communication between nodes

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101094171A (en) * 2006-06-22 2007-12-26 华为技术有限公司 Method and system for implementing interaction of media streams, controller of media gateway, and media gateway
CN103001966A (en) * 2012-12-11 2013-03-27 杭州迪普科技有限公司 Processing and identifying method and device for private network IP
CN104980528A (en) * 2015-06-26 2015-10-14 广州华多网络科技有限公司 Method, system and apparatus for realizing communication between nodes

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111355789A (en) * 2020-02-24 2020-06-30 洪心科技(广州)有限公司 Communication method and device between block chain nodes

Also Published As

Publication number Publication date
CN108833513B (en) 2021-01-26

Similar Documents

Publication Publication Date Title
CN108810119A (en) block chain processing method, device and block chain node
CN108712506A (en) block chain node communication 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
CN108989048A (en) Cryptographic key distribution method, device, equipment and storage medium
CN109118360A (en) Block chain account checking method, device, equipment and storage medium
CN109640274A (en) Note transmission method, device and computer readable storage medium based on block chain
CN108566275A (en) Identity identifying method, device and block chain node
CN109087100A (en) Cryptographic key distribution method, device, equipment and storage medium
CN108777710A (en) Block chain communication method between nodes, device and block chain node
CN108769142A (en) Exchange information processing method and block generate node
CN108173915A (en) Call chain processing method and processing device
CN108683727B (en) Block processing method and main node
CN108989043A (en) Block processes method, apparatus and block chain node
CN109191230A (en) Vehicle leasing method, equipment and storage medium
CN108777712A (en) block chain node communication method, device and block chain node
CN108876611A (en) Exchange information processing method, device and block chain node
CN108848144A (en) Block chain interior joint access method, device and block chain node
CN109087096A (en) Block chain account checking method, device, equipment and storage medium
CN109639715A (en) Method, apparatus, equipment and the computer readable storage medium for avoiding honeysuckle from attacking
CN112583880A (en) Server discovery method and related equipment
CN108985765A (en) Enterprise user information processing method, equipment and storage medium
CN108833513A (en) Block chain communication method between nodes, device and block chain node
CN108898419A (en) Incentive message processing method, device and block chain node
CN109102272A (en) Digital literary property protection method, device, equipment and storage medium

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