CN101072156A - Method and system for searching seed for P2P system - Google Patents
Method and system for searching seed for P2P system Download PDFInfo
- Publication number
- CN101072156A CN101072156A CN 200610061453 CN200610061453A CN101072156A CN 101072156 A CN101072156 A CN 101072156A CN 200610061453 CN200610061453 CN 200610061453 CN 200610061453 A CN200610061453 A CN 200610061453A CN 101072156 A CN101072156 A CN 101072156A
- Authority
- CN
- China
- Prior art keywords
- client
- node
- unique identification
- array
- information
- 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
Links
Images
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses method and system for looking up seed in P2P system. The method includes steps: building list of online node, indexing online nodes by using unique ID assigned for client end by server, and using user information array (UIA) to save network information of nodes; when looking up information of seed requested by client end, the method looks up list of online node, and selects network information of online client end matched to information of seed request by client end from UIA. When looking up seed, the invention only looks up online cline ends so as to reduce range to look up seed. Moreover, the invention reduces memory consumption of server, and requirement on bandwidth and arithmetic capability.
Description
Technical field
The invention belongs to network communication field, relate in particular in the P2P system, the method and system that seed is selected.
Background technology
At present, the service on the Internet generally adopt client/server (Client/Server, C/S) structure, as shown in Figure 1.Under this pattern, each client is all with the direct communication of server with obtain data.When client terminal quantity is very big, need server to possess very high data-handling capacity, operational capability and the very large network bandwidth, cause the server cost very expensive.
In order to address this problem, occurred a kind of equity (peer to peer, P2P) network configuration, as shown in Figure 2.On the one hand, allow client and server communication and obtain data, on the other hand, also allow between the client direct communication and obtain data.In the P2P system, can serve as role server and provide the client of data to be called seed for other clients.In the prior art, seed information is stored in the memory array of server, server is when searching the seed information of client-requested, from all client-side informations of memory array record, search qualified seed, the seed seek scope is bigger, search efficiency is lower, thereby influences the efficient of whole P2P system.
Summary of the invention
The object of the present invention is to provide the method for searching seed in a kind of P2P system, be intended to solve the server that exists in the prior art when searching the seed information of client-requested, from all client-side informations of memory array record, search qualified seed, the seed seek scope is bigger, search efficiency is lower, thereby influences the problem of the efficient of whole P2P system.
Another object of the present invention is to provide the system of searching seed in a kind of P2P system.
The present invention is achieved in that the method for searching seed in a kind of P2P system, and described method comprises the steps:
Set up online node listing, record the unique identification sign indicating number of online client in the described line node tabulation, described unique identification sign indicating number is the unique identification that server distributes to client;
Preserve the user profile array of client, preserve the network information of the client that signs in to the P2P system in the user profile array, the subscript of the user profile array of the corresponding described client of the unique identification sign indicating number of client, each array element in the user profile array comprises a pointer, points to described line node tabulation;
When receiving that client is obtained the request of seed information, search described line node tabulation, search the array element of user information corresponding array according to the unique identification sign indicating number of online client, select the network information of the online client that the seed information with client-requested is complementary, return to the client of described request seed information.
Described method further comprises:
Initiatively send and publish when request when detecting client off-line or client, with unique identification sign indicating number deletion from the line node tabulation of client.
Described method further comprises:
Receive the data message that client regularly reports, according to the unique identification sign indicating number of client, have access to the array element of described client in the user profile array, the network information that client is reported is updated in the corresponding array element.
Described line node tabulation has a plurality of, and each different line node list records has the unique identification sign indicating number of the online client of identical network information.
Described line node tabulation comprises a bidirectional pointer.
The tabulation of described line node comprises a vernier pointer, and described vernier pointer is pointed to the tabulate node location of last accessed mistake of line node;
When receiving that client is obtained the request of seed information, the current vernier pointer from the tabulation of described line node begins to search backward the information of the seed of client-requested.
Described method further comprises:
Set up the idle node tabulation, the record idle node;
When client is logined, from described idle node tabulation, obtain an idle node, the network information of client is saved in the subscript of the user profile array array element corresponding with the unique identification sign indicating number of this client, with this client of pointed that comprises in the array element, and this client joined the tabulation of described line node;
Initiatively send when publishing system request when detecting client off-line or client, search array element corresponding in the user profile array according to the unique identification sign indicating number of client, with the node motion of the pointed of array element to described idle node tabulation.
The system of searching seed in a kind of P2P system, described system comprises:
The line node database is used to write down the unique identification sign indicating number of online client, and described unique identification sign indicating number is the unique identification that server distributes to client;
User Information Database, be used to preserve the user profile array of client, preserve the network information of the client that signs in to the P2P system in the user profile array, the subscript of the user profile array of the corresponding described client of the unique identification sign indicating number of client, each array element in the user profile array comprises a pointer, points to described line node database; And
Seed information is searched module, be used for when receiving that client is obtained the request of seed information, search the line node database, search the array element of user information corresponding array in the User Information Database according to the unique identification sign indicating number of online client, select the network information of the online client that the seed information with client-requested is complementary, return to the client of described request seed information.
Described system further comprises:
The knot removal module is used for initiatively sending and publishing when request detecting client off-line or client, and the unique identification sign indicating number of client is deleted from the line node database.
Described system further comprises:
The seed information update module, be used to receive the data message that client regularly reports, according to the unique identification sign indicating number of client, in the user profile array, have access to the array element of described client, the network information that client is reported is updated in the corresponding array element.
Described line node database has a plurality of, and each different line node data-base recording has the unique identification sign indicating number of the online client of identical network information.
Described line node database comprises a bidirectional pointer.
Described line node database comprises a vernier pointer, and described vernier pointer is pointed to the tabulate node location of last accessed mistake of line node.
Described system further comprises:
The idle node database is used to write down idle node;
The node distribution module, be used for when client is logined, from the idle node database, obtain an idle node, the network information of client is saved in the subscript of user profile array in the user profile data array element corresponding with the unique identification sign indicating number of this client, with this client of pointed that comprises in the array element, and this client joined the line node database; And
The node recycling module, be used for initiatively sending when publishing system request detecting client off-line or client, search in the User Information Database array element corresponding in the user profile array according to the unique identification sign indicating number of client, with the node motion of the pointed of array element to described idle node database.
The present invention only searches on-line client searching kind of a period of the day from 11 p.m. to 1 a.m, can reduce the seek scope of seed, improves the search efficiency of seed.Simultaneously, can reduce memory consumption, bandwidth and the operational capability requirement of server.
Description of drawings
Fig. 1 is typical C in the prior art/S schematic network structure;
Fig. 2 is the schematic network structure of P2P system in the prior art;
Fig. 3 is the schematic diagram that realization seed provided by the invention is searched;
Fig. 4 is the system construction drawing that realization seed provided by the invention is searched.
Embodiment
In order to make purpose of the present invention, technical scheme and advantage clearer,, the present invention is further elaborated below in conjunction with drawings and Examples.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
In the present invention, server is only searched on-line client when searching the seed information of client-requested, reduce the seek scope of seed, improves the search efficiency of seed.
Fig. 3 shows realization principle of the present invention, and in the present invention, server distributes a UIN (Unique Identification Number, unique identification sign indicating number) for each client.UIN is unique, the subscript of corresponding user information array.Preserve Internet protocol (Internet Protocol, IP) network informations such as address, the network bandwidth, fire compartment wall type and location distribution of each client that signs in to the P2P system in the user profile array.The subscript of user profile array is used for identifying the index of each array element in the array.
Each client is counted as a node.In the present invention, preserve the UIN of online client by setting up online node listing.The array element of each user profile array comprises a pointer, this pointed line node tabulation.In communication process, client regularly reports owned data message to server, for example the burst of data numbering, speed of download etc.Server has access to the array element of this client according to the UIN of client in the user profile array, the up-to-date information that client is reported is updated in the corresponding array element.
Initiatively send and publish when request when detecting client off-line or client, server is with client deletion from the line node tabulation.
When server receives client when obtaining the request of seed information, at first search the line node tabulation, UIN according to online client in the line node tabulation searches the user profile array then, obtain the array element corresponding with UIN, the information such as IP address, fire compartment wall type and bandwidth of the seed that will be complementary with information such as the fire compartment wall type of the seed of client-requested, institute's downloaded files, location distribution return to client, by communicating and data interaction between client and these seeds.
From the above, the present invention is when searching the seed information of client-requested, the information that server can only be searched line node by line node tabulation, thereby avoid the information of all nodes in the user profile array is searched, reduce the seek scope of seed greatly, improve the search efficiency of seed.
As a preferred embodiment of the present invention, in order further to improve the search efficiency of seed, the present invention tabulates to line node according to the network information of client and segments, the client that will have identical network information, the UIN that for example mutual same file, network type be identical, be in the client of identical fire compartment wall type etc. is saved in the same line node tabulation.When the whois lookup kind period of the day from 11 p.m. to 1 a.m, just can arrive the information of obtaining seed in the corresponding online node listing, further dwindle the seek scope of seed, and then further improve the search efficiency of seed.
As one embodiment of the present of invention, line node tabulation comprises a bidirectional pointer, between the node by pointer can realize forward, backward flexible visit.By bidirectional pointer, can increase the flexibility of node visit, further improve the search efficiency of seed.
In another embodiment of the present invention, searched as seed repeatedly for fear of the part client, cause the communications burden of this client to strengthen, also comprise a vernier pointer in the line node tabulation, point to the tabulate node location of last accessed mistake of line node.When server receives client when obtaining the request of seed information, current vernier pointer from the line node tabulation begins to search backward, thereby it is selected as seed to make that online client has equal opportunity, avoid seed to concentrate on the part client, alleviate the communications burden of client.
In order to improve the recovery and the distribution capability of node, in one embodiment of the invention, idle node tabulation of server maintenance, this in store a large amount of idle node of tabulating does not have available information in the idle node.When client was logined, server obtained earlier an idle node from free list.Server is with the network information of client, and for example the network informations such as client ip address, protecting wall type, client bandwidth and location distribution are saved in the user profile array and are designated as in the array element of this client UIN down.This client of pointed that comprises in the array element with the following UIN of being designated as in the user profile array then, and this client joined line node tabulation.
Initiatively send when publishing system request when detecting client off-line or client, server finds array element corresponding in the user profile array according to the UIN of client, then with the node motion of the pointed of array element in the idle node tabulation, finish the process that client is published system.
Fig. 4 shows the structure of the system that realization seed provided by the invention searches, User Information Database 401 is preserved the user profile array of client, preserve the network informations such as IP address, the network bandwidth, fire compartment wall type and location distribution of each client that signs in to the P2P system in the user profile array, the subscript of user profile array is used for identifying the index of each array element in the array.
The array element of each user profile array comprises a pointer, this pointed line node database 402.Each client is counted as a node, preserves the UIN of node in the line node database 402.Initiatively send when publishing request to server when detecting client off-line or client, knot removal module 403 is deleted the UIN of client from line node database 402.
In the communication process, client regularly reports owned data message to server, for example the burst of data numbering.Seed information update module 404 has access to the array element of this client according to the UIN of client in the user profile array of User Information Database 401, the up-to-date information of reporting of user is updated in this array element.
When receiving client when obtaining the request of seed information, seed is searched module 405 and is at first searched line node database 402, UIN according to line node in the line node database 402 searches User Information Database 401 then, obtain the array element corresponding with UIN, the information such as IP address, fire compartment wall type and bandwidth of the seed that will be complementary with information such as the fire compartment wall type of the seed of client-requested, institute's downloaded files, location distribution return to client.
As a preferred embodiment of the present invention, comprise a plurality of line node databases in the system, each line node database is used for preserving the UIN of the client with identical network information, and client, the network type of for example mutual same file be identical, be in the client of identical fire compartment wall type etc.
As one embodiment of the present of invention, line node database 402 has a bidirectional pointer, between the node by pointer forward, backward flexibly the visit.
Simultaneously, line node database 402 also has a vernier pointer, the node location of Direction Line node database 402 last accessed mistakes.When server receives client when obtaining the request of seed information, seed is searched module 405 and is begun to search backward from the current vernier pointer of line node database 402, thereby it is selected as seed to make that online client has equal opportunity, avoid seed to concentrate on the part client, alleviate the communications burden of client.
In another embodiment of the present invention, system further comprises idle node database 406, preserves idle node, does not have available information in the idle node.
When the client login system, node distribution module 407 is obtained earlier an idle node from idle node database 406.Node distribution module 407 is with the network information of client, for example client ip address, protecting wall type, client bandwidth and location distribution etc. are saved in the User Information Database 401, with this client of pointed of the array element among subscript in the user profile array and the client UIN, and this client joined in the line node database 402.
Initiatively send when publishing system request when detecting client off-line or client to server, node recycling module 408 is searched the array element of user profile array correspondence in the User Information Database 401 according to the UIN of client, then with the node motion of pointed in the array element to idle node database 406, finish the process that client is published system.
The above only is preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of being done within the spirit and principles in the present invention, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.
Claims (14)
1, the method for searching seed in a kind of P2P system is characterized in that described method comprises the steps:
Set up online node listing, record the unique identification sign indicating number of online client in the described line node tabulation, described unique identification sign indicating number is the unique identification that server distributes to client;
Preserve the user profile array of client, preserve the network information of the client that signs in to the P2P system in the user profile array, the subscript of the user profile array of the corresponding described client of the unique identification sign indicating number of client, each array element in the user profile array comprises a pointer, points to described line node tabulation;
When receiving that client is obtained the request of seed information, search described line node tabulation, search the array element of user information corresponding array according to the unique identification sign indicating number of online client, select the network information of the online client that the seed information with client-requested is complementary, return to the client of described request seed information.
2, the method for claim 1 is characterized in that, described method further comprises:
Initiatively send and publish when request when detecting client off-line or client, with unique identification sign indicating number deletion from the line node tabulation of client.
3, the method for claim 1 is characterized in that, described method further comprises:
Receive the data message that client regularly reports, according to the unique identification sign indicating number of client, have access to the array element of described client in the user profile array, the network information that client is reported is updated in the corresponding array element.
4, the method for claim 1 is characterized in that, described line node tabulation has a plurality of, and each different line node list records has the unique identification sign indicating number of the online client of identical network information.
As claim 1 or 4 described methods, it is characterized in that 5, described line node tabulation comprises a bidirectional pointer.
As claim 1 or 4 described methods, it is characterized in that 6, the tabulation of described line node comprises a vernier pointer, described vernier pointer is pointed to the tabulate node location of last accessed mistake of line node;
When receiving that client is obtained the request of seed information, the current vernier pointer from the tabulation of described line node begins to search backward the information of the seed of client-requested.
7, the method for claim 1 is characterized in that, described method further comprises:
Set up the idle node tabulation, the record idle node;
When client is logined, from described idle node tabulation, obtain an idle node, the network information of client is saved in the subscript of the user profile array array element corresponding with the unique identification sign indicating number of this client, with this client of pointed that comprises in the array element, and this client joined the tabulation of described line node;
Initiatively send when publishing system request when detecting client off-line or client, search array element corresponding in the user profile array according to the unique identification sign indicating number of client, with the node motion of the pointed of array element to described idle node tabulation.
8, the system of searching seed in a kind of P2P system is characterized in that described system comprises:
The line node database is used to write down the unique identification sign indicating number of online client, and described unique identification sign indicating number is the unique identification that server distributes to client;
User Information Database, be used to preserve the user profile array of client, preserve the network information of the client that signs in to the P2P system in the user profile array, the subscript of the user profile array of the corresponding described client of the unique identification sign indicating number of client, each array element in the user profile array comprises a pointer, points to described line node database; And
Seed information is searched module, be used for when receiving that client is obtained the request of seed information, search the line node database, search the array element of user information corresponding array in the User Information Database according to the unique identification sign indicating number of online client, select the network information of the online client that the seed information with client-requested is complementary, return to the client of described request seed information.
9, system as claimed in claim 8 is characterized in that, described system further comprises:
The knot removal module is used for initiatively sending and publishing when request detecting client off-line or client, and the unique identification sign indicating number of client is deleted from the line node database.
10, system as claimed in claim 8 is characterized in that, described system further comprises:
The seed information update module, be used to receive the data message that client regularly reports, according to the unique identification sign indicating number of client, in the user profile array, have access to the array element of described client, the network information that client is reported is updated in the corresponding array element.
11, system as claimed in claim 8 is characterized in that, described line node database has a plurality of, and each different line node data-base recording has the unique identification sign indicating number of the online client of identical network information.
As claim 8 or 11 described systems, it is characterized in that 12, described line node database comprises a bidirectional pointer.
As claim 8 or 11 described systems, it is characterized in that 13, described line node database comprises a vernier pointer, described vernier pointer is pointed to the tabulate node location of last accessed mistake of line node.
14, system as claimed in claim 8 is characterized in that, described system further comprises:
The idle node database is used to write down idle node;
The node distribution module, be used for when client is logined, from the idle node database, obtain an idle node, the network information of client is saved in the subscript of user profile array in the user profile data array element corresponding with the unique identification sign indicating number of this client, with this client of pointed that comprises in the array element, and this client joined the line node database; And
The node recycling module, be used for initiatively sending when publishing system request detecting client off-line or client, search in the User Information Database array element corresponding in the user profile array according to the unique identification sign indicating number of client, with the node motion of the pointed of array element to described idle node database.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2006100614530A CN100473041C (en) | 2006-06-28 | 2006-06-28 | Method and system for searching seed for P2P system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2006100614530A CN100473041C (en) | 2006-06-28 | 2006-06-28 | Method and system for searching seed for P2P system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101072156A true CN101072156A (en) | 2007-11-14 |
CN100473041C CN100473041C (en) | 2009-03-25 |
Family
ID=38899154
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB2006100614530A Active CN100473041C (en) | 2006-06-28 | 2006-06-28 | Method and system for searching seed for P2P system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100473041C (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2009086763A1 (en) * | 2007-12-27 | 2009-07-16 | Huawei Technologies Co., Ltd. | Method, system and device for switching source |
WO2009092240A1 (en) * | 2007-12-29 | 2009-07-30 | Shenzhen Huawei Communication Technologies Co., Ltd. | A communication device and application method, system thereof |
CN101577626B (en) * | 2009-06-05 | 2011-04-13 | 西北工业大学 | Method for monitoring initiative specific information dissemination based on eMule |
CN101686206B (en) * | 2008-09-24 | 2011-11-30 | 宏碁股份有限公司 | Data integration method and system of crossing server |
CN106878826A (en) * | 2017-03-30 | 2017-06-20 | 河北上元工控技术有限公司 | The method of one species P2P real-time videos forwarding |
-
2006
- 2006-06-28 CN CNB2006100614530A patent/CN100473041C/en active Active
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2009086763A1 (en) * | 2007-12-27 | 2009-07-16 | Huawei Technologies Co., Ltd. | Method, system and device for switching source |
CN101471838B (en) * | 2007-12-27 | 2012-06-27 | 华为技术有限公司 | Method, system and equipment for switching source |
WO2009092240A1 (en) * | 2007-12-29 | 2009-07-30 | Shenzhen Huawei Communication Technologies Co., Ltd. | A communication device and application method, system thereof |
CN101686206B (en) * | 2008-09-24 | 2011-11-30 | 宏碁股份有限公司 | Data integration method and system of crossing server |
CN101577626B (en) * | 2009-06-05 | 2011-04-13 | 西北工业大学 | Method for monitoring initiative specific information dissemination based on eMule |
CN106878826A (en) * | 2017-03-30 | 2017-06-20 | 河北上元工控技术有限公司 | The method of one species P2P real-time videos forwarding |
Also Published As
Publication number | Publication date |
---|---|
CN100473041C (en) | 2009-03-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103714134B (en) | Network flow data index method and system | |
CN105740337B (en) | A kind of event fast matching method in distribution subscription system based on content | |
US6751627B2 (en) | Method and apparatus to facilitate accessing data in network management protocol tables | |
CN101090371B (en) | Method and system for user information management in at-once communication system | |
US20080195597A1 (en) | Searching in peer-to-peer networks | |
CN104115472A (en) | A method for scalable routing in content-oriented networks | |
US6363375B1 (en) | Classification tree based information retrieval scheme | |
CN103150394A (en) | Distributed file system metadata management method facing to high-performance calculation | |
CN105608188A (en) | Data processing method and data processing device | |
CN101236569B (en) | Highly effective dynamic path analysis method based on ContextFS | |
CN102971732A (en) | System architecture for integrated hierarchical query processing for key/value stores | |
CN100473041C (en) | Method and system for searching seed for P2P system | |
CN102868936B (en) | Method and system for storing video logs | |
CN103544261A (en) | Method and device for managing global indexes of mass structured log data | |
CN101330431B (en) | Method and system for storing instant information | |
CN100414869C (en) | Method and system for implementing message subscription through Internet | |
CN105930345A (en) | Hierarchical indexing method based on distributed real-time database system (DRTDBS) | |
CN103326925B (en) | A kind of information push method and device | |
CN103902705B (en) | Metadata-based cross-mechanism cloud digital content integration system and metadata-based cross-mechanism cloud digital content integration method | |
US20080097971A1 (en) | Peer-to-peer based secondary key search method and system for cluster database | |
CN111178965B (en) | Resource release method and server | |
CN105159925A (en) | Database cluster data distribution method and system | |
CN103248636A (en) | Offline download system and method | |
CN102737061A (en) | Distributed ticket query management system and method | |
US10025859B2 (en) | Method and system for second-degree friend query |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |