CN102130964A - Method for acquiring bit torrent (BT) seed file and relevant devices - Google Patents

Method for acquiring bit torrent (BT) seed file and relevant devices Download PDF

Info

Publication number
CN102130964A
CN102130964A CN2011100896699A CN201110089669A CN102130964A CN 102130964 A CN102130964 A CN 102130964A CN 2011100896699 A CN2011100896699 A CN 2011100896699A CN 201110089669 A CN201110089669 A CN 201110089669A CN 102130964 A CN102130964 A CN 102130964A
Authority
CN
China
Prior art keywords
packet
seed file
data division
burst
message chain
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
CN2011100896699A
Other languages
Chinese (zh)
Other versions
CN102130964B (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.)
Huawei Digital Technologies Chengdu Co Ltd
Original Assignee
Huawei Symantec Technologies Co Ltd
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 Huawei Symantec Technologies Co Ltd filed Critical Huawei Symantec Technologies Co Ltd
Priority to CN 201110089669 priority Critical patent/CN102130964B/en
Publication of CN102130964A publication Critical patent/CN102130964A/en
Application granted granted Critical
Publication of CN102130964B publication Critical patent/CN102130964B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method for acquiring a bit torrent (BT) seed file and relevant devices, which are used for solving the problem of low reliability of an acquired BT seed file in the prior art, thereby increasing the success rate of the acquisition of shared resources by adopting a BT technology. The method comprises the following steps of: acquiring a data packet transmitted by a network of which the destination address is not a local node address; extracting a data packet carrying the contents of the BT seed file from the data packet transmitted by the network; reconstructing according to the acquired data packet to generate a BT seed file; and storing the BT seed file generated by reconstruction.

Description

