Summary of the invention
The embodiment of the invention provides a kind of document down loading method and equipment, the method and system of file download service is provided, and can reduce the complexity that in the caching system a plurality of fragments is managed.
The embodiment of the invention provides a kind of document down loading method, comprising:
Send download request to resource management server, carry the file name information of file to be downloaded in the described download request;
Receive the response message that resource management server returns according to described file name information, comprise the positional information of first burst of described file to be downloaded in the described response message;
Positional information according to first burst of described file to be downloaded is downloaded described file to be downloaded from the buffer memory server cluster, described file to be downloaded is divided at least two bursts and is stored in the described caching server cluster, and described caching server cluster comprises at least two caching servers.
The embodiment of the invention provides a kind of method that file download service is provided, and comprising:
Reception carries the file name information of file to be downloaded from the download request of client in the described download request;
Return the positional information of first burst of described file to be downloaded to client according to described download request, make described client from the buffer memory server cluster, download described file to be downloaded according to the positional information of described first burst, wherein, described file to be downloaded is divided at least two bursts and is stored in the described caching server cluster, the positional information that all includes the data message and the adjacent burst of this burst in each burst, described caching server cluster comprises at least two caching servers.
The embodiment of the invention provides a kind of file download equipment, comprising:
First sending module is used for sending download request to resource management server, carries the file name information of file to be downloaded in the described download request;
First receiver module is used to receive the response message that resource management server returns according to described file name information, comprises the positional information of first burst of described file to be downloaded in the described response message;
Download module, be used for downloading described file to be downloaded from the buffer memory server cluster according to the positional information of first burst of described file to be downloaded, described file to be downloaded is divided at least two bursts and is stored in the described caching server cluster, and described caching server cluster comprises at least two caching servers.
The embodiment of the invention provides a kind of asset management device, comprising:
Second receiver module is used to receive the download request from client, carries the file name information of file to be downloaded in the described download request;
Second sending module, be used for returning to client the positional information of first burst of described file to be downloaded according to described download request, make described client from the buffer memory server cluster, download described file to be downloaded according to the positional information of described first burst, wherein, described file to be downloaded is divided at least two bursts and is stored in the described caching server cluster, the positional information that all includes the data message and the adjacent burst of this burst in each burst, described caching server cluster comprises at least two caching servers.
The embodiment of the invention provides a kind of system that file download service is provided, and comprising: the asset management device described in caching server cluster and the technique scheme comprises at least two caching servers in the described caching server cluster.
Document down loading method that the invention described above embodiment provides and equipment, the method and system of file download service are provided, because file to be downloaded is divided into a plurality of bursts and is stored in the caching server cluster, and each burst all includes the positional information of the data message and the adjacent burst of this burst, make resource management server can only manage first burst information of file to be downloaded, when file in download, resource management server returns the positional information of first burst of file to be downloaded according to download request, client is downloaded this file to be downloaded according to the positional information of this first burst from the buffer memory server cluster, thereby make resource management server to manage other a plurality of bursts in the file to be downloaded again, reduced the complexity that resource management server manages a plurality of bursts.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that is obtained under the creative work prerequisite.
In order clearly to set forth the embodiment of the invention, need to prove, in embodiments of the present invention, file to be downloaded is divided into a plurality of bursts in advance and is stored on each caching server in the caching server cluster, and comprised slice header zone and data content in each burst, resource management server manages the positional information of first burst of file to be downloaded.To be described in detail the embodiment of the invention below.
Fig. 1 is the schematic flow sheet of an embodiment of document down loading method of the present invention, and as shown in Figure 1, present embodiment comprises the steps:
Step 101, send download request, wherein, carry the file name information of file to be downloaded in the download request to resource management server;
The response message that step 102, reception resource management server return according to file name information wherein, comprises the positional information of first burst of file to be downloaded in the response message;
Step 103, from the buffer memory server cluster, download file to be downloaded according to the positional information of first burst of file to be downloaded, wherein, file to be downloaded is divided at least two bursts and is stored in the caching server cluster, and the caching server cluster comprises at least two caching servers.
The document down loading method that the embodiment of the invention provides, because resource management server only returns the positional information of first burst of file to be downloaded by download request, client is downloaded this file to be downloaded according to the positional information of this first burst from the buffer memory server cluster, thereby make resource management server to manage other a plurality of bursts in the file to be downloaded again, therefore reduced the complexity that resource management server manages a plurality of bursts.
Fig. 2 is the schematic flow sheet of another embodiment of document down loading method of the present invention, and as shown in Figure 2, present embodiment comprises the steps:
Step 201, send download request, wherein, carry the file name information of file to be downloaded in the download request to resource management server;
The response message that step 202, reception resource management server return according to file name information wherein, comprises the positional information of first burst of file to be downloaded in the response message;
Step 203, download first burst of file to be downloaded according to first caching server of positional information from the buffer memory server cluster of first burst of file to be downloaded, wherein, include the file name information of file to be downloaded, the data message of first burst and the positional information of adjacent burst in first burst;
Step 204, according to the residue burst of downloading file to be downloaded in positional information at least one second caching server from the buffer memory server cluster of adjacent burst, wherein, the positional information that all includes the data message and the adjacent burst of this burst in each burst.
The document down loading method that the embodiment of the invention provides, because being divided into a plurality of bursts in advance, file to be downloaded is stored on each caching server in the caching server cluster, and comprised slice header zone and data content in each burst, resource management server manages the positional information of first burst of file to be downloaded.Therefore, resource management server can return the positional information of first burst of file to be downloaded according to the download request of client to client, client is downloaded this file to be downloaded according to the positional information of this first burst from the buffer memory server cluster, thereby make resource management server to manage other a plurality of bursts in the file to be downloaded again, therefore reduced the complexity that resource management server manages a plurality of bursts.
In order to be more readily understood the technical scheme of embodiment illustrated in figures 1 and 2, the video file that is specially in the internet with file to be downloaded is that example is carried out exemplary illustration, video file leaves in the caching server cluster after being split into a plurality of bursts, the positional information of first burst by video file can get access to the positional information with first caching server of first burst in the caching server cluster, thereby can obtain the data content of first burst of video file from first caching server by this positional information, owing to also include the positional information of second burst adjacent in first burst of video resource with first burst, therefore client can find second caching server of depositing second burst according to the positional information of second burst, and get according to the positional information of the 3rd burst of putting down in writing in second burst adjacent with second burst and to search the 3rd caching server of depositing the 3rd burst, until being downloaded, last burst of video file finishes.Therefore, a plurality of bursts of the mode foradownloaded video file from the buffer memory server cluster by similar chained list, resource management server need not manage other a plurality of bursts in the file to be downloaded again, has therefore reduced the complexity that resource management server manages a plurality of bursts.
Fig. 3 is the schematic flow sheet that the invention provides an embodiment of method of file download service, and as shown in Figure 3, present embodiment comprises the steps:
Step 301, receive download request, wherein, carry the file name information of file to be downloaded in the download request from client;
Step 302, return the positional information of first burst of file to be downloaded to client according to download request, make client from the buffer memory server cluster, download file to be downloaded according to the positional information of first burst, file to be downloaded is divided at least two bursts and is stored in the caching server cluster, the positional information that includes adjacent burst in each burst, the caching server cluster comprises at least two caching servers.
The method that file download service is provided that the embodiment of the invention provides, because resource management server only returns the positional information of first burst of file to be downloaded by download request, client is downloaded this file to be downloaded according to the positional information of this first burst from the buffer memory server cluster, thereby make resource management server to manage other a plurality of bursts in the file to be downloaded again, therefore reduced the complexity that resource management server manages a plurality of bursts.
Fig. 4 is the schematic flow sheet that the invention provides another embodiment of method of file download service, and as shown in Figure 4, present embodiment comprises the steps:
Step 401, receive download request, wherein, carry the file name information of file to be downloaded in the download request from client;
Step 402, the positional information of from the cache file information list that is provided with, searching first burst of file to be downloaded according to file name information;
Concrete, in actual applications, in order to realize management to cache file, the information list of the cache file of being stored in the caching server cluster can be set in resource management server, concrete, the file name information that in this tabulation, can include cache file, and the first burst positional information of this cache file.
Step 403, return the positional information of first burst of file to be downloaded to client according to download request, make client from the buffer memory server cluster, download file to be downloaded according to the positional information of first burst, file to be downloaded is divided at least two bursts and is stored in the caching server cluster, the positional information that includes adjacent burst in each burst, the caching server cluster comprises at least two caching servers.
In actual applications, too much cause client too much for fear of the accessed number of times of a certain cache file to same caching server access times, thereby cause the unbalanced phenomenon of the load of each caching server in the cache cluster, the embodiment of the invention can also comprise:
Step 404, when one of them caching server in the caching server cluster provides the burst number of times of this file to be downloaded to surpass setting threshold, notify this caching server that the burst of this file to be downloaded of its storage is distributed to other caching server in the caching server cluster;
Concrete, can be downloaded number of times to the burst of cache file and set a threshold value, when the accessed number of times of this burst surpasses threshold value, illustrate that this document becomes the focus file, accessed number of times can be more, for the load of each caching server in the balance cache cluster, can notify the caching server that stores this burst that this burst is distributed to other caching servers in the cluster.
Step 405, the positional information of first burst in the burst that is distributed to other caching server in the caching server cluster is carried out record.
In order to realize the management to cache file, when caching server was distributed to other servers with the burst of its storage, resource management server can only need carry out record to first burst in the burst that is distributed.
In the present embodiment, because being divided into a plurality of bursts in advance, file to be downloaded is stored on each caching server in the caching server cluster, and slice header zone and data content in each burst, have been comprised, therefore, resource management server can be only manages the positional information of first burst of file to be downloaded, when resource management server receives the download request of client, can return the positional information of first burst of file to be downloaded according to this download request, make client from the buffer memory server cluster, download this file to be downloaded according to the positional information of this first burst, thereby make resource management server to manage other a plurality of bursts in the file to be downloaded again, therefore reduced the complexity that resource management server manages a plurality of bursts.In addition, resource management server can also be distributed to other caching server in the described caching server cluster with the burst of the described file to be downloaded of its storage by notifying this caching server in the embodiment of the invention, realized according to the actual download size realization load balancing of actual user's demand, thereby file to be downloaded has been carried out rational management file to be downloaded.
Fig. 5 is the structural representation of an embodiment of file download equipment of the present invention, the embodiment of the invention can realize the method flow of above-mentioned embodiment illustrated in figures 1 and 2, as shown in Figure 5, present embodiment comprises: first sending module 51, first receiver module 52, download module 53, wherein:
First sending module 51 is used for sending download request to resource management server, carries the file name information of file to be downloaded in the described download request;
First receiver module 52 is used to receive the response message that resource management server returns according to described file name information, comprises the positional information of first burst of described file to be downloaded in the described response message;
Download module 53, be used for downloading described file to be downloaded from the buffer memory server cluster according to the positional information of first burst of described file to be downloaded, described file to be downloaded is divided at least two bursts and is stored in the described caching server cluster, and described caching server cluster comprises at least two caching servers.
The file download equipment that the embodiment of the invention provides, because being divided into a plurality of bursts in advance, file to be downloaded is stored on each caching server in the caching server cluster, and slice header zone and data content in each burst, have been comprised, therefore, resource management server can be only manages the positional information of first burst of file to be downloaded, during file in download, resource management server can return the positional information of first burst of file to be downloaded according to the download request that first sending module 51 sends, download module 53 is downloaded this file to be downloaded according to the positional information of this first burst from the buffer memory server cluster, thereby make resource management server to manage other a plurality of bursts in the file to be downloaded again, therefore reduced the complexity that resource management server manages a plurality of bursts.
Further, more as shown in Figure 5, download module 53 can also comprise: first download unit 531 and second download unit 532, wherein:
First download unit 531, be used for downloading first burst of described file to be downloaded from first caching server of buffer memory server cluster, include the file name information of described file to be downloaded, the data message of first burst and the positional information of adjacent burst in described first burst according to the positional information of first burst of described file to be downloaded;
Second download unit 532, be used for downloading the residue burst of described file to be downloaded from least one second caching server of described caching server cluster, wherein all include the positional information of the data message and the adjacent burst of this burst in each burst according to the positional information of described adjacent burst.
Yes be appreciated that the function of each functional module of present embodiment can be according to the method specific implementation among the above-mentioned document down loading method embodiment, its specific implementation process can repeat no more with reference to the associated description in the foregoing description herein.
Fig. 6 is the structural representation of an embodiment of asset management device of the present invention, the embodiment of the invention can realize above-mentioned Fig. 3 and method flow embodiment illustrated in fig. 4, as shown in Figure 6, present embodiment asset management device 60 comprises: second receiver module 61, second sending module 62, wherein:
Second receiver module 61 is used to receive the download request from client, carries the file name information of file to be downloaded in the described download request;
Second sending module 62, be used for returning to client the positional information of first burst of described file to be downloaded according to described download request, make described client from the buffer memory server cluster, download described file to be downloaded according to the positional information of described first burst, wherein, described file to be downloaded is divided at least two bursts and is stored in the described caching server cluster, the positional information that all includes the data message and the adjacent burst of this burst in each burst, described caching server cluster comprises at least two caching servers.
The asset management device that the embodiment of the invention provides, because being divided into a plurality of bursts in advance, file to be downloaded is stored on each caching server in the caching server cluster, and slice header zone and data content in each burst, have been comprised, therefore, resource management server can be only manages the positional information of first burst of file to be downloaded, when resource management server receives the download request of client, can return the positional information of first burst of file to be downloaded according to second sending module 62 to client, make the positional information of this first burst that client returns according to second sending module 62 from the buffer memory server cluster, download this file to be downloaded, thereby make asset management device to manage other a plurality of bursts in the file to be downloaded again, therefore reduced the complexity that asset management device manages a plurality of bursts.
Further, more as shown in Figure 6, can also comprise: search module 63, notification module 64, logging modle 65, wherein:
Search module 63, be used for the file name information of the described file to be downloaded that carries according to the download request that second receiver module 61 receives, the positional information of from the cache file information list that is provided with, searching first burst of described file to be downloaded;
Notification module 64, when being used for one of them caching server when described caching server cluster and providing the burst number of times of described file to be downloaded to surpass setting threshold, notify this caching server that the burst of the described file to be downloaded of its storage is distributed to other caching server in the described caching server cluster;
Logging modle 65 is used for the positional information of first burst in the burst of other caching server of being distributed to described caching server cluster is carried out record.
In the embodiment of the invention, when one of them caching server in the described caching server cluster provides the burst number of times of described file to be downloaded to surpass setting threshold, resource management server can also notify this caching server that the burst of the described file to be downloaded of its storage is distributed to other caching server in the described caching server cluster by notification module 64, realized the actual download size realization load balancing to file to be downloaded, thereby file to be downloaded has been carried out rational management according to the actual user.
Yes be appreciated that the function of each functional module of present embodiment can be according to the method specific implementation among the above-mentioned method embodiment that file download service is provided, its specific implementation process can repeat no more with reference to the associated description in the foregoing description herein.
Fig. 7 provides the structural representation of an embodiment of system of file download service for the embodiment of the invention, and as shown in Figure 7, present embodiment comprises: asset management device 71, caching server cluster 72, wherein:
Asset management device 71, be used to receive download request from client, and return the positional information of first burst of file to be downloaded to client according to download request, make client from buffer memory server cluster 72, download described file to be downloaded according to the positional information of first burst, wherein, carry the file name information of file to be downloaded in the download request.
Caching server cluster 72 is used to store the burst of file to be downloaded, wherein, includes the positional information of the data message and the adjacent burst of this burst in each burst.
Concrete, file to be downloaded can be divided at least two bursts in advance and be stored in the caching server cluster 72, and caching server cluster 72 comprises at least two caching servers.
Further, the described asset management device 71 of the embodiment of the invention can referring in the foregoing description about the description of asset management device, do not repeat them here.
The system that file download service is provided of the embodiment of the invention, because file to be downloaded can be divided at least two bursts in advance and be stored in the caching server cluster 72, and all includes the positional information of the data message and the adjacent burst of this burst in each burst.Therefore, asset management device 71 can be only carries out record management to the positional information of first burst of file to be downloaded, when carrying out the file download, asset management device 71 can return the positional information of first burst of file to be downloaded according to the download request of client, client is downloaded this file to be downloaded according to the positional information of this first burst from buffer memory server cluster 72, thereby make asset management device 71 to manage other a plurality of bursts in the file to be downloaded again, therefore reduced the complexity that 71 pairs of a plurality of bursts of asset management device manage.
Embodiment for a better understanding of the present invention, Fig. 8 shows the structural representation of a plurality of bursts that file to be downloaded that the embodiment of the invention is suitable for forms, as shown in Figure 8, file to be downloaded is divided into N burst (N is an integer), each burst is stored on each caching server in the caching server cluster, and in each burst, comprised slice header zone and data content, be provided with the head sign of file to be downloaded in the slice header zone of first burst, the file identification of file to be downloaded (file hash), the size of current burst, the positional information of second burst adjacent with this first burst; Wherein, the original position that this first burst of head sign expression is a file to be downloaded, the file identification of file to be downloaded shows the name information of this document, for example: the file identification of video file " Chibi " is that the file identification of " 10 ", video file " dinner at night " is " 01 ", promptly can distinguish different files by this document sign; Data content can data quantity stored in this current burst of size information record of burst.Particularly, behind the data content that downloads to first burst, can directly get access to the data content of second burst of file to be downloaded by positional information at the second adjacent burst of first burst record, by that analogy, mode by similar chained list gets access to the data content in a plurality of bursts of file to be downloaded, thereby realizes the automatic management of a plurality of bursts that file to be downloaded is divided into.
In addition, also identify the positional information of the next file to be downloaded adjacent with resource file in the slice header zone of N burst of file to be downloaded, by getting access to the positional information of the next file to be downloaded adjacent, can carry out down operation to first file to be downloaded with current file to be downloaded.
Further, the described client of the invention described above embodiment both can also can be the caching server in the caching server cluster for main frame; If client is a main frame, can realize the directly mutual of client and resource management server; If client is caching server, then caching server can be realized download request is transmitted to resource management server, the positional information of first burst of file to be downloaded is transmitted to the function of main frame; It still is that the visual concrete deployment of caching server need be provided with that client is specially main frame.
One of ordinary skill in the art will appreciate that: all or part of step that realizes the foregoing description can be finished by the relevant hardware of program command, aforesaid program can be stored in the computer read/write memory medium, this program is carried out the step that comprises said method embodiment when carrying out; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CD.
It should be noted that at last: above embodiment only in order to technical scheme of the present invention to be described, is not intended to limit; Although with reference to previous embodiment the present invention is had been described in detail, those of ordinary skill in the art is to be understood that: it still can be made amendment to the technical scheme that aforementioned each embodiment put down in writing, and perhaps part technical characterictic wherein is equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution break away from the spirit and scope of various embodiments of the present invention technical scheme.