CN104168147A - Node maintenance method for P2P network monitoring based on one-dimensional chain tables - Google Patents

Node maintenance method for P2P network monitoring based on one-dimensional chain tables Download PDF

Info

Publication number
CN104168147A
CN104168147A CN201410423858.9A CN201410423858A CN104168147A CN 104168147 A CN104168147 A CN 104168147A CN 201410423858 A CN201410423858 A CN 201410423858A CN 104168147 A CN104168147 A CN 104168147A
Authority
CN
China
Prior art keywords
node
resource
user
chained list
priority
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410423858.9A
Other languages
Chinese (zh)
Other versions
CN104168147B (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.)
Zhejiang University of Technology ZJUT
Original Assignee
Zhejiang University of Technology ZJUT
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 Zhejiang University of Technology ZJUT filed Critical Zhejiang University of Technology ZJUT
Priority to CN201410423858.9A priority Critical patent/CN104168147B/en
Publication of CN104168147A publication Critical patent/CN104168147A/en
Application granted granted Critical
Publication of CN104168147B publication Critical patent/CN104168147B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The invention discloses a node maintenance method for P2P network monitoring based on one-dimensional chain tables. The method comprises the steps that according to the special needs of network monitoring application, monitored resources are repeatedly inquired to achieve the aim of monitoring the network, a traditional bucket K is abandoned, the one-dimensional chain tables are used for storing node information, the network is monitored through the inquiring function of the P2P network, the priority of nodes is set according to inquired feedback information, the one-dimensional chain tables are dynamically adjusted according to the priority of the nodes, therefore, the one-dimensional chain tables are arranged according to the priority to achieve the aim that the nodes with response information can be preferentially inquired in the next inquiring process, and therefore the inquiry of each time is prevented from being started from zero repeatedly, the number of iterations of the inquiry is reduced, inquiry time is greatly reduced, and the efficiency of monitoring the network is improved.

Description

