CN103618725B - A kind of acquisition methods and system of KAD network resource information - Google Patents

A kind of acquisition methods and system of KAD network resource information Download PDF

Info

Publication number
CN103618725B
CN103618725B CN201310645762.2A CN201310645762A CN103618725B CN 103618725 B CN103618725 B CN 103618725B CN 201310645762 A CN201310645762 A CN 201310645762A CN 103618725 B CN103618725 B CN 103618725B
Authority
CN
China
Prior art keywords
node
resource information
resource
request message
analog
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
Application number
CN201310645762.2A
Other languages
Chinese (zh)
Other versions
CN103618725A (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.)
Institute of Computing Technology of CAS
Original Assignee
Institute of Computing Technology of CAS
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 Institute of Computing Technology of CAS filed Critical Institute of Computing Technology of CAS
Priority to CN201310645762.2A priority Critical patent/CN103618725B/en
Publication of CN103618725A publication Critical patent/CN103618725A/en
Application granted granted Critical
Publication of CN103618725B publication Critical patent/CN103618725B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention provides a kind of acquisition methods and system of KAD network resource information.This method includes:N equally distributed node IDs are chosen in the node ID space of KAD networks, construct corresponding n analog node and the KAD networks are added, wherein n is positive integer.The KAD networks are monitored by the analog node, and resource information storage request message that other nodes are sent is parsed by the analog node and obtains resource information.The present invention can more fully obtain the resource information in KAD networks while accelerating acquisition of information speed.

Description

