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
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Publication Date
- 2016-04-06
Smart Images
Figure 1 Figure 2
Abstract
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...