Kademlia network node identifier generating method

A node identification and node technology, applied in the field of network communication, can solve the problems of unknown node Nb and distance uncertainty, and achieve the effect of improving efficiency

CN105472060AActive Publication Date: 2016-04-06深圳互联天下信息技术有限公司
3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Publication Date
2016-04-06

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
Patent Text Reader

Abstract

The invention discloses a Kademlia network node identifier generating method. The Kademlia network node identifier generating method is characterized in that an intranet IP address of a node, an occupied intranet port, a public network IP address, and a NAT type can be acquired; the intranet sign of the node can be acquired, and the firewall sign of the node can be acquired, and the SHA1 calculation of the public network IP address can be carried out to acquire the original node identifier of the node, and then the ICP information and the area information of the public network IP address can be inquired; the route information of the node can be acquired, the level information of the node can be set, and then the node identifier of the node can be acquired. The Kademlia network node identifier generating method is advantageous in that the calculated distance between the nodes is closer to the real network environment, and therefore the efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The invention relates to the technical field of network communication, in particular to a method for generating a node identifier of a Kademlia network. Background technique

[0002] One of the important elements of Kademlia technology is the node identifier (NodeID) and the "distance" between nodes. The distance between nodes is calculated by the exclusive OR (XOR) of two node identifiers.

[0003] The existing node identifier is generated by using a random algorithm combined with a secure hash algorithm (Secure Hash Algorithm, SHA1 algorithm for short). Domestic eMule uses a 128bit node identifier, which is also generated by a random algorithm.

[0004] When the traditional node identifier generation mechanism performs "distance" calculation, its "distance" has no connection with the "distance" between nodes in the real network environment, which brings efficiency problems. A typical example is two nodes in the same local area network (assuming tha...

Examples

Embodiment Construction

[0040] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

[0041] 1. Main process

[0042] Such as figure 1 As shown, the present invention proposes a method for generating a node identifier of a Kademlia network, specifically comprising the following steps:

[0043] (1) Set up several nodes in the Kademlia network, obtain the intranet IP address of the node and the occupied intranet port; the intranet port is the UDP port used to connect the node to the Kademlia network;

[0044] (2) Obtain the public network IP address...