Background technology
Along with Internet fast development, peer-to-peer network (Peer-to-Peer is called for short P2P) becomes gradually in the Internet and one of uses the most widely.P2P has fundamentally changed the role and the status of the subscriber's main station that is positioned at network edge, has further excavated its idling-resource, makes it serve masses.Especially, the BitTorrent file sharing network is with its high efficiency and ease for use, dark audient multi-user's support.And the BitTorrent file sharing network is when offering high-quality service for file propagation, and also the propagation for illegal contents provides opportunity, and huge impact has been brought in fields such as intellectual property, internet management, information security.Effectively file-sharing is propagated control device and can be provided strong guarantee for intellectual property, information security and national security.
The BitTorrent file sharing network is a rather complicated network, generally is made up of jointly seed website, Tracker server, distributed hashtable network (Distributed Hash Tables is called for short DHT) and shared node.And wherein seed website, Tracker server belong to the legacy network service, its One's name is legion, widely distributed, and simple directly control and management method can't effectively be implemented, and management cost is high.The DHT network is then more dynamic and flexible, and it is frequent to roll off the production line on the node, and the immature and effect of control and management method also is difficult to guarantee.Therefore, want to make that shared file is difficult to effect spread is arranged, will control, make the transmission capacity of sharing node minimize the communication process of its shared node.Therefore, it is in the characteristics of network edge to need to utilize shared node, only has limited connection or bandwidth resources, agreement according to the BitTorrent file sharing network, its connection or bandwidth resources are occupied, and the transmission capacity of node is shared in restriction, thereby reaches the purpose of propagating control.
Domestic research work quantity is very limited, mainly concentrates on the aspects such as improvement, the identification of BitTorrrent protocol traffic and active measurement Research of agreement download performance.University of Electronic Science and Technology's Master's thesis. " BitTorrent safety research " (2006:16-63. literary composition dragon work) analyzed official's client Python source code of Bi tTorrent, and some leaks and control corresponding management method that it is realized proposed, the popular client of now BitTorrent reaches tens of kinds more than, and official version also upgrades.
The external technology that also exists some anti-pirate tissues the shared file of copyright violation to be implemented control and management, for example, J.Liang, R.Kumar, Y.Xi, and K.W.Ross is at IEEE INFOCOM, Miami, FL, USA, 2005.IEEE, " the Pollution in P2P File Sharing Systems " that delivers on the 2005:1174-1185, and existing researcher has carried out extensive studies to how controlling the BitTorrent file sharing network.People such as Prithula Dhungel have set forth various controlling party ratio juris, and the method for kind of child node being attacked in the starting stage of file-sharing proposed, referring to Prithula Dhungel, Xiaojun Hei, Di Wu and Keith W.Ross. is at Polytechnic Institute of NYU Papers, " the The Seed Attack:Can BitTorrent be Nipped in the Bud that delivers on 2007? " and Prithula Dhungel, Di Wu, Xiaojun Hei, be Brad Schonhorst and KeithW.Ross. at ISIS meeting, " the Is BitTorrent Unstoppable that delivers on the Sep.11 2007? ".
In the control and management method of existing BitTorrent file sharing network, do not provide comprehensive control and management strategy, and in existing research, do not do yet and analyze targetedly and the control and management method at domestic popular client at various control and management methods.
Summary of the invention
In order to solve the problem of the effectively control documents propagation that exists in the existing BitTorrent file sharing network, the present invention propose a kind of in bit stream (BitTorrent) file sharing network the active transmission control method based on resource occupation, comprise the steps: disguise oneself as legal shared node and other shared nodes of keyholed back plate node carried out alternately; Discern the version of the bit stream client of other shared nodes by described keyholed back plate node; Selection corresponding to the control strategy of the client of identification version initiatively to occupy the resource of other shared nodes.
Further, according to active transmission control method of the present invention, the resource that it is characterized in that described other shared nodes is the connection resource of other shared nodes, and selected control strategy is: described keyholed back plate node with other shared node carrying out that Handshake shakes hands and the Bitfield message after, the Bitfield message that the keyholed back plate node sends to other shared nodes is full load, represent that promptly described keyholed back plate node has complete shared file, all respond Choke for any described keyholed back plate node of message that returns by other shared nodes and block the download that message stops normal client, keep connecting and just send Keepalive message at regular intervals simultaneously to normal client.
Further, according to active transmission control method of the present invention, the resource that it is characterized in that described other shared nodes is the bandwidth resources of other shared nodes, and selected control strategy is: the keyholed back plate node sends the Unchoke message and impels other shared nodes to send the piece request message to the keyholed back plate node, then the keyholed back plate node sends a data falsification piece that generates at random to other shared nodes, and then cause finally having burst verification failure when verification is finished in download of this piece, and abandon again and download.
Further, according to active transmission control method of the present invention, it is characterized in that working as the client release of being discerned when being the client of similar BitComet, selected keyholed back plate strategy is: the similar BitComet client of keyholed back plate node is shaken hands alternately, and transmission has the Bitfield message of whole sheets to other shared nodes, impel class BitComet client to send Interested message, and after receiving Interested message, return Unchoke message and make other shared nodes send piece requests, all respond for any piece request, all return the false data piece, just send a Keepalive simultaneously at regular intervals and keep connecting.
Further, according to active transmission control method of the present invention, it is characterized in that working as the client release of being discerned when being the client of similar Bit irit, selected keyholed back plate strategy is: the similar Bit irit client of keyholed back plate node is shaken hands alternately, and transmission has the Bitfield message of whole sheets to other shared nodes, impel the Bit irit client to send Interested message, and after receiving Interested message, return Unchoke message and make the Bit irit client send the piece request, if the piece that this piece request is asked was not asked by it, then send corresponding false data piece, block its download otherwise send Choke message to it.
Method of the present invention can be in BitTorrent file-sharing communication process, disguise oneself as legal shared node and other shared nodes carries out alternately, version to the sharing users client downloaded is discerned, and choose connection or the bandwidth resources that corresponding active control strategies is occupied sharing users, the download or the upload ability of sharing users have been limited, make all nodes that participate in whole shared file downloading process download and become very slow, even can't download.Adopt the file-sharing towards the BitTorrent network of the present invention to propagate control technology, reached such technique effect from the angle of control and management, that is resource or cost that, the communication process of shared file or download time prolong as far as possible, control and management is paid are the least possible.
Embodiment
Below with reference to Fig. 1-5 preferred implementation of the present invention is described.Fig. 1 is the active transmission control system general structure schematic diagram that the present invention is based on resource occupation, and native system totally is divided into three parts, user interface, configuration distributing system and active control-management system.User interface system is responsible for user configured input, mainly comprises the relevant parameter information of seed file and keyholed back plate task thereof.The configuration distributing system then is divided into two-stage, be positioned at the configuration distributing machine and the configuration repeater-transmitter that is positioned at the keyholed back plate front end of central authorities, the configuration distributing machine is responsible for keyholed back plate task configuration distributing that the user is submitted to the configuration repeater-transmitter to various places, and the configuration repeater-transmitter then sends to each keyholed back plate task each active keyholed back plate machine.Initiatively control-management system then is positioned at system foremost, generally form by some active keyholed back plate machines, being responsible for initiatively, the main frame in shared network sends contamination data message or passive visit and the transmission contamination data message of accepting other main frames, its whole system workflow is as follows: the user uploads seed file by the interface, and adds keyholed back plate task relevant information.Interface system will be submitted to background data base after receiving user's data.On the other hand, the configuration distributing machine is surveyed the keyholed back plate task that whether has new interpolation by the mode of database poll, will take out the configuration repeater-transmitter that corresponding configuration sends to various places from database when keyholed back plate task to be sent.The configuration repeater-transmitter is monitored the task of issuing machine from central configuration and is sent request, this keyholed back plate task is forwarded to each initiatively keyholed back plate machine when receiving new task.Initiatively after the keyholed back plate machine reception task, will resolve seed file, carry out the active keyholed back plate according to the configuration of task.The active transmission control method that the present invention is based on resource occupation mainly comprises the active transmission control method that takies based on connection and based on the active transmission control method of bandwidth occupancy, is set forth respectively below.
The active transmission control method that takies based on connection keeps connecting with the normal transmission of sharing client as far as possible, thereby occupy the connection resource of download client, make and share same other normal linking numbers minimizings of downloading node that client has, thereby reach the purpose that delays normally to share client downloads.
Fig. 2 the present invention is based on the interaction diagrams that connect the active transmission control method that takies.In the active transmission control method that takies based on connection, false control client (keyholed back plate node) is such with the normal interaction flow of sharing client (other shared nodes): false client (keyholed back plate node) same normal client (other shared nodes) carrying out that Handshake shakes hands and the Bitfield message after, the Bitfield message that wherein false client sends to normal client is full load, represent that promptly this falseness client has complete file, all respond Choke for any message of returning by normal client and block the download that message stops client, and every interval just kept connecting to its transmission Keepalive message in 30 seconds simultaneously as far as possible.
Usually, in the BitTorrent agreement, the every download of client finishes a slice (size is 256KB usually) and promptly can compare with SHA1 calculating cryptographic Hash and with the cryptographic Hash of counterpiece in the seed file to this sheet, if two values are inequality, client then abandons this 256KB data, newly downloaded this sheet of laying equal stress on.And general client 16KB data in normally some in the request downloading slicing, if it is wrong in a slice the piecemeal of any one 16KB being arranged, full wafer verification meeting failure.
According to above characteristics, active transmission control method based on bandwidth occupancy takies on the basis of control method in connection, do not send Choke message and block normal client, impel normal client to send the piece request message but send the Unchoke message to false client, then false client sends a 16KB data falsification that generates at random and sends to the normal client of sharing, the sheet that finally has this piecemeal must be failed when verification is finished in download in verification, and abandon again and to download, reach like this and occupy the purpose of sharing the client bandwidth, thereby slowed down the speed of user's download.In ideal conditions, comprise a false piecemeal at least if all have in each sheet that user's download is finished, then normal users will can't have been downloaded required file forever.
Because different clients has been carried out some optimizations to the active transmission control method based on resource occupation at present, therefore the active transmission control method based on resource occupation among the present invention has also proposed optimal control method targetedly to the client of main flow, has wherein comprised complete block groundwater pollution control and Choke﹠amp; Unchoke pollution method control method.
Fig. 3 the present invention is based on the interaction diagrams that complete block pollutes, the present invention is that example describes with the BitTorrent client of BitComet (BitComet), yet it should be understood by one skilled in the art that this method can be applied in other clients of similar BitComet client.Usually, the shared communication process of BitComet client has following characteristics: the general piece request that sends same content of a large amount of requests of BitComet, and, download a complete 256KB sheet from same node in order to prevent the attack of malicious node as far as possible.The data that all comprise a falseness in so just make ideal situation download every are difficult to realize.Therefore, characteristics according to the class BitComet, the present invention proposes the complete block groundwater pollution control: its reciprocal process as shown in Figure 3: false client is shaken hands alternately with bit comet client, and transmission has the Bitfield message of whole sheets to normal client, impel the BitComet client to send Interested message, and after receiving Interested message, return Unchoke message and make normal client send the piece request, all respond for any piece request, all return the false data piece, sent a Keepalive in per 30 seconds simultaneously keeps connecting as far as possible, thereby can reach polluting all data slice fully, and then the download or the upload ability of sharing users have been limited, make all nodes that participate in whole shared file downloading process download and become very slow, even can't download.
And in the BitTorrent client of class Bit irit (BitSpirit), if a shared client provides partial data or the most data and the verification failure of certain data block to Bit irit, then Bit irit adds 1 just for this client verification frequency of failure, reach 4 times up to the verification frequency of failure, Bit irit just adds this client in the blacklist, and no longer carries out alternately with this node.At the such client of similar Bit irit, the present invention proposes a Choke﹠amp; Unchoke piece groundwater pollution control.Its reciprocal process is as shown in Figure 4: false client (keyholed back plate node) is shaken hands alternately with the smart client of bit, and transmission has the Bitfield message of whole sheets to normal client, impel the Bit irit client to send Interested message, and after receiving Interested message, return Unchoke message and make the Bit irit client send the piece request, if the piece that this piece request is asked was not asked by it, then send corresponding false data piece, block its download otherwise send Choke message to it.Because the transformation of the full load node of an adjacency from Choke to the Unchoke state will inevitably cause the piece request of any kind of client, so trigger the request action of normal client every 30 seconds timed sending Unchoke message, make it resend the piece request message, new piece request message may still be asked previous data block, so false client still sends Choke message and blocks the Bit irit client, also might ask the data block of looking for novelty, so false client sends corresponding false data piece, thereby make normal client be in the state of continuous transmission piece request all the time or only can download the state of false data, and then the download or the upload ability of sharing users have been limited, make all nodes that participate in whole shared file downloading process download and become very slow, even can't download.
Fig. 5 is the main program flow chart that the present invention is based on the active transmission control method of resource occupation.After initiatively control-management system starts, come from the keyholed back plate configuration of disposing repeater-transmitter in the monitoring of agreement port.After receiving keyholed back plate configuration (comprising seed file and relevant parameter information thereof), at first whether the analysator subfile is legal effective, under its effective prerequisite, seed file and relevant parameter information thereof joined in the local keyholed back plate tabulation.Initiatively control-management system is then resolved seed file itself, obtains Tracker server info wherein, and constructs a large amount of forgery nodes to the Tracker server registration according to the bit stream procotol.Simultaneously, each node of fabricateing starts the connection that port of monitoring is used to receive normal client at this machine.After normal shared client transmission connection request is received by active keyholed back plate main frame, will be by the type of the identification of the handshake information in bit stream agreement normal client, be divided into BitComet type, BitSpirit type and other, according to the corresponding initiatively control and management method of dissimilar customer end adopted, method corresponds to complete block respectively and pollutes method, Choke﹠amp then; Unchoke method and resource occupying method.
For the validity of transmission control method is described, the present invention has chosen a film " Franklin " of propagating in the Internet and has tested as the target control resource, and compared respectively and propagated control enforcement before with afterwards, a normal client is downloaded download and the downloading duration that can finish, and its result is as shown in table 1 below:
Table 1
Film " Franklin " resource size is 475.5MB, and the residing the Internet of client inserts and is Beijing UNICOM, and client is selected Bit irit for use.In order comparatively clearly to hold the scale of shared network,, comprised about 300 normal node in the shared network of target control resource by measuring.Propagating before control implements, the resource that normal client is downloaded 15% size needs consuming time 3 hours 51 minutes 11 seconds.And propagate after the control enforcement, the keyholed back plate interstitial content reaches 850, makes the node of current shared network reach (300+850) about 1150.At this moment, normal client resource of downloading 10% size needs consuming time 37 hours 30 minutes.
For the correlation in transmission control method and operator and geographical position is described, the present invention has chosen an entertainment " Help " of propagating in the Internet and has tested as the target control resource, with four different the Internet access points, compared respectively and propagated control enforcement before with afterwards, a normal client is downloaded download and the downloading duration that can finish.Its result is as shown in table 2 below:
Table 2
Entertainment " Help " resource size is 293.6MB, and the residing the Internet of client inserts and is respectively Beijing UNICOM, Shenzhen education, move in Beijing and Harbin Netcom, and client is selected Bit irit for use.When the access point test of Beijing UNICOM, comprised about 600 normal node in the shared network of target control resource.Propagating before control implements, the resource that normal client is downloaded 100% size needs consuming time 1 hour 17 minutes 20 seconds.And propagate after the control enforcement, the keyholed back plate interstitial content reaches 720, makes the node of current shared network reach (600+720) about 1320.At this moment, normal client resource of downloading 95.3% size needs consuming time 7 hours 20 minutes 53 seconds.When the test of Shenzhen education access point, comprised about 600 normal node in the shared network of target control resource.Propagating before control implements, the resource that normal client is downloaded 42% size needs consuming time 42 minutes and 30 seconds.And propagate after the control enforcement, the keyholed back plate interstitial content reaches 720, makes the node of current shared network reach (600+720) about 1320.At this moment, normal client resource of downloading 99.9% size needs consuming time 3 hours 09 minute 55 seconds.When Beijing mobile access point is tested, comprised about 500 normal node in the shared network of target control resource.Propagating before control implements, the resource that normal client is downloaded 100% size needs consuming time 1 hour 21 minutes 30 seconds.And propagate after the control enforcement, the keyholed back plate interstitial content reaches 1000, makes the node of current shared network reach (500+1000) about 1500.At this moment, normal client resource of downloading 95.2% size needs consuming time 9 hours 11 minutes 41 seconds.When the access point test of Harbin Netcom, comprised about 500 normal node in the shared network of target control resource.Propagating before control implements, the resource that normal client is downloaded 100% size needs consuming time 3 hours 37 minutes.And propagate after the control enforcement, the keyholed back plate interstitial content reaches 1000, makes the node of current shared network reach (500+1000) about 1500.At this moment, normal client resource of downloading 17.3% size needs consuming time 12 hours 20 minutes 14 seconds.
Can see that from the data of above-mentioned table 1 and table 2 the active transmission control method based on resource occupation that proposes among the present invention all realized keyholed back plate effect preferably, than the control and management method that does not adopt the present invention to propose, the present invention can prolong the downloading process of a BitTorrent shared file (calculating by the time) more than 6-10 times.
Method of the present invention has been carried out more optimal control and management strategy to different main flow BitTorrent clients, seems more effective and practical than general purpose control management method.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can be finished by the relevant hardware of program command, aforesaid program can be stored in the computer read/write memory medium, this program is carried out the step that comprises said method embodiment when carrying out; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CD.
Although the present invention has been described with reference to preferred embodiment, the invention is not restricted to the embodiments described, and in view of above-mentioned instruction, those skilled in the art can carry out various modifications and variations to the foregoing description.These modifications and variations also all fall within the claim protection range of the present invention.