Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, embodiment of the present invention is described further in detail below in conjunction with accompanying drawing.
In order to make the P2P flow optimization, can strengthen the P2P user experience again, the embodiment of the invention provides a kind of redirected method that realizes in the P2P network, this method thes contents are as follows: re-positioning device receives the message of carrying the P2P peer node tabulation that P2P peer node resource requirement can be provided that routing device is transmitted; Re-positioning device forms the new P2P peer node that P2P peer node resource requirement can be provided and tabulates according to preset strategy and the tabulation of the P2P peer node that receives; The new P2P peer node tabulation that re-positioning device will form is transmitted to the P2P peer node by routing device.
Further, above-mentioned re-positioning device also is used for the P2P peer node is wished that the resource of obtaining carries out analytic statistics, according to the result of analytic statistics, and the high resource of notice buffer memory equipment cache resources temperature.In addition, this buffer memory equipment is other P2P peer node services as a Peer peer node, has strengthened other P2P users' downloading experience.
For the method that the invention described above embodiment is provided is elaborated, see also following embodiment:
Embodiment 1
The embodiment of the invention provides a kind of method of being redirected of realizing, in P2P Internet resources process of downloading, by the message between monitoring P2P peer node and the P2P server, and revise the message that the P2P server sends to the P2P peer node tabulation that this P2P peer node resource requirement can be provided having of P2P peer node and realize that P2P is redirected, the order that buffer memory equipment receives re-positioning device comes data cached.
Referring to Fig. 2, the system architecture diagram of the embodiment of the invention, re-positioning device is served routing device among Fig. 2, and a re-positioning device can be one or more routing device services; Buffer memory equipment is used for coming buffer memory P2P resource according to the order of re-positioning device, and a plurality of buffer memory equipment can be formed cluster with enhance service capacity; P2P peer node A and P2P peer node B are the P2P peer node under the routing device 1, P2P peer node C is the P2P peer node under routing device 1 not, P2P peer node A and P2P peer node B are under the jurisdiction of network 1, P2P peer node C is under the jurisdiction of network 2, therefore, for P2P peer node A and B, P2P peer node C is an outer net P2P peer node; Wherein, moving one or more P2P application programs on P2P peer node A, P2P peer node B and the P2P peer node C; Wherein, the P2P peer node is to P2P server requests resource and announce the resource that self has.
For convenience of explanation, be example with above-mentioned system architecture diagram shown in Figure 2, the embodiment of the invention provides a kind of redirected method that realizes in the P2P network, and referring to Fig. 3, this method specifically comprises:
301:P2P peer node A sends resource request message by the routing device 1 that it connected to the P2P server, and this resource request message is used to ask to have the P2P peer node tabulation of this resource.
Wherein, P2P peer node A in the network 1 sends resource request message to the P2P server, carry institute's requested resource sign in this resource request message, above-mentioned institute requested resource refers to P2P peer node A and wishes the data downloaded file, for example: text, video, picture etc., it is that example describes that the embodiment of the invention is specially video file X with institute's requested resource.
302: routing device 1 sends to re-positioning device according to the notice of DPI (Deep Packet Inspection, deep message detects) equipment with this resource request message.
Wherein, referring to Fig. 2, DPI equipment links to each other with routing device 1, it is a kind of network equipment that can carry out depth analysis to the message content of transmission over networks, when this DPI equipment finds that by detecting the message that routing device receives is to satisfy based on certain P2P agreement and behind the message that sends between P2P peer node and the P2P server, then notify routing device 1, the message of the type all is redirected to re-positioning device.
Further, the message that can also adopt not detection by DPI equipment to realize that routing device 1 will satisfy the above-mentioned type all is redirected to the purpose of re-positioning device, for example, by NMS user this routing device is carried out network configuration (as the mode such as transmit of configuration routing device), thereby realizing that routing device is redirected the request message of the video file X that receives sends to re-positioning device.
303: re-positioning device carries out analytic statistics to the resource temperature of this video file X, the high video file X of notice buffer memory equipment cache resources temperature after receiving the request message of the video file X that routing device 1 sends.
Wherein, re-positioning device carries out analytic statistics to the resource temperature of this video file X, the number of times that can be requested to download according to video file X, or the weight of this resource is carried out analysis and judgement.Because re-positioning device is being added up the resource temperature always, at the high resource of resource temperature, re-positioning device is just to buffer memory equipment transmitting order to lower levels, and notice buffer memory equipment carries out buffer memory to the high resource of above-mentioned resource temperature, and the resource record that the resource temperature is high is in daily record.Present embodiment is that example describes with the resource temperature height that P2P peer node A wishes to obtain video file X, correspondingly, in the buffer memory equipment 1 shown in Figure 2 buffer memory this video file X.
Re-positioning device is provided with the resource Thermometer, and re-positioning device comes buffer memory to several resources (being that temperature is high resource) notice buffer memory equipment of front in the table.And is asynchronous carrying out owing to carry out the resource hot statistics with notice buffer memory equipment, so can not increase the stand-by period of P2P peer node.
Preferably, in order to improve user's experience, present embodiment treats that with this user the video file X of acquisition request is that the high resource of temperature is that example is said, promptly in the buffer buffer memory this video file X.
304: re-positioning device request routing device 1 sends to the P2P server to the request message of request video file X.
305: routing device 1 sends to the P2P server to the request message of the request video file X that receives.
After the 306:P2P server is received the request message of video file X, reply the message of carrying the P2P peer node tabulation that has this video file X to P2P peer node A by routing device 1.
Still the network architecture schematic diagram that provides with Fig. 2 is that example describes, if the network address of P2P peer node A is that the network address of 69.76.58.39:10000, P2P peer node B is 69.76.58.36:10001 in the network 1, the network address of P2P peer node C is 109.56.37.28:20000 in the network 2, wherein, the network address of buffer memory equipment 1 is 69.76.58.32:20001, preserve P2P peer node resource information in the P2P server, the content of P2P peer node resource information is referring to table 1.
Table 1
P2P peer node title |
The P2P peer node network address |
??A |
??69.76.58.39:10000 |
??B |
??69.76.58.36:10001 |
??C |
??109.56.37.28:20000 |
??...... |
??...... |
As shown in table 1, the P2P server is according to the P2P peer node resource information of preserving, obtain the P2P peer node information that has this video file X, correspondingly, this P2P server returns the message of carrying the P2P peer node tabulation that has this video file X to P2P peer node A, and as shown in table 2: P2P peer node B in the network 1 and the P2P peer node C in the network 2 have the video file X that P2P peer node A is asked.
Table 2
P2P peer node title |
The P2P peer node network address |
??B |
??69.76.58.36:10001 |
??C |
??109.56.37.28:20000 |
As shown in table 2, P2P peer node in the above-mentioned P2P peer node tabulation all has the video file X that P2P peer node A is asked, for P2P peer node A, has plenty of outer net P2P peer node, P2P peer node C for example, has plenty of Intranet P2P peer node, for example P2P peer node B.
307: after routing device 1 receives the message of the P2P peer node tabulation that has this video file X, with the redirected re-positioning device that sends to of this message.
As mentioned before, based on the detection of the DPI equipment that links to each other with this routing device 1, send based on the P2P agreement and between P2P peer node and P2P server because this message satisfies, therefore, above-mentioned message is redirected to re-positioning device.In like manner, also can under the situation of not using DPI equipment,, realize the redirected re-positioning device that sends to of message of the P2P peer node tabulation that has this video file X that routing device will receive by the configuration of user to route equipment.
308: after re-positioning device receives the message of the P2P peer node tabulation that has this video file X, obtain the P2P peer node information that belongs to consolidated network in this P2P peer node tabulation with this P2P peer node A, and obtain the buffer memory facility information of this video file of buffer memory X, the above-mentioned P2P peer node information of obtaining and buffer memory facility information are had the new P2P peer node tabulation of this video file X in conjunction with formation.
Wherein, the new P2P peer node tabulation that above-mentioned re-positioning device forms, as shown in table 3:
Table 3
P2P peer node title |
The P2P peer node network address |
??B |
??69.76.58.36:10001 |
Buffer memory equipment 1 |
??69.76.58.32:20001 |
For convenience of explanation, present embodiment with re-positioning device when the tabulation of P2P peer node that the route device forwards is come is made amendment and is selected, the preset strategy that is adopted is under the jurisdiction of P2P peer node under the consolidated network for selecting in this P2P peer node tabulation with P2P peer node A, correspondingly, each P2P peer node comprises with this P2P peer node A and is under the jurisdiction of each P2P peer node and buffer memory equipment under the consolidated network in the new P2P peer node tabulation that forms of re-positioning device.The embodiment of the invention does not limit the concrete formulation mode and the method for this preset strategy, for example: can also for: from the tabulation of this P2P peer node, be under the jurisdiction of and optimize the approaching P2P peer node in IP address in P2P peer node consolidated network under and form new P2P peer node and tabulate with P2P peer node A, or, the P2P peer node of selecting to be under the jurisdiction of under the same network segment with P2P peer node A from this P2P peer node tabulation forms new P2P peer node tabulation, or the like.
309: re-positioning device sends to routing device 1 with the new P2P peer node tabulation that has this video file X of above-mentioned formation.
310: after routing device 1 was received above-mentioned new P2P peer node tabulation, the P2P peer node tabulation that this is new sent to P2P peer node A.
311:P2P peer node A receives new P2P peer node tabulation, according to the needs of self, to P2P peer node B or buffer memory equipment 1 foradownloaded video file X.
Re-positioning device in the embodiment of the invention realizes that P2P is redirected for the message that has the tabulation of P2P peer node of P2P peer node by revising the P2P server, optimized the P2P flow, re-positioning device does not only need to realize the function of P2P server, and can come analytic statistics resource temperature by the message between monitoring P2P peer node and the P2P server, and according to self analytic statistics, order buffer memory equipment carries out caching resource, buffer memory equipment for other P2P peer node provide download service, has strengthened P2P user's downloading experience as a P2P peer node.
Embodiment 2
The embodiment of the invention provides a kind of redirected method that realizes in the P2P network, present embodiment is an example with the Bittorrent agreement, for convenience of explanation, is example with Organization Chart shown in Figure 2 still, and the method that is redirected is elaborated, and concrete grammar comprises:
401:P2P peer node A is to sending HTTP Get message by routing device 1 to the P2P server, and request has the P2P peer node tabulation of allocated resource.
Wherein, P2P peer node A in the network 1 sends HTTP GET request message to the P2P server, and HTTP GET is that the mode with entity obtains the information by the specified resource of request URI (Uniform Resource Identifier, unified resource identifier), wherein
With a URI be
Http:// www.example.com/announce? info_hash=...? peer_id=...Be example, that in fact this URI will look for is video file X.
402: routing device 1 is according to the notice of DPI equipment, the redirected re-positioning device that sends to of the request message that receives.
Wherein, referring to Fig. 2, DPI equipment links to each other with routing device 1, it is a kind of network equipment that can carry out depth analysis to the message content of transmission over networks, when this DPI equipment is found by detecting: the message that sends between P2P peer node and P2P server is the Bittorrent agreement, DPI notifies routing device 1, and the protocol-dependent message of this P2P all is redirected to re-positioning device.
Also can under the situation of not using DPI equipment,, realize that routing device is with the redirected re-positioning device that sends to of the P2P request message that receives by the configuration of user to route equipment.
403: re-positioning device carries out analytic statistics to the resource temperature of this video file X, the high video file X of notice buffer memory equipment cache resources temperature after receiving the request message of the video file X that routing device 1 sends.
Re-positioning device carries out analytic statistics to the resource temperature of institute's requested resource in this message after receiving the request message of routing device 1 transmission.Wherein, re-positioning device carries out analytic statistics to the resource temperature of this document, can carry out analysis and judgement according to the number of times that file is requested to download.Re-positioning device is being added up the resource temperature always, and at the high resource of resource temperature, re-positioning device is just to buffer memory equipment transmitting order to lower levels, and notice buffer memory equipment carries out buffer memory to the high resource of above-mentioned resource temperature, and the resource record that the resource temperature is high is in daily record.Present embodiment is that example describes with the resource temperature height that P2P peer node A wishes to obtain file, correspondingly, in the buffer memory equipment 1 shown in Figure 2 buffer memory this document.
404: routing device 1 sends to the P2P server to the request message that receives video file X.
After the 405:P2P server is received this request message, reply the HTTP 200 OK message of carrying the P2P peer node tabulation that has video file X to P2P peer node A by routing device 1.
Still the network architecture schematic diagram that provides with Fig. 2 is that example describes, if the network address of P2P peer node A is that the network address of 69.76.58.39:10000, P2P peer node B is 69.76.58.36:10001 in the network 1, the network address of P2P peer node C is 109.56.37.28:20000 in the network 2, wherein, the network address of buffer memory equipment 1 is 69.76.58.32:20001, preserve P2P peer node resource information in the P2P server, referring to table 4, provide the P2P peer node resource information signal of preserving in a kind of P2P server table.
Table 4
P2P peer node title |
The P2P peer node network address |
??A |
??69.76.58.39:10000 |
P2P peer node title |
The P2P peer node network address |
??B |
??69.76.58.36:10001 |
??C |
??109.56.37.28:20000 |
??...... |
??...... |
As shown in table 4, the P2P server is according to the P2P peer node resource information of preserving, obtain the P2P peer node information that has this document, correspondingly, this P2P server returns the message of carrying the P2P peer node tabulation that has this document to P2P peer node A, and as shown in table 5: P2P peer node B in the network 1 and the P2P peer node C in the network 2 have the file that P2P peer node A is asked.
Table 5
P2P peer node title |
The P2P peer node network address |
??B |
??69.76.58.36:10001 |
??C |
??109.56.37.28:20000 |
As shown in table 5, the P2P peer node in the above-mentioned P2P peer node tabulation all has the file of P2P peer node A request, for P2P peer node A, has plenty of outer net P2P peer node, for example P2P peer node C has plenty of Intranet P2P peer node, for example P2P peer node B.
406: after routing device 1 receives the HTTP 200 OK message of carrying the P2P peer node tabulation that has video file X, with the redirected re-positioning device that sends to of this message.
As mentioned before, because the detection of the DPI equipment that links to each other with this routing device 1, routing device 1 can be redirected to re-positioning device with above-mentioned message.In like manner, also can under the situation of not using DPI equipment,, realize the redirected re-positioning device that sends to of message of the P2P peer node tabulation that has this document that routing device will receive by the configuration of user to route equipment.
407: after re-positioning device receives these HTTP 200 OK message of carrying the P2P peer node tabulation that has video file X, obtain the P2P peer node information that belongs to consolidated network in this P2P peer node tabulation with P2P peer node A, and obtain the buffer memory facility information of buffer memory this document, the above-mentioned P2P peer node information of obtaining and buffer memory facility information are had the new P2P peer node tabulation of this document in conjunction with formation.
Wherein, the new P2P peer node tabulation that above-mentioned re-positioning device forms, as shown in table 6:
Table 6
P2P peer node title |
The P2P peer node network address |
??B |
??69.76.58.36:10001 |
Buffer memory equipment 1 |
??69.76.58.32:20001 |
Re-positioning device sends to routing device 1 with the new P2P peer node tabulation that has this document of above-mentioned formation.
408: after routing device 1 was received above-mentioned new P2P peer node tabulation, the P2P peer node tabulation that this is new sent to P2P peer node A.
P2P peer node A receives new P2P peer node tabulation, according to the needs of self, to P2P peer node B or buffer memory equipment 1 file in download.
Re-positioning device in the embodiment of the invention realizes that P2P is redirected for the message that has the tabulation of P2P peer node of P2P peer node by revising the P2P server, re-positioning device does not only need to realize the function of P2P server, and can be by the message statistical analysis resource temperature between monitoring P2P peer node and the P2P server, and according to self statistical analysis, order buffer memory equipment carries out caching resource, buffer memory equipment for other P2P peer node provide download service, has strengthened P2P user's downloading experience as a P2P peer node.
Embodiment 3
Referring to Fig. 5, the embodiment of the invention provides a kind of redirected system that realizes in the P2P network, and this system comprises:
Re-positioning device 501 is used to receive the message of carrying the P2P peer node tabulation that P2P peer node resource requirement can be provided that routing device 502 is transmitted; Also be used for forming new P2P peer node tabulation, and the new P2P peer node that will form is tabulated and is transmitted to the P2P peer node by routing device 502 according to preset strategy and the tabulation of the P2P peer node that receives;
Routing device 502 is used for the forwards of carrying the tabulation of P2P peer node is given re-positioning device 501 and the new P2P peer node tabulation that re-positioning device 501 forms is transmitted to the P2P peer node.
Referring to Fig. 6, the system that above-mentioned realization is redirected also comprises P2P server 503;
Routing device 502 also is used to receive the resource request message that the P2P peer node sends, and resource request message is sent to P2P server 503;
P2P server 503, be used to receive the resource request message that P2P peer node that routing device 502 transmits sends, and according to the resource identification that carries in the resource request message, obtain the P2P peer node information that has resource identification, according to the P2P peer node information of obtaining, form the tabulation of P2P peer node, and the message that will carry the tabulation of P2P peer node sends to routing device 502.
The system that the realization that the invention described above embodiment provides is redirected also comprises:
Deep message detects DPI equipment 504, be used for the message content of transmission over networks is carried out depth analysis, when this DPI equipment is found to satisfy based on the P2P agreement and behind the message that sends between P2P peer node and the P2P server 503 by detecting, deep message detects DPI equipment 504 notice routing devices 502, and the message of the type all is forwarded to re-positioning device 501.
The system that the realization that the invention described above embodiment provides is redirected also comprises buffer memory equipment 505,
Re-positioning device 501 also is used for, and the P2P peer node is wished that the resource of obtaining carries out analytic statistics, according to the result of analytic statistics, and the high resource of notice buffer memory equipment 505 cache resources temperatures;
Buffer memory equipment 505 is used for the analytic statistics result that carries out according to the resource that 501 pairs of P2P peer node of re-positioning device wish to obtain, the resource that the cache resources temperature is high.
The message of carrying the tabulation of P2P peer node that re-positioning device 501 in the embodiment of the invention receives by basis, obtain the P2P peer node information that P2P peer node institute requested resource can be provided that belongs to consolidated network with the P2P peer node, according to belonging to the P2P peer node information of consolidated network with the P2P peer node, form new P2P peer node tabulation, realize that P2P is redirected, re-positioning device 501 does not only need to realize the function of P2P server 503, and can be by the message analysis statistics resource temperature that sends between P2P peer node and the P2P server 503, and according to self statistical analysis, order buffer memory equipment 505 cache resources, simultaneously, buffer memory equipment 505 for other P2P peer node provide download service, has strengthened P2P user's downloading experience as a P2P peer node.
Embodiment 4
Referring to Fig. 7, the embodiment of the invention provides a kind of re-positioning device, and this re-positioning device comprises:
Receiver module 701 is used to receive the message of carrying the P2P peer node tabulation that the required resource of P2P peer node can be provided that routing device is transmitted; Wherein, carry the message of P2P peer node tabulation, send by the P2P server;
Processing module 702 is used for the P2P peer node tabulation that receives according to preset strategy and receiver module 701, generates new P2P peer node and tabulates;
Sending module 703 is used for the new P2P peer node tabulation that processing module 702 generates is forwarded to the P2P peer node by routing device.
Wherein, after processing module 702 specifically is used to receive the message of carrying the tabulation of P2P peer node that routing device sends, according to the P2P peer node network address in the tabulation of P2P peer node, select the adjacent P2P peer node information in the network address with the P2P peer node of request resource, form new P2P peer node tabulation.
Wherein, the embodiment of the invention does not limit the concrete formulation mode and the method for this preset strategy, for example: can also for, optimize the approaching P2P peer node in IP address the P2P peer node under the consolidated network and form new P2P peer node tabulation from being under the jurisdiction of with the P2P peer node, or, the P2P peer node of selecting to be under the jurisdiction of under the consolidated network with the P2P peer node forms new P2P peer node tabulation, or the like.
Referring to Fig. 8, this re-positioning device also comprises:
Analytic statistics module 704 is used for requested resource is carried out analytic statistics;
Logging modle 705 is used for the result according to the analytic statistics of analytic statistics module 704, generates resource log.
Wherein, analytic statistics module 704 also comprises:
Resource hot statistics submodule is used for the resource temperature is added up, and resource hot statistics submodule specifically comprises:
The analytic statistics unit be used for the number of times that is requested to download according to resource, and/or the weight of resource is carried out analytic statistics, draws the resource temperature of this resource, thereby obtains the high resource of temperature;
The notice buffer unit is used for the result according to analytic statistics, the high resource of notice buffer memory equipment cache resources temperature.
The re-positioning device that the embodiment of the invention provides is used to notify the resource request message of routing device with the P2P peer node of receiving sends, and sends to the P2P server; Be used to also to receive that routing device sends carries the message of the P2P peer node tabulation that described P2P peer node institute requested resource can be provided, according to the message and the preset strategy (as obtaining the P2P peer node information that belongs to consolidated network with the P2P peer node) of carrying the tabulation of P2P peer node that receive, form new P2P peer node tabulation, and the new P2P peer node tabulation that will form sends to routing device, the purpose that realization is redirected; Further, the re-positioning device that the embodiment of the invention provides can the execution analysis statistical function, and the high resource of notice buffer memory equipment cache resources temperature, further, optimizes the P2P flow, improves the P2P user experience.
Embodiment 5
Referring to Fig. 9, the embodiment of the invention provides a kind of routing device, and this routing device comprises:
First receiver module 901 is used to receive the message of carrying the P2P peer node tabulation that P2P peer node resource requirement can be provided that the P2P server sends;
First forwarding module 902 is used for giving re-positioning device with the forwards that first receiver module 901 receives;
Second receiver module 903 is used to receive the new P2P peer node tabulation that re-positioning device forms;
Second forwarding module 904 is used for the new P2P peer node tabulation that second receiver module 903 receives is transmitted to the P2P peer node.
Wherein, first forwarding module 902 specifically is used for according to the detection of DPI equipment or user's configuration, and the forwards of carrying the P2P peer node tabulation that P2P peer node institute request resource can be provided that the P2P server that first receiver module 901 is received sends is to re-positioning device.
The routing device of the embodiment of the invention is used to receive the resource request message that the P2P peer node sends, and according to the notice of re-positioning device, the resource request message that the P2P peer node is sent sends to the P2P server; And the message of carrying the tabulation of P2P peer node of reception P2P server transmission.
Embodiment 6
Referring to Figure 10, the embodiment of the invention provides a kind of P2P server, and this P2P server comprises:
Receiver module 1001 is used to receive the resource request message that the P2P peer node sends; Carry the resource identification that the P2P peer node is wished the resource obtained in this resource request message;
Acquisition module 1002 is used for the resource identification that carries according to the resource request message that receives, and obtaining to provide the P2P of resource identification peer node information, and forms the tabulation of P2P peer node according to the P2P peer node information of obtaining;
Sending module 1003 is used to send the message of carrying the tabulation of P2P peer node.
The P2P server that the embodiment of the invention provides is used to receive the resource request message that the P2P peer node sends, and according to the resource identification that carries in the resource request message, form the tabulation of P2P peer node after obtaining the P2P peer node information that has resource identification, and this P2P peer node tabulation is sent.
Embodiment 7
Referring to Figure 11, the embodiment of the invention provides a kind of deep message to detect DPI equipment, and this DPI equipment comprises:
Detection module 1101 is used to judge whether the message that routing device is received is based on P2P agreement and the message for sending between P2P peer node and P2P server;
Notification module 1102 is used for the result that judges when detection module 1101 when being, notifies routing device that message is forwarded to re-positioning device.
The DPI equipment that the embodiment of the invention provides is used for the message content of transmission over networks is carried out depth analysis, when this DPI equipment is found by detecting: satisfy based on the P2P agreement and behind the message that sends between P2P peer node and the P2P server, the notice routing device all is forwarded to re-positioning device with the message of the type.
All or part of content in the technical scheme that above embodiment provides can realize that its software program is stored in the medium that can read by software programming, storage medium for example, the hard disk in the computer, CD or floppy disk.
The above only is preferred embodiment of the present invention, and is in order to restriction the present invention, within the spirit and principles in the present invention not all, any modification of being done, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.