A kind of acquisition methods and system of KAD network resource information
Technical field
The present invention relates to the acquisition methods and system of peer-to-peer network technology more particularly to a kind of KAD network resource information.
Background technology
KAD(Kademlia)Agreement is a kind of realization of DHT technologies, and eMule has been initially added into from v0.40 versions to KAD The support of agreement(Abbreviation eMule-KAD).With popularizing for eMule, KAD has become current widespread deployment and the DHT nets of application Network, online number of nodes may be up to 5,000,000 simultaneously in eMule-KAD according to statistics.
In KAD networks, each user can share the resource of oneself with the other users in network.Due to KAD nets Number of nodes in network is huge, wherein the resource quantity transmitted is even more hundreds of millions of.How in the information of magnanimity more fully Obtain resource(Such as keyword resource or file resource information)Information is a technological difficulties of this field.Currently, a kind of side Method is to obtain resource information by node monitoring information, but the Limited information that a node can be monitored and be got, this is Because the resource in KAD networks is issued on the node closer from the resource ID.It is another in order to obtain more comprehensive information Kind method is the selection multiple main frames node in KAD networks, starts a monitoring program on each node, however do so Drawback is that cost is too high.
Invention content
A kind of KAD Internet resources are provided to solve problems of the prior art according to one embodiment of present invention The acquisition methods of information, this method include:
Step 1), n equally distributed node IDs are chosen in the node ID space of KAD networks, construct corresponding n mould The KAD networks are added in quasi- node, and wherein n is positive integer;
Step 2), the KAD networks are monitored by the analog node;And
Step 3), parse by the analog node resource information storage request message that other nodes are sent and obtain money Source information.
In one embodiment, step 3)Including:When the analog node receives the message that other nodes are sent, sentence The type for the message of breaking.
If it is inquiry request message, inquiry request message herein refers to the node query requests message of resource storage, then Closer one or more of the resource ID distance that node ID includes with the inquiry request message is selected from all analog nodes A analog node, and the transmission inquiry request will be returned to about the information of selected one or more analog nodes and disappeared The node of breath;Request message is stored if it is resource information, then parses the message and obtains resource information.
In one embodiment, the inquiry request message includes:Type of message, resource ID, and send the inquiry and ask Seek the node ID of the node of message.In one embodiment, the resource information storage request message includes:Type of message, and Keyword resource information or file resource information.
In one embodiment, step 3)In, it will returned about the information of selected one or more analog nodes After the node for sending the inquiry request message, further include:From sending the node of the inquiry request message to selected One or more analog nodes send corresponding with resource ID resource information storage request message.
In one embodiment, step 3)In, resolving resource information storage request message and obtain resource information it Afterwards, further include:The resource information of acquisition is sent to resource by the analog node that request message is stored by receiving the resource information Statistical server.
In a further embodiment, the value of n is 32.
In one embodiment, the method further includes:
Step 4), terminate to monitor the KAD networks.
According to one embodiment of present invention, a kind of acquisition system of KAD network resource information is also provided, including:
Analog node constructing module, for choosing n equally distributed node IDs in the node ID space of KAD networks, It constructs corresponding n analog node and the KAD networks is added, wherein n is positive integer;And
Module is monitored, for monitoring the KAD networks by the analog node;And other are parsed by the analog node The resource information that node is sent stores request message and obtains resource information.
In one embodiment, the monitoring module is used to receive the message that other nodes are sent when the analog node When, judge the type of the message;If it is the node query requests message of resource storage, then section is selected from all analog nodes The closer one or more analog nodes of resource ID distance that point ID includes with the inquiry request message, and will be about institute The information of one or more analog nodes of selection returns to the node for sending the inquiry request message;If it is resource information Request message is stored, then parses the message and obtains resource information.
In one embodiment, the monitoring module is additionally operable to:Will be about selected one or more analog nodes Information return to the node for sending the inquiry request message after, from sending the node of the inquiry request message to selected The one or more analog nodes selected send resource information storage request message corresponding with the resource ID.
In one embodiment, the monitoring module is additionally operable to:In resolving resource information storage request message and obtain After resource information, the resource information of acquisition is sent to money by the analog node that request message is stored by receiving the resource information Source statistical server.
Following advantageous effect can be reached using the present invention:
The present invention in KAD networks by being added equally distributed multiple analog nodes come monitoring information, to be somebody's turn to do Resource information in KAD networks.While accelerating resource information acquisition speed, can more fully it obtain in KAD networks Resource information.
Description of the drawings
Fig. 1 is KAD resources in network retrieval information exchange schematic diagram;
Fig. 2 is the schematic diagram of equally distributed analog node in KAD networks according to one embodiment of present invention;
Fig. 3 is according to one embodiment of present invention, by the inquiry request message of analog node response resource memory node Method flow chart;And
Fig. 4 is the flow chart for the method for obtaining resource information by analog node according to an embodiment of the present invention.
Specific implementation mode
The present invention is illustrated in the following with reference to the drawings and specific embodiments.It should be appreciated that specific reality described herein Example is applied only to explain the present invention, is not intended to limit the present invention.
Before the acquisition methods and system for describing KAD network resource information provided by the invention, KAD is first briefly explained Several modules in agreement:
(1)KAD nodes:
In KAD networks, a node ID is indicated using 128 strings of binary characters(Or User ID).Node ID is typically to be generated by MD4 hash functions when the node starts for the first time, and the randomness of Hash ensure that the uniform of node Property and collisionless.Nodes ID can form a lookup binary tree, and node is distributed in this according to respective ID prefixes On binary tree, can by the XOR operation between node come great-jump-forward search for specify node ID search.
(2)Keyword resource
Keyword resource is used for the information of index file resource, and form can be<Key, value>, wherein key be by Hash function acts on the keyword divided by word segmentation regulation and the ID values generated, and value includes then containing the keyword The range of information of file resource, such as filename, file size and file ID.
(3)File resource
File resource downloads source information for indexing, and form is<key,value>, wherein key is the content of this document 128 ID values being calculated according to MD4 hash functions, value include the range of information for the node for sharing this file, are such as saved Point ID, IP address and port etc..Resource ID hereinafter is keyword resource ID(key)With file resource ID(key)System Claim.
(4)Resource retrieval
When carrying out keyword resource retrieval, KAD can calculate the cryptographic Hash of the keyword according to MD4 hash functions, lead to Cross iterative search(Send KADEMLIA_REQ message)After finding the node in keyword ID offsets section, it is sent to KADEMLIA_SEARCH_REQ or KADEMLIA2_SEARCH_KEY_REQ request messages, interacting message are as shown in Figure 1.When When user selects some file to prepare to download, KAD just starts to execute the retrieving of file resource, process and keyword retrieval class Seemingly.
According to one embodiment of present invention, a kind of acquisition methods of KAD network resource information are provided.It is briefly summarized, it should Method monitors other nodes on KAD networks by the way that equally distributed analog node is added in KAD networks(Also referred to as resource is sent out Cloth node)The message of transmission.For the node query requests message of resource storage, wherein node ID and the money in the message are calculated Best resource information storage node of the smaller analog node of source ID distances as respective resources;It stores and asks for resource information The resource information got from the message is sent to resource statistics server by message.Fig. 2 shows in KAD networks Analog node distribution schematic diagram.
Referring now to Fig. 3 and Fig. 4, the embodiment of the acquisition methods of KAD network resource information has been described in detail.Wherein, Fig. 3 is retouched It has stated and has been directed to inquiry request message, determined the best resource information storage node of respective resources(Determine that resource memory node will It is sent to the analog node of corresponding resource information storage request message)Method, include the following steps:
Step S101, n node ID is randomly selected in the node ID logical space of KAD networks so that this selected n A node ID is evenly distributed in entire logical space as possible.
According to one embodiment of present invention, to save cost, the present invention is in a host(That is node)Upper n mould of construction Quasi- node simultaneously starts monitoring, and wherein n may be greater than 1 integer.N analog node ID is evenly distributed on entire logical space can To ensure that the analog node of construction can listen to more comprehensive resource information.
Step S102, the analog node of KAD networks is constructed with n node ID of selection(Abbreviation analog node), starting should KAD networks are added in analog node, and the nodal information of oneself is automatically spread by these analog nodes.Wherein, which believes Breath may include IP address, UDP port number and node ID of analog node etc..
Step S103, other nodes in KAD networks are monitored in analog node(Also referred to as resource memory node)It sends KAD protocol messages.
Step S104, when analog node receives the message that other nodes are sent, first determine whether the message is resource The node query requests message of storage.
In one embodiment, inquiry request message may include type of message, resource ID, and send the money of the message This three parts of the node ID of source memory node, wherein resource ID are the resources for sending the resource memory node of the message and being stored (Including keyword resource and file resource)Resource ID.Type of message can be used for judging whether the message is that inquiry request disappears Breath, that is, in the data packet of the message, judged according to the data bit for indicating type of message.Node ID indicates the message Source.
Step S105, it if it is determined that the message received is the node query requests message of resource storage, then parses this and disappears The data packet of breath obtains resource ID therein(Such as keyword resource ID or file resource ID), and by the resource ID and all n The node ID of a analog node carries out similarity operation.For example, calculating the distance between ID using binary system XOR operation.It connects The best resource for obtaining the distance resource ID is closer in n analog node one or several analog nodes as respective resources Information storage node;Otherwise, continue to monitor KAD networks.
In KAD networks, resource is stored on one or several nodes nearest apart from resource ID, is being found After the node nearest apart from oneself, resource information will be issued to it, and ask its storage.Therefore, nearest one is chosen here A or multiple analog nodes can make the more efficient of acquisition resource information.
Step S106, by receiving the analog node best resource information storage section obtained in the previous step of inquiry request message The information of point carrys out the node that response sends the inquiry request message.
Wherein, response message includes the information of best resource information storage node, such as, it may include best resource information IP address, UDP port number, node ID of memory node etc..Then, analog node can continue to monitor the KAD networks.
Send out inquiry request message resource memory node receive response after, obtain the best money of the respective resources of resource ID The information of source information memory node.Then, money corresponding with the resource ID can be sent to the best resource information storage node Source information stores request message.
Step S107, judge whether to meet exit criteria(Such as user closes oracle listener).If so, exiting end; Otherwise, continue to monitor KAD networks.
Fig. 4 is described stores request message for resource information, and analog node believes the resource got from the message Breath is sent to one embodiment of the method for resource statistics server, includes the following steps:
Step S201, the KAD protocol messages of other nodes in KAD networks are monitored in analog node.
Step S202, analog node judges whether the message from other nodes received is resource information storage request Message.
Resource information storage request message stores the keyword resource for including in the message for request target analog node Information or file resource information.As described above, data portion structure is<key,value>Structure.For keyword Resource, resource information include file ID, filename, file type, file size etc.;For file resource, resource letter Breath includes node ID, IP address, udp port etc..
Similar with inquiry request message, resource information storage request message can also include the data of instruction message type Position can judge whether the message received is that resource information stores request message according to the data bit.
Step S203, if it is determined that is received is resource information storage request message, then analog node parses the message Data packet, and therefrom obtain resource information(Keyword resource information or file resource information).Then, it can will obtain Resource information be sent to resource statistics server;If it is not, then continuing to monitor KAD networks.
In another embodiment, analog node can first storage resource information, then the resource information of storage is sent to Resource statistics server.
Step S204. judges whether to meet exit criteria(As user closes oracle listener).If so, exiting end;Otherwise, Continue to monitor KAD networks.
It should be noted that since the message that analog node receives may be inquiry request message, it is also possible to resource information Store request message.Accordingly, it is determined that the best resource information storage node process of resource and obtain the process of resource information can be with Concurrently carry out.
Inventor is found through experiments that, when the value of analog node number n takes 32, KAD Internet resources provided by the invention The better performances of information acquisition method more comprehensively obtain the letter of the resource in KAD networks using less analog node Breath.
According to one embodiment of present invention, a kind of KAD network resource information acquisition system, including analog node are also provided Two parts of constructing module and monitoring module.
Wherein, analog node constructing module is used to choose n equally distributed nodes in the node ID space of KAD networks ID constructs corresponding n analog node and KAD networks is added, and n here is positive integer.
It monitors module to be used to monitor KAD networks by analog node, when analog node receives the message that other nodes are sent When, judge the type of the message.
Wherein, if the message is the node query requests message of resource storage, section is selected from all analog nodes The closer one or more analog nodes of resource ID distance that point ID includes with inquiry request message, and will be about selected One or more analog nodes information return to send inquiry request message node.
If the message is resource information storage request message, parses the message and obtain resource information(Including closing Keyword resource information or file resource information).If not both above message, then continue to monitor KAD networks.
Module is monitored to be additionally operable to judge whether to meet exit criteria(Such as user closes oracle listener).If so, exiting Terminate;Otherwise, continue to monitor KAD networks.
It should be noted that and understanding, the feelings of the spirit and scope of the present invention required by not departing from appended claims Under condition, various modifications and improvements can be made to the present invention of foregoing detailed description.It is therefore desirable to the model of the technical solution of protection It encloses and is not limited by given any specific exemplary teachings.