Obtain the method and the relevant apparatus of bit-torrent seed file
Technical field
The present invention relates to technical field of the computer network, relate in particular to a kind of method and a kind of device that obtains the bit-torrent seed file that obtains the bit-torrent seed file.
Background technology
In the peer-to-peer network (P2P, peer to peer) between each node (peer) dereliction from branch, any one node both can be used as the server that other nodes in network provide shared resource, can be used as client again from other node downloaded resources.Peer-to-peer network can overcome traditional client/server, and (C/S, the server process that client/server) exists in the network of structure load is bigger, occurs the problem of network bottleneck easily, thereby becomes a kind of extensively universal network configuration that obtains.
In peer-to-peer network, index (Tracker) server is used to store the information list (peer list) of the shared resource that each address of node and this node provide.Each node in the peer-to-peer network can carry out alternately with other nodes according to peerlist, thereby obtains the resource that needs.
(Bit Torrent is that a kind of P2P of dependence mode is shared file and the agreement of transmitting between a large amount of Internet users BT) to bit-torrent, also is a kind of typical implementation of peer-to-peer network.Based on the basic principle of the file-sharing technology of BT as shown in Figure 1:
Phase I, wait that the node that obtains shared resource at first logins BT seed issuing web site (also can be referred to as kind of a child node), the BT seed file of search shared resource correspondence to be obtained on BT seed issuing web site, and download the BT seed file that searches;
Comprise Tracker information and fileinfo two parts in the BT seed file, if need the address of the Tracker server used during wherein Tracker information spinner BT downloads and at the setting of Tracker server; Fileinfo is to generate according to the calculating to shared resource.
Second stage, wait to obtain the node of shared resource and resolve the BT seed file of downloading, obtain the address of Tracker server, and establish a communications link according to the address and the Tracker server that obtain, from the Tracker server, obtain peer list, carry out alternately according to the peer list and other nodes that described shared resource can be provided that obtain then, obtain the shared resource that needs.
In realizing process of the present invention, the inventor finds that there is following problem at least in prior art:
From accompanying drawing 1 as can be seen, obtaining the BT seed file in obtaining the process of shared resource is a committed step, if can't obtain the BT seed file, can't obtain required shared resource.Yet because not good, the frequent change of stability of BT seed issuing web site has at present increased the risk that can't get access to the BT seed file, influence utilizes the BT technology to obtain the reliability of shared resource.
Summary of the invention
The embodiment of the invention provides a kind of method of the BT of obtaining seed file, obtains the low problem of BT seed file reliability in order to solve prior art, thereby improves the success rate that adopts the BT technology to obtain shared resource.
Accordingly, the embodiment of the invention also provides a kind of device of the BT of obtaining seed file.
The technical scheme that the embodiment of the invention provides is as follows:
A kind of method of obtaining bit-torrent BT seed file comprises:
Obtaining destination address is not the packet of the Network Transmission of local node address;
From the packet of described Network Transmission, extract the packet that carries BT seed file content;
Generate the BT seed file according to the packet reorganization of extracting;
The BT seed file that the storage reorganization generates.
A kind of device that obtains the BT seed file comprises:
Packet obtains the unit, is used to obtain the packet that destination address is not the Network Transmission of local node address;
The packet extraction unit is used for extracting the packet that carries BT seed file content from the packet of described Network Transmission;
BT seed file recomposition unit, the packet reorganization that is used for extracting according to the packet extraction unit generates the BT seed file;
Memory cell is used to store the BT seed file that the reorganization of BT seed file recomposition unit generates.
The embodiment of the invention is by filtering the packet that obtains to carry BT seed file content from the packet of Network Transmission, then the packet that obtains is recombinated and generate the BT seed file, expanded the acquiring way of BT seed file, improved the success rate of acquisition BT seed file, used the BT technology to obtain the reliability of shared resource in the peer-to-peer network thereby can improve.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, to do one to the accompanying drawing of required use in embodiment or the description of the Prior Art below introduces simply, apparently, accompanying drawing in describing below is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the principle schematic of existing BT technology;
Fig. 2 is the main realization principle flow chart of the embodiment of the invention;
Fig. 3 is the schematic diagram of the applied network environment of the embodiment of the invention;
The detail flowchart of the scheme of obtaining the BT seed file that Fig. 4 provides for the embodiment of the invention one;
Fig. 5 is the Stored Procedure figure of BT seed file in the embodiment of the invention one;
The detail flowchart of the scheme of obtaining the BT seed file that Fig. 6 provides for the embodiment of the invention two;
Fig. 7 is the Stored Procedure figure of BT seed file in the embodiment of the invention two;
The structural representation of the device that obtains the BT seed file that Fig. 8 provides for the embodiment of the invention;
The structural representation of packet acquiring unit in the device that obtains the BT seed file that Fig. 9 a provides for the embodiment of the invention;
The structural representation of first kind of BT seed file recomposition unit in the device that obtains the BT seed file that Fig. 9 b provides for the embodiment of the invention;
The structural representation of first kind of judgment sub-unit in the device that obtains the BT seed file that Fig. 9 c provides for the embodiment of the invention;
The structural representation of memory cell in the device that obtains the BT seed file that Fig. 9 d provides for the embodiment of the invention;
The structural representation of temporary subelement in the device that obtains the BT seed file that Figure 10 a provides for the embodiment of the invention;
The structural representation of second kind of BT seed file recomposition unit in the device that obtains the BT seed file that Figure 10 b provides for the embodiment of the invention;
The structural representation of second kind of judgment sub-unit in the device that obtains the BT seed file that Figure 10 c provides for the embodiment of the invention;
The structural representation of second kind of memory cell in the device that obtains the BT seed file that Figure 10 d provides for the embodiment of the invention.
Embodiment
Because the mode that existing BT technology is obtained the BT seed file depends on the stability of indivedual websites such as BT seed issuing web site, reliability is not high, and the source of BT seed file is comparatively single.The embodiment of the invention proposes to filter from the mass data bag of Network Transmission and extracts the packet that carries BT seed file content, based on this generation BT seed file of recombinating, then the BT seed file that generates according to reorganization obtains shared resource to be downloaded, expand the source of BT seed file, improved the success rate that obtains the BT seed file.
Be explained in detail to the main realization principle of embodiment of the invention technical scheme, embodiment and to the beneficial effect that should be able to reach below in conjunction with each accompanying drawing.
As shown in Figure 2, the main realization principle process of the embodiment of the invention is as follows:
Step 10, obtaining destination address is not the packet of the Network Transmission of local node address;
Step 20 is extracted the packet that carries BT seed file content from the packet of described Network Transmission;
Step 30, the packet reorganization of obtaining according to step 20 generates the BT seed file;
Step 40, the BT seed file that the storage reorganization generates.
To introduce two embodiment in detail and come the main realization principle of the inventive method is explained in detail and illustrates according to foregoing invention principle of the present invention below.
Please refer to accompanying drawing 3, be the schematic diagram of the applied network environment of the embodiment of the invention, can obtain the position of packet that destination address is not the Network Transmission of local node address as long as need to prove that the device that obtains the BT seed file that the embodiment of the invention provides is deployed in.The device that obtains the BT seed file that for example embodiment of the invention provides between two node devices, in order to obtain enough network packet, improves the quantity of obtaining the BT seed file certainly in network, this device also can be between routing device; In addition, this device that obtains the BT seed file also can be deployed in by on the main frame in the local area network (LAN) of hub connection.
Embodiment one
Please refer to the detailed process of the scheme of obtaining the BT seed file that the embodiment of the invention shown in the accompanying drawing 4a provides.
Step 401, obtaining destination address is not the packet of the Network Transmission of local node address;
The technological means of the packet that obtains Network Transmission that is adopted during enforcement can be selected flexibly according to concrete applied environment, for example when the device that obtains the BT seed file is on by the domestic consumer's main frame in the local area network (LAN) of hub connection or between the main frame, adopt packet capturing software to get final product; When being positioned on the routing forwarding equipment (as router, switch etc.) or between the routing forwarding equipment, when the required flow that obtains is big, can adopting traffic mirroring or light splitting technology.
When the device of the described BT of obtaining seed file is positioned on the router, the destination address that this step is obtained be not the packet of local node address can be the packet that sends to each main frame in the network that router connects; When the device of the described BT of obtaining seed file is arranged in the subscriber's main station of the local area network (LAN) that connects by hub, the destination address that this step is obtained be not the packet of local node address can be that destination address is the packet of other host addresses in this local area network (LAN).
Step 402 at each packet that step 401 obtains, is obtained the parameter value and the data division of predefined parameter in this packet header part;
The predefined parameter that obtains the header part in the present embodiment comprises protocol type, source IP address, source port sign, purpose IP address and destination interface sign, consider the convenience of data processing, can be with the form storage of the parameter value of the above-mentioned predefined parameter of each packet correspondence with five-tuple.
Step 403, the processing load when alleviating the packet that follow-up identification carries BT seed file content, the parameter value that can obtain according to default filtering rule and step 402, the packet that step 401 is obtained filters;
For example, according to protocol type packet is tentatively filtered, default filtering rule A is for " if the protocol type of packet is transmission control protocol (TCP, Transmission Control Protoco1), then keeping this packet; Otherwise, discard this packet ".The protocol type of the packet that can determine according to above-mentioned filtering rule A and step 402 in this step filters out the packet of all non-Transmission Control Protocol;
And for example, parameter value according to described predefined parameter tentatively filters packet, store the S set etB of source address S set etA or predetermined source IP address and source port identifier combination in advance, known in advance by source address in SetA or being combined in the packet that transmit leg sent among the Set of source IP address and source port sign do not contain BT seed file content.Default filtering rule B be " as if the source address of packet in SetA or source IP address and source port identifier combination in SetB, then discard this packet; Otherwise keep this packet ".Source address, the source port sign of the packet that can determine according to SetA, SetB, above-mentioned default filtering rule B and step 402 in this step filter out the partial data bag, promptly filter to discard those source IP addresss in SetA or source IP address and the packet of source port identifier combination in SetB.
After step 403, according to predetermined decision rule, and the parameter value and the data division of predefined parameter in the packet header part that obtains, determine to filter whether the packet that obtains is the packet that carries BT seed file content, step 404~step 408 has provided the example of a concrete decision rule:
Step 404 is filtered each packet that obtains at step 403, judges whether the data division of the packet that obtains comprises predetermined condition code, if enter step 405, otherwise enters step 406;
Formal definition according to existing seed file, the original character of the content of BT seed file is " d8:announce ", promptly " d8:announce " is the condition code of the first packet of BT seed file, in addition condition code also can here be enumerated no longer one by one for " piece length ", " infod " etc.
Step 405, determine that the packet that obtains is the packet that carries BT seed file content, and with the symbol of the affirmation in this packet (ACK, acknowledgement Character) and the source IP address in the parameter value five-tuple, source port sign, purpose IP address, destination interface sign as the sign of message chain, and the sign of storing this message chain, enter step 407;
Need to prove, be when being the packet of Transmission Control Protocol with the packet that comprises BT seed file content in the embodiment of the invention, and predefined parameter is to confirm that symbol, source IP address, source port sign, purpose IP address, destination interface are designated example and describe.When adopting other agreements, internet packet exchange (IPX for example, Internet work Packet Exchange)/sequential packet exchange (SPX, when SequencedPacket Exchange) packet of agreement transmits the BT seed file, the parameter of choosing is the predefined parameter corresponding with Internetwork Packet Exchange, for example IPX network number, IPX node number etc.
Step 406, further judge that each parameter value whether affirmation symbol and source IP address, source port sign, purpose IP address, destination interface in the parameter value five-tuple in the packet that obtains identify respectively in the sign with the message chain of having stored is consistent, if, determine that this packet is the packet that carries BT seed file content, enters step 407; Otherwise, enter step 408;
Step 407, temporary this packet;
Step 408, if the data division of packet do not comprise predetermined condition code and the affirmation symbol in the packet and source IP address, source port sign, purpose IP address and destination interface sign respectively with the sign of the message chain of having stored in each parameter inconsistent, determine that then this packet for not carrying the packet of BT seed file content, discards this packet;
Step 409 is regularly chosen the temporary packet of step 407;
Step 410, sorts to the packet of choosing by little extremely big order according to the sequence number Seq in the packet;
Whether step 411 comprises burst information " piece " field in the data division of the packet after the monitoring ordering, if enter step 412, otherwise returns step 409;
Step 412, the total data of the BT seed file that judges whether to obtain to be used to recombinate.Particularly: after from burst information " piece " field, extracting the burst quantity information, judge whether burst information " piece " field remaining data surpasses the amassing of check code length of burst quantity and each burst, if, determine to have obtained to be used to the to recombinate entire packet of BT seed file, enter step 413, otherwise return step 409;
According to the formal definition of BT seed file, information such as the address of index server, resource size, branch chip size, resource name all are in before burst information " piece " field.
The form of burst information " piece " field is shown in Fig. 4 b, at first store the burst quantity information of this BT seed file, be the SHA1 check code of each burst afterwards, because length 20 bytes of the check code of each burst, therefore when the length of remaining data surpasses check code length long-pending of burst quantity and each burst when extract the burst quantity information from burst information " piece " field after, illustrate can be from the packet of keeping in the check code of each burst of acquisition.
The check code of information, burst quantity information and each burst before " piece " field is whole key messages that reorganization generates the BT seed file, therefore after can obtaining burst information " piece " field and from burst information " piece " field, extracting the burst quantity information, when burst information " piece " field remaining data surpasses the amassing of check code length of burst quantity and each burst, the entire packet of the BT seed file that obtains to be used to recombinate is described.
Step 413 is extracted the data division of each packet after the ordering, according to the order of data packet sequencing, the data division of each packet of extracting is carried out order recombinate, and the result that will recombinate in proper order is as the BT seed file;
Step 414, storage BT seed file.
Above-mentioned steps 401~step 408 formed be used for from the packet of Network Transmission extract the packet that carries BT seed file content the processing stage; Step 409~step 413 formed reorganization generate the BT seed file the processing stage.
Alternatively, cause the waste of storage resources, when above-mentioned steps 414 storage BT seed files, can adopt Stored Procedure as shown in Figure 5 for fear of the identical BT seed file of repeated storage:
Step 501, computation sequence reorganization result's cryptographic Hash Info Hash;
Step 502 judges whether to store the consistent BT seed file of cryptographic Hash that corresponding cryptographic Hash and step 501 calculate, if enter step 503, otherwise enter step 504;
Step 503 abandons the result that recombinates in proper order, and the packet after the ordering in the step 410;
Step 504, the result that will recombinate in proper order stores as the BT seed file, and stores the corresponding relation of this seed file cryptographic Hash Info Hash corresponding with it.
Need to prove: step 409~step 412 has just provided a data division according to packet determine whether to obtain to be used to the to recombinate example of BT seed file entire packet, can also determine whether to obtain to be used to recombinate BT seed file entire packet according to other schemes, for example, (with the packet A shown in the table 1 is example at first to filter out the transmit leg of first packet correspondence and recipient, transmit leg is 24934 node device for the 129.42.14.225 port-mark for the IP address, the recipient is 8080 node device for the 129.42.14.225 port-mark for the IP address) mutual mutual packet, obtain " Content-length " field of the length of the data division that is used to represent the packet that receives in the affirmation packet of the feedback of recipient wherein, ask for the summation of numerical value in " Content-length " field of respectively confirming in the packet, whether identical according to the numerical value in the field of indication BT seed file length in the summation of " Content-length " field numerical value of relatively asking for and the first packet, also can judge whether to have obtained to recombinate the required entire packet of BT seed file.
Table 1
Figure BDA0000054710340000091
Embodiment two
The embodiment of the invention also provides the another kind of temporary packet that carries BT seed file content, and generate the scheme of BT seed file according to the temporary packet reorganization that carries BT seed file content, can be used as the alternate embodiment of step 404~step 413 in the accompanying drawing 4, specifically as shown in Figure 6:
Initial step and step 401~step 403 is similar, here no longer repeats, with following step 601~step 608 alternative steps step 404~step 413:
Step 601 is filtered each packet that obtains at step 403, judges whether the data division of the packet that obtains comprises predetermined condition code, as " d8:announce ", if enter step 602, otherwise enter step 603;
Step 602, affirmation symbol in the packet that obtains and the source IP address in the parameter value five-tuple, source port sign, purpose IP address and destination interface sign are created the message chain as the sign of message chain, and, enter step 606 with storing in the described message chain of this packet as first packet adding establishment;
For example, the data division of supposing the packet A shown in the table 1 comprises predetermined condition code " d8:announce ", then create the message chain that is designated " (confirming symbol) 510-(source IP address) 129.42.14.225-(source port sign) 24934-(purpose IP address) 129.42.14.225-(destination interface sign) 8080 " of message chain, and packet A is added in this message chain as first packet.
Step 603, further judge that source IP address, source port sign, purpose IP address and destination interface sign in affirmation symbol and the parameter value five-tuple in the packet that obtains be whether consistent with each parameter value in the sign of the message chain of having stored respectively, if, determine that this packet is the packet that carries BT seed file content, enters step 604; Otherwise, enter step 605;
Step 604, according to sequence number in the packet by little to big order, the packet that the data division that obtains is not comprised predetermined condition code stores on the correspondence position in each parameter value in message chain sign message chain consistent with affirmation symbol, source IP address, source port sign, purpose IP address and the destination interface sign difference of this packet, enters step 606;
For example, the parameter value of packet B and packet C is as shown in table 2.
Table 2
Figure BDA0000054710340000101
The message chain that is designated " source IP address (129.42.14.225) source port sign (24934) purpose IP address (129.42.14.225) destination interface sign (8080) is confirmed symbol (510) " of message chain is specially packet A-packet B-packet C.......
Step 605, if the data division of this packet do not comprise source IP address, source port sign, purpose IP address and the destination interface sign of predetermined condition code and this packet and confirm symbol whether respectively with the sign of the message chain of having stored in each parameter inconsistent, determine that this packet for not carrying the packet of BT seed file content, then discards this packet;
The corresponding employing packet that step 601~step 605 mode is stored, when carrying out packet reorganization generation BT seed file, execution in step 606~step 610:
Whether step 606 comprises burst information " piece " field in the data division of packet in each message chain of regular monitoring, if enter step 607, otherwise continue monitoring;
Because the packet in the message chain sorts with sequence number, therefore only need in the monitoring message chain data division of last packet whether to comprise burst information " piece " field and get final product.
Alternatively, in order to improve the efficient of reorganization BT seed file, can be for each message chain be provided with the time-to-live, in this step, can only monitor and whether comprise burst information " piece " field in the data division of packet in the message chain of the longest predetermined quantity of time-to-live and get final product.
Alternatively, in order to improve the efficient of obtaining BT kind child node, avoid incomplete message chain (the message chain that does not promptly comprise the entire packet of the BT seed file that is used to recombinate) to take storage resources for a long time, can be set the time-to-live for each message chain, the first packet that comprises character symbol from the data division that obtains packet, setting up the message chain picks up counting, when in step 606 is judged the data division of packet in the message chain, not comprising burst information " piece " field, execution in step 610~step 611;
Step 607, the entire packet of BT seed file judges whether to obtain to be used to recombinate, be specially: judgement is extracted the burst quantity information from the burst information field after, whether burst information field remaining data surpasses the amassing of check code length of burst quantity and each burst, if determine the entire packet of the BT seed file that obtains to be used to recombinate, enter step 608, otherwise return step 606;
Step 608, to the data division of each packet in this message chain carry out the order reorganization (data division of the data division of the data division of packet A+packet B+packet C+...), and the result that will recombinate in proper order enters step 609 as the BT seed file;
Step 609, the BT seed file that storage obtains enters step 611;
Step 610 judges whether the time-to-live of this message chain surpasses scheduled duration, surpasses scheduled duration if judge the time-to-live of this message chain, then enters step 611, otherwise returns step 606;
Step 611 is deleted this message chain.
Similar with embodiment one, when step 608 storage BT seed file, cause the waste of storage resources, the preferred Stored Procedure that adopts as shown in Figure 7 for fear of the identical BT seed file of repeated storage:
Step 701 at each message chain, is calculated the order reorganization result's of the data division of each packet in this message chain cryptographic Hash Info Hash;
Step 702 judges whether to store the BT seed file with cryptographic Hash consistent with the cryptographic Hash that calculates, if enter step 703, otherwise enters step 704;
Step 703 is deleted this message chain;
Step 704, described order reorganization result is stored as the BT seed file, and store the corresponding relation of this BT seed file and corresponding cryptographic Hash Info Hash, owing to stored the BT seed file of determining according to described message chain this moment, for conserve storage, also can enter step 703 after step 704, the message chain of BT seed file institute foundation is determined in deletion.
By the BT seed file that the scheme that resolve to adopt embodiment one, embodiment two to provide is obtained, wait in the peer-to-peer network that the node device that obtains shared resource can obtain the Tracker server address; Set up communication linkage based on the Tracker server address and the Tracker server that obtain, acquisition can provide each address of node of required shared resource and the information list of the shared resource that this node provides; And, obtain the resource that needs alternately with the node that required shared resource can be provided in the described peer-to-peer network according to the information list that obtains.
The embodiment of the invention provides a kind of scheme of the BT of obtaining seed file, at first from the packet of Network Transmission, filter the packet that obtains to carry BT seed file content, then the packet that obtains is recombinated and generate the BT seed file, expanded the source of BT seed file, improve the success rate that obtains the BT seed file, overcome the not good problem of success rate of obtaining resource in the prior art owing to the not good BT technology that causes of the stability of BT seed issuing web site.
In addition, the scheme that the embodiment of the invention provides can also be applied to network safety filed, after the function of the integrated above-mentioned device that obtains the BT seed file on router or the gateway device, whether focus BT resource in the monitor network in real time, analyzing it is illegal resource such as piracy, violence, pornographic.
Correspondingly, the embodiment of the invention also provides a kind of device of the BT of obtaining seed file, and as shown in Figure 8, this device comprises that packet obtains unit 801, packet extraction unit 802, BT seed file recomposition unit 803 and memory cell 804, and is specific as follows:
Packet obtains unit 801, is used to obtain the packet that destination address is not the Network Transmission of local node address;
Packet extraction unit 802 is used for extracting the packet that carries BT seed file content from the packet of described Network Transmission;
BT seed file recomposition unit 803, the packet reorganization that is used for extracting according to packet extraction unit 802 generates the BT seed file;
Memory cell 804 is used to store the BT seed file that 803 reorganization of BT seed file recomposition unit generate.
Alternatively, shown in accompanying drawing 9a, the packet extraction unit 802 in the accompanying drawing 8 specifically comprises:
Obtain subelement 901, be used for obtaining the packet that unit 801 obtains, obtain the parameter value and the data division of predefined parameter in this packet header part at each packet;
Judgment sub-unit 902 is used for determining according to obtaining parameter value, data division and the predetermined decision rule that subelement 901 obtains whether this packet is the packet that carries BT seed file content, if trigger temporary subelement 903 temporary these packets; Otherwise, abandon this packet.
Please refer to accompanying drawing 9b, based on the packet extraction unit 802 shown in the accompanying drawing 9a, the BT seed file recomposition unit 803 in the accompanying drawing 8 specifically comprises:
Choose subelement 911, be used for regularly choosing the packet of the parameter value unanimity of predefined parameter described in the temporary packet of temporary subelement 903;
Ordering subelement 912 is used for according to the sequence number of packet by little to big order, sorts to choosing the packet that subelement 911 chooses;
Judgment sub-unit 913 is used for the data division according to the packet after the ordering of ordering subelement 912, the entire packet of the BT seed file that judges whether to obtain to be used to recombinate;
Determine subelement 914, be used for when judgment sub-unit 913 is determined the entire packet of the BT seed file that obtains to be used to recombinate, with the order reorganization result of the data division of each packet after the ordering as the BT seed file.
Please refer to accompanying drawing 9c, the judgment sub-unit 913 among the accompanying drawing 9b specifically comprises:
Monitoring module 921, whether the data division that is used for monitoring the packet after ordering subelement 912 sorts comprises the burst information field;
Judge module 922, when the data division that is used for the packet after monitoring module 921 monitors ordering comprises the burst information field, judgement is extracted the burst quantity information from the burst information field after, whether burst information field remaining data is the amassing of check code length that surpasses burst quantity and each burst;
Determination module 923 is used for when judge module 922 is judged remaining data and surpassed the amassing of check code length of burst quantity and each burst, determines the entire packet of the BT seed file that obtains to be used to recombinate.
Please refer to accompanying drawing 9d, based on the BT seed file recomposition unit 803 shown in extraction unit 802 shown in the accompanying drawing 9a and the 9b, the memory cell 804 in the accompanying drawing 8 specifically comprises:
Computation subunit 931 is used for calculating described order reorganization result's cryptographic Hash when determining that subelement 914 is determined the entire packet of the BT seed file that obtains to be used to recombinate;
Judgment sub-unit 932 is used to judge whether to store the consistent BT seed file of cryptographic Hash that corresponding cryptographic Hash and described computation subunit 921 calculate, if then abandon the packet after the ordering;
Storing sub-units 933, be used for judging when not storing the cryptographic Hash BT seed file consistent with the described cryptographic Hash that calculates in judgment sub-unit 932, the result stores as the BT seed file with the reorganization of described order, and stores the corresponding relation of the cryptographic Hash that this BT seed file and computation subunit calculate.
Alternatively, please refer to accompanying drawing 10a, the temporary subelement 903 shown in the accompanying drawing 9a specifically comprises the first temporary module 101 and the second temporary module 102, wherein:
The first temporary module 101, the parameter value of described predefined parameter that is used for data division is comprised the packet of predetermined condition code is created the message chain as the sign of message chain, and the packet that described data division is comprised described predetermined condition code adds the described message chain of creating as first packet;
The second temporary module 102, be used for according to the sequence number of packet by little to big order, the packet that data division is not comprised predetermined condition code stores on the correspondence position in the corresponding message chain of the sign of the message chain consistent with the parameter value of the described predefined parameter of this packet.
Please refer to accompanying drawing 10b, based on the temporary storage location shown in the accompanying drawing 10a, BT seed file recomposition unit 803 specifically comprises:
Judgment sub-unit 111 is used at each message chain, according to the data division of packet in this message chain, and the entire packet of the BT seed file that judges whether to obtain to be used to recombinate;
Determine subelement 112, be used in judgment sub-unit 111 when determining the entire packet of the BT seed file that obtains to be used to recombinate, with the order reorganization result of the data division of each packet in this message chain as the BT seed file.
Alternatively, please refer to accompanying drawing 10c, the judgment sub-unit 111 among the accompanying drawing 10b specifically comprises:
Monitoring module 121 is used for whether comprising the burst information field in the data division of each message chain packet of regular monitoring;
Judge module 122 is used for monitoring when comprising the burst information field at monitoring unit 121, judge from the burst information field, extract the burst quantity information after, whether burst information field remaining data surpasses burst quantity is amassed with the check code length of each burst is;
Determination module 123 is used for when judge module 122 is judged remaining data and surpassed the amassing of check code length of burst quantity and each burst, determines the entire packet of the BT seed file that obtains to be used to recombinate.
Please refer to accompanying drawing 10d, on the basis of accompanying drawing 10a~accompanying drawing 10c, the memory cell 804 in the accompanying drawing 8 specifically comprises:
Computation subunit 131 is used to calculate the order reorganization result's who determines that subelement 112 is determined cryptographic Hash;
Judgment sub-unit 132 is used to judge whether to store the consistent BT seed file of cryptographic Hash that corresponding cryptographic Hash and described computation subunit 131 calculate, if, dropping packets chain then;
Storing sub-units 133, be used for judging when not storing the cryptographic Hash BT seed file consistent with the described cryptographic Hash that calculates in judgment sub-unit 132, the result stores as the BT seed file with the reorganization of described order, and stores the corresponding relation of the cryptographic Hash that this BT seed file and computation subunit calculate.
Alternatively, the device that obtains the BT seed file shown in accompanying drawing 8, accompanying drawing 9a~accompanying drawing 9d, the accompanying drawing 10a~accompanying drawing 10d can be provided with separately, also can be integrated in its function on the subscriber's main station, also can be integrated in the switching equipment such as router, gateway.
One of ordinary skill in the art will appreciate that all or part of step that realizes in the foregoing description method is to instruct relevant hardware to finish by program, this program can be stored in the computer read/write memory medium, as: ROM/RAM, magnetic disc, CD etc.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.