A kind of for P2P network monitoring the node maitaining method based on one dimension chained list
Technical field
The invention belongs to P2P networking technology area, be specifically related to a kind of for P2P network monitoring the node maitaining method based on one dimension chained list.
Background technology
Along with the fast development of the universal and digitizing technique of internet, the digital contents such as the e-book of online transaction and propagation, music, film are more and more.The trend in order to develop that is digitized into of Web publishing and conventional paper works.But, because digital information is easy to be replicated, amendment and illegal propagation, there is a large amount of piracies and impinge issue in the online digital content of propagating, end user has a mind to or by mistake digital content is copied arbitrarily and pasted, the secondary of especially hot resource being had nothing to fear is propagated (as diskcopy, network is shared etc.), consume with surprising rapidity potential user, cause huge economic loss to relevant benefit people, hindering them uses the Internet to expand potential user's possibility, more seriously hit greatly the creation enthusiasm of author.
Meanwhile, the network user that appears as of P2P (Peer to Peer) network technology provides all kinds of digital contents approach faster that obtains, and also has great convenience for the user to share with other people the digital content of oneself simultaneously.Therefore the monitoring that realizes the copyright resource of P2P network seems particularly important.
In current P2P network, with third generation DHT (Distributed Hash Table, distributed hashtable, a kind of distributed storage method) technology is main flow, live/program request that it is successfully applied to file-sharing, audio frequency and video, in the various fields such as instant messaging, distributed storage, grid computing, cloud storage.Adopt the procotol of DHT technology to mainly contain Chord, CAN, Pastry, KAD etc.Wherein with KAD agreement, the application in file-sharing field is the most successful, at present concurrent user exceeded millions of, the popular file-sharing clients such as eMule/aMule, BitComet, uTorrent, Azureus, MainLine all used KAD agreement realize resource issue, search and positioning function.
At present, the detection technique of P2P network mainly contains two kinds of active monitoring and passive monitorings.P2P network active measurement technology can comprise: (1) copys client tectonic network reptile, become a member of P2P network, then the information of removing to crawl other nodes in network is as the topological property of IP, PORT and network; (2) fairly simple method is the node of P2P network collection to be sent to the conventional networking commands such as ping, hello, find_value, adds up all return informations, records and carries out off-line analysis; (3) help it in P2P network, to survey by third party software, draw the characteristic of its agreement, obtain information and the shared file situation of node.Passive measurement is different from initiatively measures, measured node needs certain quantity, and these measured node will be deployed on the router of backbone network or some crucial outlets of ISP's network, the flow information obtaining is like this just true, what adopt is soft, and the mode of combination of hardware is monitored the flow information of P2P network.Be mainly used to the flow in network, the time length being dynamically connected, the number of nodes being dynamically connected etc. is measured.
What current major part adopted is the imitation client tectonic network reptile in initiatively measuring.In these clients, mostly all use the routing table storage mode of k-bucket (K bucket).Adopt the route storage mode of k-bucket, for independently operation each time (issue, search for), can realize faster searching, checking of routing node.Its primary structure and principle are: first, each client has a node ID (different networks has different length, and electric donkey network is 128bit, and BT network is 160bit), by the distance between XOR (XOR) defined node; Secondly according to the distance of node and local node ID, be stored in routing table.Routing table is a relative straight line, and height is unbalanced tree (as shown in Figure 1) extremely, by the prefix node identical with local node ID leave in 1 bucket in, in each bucket, deposit the individual node of K (5-8), while searching like this, can, by distance, from routing table, find out fast the node of near distance.
Although K-bucket independently shows outstanding efficiency in operation each, but in network information monitoring field, the operation that need to carry out repetition to key message is to reach the object of long-term monitoring, in this case, use the route pattern of K-bucket, search node process and unavoidably seem and repeat a little and cause inefficiency.
Summary of the invention
For the existing above-mentioned technical problem of prior art, the invention provides a kind of for P2P network monitoring the node maitaining method based on one dimension chained list, be applied to monitor network, can improve monitoring efficiency, there is performance advantage fast and accurately.
A node maitaining method for P2P network monitoring based on one dimension chained list, comprises the steps:
(1) in the time that user adds P2P network first, a newly-built chained list long-term fixing online some nodes in P2P network are added in this chained list in this locality, described chained list is for memory node information;
(2) when user carries out resource searching to P2P network, first from chained list, extract K node, started to carry out iterative query by routing table by this K node, until obtain several resource nodes after convergence, K is greater than 1 natural number;
If user carries out resource searching to P2P network first, a described K node is node ID and the nearest K of resource ID in chained list; User is follow-up when P2P network is carried out to resource searching, and a described K node is node ID and nearest K of resource ID in highest priority node in chained list;
In iterative query process, user adds in chained list inquiring the nearer new node of respective distances;
(3) user initiates resource request to each resource node, upgrades the nodal information of resource node in chained list, and according to priority, the node in chained list is arranged according to response results.
Described nodal information comprises priority, response times, the version number of response times, ID (identify label number), IP address, TCP communication port, UDP communication port and client application not.
For the node that newly adds chained list, user by its priority be set to 1 and response times and not response times be all set to 0.
In described step (2), utilize the distance of XOR algorithm computing node ID and resource ID.
Described resource ID is the hash value of file or the hash value of filename keyword.
In described step (2), the detailed process of iterative query is as follows: user initiates inquiry to described K node, for the arbitrary node P in this K node, node P receives after inquiry and from self routing table, to extract node ID and nearest several nodes of resource ID are introduced user to, and user compares several nodes of node P and introduction thereof:
If the distance that node P is corresponding is all nearer to distance corresponding to several nodes of customer presentation than node P, user is using node P as resource node;
If node P is to distance corresponding to arbitrary node of the customer presentation near distance more corresponding than node P, user adds this node in chained list and to this node and initiates inquiry, this node is introduced the node in its routing table to user again according to said method, according to this iterative query until user inquire about less than the nearer node of respective distances.
When user carries out resource searching to P2P network first, if distance corresponding to node P is all nearer to distance corresponding to several nodes of customer presentation than node P, user is set to 2 by the priority of node P.
In described step (3), user initiates resource request to each resource node, if resource node returns to corresponding resource address to user, user in chained list according to its return resource address corresponding this resource node of increase of quantity response times and by its not response times zero clearing; If resource node does not return to corresponding resource address and its priority is greater than 2, user adds 1 by the not response times of this resource node in chained list.
In the time that the response times of arbitrary node in user chain table reaches response lag, the priority of this node is added to 1 and by its response times zero clearing; In the time that the not response times of arbitrary node in user chain table reaches not response lag, the priority of this node is subtracted to 1 and by its not response times zero clearing.
Node in described chained list is according to priority arranged from high to low, and priority is all 1 node by the priority arrangement that adds chained list, adds recently the node row most end of chained list; If when the priority of node changes, moved to new priority troop before.
Preferably, user regularly greets to the node in chained list, for the node that there is no response, it is shifted out from chained list; Can guarantee that the node in chained list is all effective.
The present invention is according to the specific demand of network monitor application, by the monitored resource of inquiry that repeats to reach the object of monitor network, abandon traditional K bucket and use one dimension chained list memory node information, query function by P2P network is monitored network, according to the feedback information of inquiry, the priority of node is set, according to node priority, one dimension chained list is dynamically adjusted, one dimension chained list is arranged with priority height, to reach in the time inquiring about next time, can preferentially inquire about the object of the node of response message, thereby avoid starting from scratch of each inquiry repetition, reduce the iterations of inquiry, greatly reduce query time, improve the efficiency of monitor network.
Brief description of the drawings
Fig. 1 is the routing table tree structure schematic diagram of K-bucket pattern.
Fig. 2 is the steps flow chart schematic diagram of the inventive method.
Fig. 3 is the renewal schematic flow sheet of chained list of the present invention.
Fig. 4 is the pointer structure schematic diagram of chained list of the present invention.
Embodiment
In order more specifically to describe the present invention, below in conjunction with the drawings and the specific embodiments, technical scheme of the present invention is elaborated.
As shown in Figure 2, the present invention is directed to the node maitaining method of P2P network monitoring based on one dimension chained list, comprise the steps:
(1) storage of nodal information; Each node storage priority (priority), resNum (response times), resOutTime (not response times) and node relevant information.The relevant information here comprises the ID of dactylus point, the IP of node, the TCP communication port of node, UDP communication port, the node version information etc. of node.
Priority represents the priority of node in this chained list, and resNum represents the number of times meeting with a response in query script, and the ID of node is one and generates at random the data in order to identification nodes uniqueness by node.
About the ID of node, for recognition node, be the random number of a 128bit.
About the IP of node, the int data that convert normal IP to 32bit, are stored in nodal information.
About the TCP communication port of node, each node can be opened and intercept at a tcp port, waits for the connection of other nodes.Be stored in nodal information in short mode.
About the UDP communication port of node, each node carries out the mutual of information by udp protocol and all the other nodes.Be stored in nodal information in short mode.
About the version information of node, the development of electric donkey is accompanied by the development of agreement, and in different versions, agreement has a little difference, therefore needs to confirm the version of node, could resolve with correct agreement.Be stored in nodal information with unsigned char.
(2), when supervisory control system starts, download nodes.dat from http://upd.emule-security.org/nodes.dat.Resolve nodes.dat file, obtain the node ID, IP, the Port that in file, store, they are added to chained list, and its priority is set to minimumly, resNum is set to 0, resOutTime and is set to 0.
In concrete enforcement, priority is divided into 5 kinds of ranks, and 1-priority is minimum, the priority that 2-is general, 3-high medium priority, the priority that 4-is higher, 5-limit priority.The minimum priority of referring to is here set to 1.
(3) by handshake operation, whether successful according to shaking hands, determine whether node is shifted out to chained list.
Add at any time because the node in P2P network has the characteristic of leaving at random, therefore there is validity in order to ensure the node of storing in local chained list, need timing to shake hands to node, and the node of the failure of shaking hands is shifted out to chained list.In present embodiment, timing is 2 hours.
(4) for inquiry ID inquiry.Inquiry ID herein has two kinds of situations.A kind of situation, is directly to inquire about ID by the hash value conduct of file, can inquire about ID by this and inquire about the distribution of this file in P2P network.Another kind of situation is that hash by keyword is as inquiry ID, the information (filename, file size, file type) that is mainly used in inquiring about file relevant to this keyword in P2P network.
Inquiry is divided into two processes.The first step is first searched the K nearest with inquiring about an ID node in chained list, then inquires to these nodes check whether there be the node nearer with this inquiry ID.If exist, the nearer node returning carried out the operation of the first step, iterative query; If there is not nearer node, we think this node be this time inquiry compared with happy festival time point, enter second step, to the concrete condition of its inquiry resource.In present embodiment, K is made as 8.
About nearer, refer to for the node ID being asked and inquire about the distance of ID and be queried the node ID in node route list and inquire about the comparison of the distance of ID, if the latter is less, be called nearer.
About the calculating of distance, P2P network is to weigh two distances between ID value by XOR.
About iterative query process.According to the feature of P2P network route query, the convergence rate that can ensure whole query script is O (logN), and N is the quantity of the whole nodes of network here.Be that whole process can infinitely not searched.
(5) as shown in Figure 3, according to the data of query script feedback, upgrade priority and resNum, resOutTime, concrete operations are as follows:
We initially add the priority of the node of chained list to be set to 1, resNum to be set to 0, resOutTime and to be set to 0.In the iterative process of the first step, the priority that cannot find the node (be this inquiry compared with happy festival time point) of nearlyer nodal information is set to 2, represents that they have the rank of relative priority.Doing is like this because repeat inquiry next time, has very large probability again to inquire these nodes.
Execution second step operation, when not returning to the information of inquiry, if the priority>2 of this node, by its resOutTime+1, in the time that resOutTime exceedes RES_OUT_TIME, by its priority-1, by resOutTime zero setting, and adjust chained list.In practical application, RES_OUT_TIME is set to 5.
When having the information of the inquiry returned, resOutTime is set to 0, and determine that according to the Query Result number returning the numerical value that resNum increases (when concrete operations, when number of results is 0-3, adds 1; 3-10, adds 2; >10, adds 3).In the time that resNum is accumulated to RES_NUM, priority+1, and by resNum zero setting, and adjust chained list.In practical application, RES_NUM is set to 50.
(6) in the time again the inquiry ID having inquired about being carried out to query manipulation, no longer travel through whole chained list, but directly carry out searching of nearest node in the part of limit priority.Concrete operations are as follows:
The limit priority of supposing the node of current chained list is a1, if node number is greater than MK, directly from these nodes, searches the node nearest with inquiring about ID, then repeating step (4) (5); Otherwise the node of associating time priority a1-1, even a1-2, makes node number be greater than MK, searches the node nearest with inquiring about ID from these nodes, then repeating step (4) (5).In present embodiment, MK is made as 20.
Priority is higher, reflection be the resource that is queried of the existence of node and its exist with network in stability.Therefore so do, can reduce the iterations in step (4), can converge to faster the resource node that need to search.
For the adjustment of chained list, we adopt the start node of the priority of 5 ranks in 5 extra pointer record chained lists, as shown in Figure 4.In the time having the priority of node to change in chained list, directly node is shifted out from chained list, be then directly inserted on the record pointer of corresponding level.Do like this, the cost that makes chained list adjustment is O (1).
For network information monitoring application, present embodiment is with respect to the route storage organization of K-bucket before, and it independently operates at single in (issue, search for), does not embody its advantage, even can say not as K-bucket structure; But several times repeat operation in, its fast and accurately performance advantage will be not fully exerted.

Claims (10)

1. the node maitaining method based on one dimension chained list for P2P network monitoring, comprises the steps:
(1) in the time that user adds P2P network first, a newly-built chained list long-term fixing online some nodes in P2P network are added in this chained list in this locality, described chained list is for memory node information;
(2) when user carries out resource searching to P2P network, first from chained list, extract K node, started to carry out iterative query by routing table by this K node, until obtain several resource nodes after convergence, K is greater than 1 natural number;
If user carries out resource searching to P2P network first, a described K node is node ID and the nearest K of resource ID in chained list; User is follow-up when P2P network is carried out to resource searching, and a described K node is node ID and nearest K of resource ID in highest priority node in chained list;
In iterative query process, user adds in chained list inquiring the nearer new node of respective distances;
(3) user initiates resource request to each resource node, upgrades the nodal information of resource node in chained list, and according to priority, the node in chained list is arranged according to response results.
2. node maitaining method according to claim 1, is characterized in that: described nodal information comprises priority, response times, the version number of response times, ID, IP address, TCP communication port, UDP communication port and client application not; For the node that newly adds chained list, user by its priority be set to 1 and response times and not response times be all set to 0.
3. node maitaining method according to claim 1, is characterized in that: the distance of utilizing XOR algorithm computing node ID and resource ID in described step (2).
4. node maitaining method according to claim 1, is characterized in that: the hash value of the hash value that described resource ID is file or filename keyword.
5. node maitaining method according to claim 1, it is characterized in that: in described step (2), the detailed process of iterative query is as follows: user initiates inquiry to described K node, for the arbitrary node P in this K node, node P receives after inquiry and from self routing table, to extract node ID and nearest several nodes of resource ID are introduced user to, and user compares several nodes of node P and introduction thereof:
If the distance that node P is corresponding is all nearer to distance corresponding to several nodes of customer presentation than node P, user is using node P as resource node;
If node P is to distance corresponding to arbitrary node of the customer presentation near distance more corresponding than node P, user adds this node in chained list and to this node and initiates inquiry, this node is introduced the node in its routing table to user again according to said method, according to this iterative query until user inquire about less than the nearer node of respective distances.
6. node maitaining method according to claim 5, it is characterized in that: when user carries out resource searching to P2P network first, if the distance that node P is corresponding is all nearer to distance corresponding to several nodes of customer presentation than node P, user is set to 2 by the priority of node P.
7. node maitaining method according to claim 2, it is characterized in that: in described step (3), user initiates resource request to each resource node, if resource node returns to corresponding resource address to user, user in chained list according to its return resource address corresponding this resource node of increase of quantity response times and by its not response times zero clearing; If resource node does not return to corresponding resource address and its priority is greater than 2, user adds 1 by the not response times of this resource node in chained list.
8. node maitaining method according to claim 7, is characterized in that: in the time that the response times of arbitrary node in user chain table reaches response lag, the priority of this node is added to 1 and by its response times zero clearing; In the time that the not response times of arbitrary node in user chain table reaches not response lag, the priority of this node is subtracted to 1 and by its not response times zero clearing.
9. node maitaining method according to claim 1, is characterized in that: the node in described chained list is according to priority arranged from high to low, and priority is all 1 node by the priority arrangement that adds chained list, adds recently the node row most end of chained list; If when the priority of node changes, moved to new priority troop before.
10. node maitaining method according to claim 1, is characterized in that: user regularly greets to the node in chained list, for the node that there is no response, it is shifted out from chained list.
CN201410423858.9A 2014-08-26 2014-08-26 A kind of node maitaining method that one-dimensional chained list is based on for P2P network monitorings Active CN104168147B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410423858.9A CN104168147B (en) 2014-08-26 2014-08-26 A kind of node maitaining method that one-dimensional chained list is based on for P2P network monitorings

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410423858.9A CN104168147B (en) 2014-08-26 2014-08-26 A kind of node maitaining method that one-dimensional chained list is based on for P2P network monitorings

Publications (2)

Publication Number Publication Date
CN104168147A true CN104168147A (en) 2014-11-26
CN104168147B CN104168147B (en) 2017-07-04

Family

ID=51911794

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410423858.9A Active CN104168147B (en) 2014-08-26 2014-08-26 A kind of node maitaining method that one-dimensional chained list is based on for P2P network monitorings

Country Status (1)

Country Link
CN (1) CN104168147B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110601890A (en) * 2019-09-17 2019-12-20 深圳市网心科技有限公司 Network performance analysis method, device, equipment and readable storage medium
CN113179336A (en) * 2021-06-30 2021-07-27 正链科技(深圳)有限公司 Distributed peer-to-peer network system facing hundred million-magnitude large-scale cluster

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101064649A (en) * 2007-02-02 2007-10-31 华为技术有限公司 Method, apparatus and system for selecting super node, searching network node or resource
US20090006607A1 (en) * 2007-06-28 2009-01-01 Tian Bu Scalable methods for detecting significant traffic patterns in a data network
CN101442479A (en) * 2007-11-22 2009-05-27 华为技术有限公司 Method, equipment and system for updating route in P2P peer-to-peer after node failure

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101064649A (en) * 2007-02-02 2007-10-31 华为技术有限公司 Method, apparatus and system for selecting super node, searching network node or resource
US20090006607A1 (en) * 2007-06-28 2009-01-01 Tian Bu Scalable methods for detecting significant traffic patterns in a data network
CN101442479A (en) * 2007-11-22 2009-05-27 华为技术有限公司 Method, equipment and system for updating route in P2P peer-to-peer after node failure

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
马慧 等: "基于资源路由表的P2P资源查找机制研究", 《微电子学与计算机》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110601890A (en) * 2019-09-17 2019-12-20 深圳市网心科技有限公司 Network performance analysis method, device, equipment and readable storage medium
CN110601890B (en) * 2019-09-17 2023-03-31 深圳市网心科技有限公司 Network performance analysis method, device, equipment and readable storage medium
CN113179336A (en) * 2021-06-30 2021-07-27 正链科技(深圳)有限公司 Distributed peer-to-peer network system facing hundred million-magnitude large-scale cluster

Also Published As

Publication number Publication date
CN104168147B (en) 2017-07-04

Similar Documents

Publication Publication Date Title
CN110866046B (en) Extensible distributed query method and device
CN103024085A (en) System and method for processing P2P (peer-to-peer) node request
CN111046065B (en) Extensible high-performance distributed query processing method and device
CN102891872B (en) The method and system of data storage and query in a kind of peer-to-peer network
Abe et al. Mitigating bitcoin node storage size by DHT
CN100473007C (en) Content exchange network
CN110956463B (en) Credible certificate storing method and system based on extensible distributed query system
CN104168147A (en) Node maintenance method for P2P network monitoring based on one-dimensional chain tables
Czirkos et al. Solution for the broadcasting in the Kademlia peer-to-peer overlay
Medrano-Chávez et al. A performance comparison of Chord and Kademlia DHTs in high churn scenarios
CN103533048A (en) Hot seed file acquisition method in BT (BitTorrent) network
Karolewicz et al. On efficient data storage service for IoT
Huang et al. PChord: a distributed hash table for P2P network
CN103685367A (en) Offline download system and offline download method
Zhang et al. A new algorithm of service discovery based on DHT for mobile application
Talia et al. Enabling dynamic querying over distributed hash tables
CN115208767B (en) Ethernet network detection method, device, equipment and medium based on simulation technology
CN103354554A (en) File resource information collection method for eMule network
Murugan et al. A survey of resource discovery approaches in distributed computing environment
Luo et al. A symmetric lookup-based secure P2P routing algorithm
Ma et al. Distribution aware collaborative spread replication for rare objects in unstructured peer-to-peer networks
Liu et al. Double‐layer P2P networks supporting semantic search and keeping scalability
Chen et al. Cost‐Effective Location Management for Mobile Agents on the Internet
Dahbi et al. A hierarchical architecture for distributed EPCglobal discovery services
Wei et al. Research of Chord model based on grouping by property

Legal Events

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