Summary of the invention
Based on this, be necessary to provide a kind of and can realize data download method and the system that the network based on different download protocols carries out data sharing.
A kind of data download method comprises the following steps:
Obtain the download request of file to be downloaded, comprise original download link in described download request, described original download is linked as in origin url link, BT seed file, eMule download link any one;
Obtain the cryptographic Hash of described file to be downloaded according to described original download link;
According to the cryptographic Hash of described file to be downloaded, and, when described original download is linked as the BT seed file, obtain eMule download link information and the multi-source URL set of described file to be downloaded; When described original download is linked as the eMule download link, obtain Bt seed file information and the multi-source URL set of described file to be downloaded; When described original download is linked as the origin url link, obtain Bt seed file information and eMule download link information and the multi-source URL set of described file to be downloaded;
According to the Bt seed file information of obtaining file to be downloaded and/or eMule download link information and the described file to be downloaded of multi-source URL set download.
In embodiment, the described step that obtains the cryptographic Hash of described file to be downloaded according to described original download link is therein:
When described original download is linked as the origin url link, according to default URL link and the mapping relations of cryptographic Hash, inquiry links corresponding cryptographic Hash with the origin url of described file to be downloaded;
When described original download is linked as the BT seed file, according to default Bt seed file information and the mapping relations of cryptographic Hash, inquire about the cryptographic Hash corresponding with the Bt seed file information of described file to be downloaded;
When described original download is linked as the eMule download link, according to default eMule download link information and the mapping relations of cryptographic Hash, inquire about the cryptographic Hash corresponding with the eMule download link information of described file to be downloaded.
Therein in embodiment, when described original download is linked as the origin url link, according to the cryptographic Hash of described file to be downloaded, obtains the Bt seed file information of described file to be downloaded and the step of eMule download link information and multi-source URL set and be:
According to default URL link and the mapping relations of cryptographic Hash, inquire about the multi-source URL set corresponding with the cryptographic Hash of described file to be downloaded;
According to default Bt seed file information and the mapping relations of cryptographic Hash, inquire about the Bt seed file information corresponding with the cryptographic Hash of described file to be downloaded;
According to default eMule download link information and the mapping relations of cryptographic Hash, inquire about the eMule download link information corresponding with the cryptographic Hash of described file to be downloaded.
Therein in embodiment, when described original download is connected to the BT seed file, according to the cryptographic Hash of described file to be downloaded, obtains the eMule download link information of described file to be downloaded and the step of multi-source URL set and be:
According to default URL link and the mapping relations of cryptographic Hash, inquire about the multi-source URL set corresponding with the cryptographic Hash of described file to be downloaded;
According to default eMule download link information and the mapping relations of cryptographic Hash, inquire about the eMule download link information corresponding with the cryptographic Hash of described file to be downloaded.
Therein in embodiment, when described original download is connected to the eMule download link, according to the cryptographic Hash of described file to be downloaded, obtains the Bt seed file information of described file to be downloaded and the step of multi-source URL set and be:
According to default URL link and the mapping relations of cryptographic Hash, inquire about the multi-source URL set corresponding with the cryptographic Hash of described file to be downloaded;
According to default Bt seed file information and the mapping relations of cryptographic Hash, inquire about the Bt seed file information corresponding with the cryptographic Hash of described file to be downloaded.
Therein in embodiment, condition code and file sequence number that described Bt seed file information is the Bt seed file, informative abstract value and file size that described eMule download link information is file to be downloaded, described basis is obtained the Bt seed file information of file to be downloaded and/or the step of eMule download link information and the described file to be downloaded of multi-source URL set download is:
Described file to be downloaded is divided into to a plurality of bursts, and according to download capabilities, the downloading task of described burst is dispatched;
Download described burst according to the multi-source URL set of described file to be downloaded;
When described original download is linked as the Bt seed file, according to described original download, described burst is downloaded in link, otherwise, obtain the Bt seed according to the condition code of the Bt seed file of described file to be downloaded, and download described burst according to described BT seed;
When described original download is linked as the eMule download link, download described burst according to described original download link, otherwise, according to informative abstract value and the file size structure eMule download link of described file to be downloaded, and download described burst according to described eMule download link.
In embodiment, described method also comprises therein:
When described file to be downloaded is new file, set up and store the URL link of described new file and the mapping relations between cryptographic Hash, Bt seed information and cryptographic Hash or eMule download link information and cryptographic Hash.
In embodiment, described method also comprises: when described file to be downloaded is new file, obtain and store the Bt seed file of described file to be downloaded therein.
In addition, also provide a kind of data downloading system, described system comprises Download Server and download client, and described Download Server comprises:
The resource query server, for obtaining the download request of file to be downloaded, comprise original download link in described download request, described original download is linked as in origin url link, BT seed file, eMule download link any one;
The logical server group, for obtaining the cryptographic Hash of described file to be downloaded according to described original download link;
Described logical server group is also for the cryptographic Hash according to described file to be downloaded, and, when described original download is linked as the BT seed file, the eMule download link information and the multi-source URL that obtain described file to be downloaded gather; When described original download is linked as the eMule download link, obtain Bt seed file information and the multi-source URL set of described file to be downloaded; When described original download is linked as the origin url link, obtain Bt seed file information and eMule download link information and the multi-source URL set of described file to be downloaded;
Described download client is for the Bt seed file information according to obtaining file to be downloaded and/or eMule download link information and the described file to be downloaded of multi-source URL set download.
In embodiment, described original download is linked as origin url link or BT seed file or eMule download link therein, and described logical server group comprises:
The U2h server, while linking for be linked as origin url when described original download, according to default URL link and the mapping relations of cryptographic Hash, inquiry links corresponding cryptographic Hash with the origin url of described file to be downloaded;
The Bt2h server, for when described original download is linked as the BT seed file, according to default Bt seed file information and the mapping relations of cryptographic Hash, inquire about the cryptographic Hash corresponding with the Bt seed file information of described file to be downloaded;
The eMule2h server, for when described original download is linked as the eMule download link, according to default eMule download link information and the mapping relations of cryptographic Hash, inquire about the cryptographic Hash corresponding with the eMule download link information of described file to be downloaded
Therein in embodiment, described logical server group also comprises one or both and the h2U server in h2Bt server and h2eMule server, wherein:
The h2U server, the mapping relations for the link of the URL according to default with cryptographic Hash, inquire about the multi-source URL set corresponding with the cryptographic Hash of described file to be downloaded;
The h2Bt server, for the Bt seed file according to default and the mapping relations of cryptographic Hash, inquire about the Bt seed file information corresponding with the cryptographic Hash of described file to be downloaded;
The h2eMule server, for the eMule download link information according to default and the mapping relations of cryptographic Hash, inquire about the eMule download link information corresponding with the cryptographic Hash of described file to be downloaded.
Therein in embodiment, condition code and file sequence number that described Bt seed file information is the Bt seed file, informative abstract value and file size that described eMule download link information is file to be downloaded, described download client comprises:
Scheduler module, for described file to be downloaded is divided into to a plurality of bursts, and dispatched the downloading task of described burst according to download capabilities;
Download module comprises:
The Http download unit, download described burst for the set of the multi-source URL according to described file to be downloaded;
The Bt download unit, for when described original download is linked as the Bt seed file, download described burst according to described original download link, otherwise, obtain the Bt seed according to the condition code of the Bt seed file of described file to be downloaded, and download described burst according to described BT seed;
The eMule download unit, for when described original download is linked as the eMule download link, download described burst according to described original download link, otherwise, according to informative abstract value and the file size structure eMule download link of described file to be downloaded, and download described burst according to described eMule download link.
Therein in embodiment, described Download Server also comprises the goods receiving module, the URL link of described new file and the mapping relations between cryptographic Hash, Bt seed information and cryptographic Hash or eMule download link information and cryptographic Hash are set up and stored to described goods receiving module, for when described file to be downloaded is new file.
In embodiment, described Download Server also comprises the Bt seed server therein, and the Bt seed file of described file to be downloaded is obtained and stored to described Bt seed server, for when described file to be downloaded is new file.
Above-mentioned data download method and system, at first obtain the download request that comprises the link of file to be downloaded original download, and link according to original download the cryptographic Hash that obtains file to be downloaded.Then according to the cryptographic Hash of file to be downloaded, obtain two in the Bt seed file information of file to be downloaded and eMule download link information or link different one from original download in both, and the multi-source URL set of obtaining file to be downloaded.Finally according to multi-source URL set, Bt seed file information and the eMule download link information of file to be downloaded, download file to be downloaded.By said method and system, after the original download link that obtains file to be downloaded, can obtain multi-source URL set, Bt seed file information and the eMule download link information of file to be downloaded, thereby can adopt the downloading mode based on three kinds of download protocols to download file to be downloaded in p2p network separately simultaneously.Therefore, said method and system can take full advantage of Internet resources, realize that the network based on different download protocols carries out data sharing.
Embodiment
As shown in Figure 1, in one embodiment, data download method comprises the following steps:
Step S110, obtain the download request of file to be downloaded, comprises the original download link in download request, and original download is linked as in origin url link, BT seed file, eMule download link any one.
Comprised the original download link of file to be downloaded in download request.After obtaining download request, can from download request, extract the original download link of file to be downloaded.In the ordinary course of things, original download is linked as origin url link or Bt seed or eMule download link.
Step S120, according to original download, link obtains the cryptographic Hash of file to be downloaded.
After the original download link that obtains file to be downloaded, need to obtain according to the original download link unique identifying number of file to be downloaded: the cryptographic Hash of file to be downloaded.
Step S130, according to the cryptographic Hash of file to be downloaded, and, when original download is linked as the BT seed file, obtain eMule download link information and the multi-source URL set of file to be downloaded; When original download is linked as the eMule download link, obtain Bt seed file information and the multi-source URL set of file to be downloaded; When original download is linked as the origin url link, obtain Bt seed file information and eMule download link information and the multi-source URL set of file to be downloaded.
Cryptographic Hash is the unique identification of file, no matter be therefore under which kind of download protocol, the cryptographic Hash of same file is also identical.Therefore, after obtaining the cryptographic Hash of file to be downloaded, can obtain the download link of file to be downloaded under different download protocols by default mapping relations.
In one embodiment, original download is linked as the origin url link, and above-mentioned steps S120 is specially: according to default URL link and the mapping relations of cryptographic Hash, inquiry links corresponding cryptographic Hash with the origin url of file to be downloaded.
Particularly, when the original download of file to be downloaded is linked as the origin url link, inquire about default URL link and the mapping relations of cryptographic Hash, in these mapping relations, each URL link is to there being a cryptographic Hash.Find in mapping relations and link identical URL with origin url and link, its corresponding cryptographic Hash is just the cryptographic Hash of this file to be downloaded.
In the present embodiment, above-mentioned steps S130 is specially: according to default URL link and the mapping relations of cryptographic Hash, inquire about the multi-source URL set corresponding with the cryptographic Hash of file to be downloaded; According to default Bt seed file information and the mapping relations of cryptographic Hash, inquire about the Bt seed file information corresponding with the cryptographic Hash of file to be downloaded; According to default eMule download link information and the mapping relations of cryptographic Hash, inquire about the eMule download link information corresponding with the cryptographic Hash of file to be downloaded.
Particularly, identical file likely has a plurality of download address, and in the mapping relations of URL link and cryptographic Hash, each cryptographic Hash may corresponding a plurality of URL links.While inquiring about the mapping relations of default URL link and cryptographic Hash, can obtain a plurality of URL download link of file to be downloaded, a plurality of URL download link of file to be downloaded form multi-source URL set jointly.
Particularly, Bt seed file information comprises condition code and the file sequence number of Bt seed file.What in the mapping relations of Bt seed file information and cryptographic Hash, record is the mapping relations of one group of data forming of the file sequence number of the condition code of file cryptographic Hash and Bt seed and this Bt seed.Identical file is corresponding a plurality of Bt seed likely, therefore, in the mapping relations of Bt seed file information and cryptographic Hash, a stack features code and the file sequence number of the corresponding a plurality of same Bt seeds of each cryptographic Hash possibility.When obtaining the Bt seed file information of download file, generally obtain condition code and the file sequence number of downloading the fastest Bt seed of average speed.
In one embodiment, each file is after download completes, the relevant information of download such as that capital will be downloaded will be consuming time, average speed are reported feedback, according to feedack, can calculate the average speed of download of each Bt seed file of storage, thus convenient that the fastest Bt seed of download average speed of selecting.
Particularly, eMule download link information is file to be downloaded informative abstract value and file size.Because the informative abstract value is also the unique identification of file to be downloaded, therefore, the informative abstract value of the cryptographic Hash of file to be downloaded and file is relation one to one.Cryptographic Hash and the informative abstract of file to be downloaded and the mapping of file size of file to be downloaded have been recorded in default eMule download link information and the mapping relations of cryptographic Hash, therefore, inquire about and can obtain file to be downloaded unique informative abstract value and file size by cryptographic Hash.
In another embodiment, original download is linked as the BT seed file, and above-mentioned steps S120 is specially: according to default Bt seed file information and the mapping relations of cryptographic Hash, inquire about the cryptographic Hash corresponding with the Bt seed file information of file to be downloaded.
Particularly, when the original download of file to be downloaded is linked as the Bt kind period of the day from 11 p.m. to 1 a.m, inquire about default Bt seed file information and the mapping relations of cryptographic Hash.In the present embodiment, one group of data that the condition code of the Bt seed file that Bt seed file information is file to be downloaded and file sequence number form, in these mapping relations, the condition code of Bt seed file and file sequence number are corresponding with cryptographic Hash, wherein, same cryptographic Hash can be corresponding with condition code and the file sequence number of a plurality of same Bt seed files.Therefore while inquiring about, using the condition code of Bt seed of file to be downloaded and file sequence number as the inquiry major key, obtain the cryptographic Hash of file to be downloaded.
In the present embodiment, above-mentioned steps S130 is specially: according to default URL link and the mapping relations of cryptographic Hash, inquire about the multi-source URL set corresponding with the cryptographic Hash of file to be downloaded; According to default eMule download link information and the mapping relations of cryptographic Hash, inquire about the eMule download link information corresponding with the cryptographic Hash of file to be downloaded.
In another embodiment, original download is linked as the eMule download link, and above-mentioned steps S120 is specially: according to default eMule download link information and the mapping relations of cryptographic Hash, inquire about the cryptographic Hash corresponding with the eMule download link information of file to be downloaded.
Concrete, when the original link of file to be downloaded is the eMule download link, inquire about default eMule download link information and the mapping relations of cryptographic Hash.In the present embodiment, informative abstract value and file size that eMule download link information is file to be downloaded, in these mapping relations, informative abstract value and the file size of file to be downloaded are corresponding with cryptographic Hash, wherein, cryptographic Hash is corresponding one by one with informative abstract value and the file size of file to be downloaded.Therefore when inquiry, first from the eMule download link, extract the informative abstract value of file, then using the informative abstract value of file to be downloaded as the inquiry major key, thereby obtain the cryptographic Hash of file to be downloaded.
In the present embodiment, above-mentioned steps S130 is specially: according to default URL link and the mapping relations of cryptographic Hash, inquire about the multi-source URL set corresponding with the cryptographic Hash of file to be downloaded; According to default Bt seed file information and the mapping relations of cryptographic Hash, inquire about the Bt seed file information corresponding with the cryptographic Hash of file to be downloaded.
Step S140, according to the Bt seed file information of obtaining file to be downloaded and/or eMule download link information and the described file to be downloaded of multi-source URL set download.
After obtaining multi-source URL set, Bt seed file information and the eMule download link information of file to be downloaded, can take Http download, Bt download and eMule to download three kinds of modes and download file to be downloaded.
As shown in Figure 2, in one embodiment, the condition code that Bt seed file information is the Bt seed file and file sequence number, informative abstract value and file size that eMule download link information is file to be downloaded, above-mentioned steps S140 is specially:
Step S141, be divided into a plurality of bursts by file to be downloaded, and according to download capabilities, the downloading task of burst is dispatched.
Particularly, because the resource of the downloading mode based on different agreement is variant, therefore, when downloading different files, the download capabilities of three kinds of downloading modes is also different.For example, the resource of file A under the Bt download protocol is more, and therefore for file A, the ability that Bt downloads is the strongest; And the resource of file B under the eMule agreement is more, therefore for file B, the ability that eMule downloads is the strongest.Therefore before being downloaded, at first need file to be downloaded is divided into to a plurality of bursts, and be the downloading task that the downloading mode based on different agreement distributes burst according to download capabilities.
Step S143, according to the multi-source URL set downloading slicing of file to be downloaded.
Particularly, while carrying out the Http download, at first according to the multi-source URL of file to be downloaded, gather, the node linked to the URL contained in multi-source URL set by the Tracker server lookup, composition is based on Http download protocol p2p network, then carry out the p2p download based on this p2p network, complete distributed downloading task.
Step S145, when original download is linked as the Bt seed file, according to original download link downloading slicing, otherwise, obtain the Bt seed according to the condition code of the Bt seed file of file to be downloaded, and according to BT seed downloading slicing.
Particularly, carry out Bt while downloading, if original download is linked as the Bt seed file, does not need by according to Bt seed file acquisition of information Bt seed file, and can directly by original download, link and carry out the Bt download.If original present link is not the Bt seed file, at first according to the condition code of the Bt seed file of file to be downloaded, obtain the Bt seed.The Bt seed is stored in the Bt seed bank, and it is corresponding with it that each Bt seed has unique Bt seed characteristics code, after the condition code that obtains the Bt seed file, can find by condition code the Bt seed in the Bt seed bank.Then utilize the Bt seed, by Tracker server (tracking server), inquire the node that contains this Bt seed, form based on Bt download protocol p2p network, then based on this p2p network, carry out the p2p download, complete distributed downloading task.
Step S147, when original download is linked as the eMule download link, according to original download link downloading slicing, otherwise, according to informative abstract value and the file size structure eMule download link of file to be downloaded, and according to eMule download link downloading slicing.
Particularly, while carrying out the eMule download, if original download is linked as the eMule download link, does not need to download and connect according to eMule download link acquisition of information eMule, and directly adopt the original download link to carry out the eMule download.If the original download link does not connect for eMule downloads, at first according to informative abstract value and the file size of file to be downloaded, construct the eMule download link, then utilize the eMule download link, by the Tracker server lookup to the node that contains this eMule download link, composition is based on eMule download protocol p2p network, then carry out the p2p download based on this p2p network, complete distributed downloading task.
In one embodiment, if in the downloading process of file to be downloaded, there are one or both downloading modes to fulfil distributed downloading task ahead of schedule, in order to save Internet resources, reduce download consuming time, will be redistributed remaining downloading task.
In another embodiment, data download method also comprises:
When file to be downloaded is new file, set up and store the URL link of new file and the mapping relations between cryptographic Hash, Bt seed information and cryptographic Hash or eMule download link information and cryptographic Hash.
Particularly, after obtaining the original download link, if link the cryptographic Hash that can not inquire file to be downloaded according to original download, judge that this file to be downloaded is new file.At first calculate the cryptographic Hash of this new file, if the original download of new file is linked as the origin url link, set up and store the two-way mapping relations of URL link and cryptographic Hash; If the original download of new file is linked as the eMule download link, set up and store the two-way mapping relations of eMule download link information and cryptographic Hash; If the original download of new file is linked as the Bt seed file, set up and store the two-way mapping relations of Bt seed file information and cryptographic Hash.
In addition, when the original download of new file is linked as the Bt seed file, data download method also comprises:
Obtain and store the Bt seed file of file to be downloaded.
Particularly, the Bt seed file of new file is stored in the Bt seed bank, when in follow-up downloading process, after getting the condition code of this Bt seed file, can in the Bt seed bank, find corresponding Bt seed file.Thereby can be downloaded according to this Bt seed file.
Another agreement mutation of Bt download protocol is called the Magnet agreement, i.e. and " magnetic force link ", the Main Function of magnetic force link is identification BT seed file.This link is to generate " digital finger-print " of a plain text by the Hash result of different file contents, identifies the Bt seed file of file.Different is that this " digital finger-print " can be generated from any file by anyone, and (for example: BT Tracker server), and recognition accuracy is high without any need for the support of " central authority " to make " magnetic force link ".When the mutation Magnet agreement that adopts the Bt download protocol is downloaded, can directly by " digital finger-print " in Magnet agreement identification, be embodied in the Bt seed file in the Bt seed bank, then downloaded according to the Bt seed file, therefore can be improved the download efficiency of Magnet agreement.
As shown in Figure 3, the present invention also provides a kind of data downloading system.Data downloading system comprisesDownload Server 100 and download client 200.Wherein,Download Server 100 comprisesresource query server 110,logical server group 120.
Resource query server 110 is for obtaining the download request of file to be downloaded, comprises the original download link in download request, and original download is linked as in origin url link, BT seed file, eMule download link any one.
Comprised the original download link of file to be downloaded in download request.After obtaining download request,resource query server 110 can extract the original download link of file to be downloaded from download request.In the ordinary course of things, original download is linked as origin url link or Bt seed or eMule download link.
Logical server group 120 is for the cryptographic Hash according to original download link acquisition file to be downloaded.
Obtain the original download link of file to be downloaded atresource query server 110 after,logical server group 120 need to obtain according to the original download link unique identifying number of file to be downloaded: the cryptographic Hash of file to be downloaded.
As shown in Figure 4, in one embodiment,logical server group 120 comprisesU2h server 121,Bt2h server 123 and eMule2h server 125.Wherein:
WhenU2h server 121 links for be linked as origin url when original download, according to default URL link and the mapping relations of cryptographic Hash, inquiry links corresponding cryptographic Hash with the origin url of file to be downloaded.
U2h server 121 is linked in respective file hash(cryptographic Hash for URL) mapping server, particularly, when the original download of file to be downloaded is linked as the origin url link, the URL link that 121 inquiries of U2h server are default and the mapping relations of cryptographic Hash, in these mapping relations, each URL link is to there being a cryptographicHash.U2h server 121 finds and links identical URL with origin url and link in mapping relations, and its corresponding cryptographic Hash is just the cryptographic Hash of this file to be downloaded.
Bt2h server 123 when when original download, being linked as the BT seed file, according to default Bt seed file information and the mapping relations of cryptographic Hash, is inquired about the cryptographic Hash corresponding with the Bt seed file information of file to be downloaded.
Bt2h server 123 be the Bt seed file in respective file hash mapping server, particularly, when the original download of file to be downloaded is linked as the Bt kind period of the day from 11 p.m. to 1 a.m, the Bt seed file information thatBt2h server 123 is default and the mapping relations of cryptographic Hash.In the present embodiment, the condition code of the Bt seed file that Bt seed file information is file to be downloaded and file sequence number, in these mapping relations, the condition code of Bt seed file is corresponding with cryptographic Hash.Therefore, duringBt2h server 123 inquiry, using the condition code of Bt seed of file to be downloaded and file sequence number as the inquiry major key, obtain the cryptographic Hash of file to be downloaded.
EMule2h server 125 when when original download, being linked as the eMule download link, according to default eMule download link information and the mapping relations of cryptographic Hash, is inquired about the cryptographic Hash corresponding with the eMule download link information of file to be downloaded.
EMule2h server 125 is eMule download link and file hash mapping server, concrete, when the original link of file to be downloaded is the eMule download link, the eMule download link information that 125 inquiries of eMule2h server are default and the mapping relations of cryptographic Hash.In the present embodiment, informative abstract value and file size that eMule download link information is file to be downloaded, in these mapping relations, the informative abstract value of file to be downloaded is corresponding with cryptographic Hash, therefore, when 125 inquiry of eMule2h server, first from the eMule download link, extract the informative abstract value of file, then using the informative abstract value of file to be downloaded as the inquiry major key, thereby obtain the cryptographic Hash of file to be downloaded.
Logical server group 120 is also for the cryptographic Hash according to file to be downloaded, and, when original download is linked as the BT seed file, the eMule download link information and the multi-source URL that obtain file to be downloaded gather; When original download is linked as the eMule download link, obtain Bt seed file information and the multi-source URL set of file to be downloaded; When original download is linked as the origin url link, obtain Bt seed file information and eMule download link information and the multi-source URL set of file to be downloaded.
Cryptographic Hash is the unique identification of file, no matter be therefore under which kind of download protocol, the cryptographic Hash of same file is also identical.Therefore,logical server group 120, after obtaining the cryptographic Hash of file to be downloaded, can obtain the download link of file to be downloaded under different download protocols by default mapping relations.
In one embodiment,logical server group 120 also comprisesh2U server 122,h2Bt server 124 and h2eMule server 126.Wherein:
H2U server 122 is the mapping relations with cryptographic Hash for the link of the URL according to default, inquire about the multi-source URL set corresponding with the cryptographic Hash of file to be downloaded.
H2U server 122 is that file hash links mapping server with corresponding URL, and identical file likely has a plurality of download address, and in the mapping relations of URL link and cryptographic Hash, each cryptographic Hash may corresponding a plurality of URL links.When the URL link that 122 inquiries of h2U server are default and the mapping relations of cryptographic Hash, can obtain a plurality of URL download link of file to be downloaded, a plurality of URL download link of file to be downloaded form multi-source URL set jointly.
H2Bt server 124, for the Bt seed file information according to default and the mapping relations of cryptographic Hash, is inquired about the Bt seed file information corresponding with the cryptographic Hash of file to be downloaded.
H2Bt server 124 is file hash and corresponding Bt seed file mapping server.In one embodiment, Bt seed file information comprises condition code and the file sequence number of Bt seed file, and what in the mapping relations of Bt seed file information and cryptographic Hash, record is the condition code of file cryptographic Hash and Bt seed and the mapping relations of one group of data that the file sequence number forms.Identical file is corresponding a plurality of Bt seed likely, therefore, in the mapping relations of Bt seed file information and cryptographic Hash, each cryptographic Hash may corresponding a plurality of same Bt seeds a stack features code and file sequencenumber.H2Bt server 124, when obtaining the Bt seed file information of download file, generally obtains condition code and the file sequence number of downloading that the fastest Bt seed of average speed.In one embodiment, data downloading system also comprises statistical server, when having downloaded at every turn, download client can be consuming time by downloading, average speed of download etc. downloaded relevant information reporting to statistical server, statistical server carries out computational analysis to downloading relevant information, can know the average speed of good and bad and each Bt seed file of resource, thereby be convenient to select to download the fastest Bt seed file of average speed.
H2eMule server 126, for the eMule download link information according to default and the mapping relations of cryptographic Hash, is inquired about the eMule download link information corresponding with the cryptographic Hash of file to be downloaded.
H2eMule server 126 is file hash and corresponding eMule download link mapping server.In one embodiment, eMule download link information is file to be downloaded informative abstract value and file size.Because the informative abstract value is also the unique identification of file to be downloaded, therefore, the informative abstract value of the cryptographic Hash of file to be downloaded and file is relation one to one.Cryptographic Hash and the informative abstract value of file to be downloaded and the mapping of file size of file to be downloaded have been recorded in default eMule download link information and the mapping relations of cryptographic Hash, therefore,h2eMule server 126 is inquired about and can be obtained file to be downloaded unique informative abstract value and file size by cryptographic Hash.
In another embodiment, when original download is linked as the Bt seed file,logical server group 120 can only compriseh2U server 122 andh2eMule server 126.
In another embodiment, when original download is linked as the eMule download link,logical server group 120 can only compriseh2U server 122 andh2Bt server 124.
Download client 200 is for the Bt seed file information according to obtaining file to be downloaded and/or eMule download link information and the described file to be downloaded of multi-source URL set download.
Obtain multi-source URL set, Bt seed file information and the eMule download link information of file to be downloadedlogical server group 120 after, downloadclient 200 can take Http download, Bt to download and three kinds of modes of eMule download are downloaded file to be downloaded.
As shown in Figure 5, in one embodiment, the condition code that Bt seed file information is the Bt seed file and file sequence number, downloadclient 200 comprisesscheduler module 210 and download module 220.Wherein,download module 220 comprisesHttp download unit 221,Bt download unit 223 andeMule download unit 225.
Scheduler module 210 is for file to be downloaded being divided into to a plurality of bursts, and according to download capabilities, the downloading task of burst dispatched.
Particularly, because the resource of the downloading mode based on different agreement is variant, therefore, when downloading different files, the download capabilities of three kinds of downloading modes is also different.For example, the resource of file A under the Bt download protocol is more, and therefore, for file A, the ability that Bt downloads is the strongest; And the resource of file B under the eMule agreement is more, therefore for file B, the ability that eMule downloads is the strongest.Therefore, before being downloaded, atfirst scheduler module 210 needs file to be downloaded is divided into to a plurality of bursts, and is the downloading task that the different download unit ofdownload module 220 distributes burst according to download capabilities.
Http download unit 221 is for the set of the multi-source URL according to file to be downloaded downloading slicing.
Particularly, whenHttp download unit 221 carries out the Http download, at first according to the multi-source URL of file to be downloaded, gather, the node linked to the URL contained in multi-source URL set by the Tracker server lookup, composition is based on Http download protocol p2p network, then carry out the p2p download based on this p2p network, complete distributed downloading task.
Bt download unit 223 when when original download, being linked as the Bt seed file, according to original download link downloading slicing, otherwise, obtain the Bt seed according to the condition code of the Bt seed file of file to be downloaded, and according to BT seed downloading slicing.
Particularly,Bt download unit 223 carries out Bt while downloading, if original download is linked as the Bt seed file, 223 of Bt download units do not need by according to Bt seed file acquisition of information Bt seed file, and can directly by original download, link and carry out the Bt download.If original present link is not the Bt seed file, at firstBt download unit 223 obtains the Bt seed according to the condition code of the Bt seed file of file to be downloaded.The Bt seed is stored in the Bt seed bank, and it is corresponding with it that each Bt seed has unique Bt seed characteristics code, afterBt download unit 223 obtains the condition code of Bt seed files, can find by condition code the Bt seed in the Bt seed bank.Then utilize the Bt seed,, form based on Bt download protocol p2p network to the node that contains this Bt seed by the Tracker server lookup, then based on this p2p network, carry out the p2p download, complete distributed downloading task.
EMule download unit 225 is when being linked as the eMule download link when original download, according to original download link downloading slicing, otherwise, according to informative abstract value and the file size structure eMule download link of file to be downloaded, and according to eMule download link downloading slicing.
Particularly, wheneMule download unit 225 carries out the eMule download, if original download is linked as the eMule download link, 225 of eMule download units do not need to download and connect according to eMule download link acquisition of information eMule, and directly adopt the original download link to carry out the eMule download.If the original download link does not connect for eMule downloads, at firsteMule download unit 225 constructs the eMule download link according to informative abstract value and the file size of file to be downloaded, then utilize the eMule download link, by the Tracker server lookup to the node that contains this eMule download link, composition is based on eMule download protocol p2p network, then carry out the p2p download based on this p2p network, complete distributed downloading task.
In one embodiment, if in the downloading process of file to be downloaded, there is one or two download unit to fulfil distributed downloading task ahead of schedule, in order to save Internet resources, reduce download consuming time,scheduler module 210 will be redistributed remaining downloadingtask.Scheduler module 210 makes three download units always in running order, prevents idle download unit, thereby improves download efficiency.
As shown in Figure 6, in another embodiment,Download Server 100 also comprisesgoods receiving server 130 and Bt seed server 140.Wherein:
The URL link of new file and the mapping relations between cryptographic Hash, Bt seed information and cryptographic Hash or eMule download link information and cryptographic Hash are set up and stored togoods receiving server 130, for when file to be downloaded is new file.
Particularly, afterresource query server 110 obtains the original download link, iflogical server group 120 links the cryptographic Hash that can not inquire file to be downloaded according to original download, judge that this file to be downloaded is new file.Atfirst download client 200 calculates the cryptographic Hash of this new file, if the original download of new file is linked as the origin url link, the two-way mapping relations of URL link and cryptographic Hash are set up and stored to 130 of goods receiving servers; If the original download of new file is linked as the eMule download link, the two-way mapping relations of eMule download link information and cryptographic Hash are set up and stored to 130 of goods receiving servers; If the original download of new file is linked as the Bt seed file, the two-way mapping relations of Bt seed file information and cryptographic Hash are set up and stored to 130 of goods receiving servers.
In one embodiment, in above-mentioned newly-built mapping relations storage and index data base, the data of described index data base can be called bylogical server group 120, andlogical server group 120, carrying out query mappings while concerning, can search mapping relations from index data base.Simultaneously, above-mentioned newly-built mapping relations also will be synchronized with in logical server group's internal memory.Logical server group 120, when calling mapping relations, deposits middle inquiry at first within it, if just search in internal memory less than searching in index data base.The mode of searching like this can be accelerated the speed of high inquiry, thereby improves overall performance.
The Bt seed file of file to be downloaded is obtained and stored toBt seed server 140.
Particularly, when the file to be downloaded original download that is new file and new file is linked as the Bt seed file,Bt seed server 140 is obtained the Bt seed file that file to be downloaded is complete, and the Bt seed file of file to be downloaded is stored in to the Bt seed bank.When in follow-up downloading process, after getting the condition code of this Bt seed file, can in the Bt seed bank, find corresponding Bt seed file.Thereby can be downloaded according to this Bt seed file.
Another agreement mutation of Bt download protocol is called the Magnet agreement, i.e. and " magnetic force link ", the Main Function of magnetic force link is identification BT seed file.This link is to generate " digital finger-print " of a plain text by the Hash result of different file contents, identifies the Bt seed file of file.Different is that this " digital finger-print " can be generated from any file by anyone, and (for example: BT Tracker server), and recognition accuracy is high without any need for the support of " central authority " to make " magnetic force link ".When the mutation Magnet agreement that adopts the Bt download protocol is downloaded,download client 200 can directly be embodied in the Bt seed file in the Bt seed bank by " digital finger-print " in Magnet agreement identification, then downloaded according to the Bt seed file, therefore can be improved the download efficiency of Magnet agreement.
Above-mentioned data download method and system, at first obtain the download request that comprises the link of file to be downloaded original download, and link according to original download the cryptographic Hash that obtains file to be downloaded.Then according to the cryptographic Hash of file to be downloaded, obtain two in the Bt seed file information of file to be downloaded and eMule download link information or link different one from original download in both, and the multi-source URL set of obtaining file to be downloaded.Finally according to multi-source URL set, Bt seed file information and the eMule download link information of file to be downloaded, download file to be downloaded.By said method and system, after the original download link that obtains file to be downloaded, can obtain multi-source URL set, Bt seed file information and the eMule download link information of file to be downloaded, thereby can adopt the downloading mode based on three kinds of download protocols to download file to be downloaded in p2p network separately simultaneously.Therefore, said method and system can take full advantage of Internet resources, realize that the network based on different download protocols carries out data sharing.
The above embodiment has only expressed several execution mode of the present invention, and it describes comparatively concrete and detailed, but can not therefore be interpreted as the restriction to the scope of the claims of the present invention.It should be pointed out that for the person of ordinary skill of the art, without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection range of patent of the present invention should be as the criterion with claims.