Claims (13)

1. a method of obtaining bit-torrent BT seed file is characterized in that, comprising:
Obtaining destination address is not the packet of the Network Transmission of local node address;
From the packet of described Network Transmission, extract the packet that carries BT seed file content;
Generate the BT seed file according to the packet reorganization of extracting;
The BT seed file that the storage reorganization generates.
2. the method for claim 1 is characterized in that, the described packet that carries BT seed file content that extracts from the packet of Network Transmission specifically comprises:
Packet at each acquisition, obtain the parameter value and the data division of predefined parameter in the packet header part, and according to the parameter value that obtains, data division and predetermined decision rule, whether the specified data bag is the packet that carries BT seed file content, if, temporary this packet; Otherwise, packet discard.
3. method as claimed in claim 2 is characterized in that, described predetermined decision rule comprises:
Whether the data division of judging this packet comprises predetermined condition code;
If the data division of this packet comprises predetermined condition code, determine that this packet is the packet that carries BT seed file content, with the parameter value of the described predefined parameter of this packet sign, the sign of storing this message chain as the message chain;
If the data division of this packet does not comprise predetermined condition code, whether the parameter value of the predefined parameter of this packet that judgement is obtained is consistent with the sign of the message chain of having stored, if consistent, determines that this packet is the packet that carries BT seed file content;
If it is inconsistent with the sign of the message chain of storage that the data division of this packet does not comprise the parameter value of predefined parameter of predetermined condition code and this packet, determine that then this packet is the packet that does not carry BT seed file content.
4. method as claimed in claim 2 is characterized in that, and is described according to the packet reorganization generation BT seed file that extracts, and specifically comprises:
Regularly choose the packet of the parameter value unanimity of temporary described predefined parameter;
, by little extremely big order the packet of choosing is sorted according to the sequence number in the packet;
According to the data division of packet after the ordering, the entire packet of the BT seed file that judges whether to obtain to be used to recombinate;
When determining the entire packet of the BT seed file that obtains to be used to recombinate, with the order reorganization result of the data division of each packet after the ordering as the BT seed file.
5. method as claimed in claim 4 is characterized in that, and is described according to the data division of packet after the ordering, and the entire packet of the BT seed file that judges whether to obtain to be used to recombinate specifically comprises:
Whether comprise the burst information field in the data division of the packet after the monitoring ordering;
Comprise the burst information field if monitor in the data division of the packet after the ordering, judge from the burst information field, extract the burst quantity information after, whether burst information field remaining data surpasses burst quantity is amassed with the check code length of each burst is;
Surpass burst quantity and amass if comprise burst information field and remaining data in the data division of packet after the ordering, determine the entire packet of the BT seed file that obtains to be used to recombinate with the check code length of each burst is.
6. method as claimed in claim 3 is characterized in that, the described temporary packet that carries BT seed file content specifically comprises:
The parameter value of described predefined parameter that data division is comprised the packet of described predetermined condition code is created the message chain as the sign of message chain,
The packet that described data division is comprised described predetermined condition code adds the described message chain of creating as first packet;
According to the sequence number in the packet by little to big order, the packet that data division is not comprised predetermined condition code store into the message chain sign message chain consistent with the parameter value of the described predefined parameter of this packet in correspondence position on.
7. method as claimed in claim 6 is characterized in that, the packet reorganization that described basis is obtained generates the BT seed file, specifically comprises:
At each message chain, according to the data division of packet in this message chain, the entire packet of the BT seed file that judges whether to obtain to be used to recombinate;
When determining the entire packet of the BT seed file that obtains to be used to recombinate, with the order reorganization result of the data division of each packet in this message chain as the BT seed file.
8. method as claimed in claim 7 is characterized in that, described data division according to packet in this message chain, and the entire packet of the BT seed file that judges whether to obtain to be used to recombinate specifically comprises:
Whether comprise the burst information field in the data division of packet in this message chain of regular monitoring; In monitored results when comprising the burst information field, judge from the burst information field, extract the burst quantity information after, whether burst information field remaining data surpasses burst quantity is amassed with the check code length of each burst is;
If data division comprises burst information field and remaining data and surpasses burst quantity and amass with the check code length of each burst is, determine the entire packet of the BT seed file that obtains to be used to recombinate.
9. a device that obtains the BT seed file is characterized in that, comprising:
Packet obtains the unit, is used to obtain the packet that destination address is not the Network Transmission of local node address;
The packet extraction unit is used for extracting the packet that carries BT seed file content from the packet of described Network Transmission;
BT seed file recomposition unit, the packet reorganization that is used for extracting according to the packet extraction unit generates the BT seed file;
Memory cell is used to store the BT seed file that the reorganization of BT seed file recomposition unit generates.
10. device as claimed in claim 9 is characterized in that, described packet extraction unit specifically comprises:
Obtain subelement, be used for packet, obtain the parameter value and the data division of predefined parameter in this packet header part at each acquisition;
Judgment sub-unit is used for determining according to obtaining parameter value, data division and the predetermined decision rule that subelement obtains whether this packet is the packet that carries BT seed file content, if trigger temporary this packet of temporary subelement; Otherwise, abandon this packet.
11. device as claimed in claim 10 is characterized in that, described temporary subelement specifically comprises:
The first temporary module, the parameter value of described predefined parameter that is used for data division is comprised the packet of predetermined condition code is created the message chain as the sign of message chain, and the packet that described data division is comprised described predetermined condition code adds the described message chain of creating as first packet;
The second temporary module, be used for according to the sequence number of packet by little to big order, the packet that data division is not comprised predetermined condition code stores on the correspondence position in the corresponding message chain of the sign of the message chain consistent with the parameter value of the described predefined parameter of this packet.
12. device as claimed in claim 11 is characterized in that, described BT seed file recomposition unit specifically comprises:
Judgment sub-unit is used at each message chain, according to the data division of packet in this message chain, and the entire packet of the BT seed file that judges whether to obtain to be used to recombinate;
Determine subelement, be used in judgment sub-unit when determining the entire packet of the BT seed file that obtains to be used to recombinate, with the order reorganization result of the data division of each packet in this message chain as the BT seed file.
13. device as claimed in claim 12 is characterized in that, described judgment sub-unit specifically comprises:
Monitoring module is used for whether comprising the burst information field in the data division of each message chain packet of regular monitoring;
Judge module is used for monitoring when comprising the burst information field at monitoring module, judge from the burst information field, extract the burst quantity information after, whether burst information field remaining data surpasses burst quantity is amassed with the check code length of each burst is;
Determination module is used for when judge module is judged remaining data and surpassed the amassing of check code length of burst quantity and each burst, determines the entire packet of the BT seed file that obtains to be used to recombinate.
CN 201110089669 2011-04-11 2011-04-11 Method for acquiring bit torrent (BT) seed file and relevant devices Expired - Fee Related CN102130964B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201110089669 CN102130964B (en) 2011-04-11 2011-04-11 Method for acquiring bit torrent (BT) seed file and relevant devices

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201110089669 CN102130964B (en) 2011-04-11 2011-04-11 Method for acquiring bit torrent (BT) seed file and relevant devices

Publications (2)

Publication Number Publication Date
CN102130964A true CN102130964A (en) 2011-07-20
CN102130964B CN102130964B (en) 2013-04-24

Family

ID=44268852

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201110089669 Expired - Fee Related CN102130964B (en) 2011-04-11 2011-04-11 Method for acquiring bit torrent (BT) seed file and relevant devices

Country Status (1)

Country Link
CN (1) CN102130964B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104539728A (en) * 2015-01-15 2015-04-22 北京国创富盛通信股份有限公司 P2P transmission method and system based on AP
CN104572839A (en) * 2014-12-11 2015-04-29 百度在线网络技术(北京)有限公司 Retrieval method and retrieval system for resource file
CN106105153A (en) * 2014-04-17 2016-11-09 华为技术有限公司 A kind of data processing method, control method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101046806A (en) * 2006-03-30 2007-10-03 腾讯科技(深圳)有限公司 Search engine system and method
US20090210697A1 (en) * 2008-01-17 2009-08-20 Songqing Chen Digital Rights Protection in BitTorrent-like P2P Systems
CN101917488A (en) * 2010-08-20 2010-12-15 成都市华为赛门铁克科技有限公司 BT download method, device and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101046806A (en) * 2006-03-30 2007-10-03 腾讯科技(深圳)有限公司 Search engine system and method
US20090210697A1 (en) * 2008-01-17 2009-08-20 Songqing Chen Digital Rights Protection in BitTorrent-like P2P Systems
CN101917488A (en) * 2010-08-20 2010-12-15 成都市华为赛门铁克科技有限公司 BT download method, device and system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106105153A (en) * 2014-04-17 2016-11-09 华为技术有限公司 A kind of data processing method, control method and device
CN104572839A (en) * 2014-12-11 2015-04-29 百度在线网络技术(北京)有限公司 Retrieval method and retrieval system for resource file
CN104539728A (en) * 2015-01-15 2015-04-22 北京国创富盛通信股份有限公司 P2P transmission method and system based on AP

Also Published As

Publication number Publication date
CN102130964B (en) 2013-04-24

Similar Documents

Publication Publication Date Title
CN103731451B (en) A kind of method and system that file uploads
US8677011B2 (en) Load distribution system, load distribution method, apparatuses constituting load distribution system, and program
US8358641B2 (en) Method for improving peer to peer network communication
JP4759389B2 (en) Packet communication device
CN102404396B (en) Method, device and system for identifying peer-to-peer (P2P) flow and equipment
Willinger et al. Design and evolution
US10355961B2 (en) Network traffic capture analysis
CN103220308B (en) A kind of document down loading method, apparatus and system
WO2015096149A1 (en) Tcp link configuration method, apparatus and device
KR20080061055A (en) System and method for identifying p2p application service
EP2477377A1 (en) Peer node and method for improved peer node selection
Imtiaz et al. Churn in the bitcoin network
WO2012034414A1 (en) Method and system for processing peer to peer (p2p) services
CN102130964B (en) Method for acquiring bit torrent (BT) seed file and relevant devices
US20120047248A1 (en) Method and System for Monitoring Flows in Network Traffic
CN103746768B (en) A kind of recognition methods of packet and equipment
EP1872556A2 (en) Method for the establishing of connections in a communication system
CN107222403A (en) A kind of data transmission method, system and electronic equipment
US9106479B1 (en) System and method for managing network communications
CN110601989A (en) Network traffic balancing method and device
CA2595438C (en) Method for improving peer to peer network communication
Potys et al. NetInf TP: A receiver-driven protocol for ICN data transport
Dillon Peer-to-Peer botnet detection using NetFlow
CN105847458A (en) P2P (Peer-to-Peer) caching guiding system and method based on DNS (Domain Name System)
Ilie Gnutella network traffic: Measurements and characteristics

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent of invention or patent application
CB02 Change of applicant information

Address after: High tech Park No. 88 University of Electronic Science and technology of Sichuan province in 611731 Chengdu city high tech Zone West Park area Qingshui River Tianchen Road No. 5 building D

Applicant after: Huawei Symantec Technologies Co., Ltd.

Address before: High tech Park No. 88 University of Electronic Science and technology of Sichuan province in 611731 Chengdu city high tech Zone West Park area Qingshui River Tianchen Road No. 5 building D

Applicant before: Chengdu Huawei Symantec Technologies Co., Ltd.

COR Change of bibliographic data

Free format text: CORRECT: APPLICANT; FROM: CHENGDU HUAWEI SYMANTEC TECHNOLOGIES CO., LTD. TO: HUAWEI DIGITAL TECHNOLOGY (CHENGDU) CO., LTD.

C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20130424

Termination date: 20210411