Claims (12)

1. a kind of acquisition methods of KAD network resource information, including:
Step 1) chooses n equally distributed node IDs in the node ID space of KAD networks, constructs corresponding n simulation section The KAD networks are added in point, and wherein n is positive integer;
Step 2) monitors the KAD protocol messages that other nodes are sent out in the KAD networks by the analog node;And
Step 3), the resource information sent by the analog node resolving resource publisher node store request message to obtain resource Information.
2. according to the method described in claim 1, wherein, step 3) includes:
When the analog node receives the message that the resource publisher node is sent, the type of the message is judged;
If it is inquiry request message, then selection node ID includes with the inquiry request message from all analog nodes The closer one or more analog nodes of resource ID distance, and by the information about selected one or more analog nodes Return to the node for sending the inquiry request message;
Request message is stored if it is resource information, then parses the message and obtains resource information.
3. according to the method described in claim 2, wherein, the inquiry request message includes:Type of message, resource ID, and hair Send the node ID of the node of the inquiry request message.
4. method according to claim 1 or 2 or 3, wherein the resource information stores request message and includes:Message class Type and keyword resource information or file resource information.
5. according to the method in claim 2 or 3, in step 3), will be about selected one or more analog nodes Information return to the node for sending the inquiry request message after, further include:
Node from sending the inquiry request message is sent and the resource ID to selected one or more analog nodes Corresponding resource information stores request message.
6. method according to claim 1 or 2 or 3, in step 3), in resolving resource information storage request message and obtain After taking resource information, further include:
The resource information of acquisition is sent to resource statistics clothes by the analog node that request message is stored by receiving the resource information Business device.
7. method according to claim 1 or 2 or 3, wherein n 32.
8. method according to claim 1 or 2 or 3, further includes:
Step 4) terminates to monitor the KAD networks.
9. a kind of acquisition system of KAD network resource information, including:
Analog node constructing module, for choosing n equally distributed node IDs, construction in the node ID space of KAD networks The KAD networks are added in corresponding n analog node, and wherein n is positive integer;And
Module is monitored, for monitoring the KAD protocol messages that other nodes are sent out in the KAD networks by the analog node;With And the resource information sent by the analog node resolving resource publisher node stores request message and obtains resource information.
10. system according to claim 9, wherein the monitoring module is used to receive other when the analog node When the message that node is sent, the type of the message is judged;If it is inquiry request message, then section is selected from all analog nodes The closer one or more analog nodes of resource ID distance that point ID includes with the inquiry request message, and will be about institute The information of one or more analog nodes of selection returns to the node for sending the inquiry request message;If it is resource information Request message is stored, then parses the message and obtains resource information.
11. system according to claim 10, wherein the monitoring module is additionally operable to:Will be about selected one Or after the information of multiple analog nodes returns to the node for sending the inquiry request message, disappeared by sending the inquiry request The node of breath sends resource information storage request corresponding with the resource ID to selected one or more analog nodes Message.
12. according to the system described in claim 9 or 10 or 11, wherein the monitoring module is additionally operable to:In resolving resource information After storing request message and obtaining resource information, the analog node of request message will be stored by receiving the resource information to be obtained The resource information taken is sent to resource statistics server.
CN201310645762.2A 2013-12-04 2013-12-04 A kind of acquisition methods and system of KAD network resource information Active CN103618725B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310645762.2A CN103618725B (en) 2013-12-04 2013-12-04 A kind of acquisition methods and system of KAD network resource information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310645762.2A CN103618725B (en) 2013-12-04 2013-12-04 A kind of acquisition methods and system of KAD network resource information

