CN102055786A - File download method and server, download client and system adopting same - Google Patents

File download method and server, download client and system adopting same Download PDF

Info

Publication number
CN102055786A
CN102055786A CN2009102374501A CN200910237450A CN102055786A CN 102055786 A CN102055786 A CN 102055786A CN 2009102374501 A CN2009102374501 A CN 2009102374501A CN 200910237450 A CN200910237450 A CN 200910237450A CN 102055786 A CN102055786 A CN 102055786A
Authority
CN
China
Prior art keywords
downloaded
file
download
peer
server
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
CN2009102374501A
Other languages
Chinese (zh)
Other versions
CN102055786B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN200910237450.1A priority Critical patent/CN102055786B/en
Publication of CN102055786A publication Critical patent/CN102055786A/en
Application granted granted Critical
Publication of CN102055786B publication Critical patent/CN102055786B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a file download method and a server, a download client and a system which adopt the method, and belongs to the technical field of network communication. The method comprises the following steps: a P2P (peer-to-peer) server receives the file name of a file to be downloaded; the P2P server acquires download information according to the file name, sends back the download information which at least includes segment amounts of the file to be downloaded, the peer downloading the file to be downloaded and the segment number of the file to be downloaded and stored in the peer, to the download client; and the download client downloads the file to be downloaded from the download server and the peer downloading the file to be downloaded according to the segment amounts in the file to be downloaded and the segment number of the file to be downloaded and stored in the peer. The system comprises the P2P server and the download client. By adopting the method, the occupied server bandwidth and user resource are reduced and the download is accelerated.

Description

Method, server, download end and system that a kind of file is downloaded
Technical field
The present invention relates to network communications technology field, method, server, download end and system that particularly a kind of file is downloaded.
Background technology
At present, file is downloaded and have been become one of main application of the Internet, and along with all kinds of files to be downloaded such as Games Software, other application software take up space increasingly, the file download has become and takies one of maximum application of server bandwidth.Software enterprise and expensive hardware cost and the bandwidth cost of download payment of organizing the file of having nothing for it but.
The traditional file downloading mode mainly is by Webpage corresponding in the URL login Download Server, and the chained address of the file to be downloaded that provides from Webpage is download file to be downloaded from Download Server directly.But this kind mode speed of download is slow, take higher server bandwidth.
In order to solve the problem that exists in the traditional file downloading mode, people bring into use P2P (Peer-to-Peer, peer-to-peer network) mode file in download, mainly contain the method for following two kinds of P2P mode file in download at present:
First kind, use the multi-source download tool from Download Server, to download file to be downloaded, for example, by URL (Uniform Resource Locator, URL(uniform resource locator)) corresponding Webpage in the login Download Server, multi-source download tools such as a use sudden peal of thunder or whirlwind are downloaded file to be downloaded from the chained address of the file to be downloaded that this Webpage provides.
Second kind, use Bt (Bit torrent, file distributing agreement) or Emule (electric donkey) shared file system from all clients that participate in, to download file to be downloaded.
In realizing process of the present invention, the inventor finds that there is following problem at least in existing P2P downloading mode:
In above-mentioned first method: the multi-source download tool takies higher server bandwidth, and multi-source download tool capacity is bigger, before downloading the multi-source download tool will be installed earlier, has taken user resources.
In above-mentioned second method: can't guarantee speed of download, and before downloading, also Bt or Emule shared file system will be installed earlier, take user resources.
Summary of the invention
For when the file in download, reduce taking and improve speed of download, method, server, download end and system that the embodiment of the invention provides a kind of file to download to server bandwidth and user resources.Described technical scheme is as follows:
The method that a kind of file is downloaded, described method comprises:
The P2P server receives the filename of file to be downloaded;
Described P2P server is according to described filename, obtain download message, and return described download message and give to download end, described download message comprises fragment sum that described file to be downloaded comprises at least, downloads sheet that the described file to be downloaded stored among the Peer of described file to be downloaded and the described Peer comprises number;
The sheet that the described file to be downloaded of storing among fragment sum that described download end comprises according to described file to be downloaded and the described Peer comprises number, the described file to be downloaded of download from Download Server and the described Peer that is downloading described file to be downloaded.
A kind of server, described server comprises:
Receiver module is used to receive the filename of file to be downloaded;
Acquisition module, be used for according to described filename, obtain download message, described download message comprises fragment sum that described file to be downloaded comprises at least, downloads sheet that the described file to be downloaded stored among the Peer of described file to be downloaded and the described Peer comprises number;
Sending module is used to send described download message to downloading end.
A kind of download end, described download end comprises:
Receiver module is used to receive download message, and described download message comprises fragment sum that described file to be downloaded comprises at least, downloads sheet that the described file to be downloaded stored among the Peer of described file to be downloaded and the described Peer comprises number;
Download module, the sheet that the described file to be downloaded that the fragment that is used for comprising according to described file to be downloaded sum and described Peer store comprises number, the described file to be downloaded of download from Download Server and the described Peer that is downloading described file to be downloaded.
The system that a kind of file is downloaded, described system comprise downloading holds and the P2P server;
Described P2P server is used to receive the filename of file to be downloaded; According to described filename, obtain download message, and return described download message and give to download end, described download message comprises fragment sum that described file to be downloaded comprises at least, downloads sheet that the described file to be downloaded stored among the Peer of described file to be downloaded and the described Peer comprises number;
Described download end, the sheet that the described file to be downloaded that the fragment that is used for comprising according to described file to be downloaded sum and described Peer store comprises number, the described file to be downloaded of download from Download Server and the described Peer that is downloading described file to be downloaded.
Receive the filename of file to be downloaded by the P2P server, according to filename, obtain download message, and return this download message and give to download end, download end and from the Peer that downloads file to be downloaded that Download Server and download message comprise, download file to be downloaded.Wherein, owing to download the direct file in download of end, take user resources thereby reduce; Because the while file in download takies the bandwidth resources of Download Server and improves speed of download so reduce from Download Server and Peer.
Description of drawings
Fig. 1 is the method flow diagram that a kind of file that the embodiment of the invention 1 provides is downloaded;
Fig. 2 is a kind of P2P network architecture schematic diagram that the embodiment of the invention 1 provides;
Fig. 3 is the method detail flowchart that a kind of file that the embodiment of the invention 1 provides is downloaded;
Fig. 4 is the schematic diagram of a kind of server of providing of the embodiment of the invention 2;
Fig. 5 is a kind of schematic diagram of downloading end that the embodiment of the invention 3 provides;
Fig. 6 is the system block diagram that a kind of file that the embodiment of the invention 4 provides is downloaded.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, embodiment of the present invention is described further in detail below in conjunction with accompanying drawing.
Embodiment 1
As shown in Figure 1, the method that the embodiment of the invention provides a kind of file to download comprises:
Step 101:P2P server receives the filename of file to be downloaded;
Step 102:P2P server is according to the filename that receives, obtain download message, and return this download message and give the download end, wherein, this download message comprises fragment sum that file to be downloaded comprises at least, downloads sheet that the file to be downloaded stored among the Peer of file to be downloaded and this Peer comprises number;
Step 103: download sheet that the file to be downloaded stored among fragment sum that end comprises according to file to be downloaded and this Peer comprises number, from Download Server with downloading the Peer of file to be downloaded and downloading file to be downloaded.
Wherein, download end and can or operate in downloading etc. among certain Peer for certain Peer in the P2P network, each downloads end all a corresponding Peer, is exactly in fact to download the Peer of end correspondence in file in download so download the end file in download.
In embodiments of the present invention, the P2P server receives the filename of file to be downloaded, according to filename, obtains download message, and return this download message and give to download end, download end and from the Peer that downloads file to be downloaded that Download Server and download message comprise, download file to be downloaded.Wherein, owing to download the direct file in download of end, take user resources thereby reduce; Because the while file in download takies the bandwidth resources of Download Server and improves speed of download so reduce from Download Server and Peer.
For said method is elaborated, see also Fig. 2, a kind of P2P network architecture schematic diagram for the embodiment of the invention provides comprises Download Server, P2P server and Peer (being respectively PeerA, PeerB and PeerC).Wherein, Download Server is used for storage file; The P2P server is used for the corresponding relation of storage file name and fragment sum and the corresponding relation of Peer and fileinfo, and file is made up of fragment, and each fragment all has the sheet number of self.
Based on the P2P network architecture that above-mentioned Fig. 2 provided, referring to Fig. 3, the detailed process of the method that the embodiment of the invention provides specifically comprises:
Step 201: download end obtains file to be downloaded from the download address of file to be downloaded filename, and the filename that obtains is sent to the P2P server;
Wherein, include the filename of file to be downloaded in the download address of file to be downloaded, particularly, download end and from the download address of file to be downloaded, read filename, and this document name is sent to the P2P server.
Wherein, download the download address that end can obtain file to be downloaded from Download Server.For example, with PeerA is that the download end is that example describes, download end obtains file to be downloaded from Download Server download address IP3, wherein, IP3 is " www. file 3.com ", and the filename that includes file to be downloaded in IP3 is a file 3, reads file 3 from IP3, and file 3 is sent to the P2P server.
Step 202:P2P server receives the filename of file to be downloaded, searches the fragment sum that file to be downloaded comprises, and returns to the download end;
Particularly, the P2P server receives the filename of file to be downloaded, according to this document name, from the corresponding relation of filename and the fragment sum of self storage, find out the fragment sum that file to be downloaded comprises, and the fragment sum that file to be downloaded comprises returned to download hold.
Wherein, the sum of all fragments that every record in the corresponding relation of filename and fragment sum is used to represent that certain file and this document comprise, the corresponding relation of filename as shown in table 1 and fragment sum, the implication of second line display of table 1 is that file 1 and this document 1 comprise all fragment sums 3, and promptly file 1 comprises three fragments.The corresponding relation of filename and fragment sum is that operator sets up in advance, comprises the filename of each file in the Download Server and the corresponding relation of it fragment sum that comprises.
Table 1
Filename The fragment sum
File 1 3
File 2 4
File 3 5
...... ......
For example, the filename that the P2P server receives file to be downloaded is a file 3, finds out the corresponding fragment of file to be downloaded according to file 3 from the corresponding relation of filename as shown in table 1 and fragment sum and adds up to 5.
Wherein, in the step 201 of present embodiment, download the filename that end can not read the file to be downloaded in the download address earlier, but directly the download address of file to be downloaded is sent to the P2P server; Correspondingly, the P2P server receives the download address of file to be downloaded in step 202, and reads the filename of file to be downloaded from download address, searches the fragment sum that file to be downloaded comprises according to the filename that reads then.
Step 203:P2P server finds out all Peer that downloading file to be downloaded in the network according to the filename of file to be downloaded;
Particularly, the P2P server is according to the filename of file to be downloaded, finds out all Peer nodes of downloading file to be downloaded from the corresponding relation of the Peer that self stored and fileinfo.
Wherein, fileinfo just comprises at the filename of file in download at least and downloaded the sheet number of the fragment that this document comprises, can also comprise that download state promptly downloading or downloading end, the bandwidth of Peer etc.Can for example, store the corresponding relation of Peer and fileinfo with table 2 with the corresponding relation of forms such as table storage Peer and fileinfo.In the corresponding relation of Peer shown in the table 2 and fileinfo, in the storage networking just at each Peer, each Peer of file in download just at the filename of downloaded files and the sheet number of having downloaded the fragment that each file comprises.For example, be that PeerA, file 1 and sheet numbers 1,2,3 is used to represent PeerA just in file in download 1 at second line item shown in the table 2, and the sheet that comprises of file in download 1 number is 1,2,3 three fragment.Peer in the network is when downloading certain file, all the filename of the sheet of the fragment that will download number and this document reports the P2P server, and the P2P server number is stored in this Peer, filename and sheet in the corresponding relation of Peer and fileinfo as a record.Wherein, represent a unique Peer with the IP address in the present embodiment, when the P2P server receives sheet that certain Peer reports number and filename, can directly view the IP address of this Peer, represent this Peer with this IP address.
Table 2
Figure B2009102374501D0000061
For example, the P2P server is an index with file 3, just finds out PeerB and PeerC in file in download 3 from table 2.
Step 204:P2P server is selected a Peer from all Peer that search, further from the corresponding relation of Peer and the fileinfo of self storage, read this Peer and stored sheet that file to be downloaded comprises number, and the sheet that the file to be downloaded of storing among this Peer and this Peer is comprised number returns to download and holds;
Wherein, it is multiple that the P2P server selects the method for Peer to have, and for example, selects a Peer at random from all Peer, for another example, selects to have downloaded the maximum Peer of segments from all Peer.
For example, the P2P server is from the PeerB and PeerC that find out, select PeerC at random, perhaps select to have downloaded the many PeerC of segments, from the corresponding relation of Peer as shown in table 2 and fileinfo, read the sheet of having stored all fragments that file to be downloaded comprises among the PeerC further and number be respectively 1,2,3,4, PeerC and sheet numbers 1,2,3,4 returned to download end.
Step 205: occur in after the step 202 and and take place simultaneously or afterwards, download the fragment sum that termination is received file to be downloaded,, determine the sheet number of all fragments that file to be downloaded comprises according to the fragment sum with step 203 and/or 204;
For example, download end and add up to 5, determine file to be downloaded and comprise that sheet number is respectively 1,2,3,4,5 five fragment according to receiving the fragment that the P2P server returns.
Step 206: download and to select a sheet number all sheets that end comprises from file to be downloaded number, with this sheet number as first to be downloaded number, according to the download address of file to be downloaded from Download Server down slide glass number be first to be downloaded number fragment;
Wherein, it is multiple to select first to be downloaded number method to comprise, for example, download end and select a sheet number at random, and with this sheet number as first to be downloaded number, for another example, select a sheet number in order, and with this sheet number as first to be downloaded number.For example, download end from 1,2,3,4,5 five sheet number, select sheet numbers 3 at random, with sheet numbers 3 as first to be downloaded number, according to IP3 from Download Server down slide glass number be 3 fragment.
In addition, download end and begin when the download server sheet number is first to be downloaded number fragment, with the filename of file to be downloaded, report the P2P server first to be downloaded number.The P2P server is according to downloading the corresponding Peer of end and the filename of file to be downloaded, search self the storage Peer and the corresponding relation of fileinfo, if do not find out the corresponding relation that comprises the filename of downloading corresponding Peer of end and file to be downloaded, then will download the corresponding Peer of end, the filename of file to be downloaded and first to be downloaded number are stored in the corresponding relation of the Peer of self storage and fileinfo as a new corresponding relation, if find out the corresponding relation that comprises the filename of downloading corresponding Peer of end and file to be downloaded, then first to be downloaded number be stored in this corresponding relation.For example download end file 3 and sheet numbers 3 reported the P2P server, the P2P server is according to downloading end corresponding PeerA and file 3, from the corresponding relation of Peer as shown in table 2 and fileinfo, do not find out the corresponding relation that comprises PeerA and file 3, then PeerA, file 3 and sheet numbers 3 are stored in the corresponding relation of Peer as shown in table 2 and fileinfo as a new corresponding relation, shown in the following table 3 of the result who obtains.
Table 3
In addition, download end and can also report other information to the P2P server, for example, report the bandwidth of Peer of self correspondence or download state promptly downloading etc. to the P2P server, correspondingly, the P2P server also writes down other information that report.Wherein, in the network each Peer when file in download, all to just report filename to the P2P server in downloaded files, the sheet of the fragment downloaded number, each Peer can also report other information.
Wherein, step 205-206 occurs in after the step 202, can take place simultaneously with step 203-204 or take place after step 204.In addition, in present embodiment step 202, after the P2P whois lookup goes out the fragment sum that file to be downloaded comprises, can not return the fragment sum earlier and give and download end, download end up to fragment sum, Peer and sheet number being returned to together in step 204.
Step 207: download sheet that the file to be downloaded stored among Peer that termination receives that the P2P server returns and this Peer comprises number, select a sheet of also not downloading number in the sheet that the file to be downloaded of storing comprises number from this Peer, and with this sheet number as second to be downloaded number;
For example, download termination and receive storage file 3 comprises among PeerC that the P2P server returns and the PeerC 1,2,3,4 four sheet number, and from 1,2,3,4 four sheet receiving number, selects an also sheet of download numbers 2 not, and with this sheet number as second to be downloaded number.
Step 208: download end from the Peer that returns down slide glass number be second to be downloaded number fragment;
Wherein, download end when slide glass number is second to be downloaded number a fragment down in the Peer that returns, with file to be downloaded with report the P2P server second to be downloaded number.Correspondingly, the P2P server is according to downloading the corresponding Peer of end and the filename of file to be downloaded, search the corresponding relation of Peer and fileinfo, if do not find out the corresponding relation that comprises the filename of downloading corresponding Peer of end and file to be downloaded, then will download the corresponding Peer of end, the filename of file to be downloaded and first to be downloaded number are stored in the corresponding relation of Peer and fileinfo as a new corresponding relation, if find out the corresponding relation that comprises the filename of downloading corresponding Peer of end and file to be downloaded, then first to be downloaded number be stored in this corresponding relation.
For example, download end slide glass under PeerC and number be 2 fragment, and file 3 and sheet numbers 2 reported the P2P server.Correspondingly, the P2P server is according to downloading end corresponding PeerA and file 3, from the corresponding relation of Peer as shown in table 3 and fileinfo, find out the corresponding relation that comprises PeerA and file 3, then sheet numbers 3 is stored in this corresponding relation, shown in the following table 4 of the result who obtains.
Table 4
Figure B2009102374501D0000081
Step 209: after from Download Server, having downloaded the current fragment of downloading, download all sheets that end comprises from file to be downloaded number, select a sheet of also not downloading number, with this sheet number as first to be downloaded number, and from Download Server down slide glass number be first to be downloaded number fragment; After from the Peer that returns, having downloaded the current fragment of downloading, download and select a sheet of also not downloading number in the sheet that file to be downloaded that end stores comprises number from the Peer that returns, with this sheet number as second to be downloaded number, and from the Peer that this returns down slide glass number be second to be downloaded number fragment, up to downloading complete file to be downloaded.
For example, after to have downloaded sheet from Download Server number be 3 fragment, download end and from 1,2,3,4,5 five sheet number, select a sheet of also not downloading number 1, with sheet number 1 as first to be downloaded number, down slide glass number is 1 fragment from Download Server, after to have downloaded sheet from PeerC number be 2 fragment, download end from the sheet that returns numbers 1,2,3,4, select a sheet of also not downloading numbers 4, with sheet numbers 4 as second to be downloaded number, down slide glass number is 4 fragment from PeerC, so, and till having downloaded complete file 3.
Wherein, when downloading complete file to be downloaded of end download, the filename of file to be downloaded and download state promptly downloaded finish to report the P2P server, correspondingly, the P2P server is according to this download state, just know that downloading end has downloaded complete file to be downloaded, and according to downloading the corresponding Peer of end and the filename of file to be downloaded, from the corresponding relation of Peer and fileinfo, find out the corresponding relation that comprises the filename of downloading corresponding Peer of end and file to be downloaded, and from the corresponding relation of Peer and fileinfo, delete this corresponding relation.
In addition, if it is each when reporting the filename of file to be downloaded to the P2P server and downloading the sheet of fragment to download end, also report download state promptly to download, just the P2P server will be downloaded the corresponding Peer of end, the filename of file to be downloaded and the fragment sheet downloaded number and download state are stored in the corresponding relation of Peer and fileinfo as a record, then when file is with the download end under the treating that P2P server reception download end reports, from the corresponding relation of Peer and fileinfo, find out the corresponding relation that comprises the filename of downloading corresponding Peer of end and file to be downloaded, then the download state in this corresponding relation is updated to and downloads end and get final product.Wherein, in the present embodiment, download end and also support breakpoint transmission.
Wherein, in the present embodiment, download end and also can be downloader.Wherein, the user is in advance by corresponding Webpage in the URL login Download Server, wherein, this Webpage provides the chained address of file to be downloaded corresponding download device, the chained address that provides according to this Webpage, the download address of directly downloading file to be downloaded corresponding download device and file to be downloaded certain Peer in the P2P network directly moves this downloader then in this Peer, this downloader is just downloaded file to be downloaded by above-mentioned steps 201-209.
Correspondingly, all be provided with a corresponding download device for each file in Download Server, Download Server provides the chained address of downloader by Webpage to the user, rather than the chained address of file to be downloaded directly is provided.Wherein, the downloader capacity is very little, generally has only 1 to 2MB size, so can download from Download Server fast, can also reduce taking the bandwidth resources of user resources and Download Server; And before utilizing the downloader file in download, need in Peer, not install, but when file in download, directly move downloader, so, further reduce taking user resources, make things convenient for the user.
In embodiments of the present invention, the P2P server receives the filename from the file to be downloaded of downloading end, according to filename, obtain the fragment sum that file to be downloaded comprises, downloading the storage file to be downloaded comprises among Peer of file to be downloaded and this Peer sheet number, and the above-mentioned information of obtaining returns and downloads end, downloads sheet that end comprises according to the file to be downloaded of storing among the fragment sum that returns and this Peer number, downloads file to be downloaded from Download Server and this Peer.Wherein, owing to download the direct file in download of end, take user resources thereby reduce; Because the while file in download takies the bandwidth resources of Download Server and improves speed of download so reduce from Download Server and Peer.
Embodiment 2
As shown in Figure 4, the embodiment of the invention provides a kind of server, comprising:
Receiver module 301 is used to receive the filename of file to be downloaded;
Acquisition module 302 is used for obtaining download message according to the filename that receives, and this download message comprises fragment sum that file to be downloaded comprises at least, downloads sheet that the file to be downloaded stored among the Peer of file to be downloaded and this Peer comprises number;
Sending module 303 is used to send this download message to downloading end.
Wherein, acquisition module 302 specifically comprises:
Search the unit, be used for, search file to be downloaded the fragment sum that comprises and all Peer that downloading file to be downloaded according to the filename that receives;
Selected cell is used for selecting a Peer who is downloading file to be downloaded from all Peer that search, and obtains the storage file to be downloaded comprises among this Peer sheet number;
Further, searching the unit specifically comprises:
First searches subelement, is used for according to the filename that receives, and from the corresponding relation of filename and fragment sum, searches corresponding fragment sum;
Second searches subelement, is used for according to the filename that receives, and from the corresponding relation of Peer and fileinfo, searches all corresponding Peer;
Further, this server also comprises:
First memory module, be used for when downloading the sheet of holding the fragment that reports the filename of file to be downloaded and downloading, judge in the corresponding relation of Peer and fileinfo and whether have the corresponding relation that comprises Peer that this download end is corresponding and the filename that reports, if not, store this download end corresponding Peer, the filename that reports and the sheet that reports number; If the sheet that reports number is stored in this corresponding relation;
Further, this server also comprises:
First removing module is used for according to the ending message that reports, will comprising that the corresponding relation of Peer that this downloads end is corresponding and the filename that reports is deleted when downloading end and report the filename of file to be downloaded and ending message.
In embodiments of the present invention, after server receives the filename of file to be downloaded, obtain fragment sum that file to be downloaded comprises, download sheet that the file to be downloaded stored among the Peer of file to be downloaded and this Peer comprises number, and the above-mentioned information that will obtain sends to the download end, so, make and download end, from Download Server and Peer, download file to be downloaded according to the information that server sends, reduce the bandwidth resources that take Download Server, improved speed of download.
Embodiment 3
As shown in Figure 5, the embodiment of the invention provides a kind of download end, comprising:
Receiver module 401 is used to receive download message, and this download message comprises fragment sum that file to be downloaded comprises at least, downloads sheet that the file to be downloaded stored among the Peer of file to be downloaded and this Peer comprises number;
Download module 402, the sheet that the file to be downloaded that the fragment that is used for comprising according to file to be downloaded sum and this Peer store comprises number is from Download Server with downloading the Peer of file to be downloaded and downloading file to be downloaded.
Wherein, download module 402 specifically comprises:
Determining unit is used for the fragment sum according to download message, determines all sheets that file to be downloaded comprises number;
First download unit is used for all sheets of comprising from file to be downloaded number, selects a sheet of also not downloading number, and this sheet number as first to be downloaded number, is downloaded first to be downloaded number fragment from Download Server;
Second download unit is used for the sheet that comprises from the file to be downloaded that this Peer stores number, selects a sheet of also not downloading number, and this sheet number as second to be downloaded number, is downloaded second to be downloaded number fragment from this Peer;
Further, this download end also comprises:
First reporting module is used for when downloading file to be downloaded, reports the filename of file to be downloaded and the sheet of the fragment downloaded number to the P2P server;
Further, this download end also comprises:
Second reporting module is used for when having downloaded file to be downloaded, reports the filename and the ending message of file to be downloaded to the P2P server;
Wherein, download end and can be downloader.
In embodiments of the present invention, download termination and accept the information of carrying,, from Download Server with downloading and downloading file to be downloaded the Peer that treats play file simultaneously, thereby improved the bandwidth resources that speed of download and minimizing take Download Server according to download message.In addition, downloading end can be downloader, the downloader capacity is very little, generally have only 1 to 2MB size, before utilizing downloader download file to be downloaded, do not need to install, but when downloading file to be downloaded, directly move downloader, just can download file to be downloaded, so, reduce taking user resources.
Embodiment 4
As shown in Figure 6, the system that the embodiment of the invention provides a kind of file to download, this system comprise P2P server 501 and download end 502;
P2P server 501 is used to receive the filename of file to be downloaded; Filename according to file to be downloaded, obtain download message, and return this download message and give to download end, wherein, this download message comprises fragment sum that file to be downloaded comprises at least, downloads sheet that the file to be downloaded stored among the Peer of file to be downloaded and this Peer comprises number;
Download end 502, be used for sheet that file to be downloaded that fragment sum that comprises according to file to be downloaded and the Peer that returns store comprises number, from Download Server and the Peer that returns, download file to be downloaded.
Wherein, P2P server 501 specifically comprises:
Receiver module is used to receive the filename of file to be downloaded;
Search module, be used for filename, search file to be downloaded the fragment sum that comprises and all Peer that downloading file to be downloaded according to file to be downloaded;
Select module, be used for selecting a Peer who is downloading file to be downloaded, obtain the storage file to be downloaded comprises among this Peer sheet number from all Peer that search;
Return module, the fragment sum that is used for file to be downloaded is comprised, download sheet that the Peer of file to be downloaded and file to be downloaded that this Peer stores comprise and number return to and to download end 302;
Searching module specifically comprises
First searches the unit, is used for the filename according to file to be downloaded, from the corresponding relation of filename and fragment sum, searches corresponding fragment sum;
Second searches the unit, is used for the filename according to file to be downloaded, from the corresponding relation of Peer and fileinfo, searches all corresponding Peer;
Downloading end 502 specifically comprises:
Determination module is used for the fragment sum that comprises according to file to be downloaded, determines all sheets that file to be downloaded comprises number;
First download module is used for all sheets of comprising from file to be downloaded number, selects a sheet of also not downloading number, and this sheet number as first to be downloaded number, is downloaded first to be downloaded number fragment from Download Server;
Second download module is used for the sheet that comprises from the file to be downloaded that the Peer that returns stores number, selects a sheet of also not downloading number, and this sheet number as second to be downloaded number, is downloaded second to be downloaded number fragment from this Peer;
Downloading end 502 also comprises:
The 3rd reporting module is used for when downloading end 502 and download files to be downloaded, reports the filename of file to be downloaded and the sheet of the fragment downloaded number to P2P server 501;
Correspondingly, P2P server 501 also comprises:
Second memory module, be used for judging whether the Peer and the corresponding relation of fileinfo exist the corresponding relation that comprises the filename of downloading corresponding Peer of end and file to be downloaded, if not, storage is downloaded end corresponding Peer, the filename that reports and the sheet that reports number; If the sheet that reports number is stored in this corresponding relation;
Downloading end 502 also comprises:
The 4th reporting module is used for reporting the filename and the ending message of file to be downloaded to P2P server 501 when download end 501 has been downloaded file to be downloaded;
Correspondingly, P2P server 501 also comprises:
Second removing module is used for according to ending message, will comprise the corresponding relation deletion of downloading corresponding Peer of end and filename.
Wherein, download end 502 in the present embodiment and support breakpoint transmission.
In embodiments of the present invention, the P2P server receives the filename of file to be downloaded, according to filename, obtains download message, and return this download message and give to download end, download end and from the Peer that downloads file to be downloaded that Download Server and download message comprise, download file to be downloaded.Wherein, owing to download the direct file in download of end, take user resources thereby reduce; Because the while file in download takies the bandwidth resources of Download Server and improves speed of download so reduce from Download Server and Peer.
All or part of content in the technical scheme that above embodiment provides can realize that its software program is stored in the storage medium that can read by software programming, storage medium for example: the hard disk in the computer, CD or floppy disk.
The above only is preferred embodiment of the present invention, and is in order to restriction the present invention, within the spirit and principles in the present invention not all, any modification of being done, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (19)

1. the method downloaded of a file is characterized in that described method comprises:
The P2P server receives the filename of file to be downloaded;
Described P2P server is according to described filename, obtain download message, and return described download message and give to download end, described download message comprises fragment sum that described file to be downloaded comprises at least, downloads sheet that the described file to be downloaded stored among the Peer of described file to be downloaded and the described Peer comprises number;
The sheet that the described file to be downloaded of storing among fragment sum that described download end comprises according to described file to be downloaded and the described Peer comprises number, the described file to be downloaded of download from Download Server and the described Peer that is downloading described file to be downloaded.
2. the method for claim 1 is characterized in that, described P2P server obtains download message according to described filename, specifically comprises:
According to described filename, search described file to be downloaded the fragment sum that comprises and all Peer that downloading described file to be downloaded;
From described all Peer that search, select a described Peer who is downloading described file to be downloaded, obtain the described file to be downloaded of storage comprises among the described Peer sheet number.
3. method as claimed in claim 2 is characterized in that, and is described according to described filename, searches described file to be downloaded the fragment sum that comprises and all Peer that downloading described file to be downloaded, specifically comprises:
According to described filename, from the corresponding relation of filename and fragment sum, search corresponding fragment sum;
According to described filename, from the corresponding relation of Peer and fileinfo, search all corresponding Peer.
4. the method for claim 1, it is characterized in that, the sheet that the described file to be downloaded of storing among fragment sum that described download end comprises according to described file to be downloaded and the described Peer comprises number, from Download Server and the described Peer that is downloading described file to be downloaded, download described file to be downloaded, specifically comprise:
According to described fragment sum, determine all sheets that described file to be downloaded comprises number;
All sheets that comprise from described file to be downloaded number, select a sheet of also not downloading number, with described number as first to be downloaded number, from described Download Server, download described first to be downloaded number fragment;
In the sheet that the described file to be downloaded of storing comprises number, select a sheet of also not downloading number from described Peer, with described number as second to be downloaded number, from described Peer, download described second to be downloaded number fragment.
5. as the described method of any claim of claim 1-4, it is characterized in that when described download end was downloaded described file to be downloaded, described method also comprised:
Described download end reports the filename of described file to be downloaded and the sheet of the fragment downloaded number to described P2P server;
Correspondingly,
Whether described P2P server is judged to exist in the corresponding relation of Peer and fileinfo and is comprised the Peer that described download end is corresponding and the corresponding relation of described filename, if not, store the Peer of described download end correspondence, the described filename that reports and the described sheet that reports number; If the described sheet that reports number is stored in the described corresponding relation.
6. as the described method of any claim of claim 1-4, it is characterized in that when described download end had been downloaded described file to be downloaded, described method also comprised:
Described download end reports the filename and the ending message of described file to be downloaded to described P2P server;
Correspondingly,
Described P2P server will comprise the corresponding relation deletion of the Peer and the described filename of described download end correspondence according to described ending message.
7. as the described method of any claim of claim 1-4, it is characterized in that described download end is a downloader.
8. method as claimed in claim 7 is characterized in that, before the P2P server receives the filename of file to be downloaded, also comprises and carries out described downloader.
9. method as claimed in claim 8 is characterized in that, before carrying out described downloader, extremely needs to download the Peer of file to be downloaded earlier from the described downloader of described download server.
10. a server is characterized in that, described server comprises:
Receiver module is used to receive the filename of file to be downloaded;
Acquisition module, be used for according to described filename, obtain download message, described download message comprises fragment sum that described file to be downloaded comprises at least, downloads sheet that the described file to be downloaded stored among the Peer of described file to be downloaded and the described Peer comprises number;
Sending module is used to send described download message to downloading end.
11. server as claimed in claim 10 is characterized in that, described acquisition module specifically comprises:
Search the unit, be used for, search described file to be downloaded the fragment sum that comprises and all Peer that downloading described file to be downloaded according to described filename;
Selected cell is used for selecting a described Peer who is downloading described file to be downloaded from described all Peer that search, and obtains the described file to be downloaded of storage comprises among the described Peer sheet number.
12. server as claimed in claim 11 is characterized in that, the described unit of searching specifically comprises:
First searches subelement, is used for according to described filename, from the corresponding relation of filename and fragment sum, searches corresponding fragment sum;
Second searches subelement, is used for according to described filename, from the corresponding relation of Peer and fileinfo, searches all corresponding Peer.
13., it is characterized in that described server also comprises as the described server of any claim of claim 10-12:
First memory module, be used for when downloading the sheet of holding the fragment that reports the filename of described file to be downloaded and downloading, judge whether to exist in the corresponding relation of Peer and fileinfo and comprise the Peer that described download end is corresponding and the corresponding relation of described filename, if not, store the Peer of described download end correspondence, the described filename that reports and the described sheet that reports number; If the described sheet that reports number is stored in the described corresponding relation.
14., it is characterized in that described server also comprises as the described server of any claim of claim 10-12:
First removing module is used for according to described ending message, will comprising the corresponding relation deletion of the Peer and the described filename of described download end correspondence when downloading end and report the filename of described file to be downloaded and ending message.
15. download end, it is characterized in that described download end comprises for one kind:
Receiver module is used to receive download message, and described download message comprises fragment sum that described file to be downloaded comprises at least, downloads sheet that the described file to be downloaded stored among the Peer of described file to be downloaded and the described Peer comprises number;
Download module, the sheet that the described file to be downloaded that the fragment that is used for comprising according to described file to be downloaded sum and described Peer store comprises number, the described file to be downloaded of download from Download Server and the described Peer that is downloading described file to be downloaded.
16. download end as claimed in claim 15 is characterized in that, described download module specifically comprises:
Determining unit is used for according to described fragment sum, determines all sheets that described file to be downloaded comprises number;
First download unit is used for all sheets of comprising from described file to be downloaded number, selects a sheet of also not downloading number, with described number as first to be downloaded number, from described Download Server, download described first to be downloaded number fragment;
Second download unit is used for the sheet that comprises from the described file to be downloaded that described Peer stores number, selects a sheet of also not downloading number, with described number as second to be downloaded number, from described Peer, download described second to be downloaded number fragment.
17., it is characterized in that described download end also comprises as claim 15 or 16 described download ends:
First reporting module is used for when downloading described file to be downloaded, reports the filename of described file to be downloaded and the sheet of the fragment downloaded number to the P2P server.
18., it is characterized in that described download end also comprises as claim 15 or 16 described download ends:
Second reporting module is used for when having downloaded described file to be downloaded, reports the filename and the ending message of described file to be downloaded to the P2P server.
19. the system that file is downloaded is characterized in that, described system comprises downloading holds and the P2P server;
Described P2P server is used to receive the filename of file to be downloaded; According to described filename, obtain download message, and return fragment sum that described download message comprises described file to be downloaded for described download end, described download message to comprise at least, download sheet that the described file to be downloaded stored among the Peer of described file to be downloaded and the described Peer comprises number;
Described download end, the sheet that the described file to be downloaded that the fragment that is used for comprising according to described file to be downloaded sum and described Peer store comprises number, the described file to be downloaded of download from Download Server and the described Peer that is downloading described file to be downloaded.
CN200910237450.1A 2009-11-06 2009-11-06 File download method and server, download client and system adopting same Active CN102055786B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910237450.1A CN102055786B (en) 2009-11-06 2009-11-06 File download method and server, download client and system adopting same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910237450.1A CN102055786B (en) 2009-11-06 2009-11-06 File download method and server, download client and system adopting same

Publications (2)

Publication Number Publication Date
CN102055786A true CN102055786A (en) 2011-05-11
CN102055786B CN102055786B (en) 2014-12-24

Family

ID=43959711

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910237450.1A Active CN102055786B (en) 2009-11-06 2009-11-06 File download method and server, download client and system adopting same

Country Status (1)

Country Link
CN (1) CN102055786B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102456076A (en) * 2011-11-23 2012-05-16 北京安天电子设备有限公司 Massive fragment data aggregation system and method
WO2013143367A1 (en) * 2012-03-30 2013-10-03 Tencent Technology (Shenzhen) Company Limited Method and system for resource download
CN103532999A (en) * 2012-07-05 2014-01-22 腾讯科技(深圳)有限公司 Data transmission method, mobile device and background service system
CN104079615A (en) * 2013-03-29 2014-10-01 联想(北京)有限公司 File downloading method and information processing device
CN109600453A (en) * 2019-02-18 2019-04-09 广州卓远虚拟现实科技有限公司 A kind of distributed virtual reality content distribution method and system
CN112104990A (en) * 2019-05-30 2020-12-18 北京小米移动软件有限公司 Resource downloading method, device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1852099A (en) * 2005-07-11 2006-10-25 华为技术有限公司 Method and system for terminal download of sharing data
CN1925403A (en) * 2005-09-02 2007-03-07 腾讯科技(深圳)有限公司 Network communication system and method realizing file downloading
CN101068155A (en) * 2006-09-20 2007-11-07 腾讯科技(深圳)有限公司 Coordinate connection stream media direct broadcasting system and collection server thereof
CN101136911A (en) * 2006-08-31 2008-03-05 腾讯科技(深圳)有限公司 Method to download files using P2P technique and P2P download system
CN101188622A (en) * 2007-12-29 2008-05-28 腾讯科技(深圳)有限公司 A method and device for downloading file by using P2P living broadcast channel

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1852099A (en) * 2005-07-11 2006-10-25 华为技术有限公司 Method and system for terminal download of sharing data
CN1925403A (en) * 2005-09-02 2007-03-07 腾讯科技(深圳)有限公司 Network communication system and method realizing file downloading
CN101136911A (en) * 2006-08-31 2008-03-05 腾讯科技(深圳)有限公司 Method to download files using P2P technique and P2P download system
CN101068155A (en) * 2006-09-20 2007-11-07 腾讯科技(深圳)有限公司 Coordinate connection stream media direct broadcasting system and collection server thereof
CN101188622A (en) * 2007-12-29 2008-05-28 腾讯科技(深圳)有限公司 A method and device for downloading file by using P2P living broadcast channel

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102456076A (en) * 2011-11-23 2012-05-16 北京安天电子设备有限公司 Massive fragment data aggregation system and method
WO2013143367A1 (en) * 2012-03-30 2013-10-03 Tencent Technology (Shenzhen) Company Limited Method and system for resource download
US9438666B2 (en) 2012-03-30 2016-09-06 Tencent Technology (Shenzhen) Company Limited Method and system for resource download
CN103532999A (en) * 2012-07-05 2014-01-22 腾讯科技(深圳)有限公司 Data transmission method, mobile device and background service system
CN103532999B (en) * 2012-07-05 2019-03-12 腾讯科技(深圳)有限公司 Data transmission method, mobile device and background service system
CN104079615A (en) * 2013-03-29 2014-10-01 联想(北京)有限公司 File downloading method and information processing device
CN104079615B (en) * 2013-03-29 2018-11-09 联想(北京)有限公司 Document down loading method and information processing unit
CN109600453A (en) * 2019-02-18 2019-04-09 广州卓远虚拟现实科技有限公司 A kind of distributed virtual reality content distribution method and system
CN112104990A (en) * 2019-05-30 2020-12-18 北京小米移动软件有限公司 Resource downloading method, device and storage medium

Also Published As

Publication number Publication date
CN102055786B (en) 2014-12-24

Similar Documents

Publication Publication Date Title
CN102523256B (en) Content management method, device and system
US7343422B2 (en) System and method for using uniform resource locators to map application layer content names to network layer anycast addresses
US7565450B2 (en) System and method for using a mapping between client addresses and addresses of caches to support content delivery
US7577754B2 (en) System and method for controlling access to content carried in a caching architecture
US7725596B2 (en) System and method for resolving network layer anycast addresses to network layer unicast addresses
CN102523314B (en) Identify the method and apparatus of efficient destination server
US20150237113A1 (en) Method and system for file transmission
EP2852125A1 (en) Server selection for content distribution
CN102055786A (en) File download method and server, download client and system adopting same
US20020004846A1 (en) System and method for using network layer uniform resource locator routing to locate the closest server carrying specific content
CN103023902B (en) Data transmission method and system
CN101510899B (en) Method, system and equipment for implementing content source selection
CN103597471A (en) Methods and systems for caching data communications over computer networks
CN102065112A (en) Peer-to-peer (P2P) network system and method and related device for establishing the same
US7895264B2 (en) Storage cluster server network
US20020078461A1 (en) Incasting for downloading files on distributed networks
CN103812881B (en) Offline download control method and device
CN103369002B (en) A kind of method and system of resource downloading
CN102271165A (en) Device and method for sharing and managing resources searched on Internet
US20140156809A1 (en) Data downloading method, terminal, server, and system
CN103248678A (en) Data resource sharing method, server-side and client-side
RU2483457C2 (en) Message routing platform
CN102857547A (en) Distributed caching method and device
CN101741869A (en) Method and system for providing contents
JP2004086317A (en) Load distribution method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant