CN108712507B - Block link point access method and device and block link point - Google Patents
Block link point access method and device and block link point Download PDFInfo
- Publication number
- CN108712507B CN108712507B CN201810553990.XA CN201810553990A CN108712507B CN 108712507 B CN108712507 B CN 108712507B CN 201810553990 A CN201810553990 A CN 201810553990A CN 108712507 B CN108712507 B CN 108712507B
- Authority
- CN
- China
- Prior art keywords
- node
- address
- target node
- target
- port number
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 44
- 238000004590 computer program Methods 0.000 claims description 11
- 238000011161 development Methods 0.000 abstract description 6
- 230000001737 promoting effect Effects 0.000 abstract 1
- 238000004891 communication Methods 0.000 description 11
- 238000010586 diagram Methods 0.000 description 6
- 230000008569 process Effects 0.000 description 5
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000007774 longterm Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000000977 initiatory effect Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1097—Protocols 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]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/09—Mapping addresses
- H04L61/25—Mapping addresses of the same type
- H04L61/2503—Translation of Internet protocol [IP] addresses
- H04L61/2517—Translation of Internet protocol [IP] addresses using port numbers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5007—Internet protocol [IP] addresses
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/09—Mapping addresses
- H04L61/25—Mapping addresses of the same type
- H04L61/2503—Translation of Internet protocol [IP] addresses
- H04L61/2514—Translation of Internet protocol [IP] addresses between local and global IP addresses
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The embodiment of the invention provides a block link point access method and device and a block link point. The method comprises the following steps: the master storage node receives request information sent by a target node, wherein the request information indicates that the target node requests to become a slave storage node, the request information comprises identification information of the target node and first indication information, and the first indication information is used for indicating that the target node has no public network IP address; the main storage node distributes the IP address and the first port number of the agent node for the target node; and the main storage node sends the IP address and the first port number of the agent node to the target node so that the target node sends a heartbeat message to the agent node, wherein the heartbeat message comprises the public network IP address and the second port number of the NAT corresponding to the target node. The embodiment of the invention ensures that the node without the public network IP address can also become a slave storage node, thereby promoting the development of block chain service.
Description
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a block link point access method and device and a block link point.
Background
In a blockchain network, a master storage node may store a complete blockchain ledger, a slave storage node may store a partial blockchain ledger, and the slave storage node may receive inquiry access of other nodes by providing inquiry services to the other nodes to obtain corresponding rewards.
In the prior art, in order to promote the block chain service, more nodes are required to become slave storage nodes, but the nodes are required to have public network IP addresses to become the slave storage nodes, but at present, many nodes do not have public network IP addresses, so that many nodes cannot become slave storage nodes, and the development of the block chain service is limited.
Disclosure of Invention
The embodiment of the invention provides a block chain node point access method, a block chain node point access device and a block chain node point, so that a node without a public network IP address can also be a slave storage node, and the development of block chain service is promoted.
In a first aspect, an embodiment of the present invention provides a block link point access method, including:
a master storage node receives request information sent by a target node, wherein the request information indicates that the target node requests to become a slave storage node, the request information comprises identification information of the target node and first indication information, and the first indication information is used for indicating that the target node has no public network IP address;
the main storage node distributes an IP address and a first port number of an agent node for the target node;
and the main storage node sends the IP address and the first port number of the agent node to the target node so that the target node sends a heartbeat message to the agent node, wherein the heartbeat message comprises the public network IP address and the second port number of the NAT corresponding to the target node.
In a second aspect, an embodiment of the present invention provides a block link point access device, including:
a receiving module, configured to receive request information sent by a target node, where the request information indicates that the target node requests to become a slave storage node, and the request information includes identification information of the target node and first indication information, and the first indication information is used to indicate that the target node has no public network IP address;
the allocation module is used for allocating the IP address and the first port number of the agent node for the target node;
and the sending module is used for sending the IP address and the first port number of the agent node to the target node so that the target node sends a heartbeat message to the agent node, wherein the heartbeat message comprises the public network IP address and the second port number of the NAT corresponding to the target node.
In a third aspect, an embodiment of the present invention provides a block link point, including:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, the computer program being executed by a processor to implement the method of the first aspect.
According to the block link point access method, the block link point access device and the block link point, the IP address and the first port number of the proxy node are distributed to the target node through the main storage node, so that the target node sends the heartbeat message to the proxy node, the heartbeat message comprises the address information of the target node, the proxy node can record the corresponding relation between the identification information of the target node and the address information of the target node, the target node can become a secondary storage node in a block link network, and therefore the node without the public network IP address can also become the secondary storage node, and the development of block link service is promoted.
Drawings
Fig. 1 is a schematic diagram of an application scenario provided in an embodiment of the present invention;
fig. 2 is a flowchart of a block link point access method according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a block chain network according to an embodiment of the present invention;
fig. 4 is a flowchart of a block-link point access method according to another embodiment of the present invention;
fig. 5 is a schematic structural diagram of a block link point access device according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a blockchain node according to an embodiment of the present invention.
With the foregoing drawings in mind, certain embodiments of the disclosure have been shown and described in more detail below. These drawings and written description are not intended to limit the scope of the disclosed concepts in any way, but rather to illustrate the concepts of the disclosure to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The block link point access method provided by the invention can be applied to the communication system shown in fig. 1. As shown in fig. 1, the communication system includes: access network device 11, terminal device 12, and server 13. It should be noted that the communication System shown in fig. 1 may be applicable to different network formats, for example, may be applicable to Global System for Mobile communication (GSM), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time Division-Synchronous Code Division Multiple Access (TD-SCDMA), Long Term Evolution (Long Term Evolution, LTE), and future 5G network formats. Optionally, the communication system may be a system in a scenario of high-reliability and Low-Latency Communications (URLLC) transmission in a 5G communication system.
Therefore, optionally, the access Network device 11 may be a Base Station (BTS) and/or a Base Station Controller in GSM or CDMA, a Base Station (NodeB, NB) and/or a Radio Network Controller (RNC) in WCDMA, an evolved Node B (eNB or eNodeB) in LTE, or a relay Station or an access point, or a Base Station (gbb) in a future 5G Network, and the present invention is not limited thereto.
The terminal device 12 may be a wireless terminal or a wired terminal. A wireless terminal may refer to a device that provides voice and/or other traffic data connectivity to a user, a handheld device having wireless connection capability, or other processing device connected to a wireless modem. A wireless terminal, which may be a mobile terminal such as a mobile telephone (or "cellular" telephone) and a computer having a mobile terminal, for example, a portable, pocket, hand-held, computer-included, or vehicle-mounted mobile device, may communicate with one or more core Network devices via a Radio Access Network (RAN), and may exchange language and/or data with the RAN. For another example, the Wireless terminal may also be a Personal Communication Service (PCS) phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA), and other devices. A wireless Terminal may also be referred to as a system, a Subscriber Unit (Subscriber Unit), a Subscriber Station (Subscriber Station), a Mobile Station (Mobile), a Remote Station (Remote Station), a Remote Terminal (Remote Terminal), an Access Terminal (Access Terminal), a User Terminal (User Terminal), a User Agent (User Agent), and a User Device or User Equipment (User Equipment), which are not limited herein. Optionally, the terminal device 12 may also be a smart watch, a tablet computer, or the like. In this embodiment, the terminal device 12 and the server 13 may be nodes in a blockchain network.
The invention provides a block link point access method, which aims to solve the technical problems in the prior art.
The following describes the technical solutions of the present invention and how to solve the above technical problems with specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present invention will be described below with reference to the accompanying drawings.
Fig. 2 is a flowchart of a block link point access method according to an embodiment of the present invention. The embodiment of the invention provides a block link point access method aiming at the technical problems in the prior art, and the method comprises the following specific steps:
As shown in fig. 3, 31 denotes a master storage node in the blockchain network, 32 denotes a slave storage node in the blockchain network, and the slave storage node 32 has its own public network IP address. The target node 33 indicates a target node, the target node 33 requests to become a slave storage node, the target node 33 does not have a public Network IP Address, the target node 33 communicates with the blockchain Network through Network Address Translation (NAT), 34 indicates a NAT, 35 indicates an inquiring node in the blockchain Network, in this embodiment, the inquiring node 35 also does not have its own public Network IP Address, the inquiring node 35 also communicates with the blockchain Network through NAT, and 36 indicates a proxy node. The querying node 35 is provided with a query service by a slave storage node. The method is only illustrative and does not limit the specific network architecture of the blockchain network.
When the target node 33 first joins the block chain network, it is necessary to obtain the created blocks from the nodes adjacent to the target node 33, and optionally, all the nodes in the block chain network store the created blocks. In order to ensure that the target node 33 obtains a real created block, the target node 33 may send created block query requests to a plurality of neighboring nodes, for example, the target node 33 sends created block query requests to the neighboring node B and the neighboring node C, after receiving the created block query requests, the neighboring node B and the neighboring node C send respective locally stored created blocks to the target node 33, the target node 33 compares whether created blocks fed back by the neighboring node B and the neighboring node C are consistent, and if created blocks fed back by the neighboring node B and the neighboring node C are consistent, the target node 33 locally stores the created blocks; if the created blocks fed back by the adjacent node B and the adjacent node C are not consistent, the target node 33 may further continue to send created block query requests to the adjacent node D and the adjacent node E, and receive created blocks fed back by the adjacent node D and the adjacent node E, respectively, and if the created blocks fed back by adjacent nodes exceeding a preset proportion among the adjacent node B, the adjacent node C, the adjacent node D, and the adjacent node E are consistent, the target node 33 determines that the created blocks are real. Optionally, if the created blocks fed back by more than fifty percent of the neighboring nodes, such as the neighboring node C, the neighboring node D, and the neighboring node E, are consistent, the target node 33 determines that the created block fed back by the neighboring node C is real, and the created block fed back by the neighboring node B is false.
When the target node 33 has obtained the real created block, it stores the created block locally, and obtains the IP address of the main storage node from the created block, which may be, optionally, the created block stores IP addresses of one or more main storage nodes, and the target node 33 may send request information to one or more main storage nodes according to the IP addresses of the one or more main storage nodes, for example, the target node 33 sends request information to one main storage node, for example, the target node 33 sends request information to the main storage node 31, the request information is used to indicate that the target node 33 wants to become a slave storage node, and the request information includes identification information of the target node 33, a terminal device number corresponding to the target node 33, and first indication information for indicating that the target node 33 has no public network IP address, where the first indication information may be a field or a character agreed in advance in the blockchain network.
In the present embodiment, the master storage node 31 locally stores a first list, where the first list includes identification information of a slave storage node corresponding to the master storage node 31 and a public network IP address, and for example, the first list includes identification information of the slave storage node 32, a terminal device number corresponding to the slave storage node 32, and a public network IP address. It will be appreciated that since the slave storage node 32 is not under the NAT and the slave storage node 32 has its own public network IP address, the target node 33 does not have its own public network IP address under the NAT.
When the main storage node 31 receives the request information sent by the target node 33, it is determined that the target node 33 does not have a public network IP address, but the target node 33 wants to become a slave storage node, the main storage node 31 records the identification information of the target node 33 and the terminal device number corresponding to the target node 33 in the first list. The first list may also store the public key of the slave storage node 32 and the public key of the target node 33.
Since the slave storage node 32 does not communicate with the blockchain network through the NAT, the slave storage node 32 has a public network IP address, and the master storage node 31 locally stores the public network IP address of the slave storage node 32; the target node 33 communicates with the blockchain network through the NAT, and the target node 33 does not have a public network IP address, and the main storage node 31 does not locally have the public network IP address of the target node 33; however, it is necessary to have a public network IP address as a slave storage node in order for the inquiring node to access the slave storage node based on the public network IP address. Therefore, in this embodiment, the target node 33 needs to send a heartbeat message to the main storage node 31 in real time or periodically, and it is assumed that the heartbeat message sent by the target node 33 and received by the main storage node 31 at a certain time is marked as a first heartbeat message, where the content included in the first heartbeat message may specifically be a content index, such as a block number, which can currently provide storage information query and is signed by the target node 33 using its own private key.
After the main storage node 31 receives the first heartbeat packet, according to the signed block number in the first heartbeat packet, the identity information of the target node 33 may be determined, and the source IP address and the source port number of the first heartbeat packet are further extracted, where the main storage node 31 may use the source IP address and the source port number of the first heartbeat packet as the address information of the target node 33, and optionally, the address information of the target node 33 includes: the public network IP address of the NAT corresponding to the target node 33 and the port number mapped on the NAT by the target node 33. In addition, the public network IP address may also be a public network IP address of a local area network to which the target node 33 belongs. That is to say, the source IP address of the first heartbeat packet may be a public network IP address of the NAT corresponding to the target node 33, or a public network IP address of a local area network to which the target node 33 belongs; the source port number of the first heartbeat packet may be the port number mapped on the NAT by the destination node 33.
Further, the main storage node 31 may store the identification information of the target node 33, the terminal device number corresponding to the target node 33, and the public network IP address and port number of the NAT corresponding to the target node 33 in the first list.
In this embodiment, the primary storage node 31 also locally stores a second list including the identification information and IP addresses of the agent nodes, for example, the second list including the identification information and IP addresses of the agent nodes 36. Since the target node 33 is located under the NAT, the master storage node 31 may assign the target node 33 an IP address and a first port number of an agent node, e.g., the master storage node 31 assigns the target node 33 an IP address and a first port number of an agent node 36, which the master storage node 31 assigns to the target node 33 a port on the agent node 36. After the primary storage node 31 assigns the IP address and the first port number of the agent node 36 to the destination node 33, the IP address and the first port number of the agent node 36 may also be sent to the destination node 33.
After the master storage node allocates the IP address and the first port number of the agent node to the target node, the method further includes: and the main storage node sends the identification information of the target node and the first port number to the agent node.
For example, after the primary storage node 31 assigns the IP address and the first port number of the agent node 36 to the target node 33, the primary storage node 31 may sign the identification information of the target node 33 and the first port number on the agent node 36 assigned to the target node 33 by the primary storage node 31 by using its own private key, and send the signed information to the agent node 36. After the agent node 36 receives the identification information of the target node 33 sent by the main storage node 31 and the first port number on the agent node 36 assigned to the target node 33 by the main storage node 31, the identification information of the target node 33 and the first port number on the agent node 36 assigned to the target node 33 by the main storage node 31 are written into a third list locally stored by the agent node 36.
Specifically, the main storage node sends the IP address and the first port number of the agent node to the target node, so that the target node sends a heartbeat packet to the agent node, where the heartbeat packet includes the public network IP address and the second port number of the NAT corresponding to the target node, and includes: the main storage node sends the IP address and the first port number of the agent node to the target node so that the target node sends a connection request to the agent node, and when the agent node determines to establish connection with the target node, the target node sends a heartbeat message to the agent node, wherein the heartbeat message comprises the public network IP address and the second port number of the NAT corresponding to the target node.
After the target node 33 receives the IP address and the first port number of the agent node 36 allocated by the main storage node 31 to the target node 33, the target node 33 sends a connection request to the agent node 36, where the connection request includes the identification information of the target node 33, and in other embodiments, the target node 33 may also sign the identification information of the target node 33 with its own private key, and the connection request includes the signed identification information of the target node 33. After the proxy node 36 receives the connection request sent by the target node 33, it is queried whether the third list locally stored by the proxy node 36 includes the identification information of the target node 33, if so, it is further detected whether the first port number corresponding to the identification information of the target node 33 in the third list is the port number of the proxy node 36 that received the connection request, if so, the proxy node 36 sends an agreement connection response to the target node 33, and the proxy node 36 records the IP address and the port number of the target node 33 in the third list. When the target node 33 receives the connection approval response sent by the agent node 36, the target node 33 sends a heartbeat message to the agent node 36, thereby opening a heartbeat path between the target node 33 and the agent node 36. In addition, the target node 33 may periodically send a heartbeat message to the proxy node 36 to maintain a heartbeat path between the target node 33 and the proxy node 36, where a source IP address of the heartbeat message is a public network IP address of an NAT corresponding to the target node 33, and a source port number of the heartbeat message is a port number of the target node 33 on the NAT. The proxy node 36 may update the IP address and the port number of the target node 33 in the third list locally stored once when receiving a heartbeat packet sent by the target node 33, where the IP address of the target node 33 stored in the third list is the public network IP address of the NAT corresponding to the target node 33, and the port number of the target node 33 stored in the third list is the port number of the target node 33 on the NAT. That is, the third list stores not only the identification information of the target node 33, the first port number on the proxy node 36 allocated by the main storage node 31 to the target node 33, but also the public network IP address of the NAT corresponding to the target node 33 and the port number corresponding to the target node 33 on the NAT, where the port number corresponding to the target node 33 on the NAT is recorded as the second port number.
In the embodiment of the invention, the IP address and the first port number of the proxy node are distributed to the target node through the main storage node, so that the target node sends the heartbeat message to the proxy node, the heartbeat message comprises the address information of the target node, the proxy node can record the corresponding relation between the identification information of the target node and the address information of the target node, and the target node can become a secondary storage node in a block chain network, so that the node without the public network IP address can also become the secondary storage node, and the development of block chain service is promoted.
Fig. 4 is a flowchart of a block link point access method according to another embodiment of the present invention. On the basis of the foregoing embodiments, the block link point access method provided in this embodiment further includes the following steps:
When the query node 35 first joins the block chain network, it is necessary to obtain the created blocks from the nodes adjacent to the query node 35, and optionally, all the nodes in the block chain network store the created blocks. In order to ensure that the query node 35 obtains a real created block, the query node 35 may send created block query requests to a plurality of neighboring nodes, for example, the query node 35 sends created block query requests to the neighboring node B1 and the neighboring node C1, after receiving the created block query requests, the neighboring node B1 and the neighboring node C1 send respective locally stored created blocks to the query node 35, the query node 35 compares whether the created blocks fed back by the neighboring node B1 and the neighboring node C1 are consistent, and if the created blocks fed back by the neighboring node B1 and the neighboring node C1 are consistent, the query node 35 locally stores the created blocks; if the created blocks fed back by the neighboring node B1 and the neighboring node C1 are not consistent, the query node 35 may further continue to send created block query requests to the neighboring node D1 and the neighboring node E1, and receive created blocks fed back by the neighboring node D1 and the neighboring node E1, respectively, and if created blocks fed back by neighboring nodes exceeding a preset proportion among the neighboring node B1, the neighboring node C1, the neighboring node D1, and the neighboring node E1 are consistent, the query node 35 determines that the created blocks are real. Optionally, more than fifty percent of neighboring nodes, such as the neighboring node C1, the neighboring node D1, and the neighboring node E1, of the neighboring node B1, the neighboring node C1, the neighboring node D1, and the neighboring node E1 respectively feed back the same created blocks, and then the query node 35 determines that the created blocks fed back by the neighboring node C1 are real, and the created blocks fed back by the neighboring node B1 are false.
After the query node 35 acquires the real created block, the created block is stored locally, and the IP address of the main storage node is acquired from the created block, optionally, the IP addresses of one or more main storage nodes are stored in the created block, and the query node 35 may send a query request to one or more main storage nodes, in this embodiment, the query node 35 sends the query request to one main storage node, for example, the IP address of the main storage node 31 is stored in the created block, and the query node 35 sends the query request to the main storage node 31 according to the IP address, where the query request is used for querying the secondary storage node. Optionally, the query request includes second indication information, where the second indication information is used to indicate that the querying node 35 has no public network IP address, and the second indication information may be pre-agreed indication information in the blockchain network, for example, the second indication information may be written in a fixed field or character in the created block to identify the querying node no public network IP address. In addition, the query node 35 may also sign the query request by using its own private key, and send the signed query request to the main storage node 31. In this embodiment, the querying node 35 may declare itself under a NAT or declare itself under a symmetric NAT.
When the main storage node 31 receives the query request sent by the query node 35, and determines that the query node 35 has no public network IP address, the public network IP address and the port number of the NAT corresponding to the query node 35 at the current time are recorded.
Specifically, the main storage node sends the IP address and the first port number of the agent node corresponding to the target node to the query node according to the address information of the query node.
For example, the main storage node 31 sends the IP address and the first port number of the agent node 36, which are allocated to the target node 33 by the main storage node 31, to the querying node 35 according to the public network IP address and the port number of the NAT corresponding to the querying node 35. When the query node 35 receives the IP address and the first port number of the agent node 36 sent by the main storage node 31, the query node 35 sends a query request to the agent node 36 according to the IP address and the first port number of the agent node 36, where the query request may be a query request signed by the query node 35 with its own private key. When the agent node 36 receives the query request, the query request is sent to the target node 33 via a heartbeat channel established and maintained between the agent node 36 and the target node 33. After the target node 33 receives the query request sent by the agent node 36, the target node 33 sends the query result to the first port number of the agent node 36 according to the IP address and the first port number of the agent node 36, and after the agent node 36 receives the query result returned by the target node 33 from the first port number, the query result is fed back to the query node 35. Thereby completing the query service process between the querying node 35 and the target node 33 as a slave storage node. Alternatively, the broker node 36 may be assigned a permanent service port so that the querying node 35 and the target node 33 may perform the querying service process through the service port.
In the embodiment of the invention, the IP address and the first port number of the proxy node are distributed to the target node through the main storage node, so that the target node sends the heartbeat message to the proxy node, the heartbeat message comprises the address information of the target node, the proxy node can record the corresponding relation between the identification information of the target node and the address information of the target node, and the target node can become a secondary storage node in a block chain network, so that the node without the public network IP address can also become the secondary storage node, and the development of block chain service is promoted.
Fig. 5 is a schematic structural diagram of a block link point access device according to an embodiment of the present invention. The block link node access device may specifically be the main storage node described in the above embodiments. As shown in fig. 5, the block-link point access device 50 includes: a receiving module 51, a distributing module 52 and a sending module 53; the receiving module 51 is configured to receive request information sent by a target node, where the request information indicates that the target node requests to become a slave storage node, and the request information includes identification information of the target node and first indication information, and the first indication information is used to indicate that the target node has no public network IP address; the allocating module 52 is configured to allocate an IP address and a first port number of the agent node to the target node; the sending module 53 is configured to send the IP address and the first port number of the agent node to the target node, so that the target node sends a heartbeat packet to the agent node, where the heartbeat packet includes the public network IP address and the second port number of the NAT corresponding to the target node.
Optionally, the receiving module 51 is further configured to: receiving a query request sent by a query node; the sending module 53 is further configured to: and sending the IP address and the first port number of the agent node corresponding to the target node to the query node so that the query node sends the query request to the agent node, and sending the query request to the target node by the agent node according to the public network IP address and the second port number of the NAT corresponding to the target node.
Optionally, the sending module 53 is further configured to: and sending the identification information of the target node and the first port number to the agent node.
Optionally, the query request includes second indication information, where the second indication information is used to indicate that the querying node has no public network IP address; the block link point access device 50 further includes: a determination module 54; the determining module 54 is configured to determine address information of the query node according to the query request sent by the query node; the sending module 53 is specifically configured to: and sending the IP address and the first port number of the agent node corresponding to the target node to the query node according to the address information of the query node.
Optionally, the sending module 53 is specifically configured to: and sending the IP address and the first port number of the agent node to the target node so that the target node sends a connection request to the agent node, and when the agent node determines to establish connection with the target node, the target node sends a heartbeat message to the agent node, wherein the heartbeat message comprises the public network IP address and the second port number of the NAT corresponding to the target node.
The block link point access device of the embodiment shown in fig. 5 can be used to implement the technical solution of the above method embodiments, and the implementation principle and technical effect are similar, and are not described herein again.
Fig. 6 is a schematic structural diagram of a blockchain node according to an embodiment of the present invention. The block link point provided by the embodiment of the present invention may execute the processing procedure provided by the block link point access method embodiment, as shown in fig. 6, the block link point 60 includes a memory 61, a processor 62, a computer program, and a communication interface 63; wherein a computer program is stored in the memory 61 and is configured to be executed by the processor 62 for the block-link point access method described in the above embodiments.
The block link points of the embodiment shown in fig. 6 can be used to implement the technical solution of the above method embodiment, and the implementation principle and technical effect are similar, and are not described herein again.
In addition, the present embodiment also provides a computer-readable storage medium on which a computer program is stored, the computer program being executed by a processor to implement the block link point access method described in the above embodiments.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
It is obvious to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to perform all or part of the above described functions. For the specific working process of the device described above, reference may be made to the corresponding process in the foregoing method embodiment, which is not described herein again.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.
Claims (12)
1. A block-link point access method, comprising:
a master storage node receives request information sent by a target node, wherein the request information indicates that the target node requests to become a slave storage node, the request information comprises identification information of the target node and first indication information, and the first indication information is used for indicating that the target node has no public network IP address; the master storage node is used for storing a complete block chain account book, and the slave storage node is used for storing a part of block chain account book;
the main storage node distributes an IP address and a first port number of an agent node for the target node;
and the main storage node sends the IP address and the first port number of the agent node to the target node so that the target node sends a heartbeat message to the agent node, wherein the heartbeat message comprises the public network IP address and the second port number of the NAT corresponding to the target node.
2. The method of claim 1, further comprising:
the main storage node receives a query request sent by a query node;
and the main storage node sends the IP address and the first port number of the agent node corresponding to the target node to the inquiry node so that the inquiry node sends the inquiry request to the agent node, and the agent node sends the inquiry request to the target node according to the public network IP address and the second port number of the NAT corresponding to the target node.
3. The method of claim 1, wherein after the master storage node assigns the target node an IP address and a first port number of an agent node, further comprising:
and the main storage node sends the identification information of the target node and the first port number to the agent node.
4. The method of claim 2, wherein the query request includes second indication information indicating that the querying node has no public network IP address;
after the main storage node receives the query request sent by the query node, the method further includes:
the main storage node determines the address information of the query node according to the query request sent by the query node;
the main storage node sends the IP address and the first port number of the agent node corresponding to the target node to the query node, including:
and the main storage node sends the IP address and the first port number of the agent node corresponding to the target node to the query node according to the address information of the query node.
5. The method of claim 1, wherein the master storage node sending the IP address and the first port number of the agent node to the target node, so that the target node sends a heartbeat packet to the agent node, the heartbeat packet including the public network IP address and the second port number of the NAT corresponding to the target node, comprising:
the main storage node sends the IP address and the first port number of the agent node to the target node so that the target node sends a connection request to the agent node, and when the agent node determines to establish connection with the target node, the target node sends a heartbeat message to the agent node, wherein the heartbeat message comprises the public network IP address and the second port number of the NAT corresponding to the target node.
6. A block-link point access device, comprising:
a receiving module, configured to receive request information sent by a target node, where the request information indicates that the target node requests to become a slave storage node, and the request information includes identification information of the target node and first indication information, and the first indication information is used to indicate that the target node has no public network IP address; the master storage node is used for storing a complete block chain account book, and the slave storage node is used for storing a part of block chain account book;
the allocation module is used for allocating the IP address and the first port number of the agent node for the target node;
and the sending module is used for sending the IP address and the first port number of the agent node to the target node so that the target node sends a heartbeat message to the agent node, wherein the heartbeat message comprises the public network IP address and the second port number of the NAT corresponding to the target node.
7. The block-link point access device of claim 6, wherein the receiving module is further configured to: receiving a query request sent by a query node;
the sending module is further configured to: and sending the IP address and the first port number of the agent node corresponding to the target node to the query node so that the query node sends the query request to the agent node, and sending the query request to the target node by the agent node according to the public network IP address and the second port number of the NAT corresponding to the target node.
8. The block-link point access device of claim 6, wherein the sending module is further configured to: and sending the identification information of the target node and the first port number to the agent node.
9. A block-linked point access device as claimed in claim 7, wherein the query request includes second indication information indicating that the querying node has no public network IP address;
the block link point access device further comprises: the determining module is used for determining the address information of the query node according to the query request sent by the query node;
the sending module is specifically configured to: and sending the IP address and the first port number of the agent node corresponding to the target node to the query node according to the address information of the query node.
10. The block-link point access device of claim 6, wherein the sending module is specifically configured to: and sending the IP address and the first port number of the agent node to the target node so that the target node sends a connection request to the agent node, and when the agent node determines to establish connection with the target node, the target node sends a heartbeat message to the agent node, wherein the heartbeat message comprises the public network IP address and the second port number of the NAT corresponding to the target node.
11. A block link point, comprising:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of any one of claims 1-5.
12. A computer-readable storage medium, having stored thereon a computer program for execution by a processor to perform the method of any one of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810553990.XA CN108712507B (en) | 2018-05-31 | 2018-05-31 | Block link point access method and device and block link point |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810553990.XA CN108712507B (en) | 2018-05-31 | 2018-05-31 | Block link point access method and device and block link point |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108712507A CN108712507A (en) | 2018-10-26 |
CN108712507B true CN108712507B (en) | 2021-05-18 |
Family
ID=63870991
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810553990.XA Active CN108712507B (en) | 2018-05-31 | 2018-05-31 | Block link point access method and device and block link point |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108712507B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110445850A (en) * | 2019-07-24 | 2019-11-12 | 深圳壹账通智能科技有限公司 | Block chain node access method and device, storage medium, electronic equipment |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6779035B1 (en) * | 2000-03-06 | 2004-08-17 | Microsoft Corporation | Application programming interface and generalized network address translator for translation of transport-layer sessions |
CN1592300A (en) * | 2003-09-02 | 2005-03-09 | 华为技术有限公司 | Method for realizing multimedia protocol passing through network address translation device |
TWI236255B (en) * | 2003-12-15 | 2005-07-11 | Ind Tech Res Inst | System and method for supporting inter-NAT-domain handoff within a VPN by associating L2TP with mobile IP |
CN1706168A (en) * | 2002-10-17 | 2005-12-07 | 思科技术公司 | Methods and apparatus for home address management at home agent for NAI based mobile nodes |
CN101193130A (en) * | 2006-11-21 | 2008-06-04 | 中兴通讯股份有限公司 | Method for penetrating NAT in mobile IPv6 |
CN102932371A (en) * | 2012-11-20 | 2013-02-13 | 杭州华三通信技术有限公司 | Method for realizing communication between IPv6 private network node and public network node and routing forwarding equipment |
CN104980528A (en) * | 2015-06-26 | 2015-10-14 | 广州华多网络科技有限公司 | Method, system and apparatus for realizing communication between nodes |
-
2018
- 2018-05-31 CN CN201810553990.XA patent/CN108712507B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6779035B1 (en) * | 2000-03-06 | 2004-08-17 | Microsoft Corporation | Application programming interface and generalized network address translator for translation of transport-layer sessions |
CN1706168A (en) * | 2002-10-17 | 2005-12-07 | 思科技术公司 | Methods and apparatus for home address management at home agent for NAI based mobile nodes |
CN1592300A (en) * | 2003-09-02 | 2005-03-09 | 华为技术有限公司 | Method for realizing multimedia protocol passing through network address translation device |
TWI236255B (en) * | 2003-12-15 | 2005-07-11 | Ind Tech Res Inst | System and method for supporting inter-NAT-domain handoff within a VPN by associating L2TP with mobile IP |
CN101193130A (en) * | 2006-11-21 | 2008-06-04 | 中兴通讯股份有限公司 | Method for penetrating NAT in mobile IPv6 |
CN102932371A (en) * | 2012-11-20 | 2013-02-13 | 杭州华三通信技术有限公司 | Method for realizing communication between IPv6 private network node and public network node and routing forwarding equipment |
CN104980528A (en) * | 2015-06-26 | 2015-10-14 | 广州华多网络科技有限公司 | Method, system and apparatus for realizing communication between nodes |
Also Published As
Publication number | Publication date |
---|---|
CN108712507A (en) | 2018-10-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108712506B (en) | Block chain node communication method and device and block chain node | |
US11057761B2 (en) | Cloud SIM card management server, binding device, management method, binding method and system | |
CN109451451B (en) | Terminal roaming method, device and storage medium | |
CN108810120B (en) | Block chain node communication method and device and block chain node | |
CN109067724B (en) | Block chain data transaction method, device, equipment and storage medium | |
CN109167847B (en) | IPv6 address generation method, SMF and communication system | |
US10104700B2 (en) | Message processing method, MME selection method, and apparatuses | |
KR101437364B1 (en) | Transmission device and receiving device and operation method thereof | |
CN109118360B (en) | Block chain account checking method, device, equipment and storage medium | |
CN108769142B (en) | Transaction information processing method and block generation node | |
CN108200568B (en) | Mobile communication electronic SIM card data processing method and device | |
CN108683727B (en) | Block processing method and main node | |
TWI640214B (en) | Network access method, related equipment and system | |
RU2016101134A (en) | METHOD AND SYSTEM OF AUTHENTICATION OF USERS TO PROVIDE ACCESS TO DATA TRANSFER NETWORKS | |
JP2020534760A (en) | RBG division method and user terminal | |
CN108777710B (en) | Inter-node communication method and device of block chain and block chain node | |
CN108877290B (en) | Parking space scheduling method, device, equipment and storage medium | |
CN108777712B (en) | Block chain node communication method and device and block chain node | |
CN108848144B (en) | Method and device for accessing nodes in block chain and block chain link point | |
CN108876611B (en) | Transaction information processing method and device and block link points | |
CN108712507B (en) | Block link point access method and device and block link point | |
CN109087096B (en) | Block chain account checking method, device, equipment and storage medium | |
CN111431818A (en) | Cross-domain request traffic distribution method and device, storage medium and computer equipment | |
CN105409288B (en) | A kind of user management method of shared network, corresponding equipment and system | |
JP2019506796A (en) | Access method, user device and server |
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 |