Publications (2)

Publication Number Publication Date
CN103618725A CN103618725A (en) 2014-03-05
CN103618725B true CN103618725B (en) 2018-11-09

Family

ID=50169429

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310645762.2A Active CN103618725B (en) 2013-12-04 2013-12-04 A kind of acquisition methods and system of KAD network resource information

Country Status (1)

Country Link
CN (1) CN103618725B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103167029A (en) * 2013-03-06 2013-06-19 中国科学院计算技术研究所 Method and device for discovering specific resources on eMule network
CN103258052A (en) * 2013-05-28 2013-08-21 中国科学院计算技术研究所 Method for discovering related resources on eMule network
CN103354554A (en) * 2013-05-28 2013-10-16 中国科学院计算技术研究所 File resource information collection method for eMule network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103167029A (en) * 2013-03-06 2013-06-19 中国科学院计算技术研究所 Method and device for discovering specific resources on eMule network
CN103258052A (en) * 2013-05-28 2013-08-21 中国科学院计算技术研究所 Method for discovering related resources on eMule network
CN103354554A (en) * 2013-05-28 2013-10-16 中国科学院计算技术研究所 File resource information collection method for eMule network

Also Published As

Publication number Publication date
CN103618725A (en) 2014-03-05

Similar Documents

Publication Publication Date Title
CN101409706B (en) Method, system and relevant equipment for distributing data of edge network
Ahlgren et al. Design considerations for a network of information
CN102223411B (en) Method and system for downloading file by adopting P2P (Peer-to-Peer) technology and client side
CN105337941A (en) Method and device for providing device identifier
CN103731472B (en) Method and system, the client of file are downloaded using P2P technologies
US20140143339A1 (en) Method, apparatus, and system for resource sharing
CN105847853A (en) Video content distribution method and device
CN109729183A (en) Request processing method, device, equipment and storage medium
JP2016045944A (en) System and method for reconstructable all-in-one content stream
CN103369002A (en) A resource downloading method and system
CN104503983A (en) Method and device for providing website certification data for search engine
CN103746768A (en) Data packet identification method and equipment thereof
CN110855627B (en) Application deployment method, device, equipment and medium
Karolewicz et al. On efficient data storage service for IoT
US8738801B2 (en) Methods and apparatus for updating index information while adding and updating documents in a distributed network
JP6233846B2 (en) Variable-length nonce generation
CN103605708B (en) The method and system of keyword are speculated in KAD networks by keyword cryptographic Hash
CN103618725B (en) A kind of acquisition methods and system of KAD network resource information
CN103167029B (en) The discovery method and apparatus of specific resources on a kind of eMule network
CN107977381B (en) Data configuration method, index management method, related device and computing equipment
Xu et al. A novel multilevel index model for distributed service repositories
CN111125580A (en) Network resource acquisition method and device, electronic equipment and storage medium
Alhisnawi Forwarding information base design techniques in content-centric networking: a survey
CN117539962B (en) Data processing method, device, computer equipment and storage medium
Liu et al. Double‐layer P2P networks supporting semantic search and keeping scalability

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant