Summary of the invention
In view of this, the invention provides a kind of file content method for synchronous and system, to guarantee the promptness that reaches download synchronously of file content.
A kind of file content method for synchronous comprises:
Receive the synchronization request that main control server sends according to the user, and the synchronous task that sends according to the minimal time delay principle, described synchronization request includes file identification;
According to described synchronous task loading source file and supply with other node synchronization servers and download;
If failed download is sent to described synchronous task in the synchronization server of another node according to the minimal time delay principle with synchronous task, until finishing the content distribution.
In the present embodiment, main control server is distributed to a certain node synchronization server according to synchronization request with task, the distribution principle is that source file server is to the minimum destination node synchronization server of node synchronization server time-delay, a file is downloaded a from the source station, the synchronization server of other nodes is downloaded according to downloading in the successful synchronization server, if this node synchronization server failed download, then continue to utilize described minimal time delay principle synchronous task to be sent in the synchronization server of described other nodes, until finishing the content distribution.The preferred task of this execution mode issues carries out file between path and the node synchronization server and downloads mutually, has realized that file content reaches the promptness of download synchronously.
Preferably, described method also comprises:
The monitoring file content is downloaded the path transmission speed;
When the network transfer speeds of certain node synchronization server file content download is lower than the pre-set velocity value, abandon this path file content and download, and search best source file download path.
Above-mentioned execution mode has solved because the region network bandwidth and the network fluctuation in the transmission path of downloading task cause downloading the affected problem of promptness.
Preferably, described method also comprises: when described source file size greater than default when handling file size:
The tabulation of generation redirection file;
Be sent under the destination node synchronization server assigned catalogue according to this redirection file tabulation;
According to the indication of this assigned catalogue file is redirected to a plurality of territories and carry out the synchronous dynamic transmission.
Above-mentioned execution mode shows that under the situation of user's synchronous documents enormous amount, each node file can't be deposited carrying, and accelerate the synchronizing speed of each node synchronization server by setting up the go forward side by side mode that is redirected of style of writing part of a plurality of territories this moment.
Preferably, described method also comprises: make up meshed network, specific implementation is:
According to the file size of source file, with the corresponding a plurality of territories of synchronization server of node;
Each territory corresponding stored server and one group of speed buffering server.
The type of described storage server and and the speed buffering server between configuration mode various ways can be arranged.
Preferably, described method also comprises: read and send described redirection file tabulation again according to Preset Time interval or the default size of described redirection file tabulation.
As preferably after file distributing is finished, the user of being redirected for needs, when described redirection list file greater than 6K or rise time greater than uploading redirection list in one hour.
Preferably, described method also comprises: check file by the domain name that redirects, and determine that resolved rear line sends file content and downloads successfully.
Resolved or can be accessed the time when file, then send successfully report or feedback information to the user.
A kind of file content synchro system comprises: main control server, a plurality of node synchronization server and source file server, wherein:
A plurality of node synchronization servers include a destination node synchronization server, determine according to the minimal time delay principle;
The synchronous task that the synchronization request that described destination node synchronization server reception main control server sends according to the user obtains;
According to described synchronous task loading source file and supply with other node synchronization servers and download from described source file server;
When this destination node synchronization server failed download, this synchronous task is sent in the synchronization server of another node according to the minimal time delay principle, until finishing the content distribution.
Described System and method for correspondence issues the path and can carry out file between the node synchronization server and download mutually by the optimization task, has guaranteed the promptness of content synchronization and file in download content.
Preferably, described system also comprises:
Node file transfer monitoring means is used to monitor file content and downloads the path transmission speed;
When the network transfer speeds of certain node synchronization server file content download is lower than the pre-set velocity value, abandon this path file content and download, and search best source file download path.
This node file transfer monitoring means is by in time understanding the path transmission speed of node synchronization server and source station, has file to need to select optimized transmission line when synchronous the client, finishes the transmission of distribution in time of file on all nodes.
Preferably, described system also comprises: Redirect Server is used for when handling file size, receiving the redirection file tabulation that is generated by described main control server greater than default when described source file size;
Be sent under the destination node synchronization server assigned catalogue according to this redirection file tabulation;
Described destination node synchronization server redirects to a plurality of territories according to the indication of this assigned catalogue with file and carries out the synchronous dynamic transmission.
Described Redirect Server can be set to two, and one main one is equipped with, and the redirection list that main control server issues is read in circulation repeatedly.
Preferably, described each territory is by storage server and one group of speed buffering server.
The framework mode of described storage server and speed buffering server is selected according to the file size of reality, can be the combination of the combination of a memory and one group of cache server or one group of NetApp server and the corresponding one group of cache server that is connected.
From above-mentioned technical scheme as can be seen, file content method for synchronous among embodiment of the invention the present invention adopts main control server to send synchronous task according to the minimal time delay principle to the destination node synchronization server, this destination node synchronization server is successfully downloaded a file content from the source station, synchronization server by other nodes is downloaded, thereby finishes the content distribution; If this destination node synchronization server failed download, then utilizing the minimal time delay principle to carry out task once more issues, until content synchronization and download whole positions, system in the present embodiment is corresponding with described method, described system constructing be core with the main control server, with the destination node synchronization server is loading source, the network of being downloaded mutually by a plurality of node synchronization servers constitutes, at the shortcoming of existing file content method for synchronous promptness deficiency, realized reaching synchronously the raising that file content is downloaded promptness; In addition, embodiments of the invention have been used the monitoring of the transmission speed of path between node and the source station and the mode of searching for best loading source file path, and the promptness that file is downloaded is further enhanced.
Embodiment
For quote and know for the purpose of, hereinafter the technical term of Shi Yonging, write a Chinese character in simplified form or abridge and be summarized as follows:
Cache: cache memory;
NetApp: Network Appliance, Inc.;
CDN:Content Delivery Network, i.e. content distributing network;
Wget: be a free instrument of file in download automatically from the network;
URL:Universal Resource Locator URL(uniform resource locator).
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.
The invention discloses a kind of file content method for synchronous and system, to guarantee the promptness that reaches download synchronously of file content.Fig. 1 shows a kind of file content method for synchronous, need to prove, the present invention stands in destination node synchronization server side and is described, and this method comprises:
Step 101: receive the synchronization request that main control server sends according to the user, and the synchronous task that sends according to the minimal time delay principle, described synchronization request includes file identification;
Described file identification includes: document identification number, file download URL, operation instruction information, file are deposited information such as path and Synchronizing Passwords.
Step 102: according to described synchronous task loading source file and supply with other node synchronization servers and download;
Main control server is distributed to a certain node synchronization server according to synchronization request with task, and the distribution principle is that the source station is preferential apart from node synchronization server time-delay minimum node.A file is only downloaded portion from the source station, and is downloaded from downloading successful destination node synchronization server by other node synchronization server;
Step 103: if failed download is sent to described synchronous task in the synchronization server of another node according to the minimal time delay principle with synchronous task, until finishing the content distribution.
If all nodes are downloaded all failures, will be to reporting synchronization failure information with protection.
In the present embodiment: issue the path and can between the node synchronization server, carry out file and download mutually by the optimization task, guaranteed the promptness of content synchronization and file in download content.
Fig. 2 illustrates another file content method for synchronous, comprising:
Step 201: receive the synchronization request that main control server sends according to the user, and the synchronous task that sends according to the minimal time delay principle, described synchronization request includes file identification;
Described file identification includes: document identification number, file download URL, operation instruction information, file are deposited information such as path and Synchronizing Passwords.
Step 202: according to described synchronous task loading source file and supply with other node synchronization servers and download;
Step 203: described synchronous task is sent to synchronous task in the synchronization server of another node according to the minimal time delay principle, until finishing the content distribution.
Step 204: the monitoring file content is downloaded the path transmission speed;
Step 205: when the network transfer speeds of certain node synchronization server file content download is lower than the pre-set velocity value, abandons this path file content and download, and search best source file download path.
For substantially all being normal with the area, with the transmission between the operator, between 2 telecommunication nodes that are similarly in the Guangdong Province: Suining and Zhanjiang, between Zhanjiang and Foshan, transmission speed maintains 10MB/s throughout the year, then can close the monitoring between these 2 days.Same, the monitoring between Harbin, Shenyang, Qingdao three ground Netcom nodes also can be closed, and between download can open always.
And for the interconnected node in north and south, as Zhanjiang telecommunications and Shenyang Netcom, the transmission speed fluctuation ratio is bigger, when speed of detection less than 500KB/s, even during less than 100KB/s, system need close the transmission between these 2 points dynamically.Under the extreme case, the source file of supposing the client is in northern Netcom, all southern nodes can't guarantee that all 500KB is from the source file in download so, will obtain file from northern node so, and this moment all to relate to the north and south transmitting speed all undesirable, node need select the fastest transmission route to remove to obtain file according to the result who surveys so.
Fig. 3 shows another file content method for synchronous, comprising:
Step 301: receive the synchronization request that main control server sends according to the user, and the synchronous task that sends according to the minimal time delay principle, described synchronization request includes file identification;
Described file identification includes: document identification number, file download URL, operation instruction information, file are deposited information such as path and Synchronizing Passwords.
Step 302: according to described synchronous task loading source file and supply with other node synchronization servers and download;
Step 303: when described source file size when handling file size, generates the redirection file tabulation greater than default;
Step 304: be sent under the destination node synchronization server assigned catalogue according to this redirection file tabulation;
Step 305: according to the indication of this assigned catalogue file is redirected to a plurality of territories and carry out the synchronous dynamic transmission;
Illustrate: when performing step 302-step 305, need carry out the structure of meshed network, specific implementation is: according to the file size of source file, with the corresponding a plurality of territories of synchronization server of node; Each territory corresponding stored server and one group of speed buffering server.
If the synchronous documents size is huge, each node file can't be stored in the storage, at this moment just need set up a plurality of territories, and each territory is at the corresponding one group of server of each node.Set one or two Redirect Servers, externally domain name is " 21newhot.tudou.com ", for example work as user capture: http: // 21newhot.tudou, during the com/flv/018/415/998/18415998.flv file, Redirect Server can arrive file redirection according to tabulation:
Http:// wd.tudou0103.okcdn.com/fiv/018/415/998/18415998.flv file.
And " wd.tudou0103.okcdn.com " in esse territory that is file.
Same user can arrive by " 21newhot.tudou.com " domain browsing: the file in " wd.tudou0104.okcdn.com " territory.Reach redirected purpose, the listed files of same area does not upload under the synchronization server assigned catalogue, and described Redirect Server read once new listing file in per ten minutes from main control server.
After file distributing is finished, the user of being redirected for needs, described listing file greater than 6K or listing file rise time greater than uploading redirection list in one hour.Check by " wd.tudou0103.okcdn.com " domain name whether file is resolved then.Maybe can visit will be to user report success when file is resolved.
And do not need to be redirected for the less user of quantity of documents.Only need a territory can solve the file access problem, do not need the redirection file program to check whether file can be accessed by domain name.
Step 306: if failed download is sent to described synchronous task in the synchronization server of another node according to the minimal time delay principle with synchronous task, until finishing the content distribution.
Step 307: the monitoring file content is downloaded the path transmission speed;
Step 308: when the network transfer speeds of certain node synchronization server file content download is lower than the pre-set velocity value, abandons this path file content and download, and search best source file download path.
Fig. 4 shows a kind of file content synchronous system architecture, comprising:main control server 401, a plurality ofnode synchronization server 402 andsource file server 403, wherein:
A plurality ofnode synchronization servers 402 include a destinationnode synchronization server 4021, determine according to the minimal time delay principle;
The synchronous task that the synchronization request that described destinationnode synchronization server 4021 receptionmain control servers 401 send according to the user obtains;
According to described synchronous task loading source file and supply with other node synchronization servers and download from describedsource file server 403;
When these destinationnode synchronization server 403 failed downloads, according to the minimal time delay principle this synchronous task is sent in another node synchronization server, until finishing the content distribution.
Described System and method for correspondence issues the path and can carry out file between the node synchronization server and download mutually by the optimization task, has guaranteed the promptness of content synchronization and file in download content.
Fig. 5 a shows another file content synchronous system architecture, and same structure is formed accompanying drawing and the explanation referring to Fig. 4, now only is described with regard to difference: among Fig. 5 a, show node file transfer monitoring means 501 andRedirect Server 502;
Described node file transfer monitoring means 501 is used to monitor file content and downloads the path transmission speed;
When the network transfer speeds of certain node synchronization server file content download is lower than the pre-set velocity value, abandon this path file content and download, and search best source file download path.This node file transfer monitoring means is by in time understanding the path transmission speed of node synchronization server and source station, has file to need to select optimized transmission line when synchronous the client, finishes the transmission of distribution in time of file on all nodes.
DescribedRedirect Server 502 is used for when handling file size, receiving the redirection file tabulation that is generated by described main control server greater than default when described source file size;
Be sent under the destination node synchronization server assigned catalogue according to this redirection file tabulation;
Described destination node synchronization server redirects to a plurality of territories according to the indication of this assigned catalogue with file and carries out the synchronous dynamic transmission.
Described Redirect Server can be set to two, and one main one is equipped with, and the redirection list that main control server issues is read in circulation repeatedly.
Having indicated a domain server version among Fig. 5 b, is the combination of a memory and one group of cache server:
At each node different territories is arranged, a territory is made of a storage server and one group of cache server, at each node one group of server is arranged all for same territory.If a file belongs to a territory, then this file of each node all should be stored in the storage server of this territory correspondence.
What need special feature is: the top layer point is the node synchronization server, uses the wget mode to obtain client's source file, uses synchronous dynamic transmission mode synchronous documents mutually between lower level node.
The transmission means of this kind layering has guaranteed that jumbo file transmits fast.
Having indicated domain server version among Fig. 5 c, is one group of NetApp server and the combination of one group of cache server of corresponding connection.
At each node a NetApp server is arranged, be responsible for storage file specially.It is mounted under the catalogue of Download Server with the catalogue situation.Structure has gone out 3 NetApp servers as shown, is mounted under three catalogues.The NetApp server also is mounted to simultaneously and belongs to 3 territories on the father cache server respectively, can have access to file under the synchronous directory by domain name.Use and be somebody's turn to do in the middle mode, open a plurality of NetApp servers simultaneously, use the synchronous dynamic transmission means between a plurality of NetApp servers, carry out mutually synchronously.Have only bottom when issue, the active service cache node of Kai Qiing is mount directory in fact simultaneously.
Need to prove: for the less user of quantity of documents, the generic-document total amount is no more than 1.5T, and the user has only a territory, can directly synchronization server and storage server be merged use.Be that synchronization server uses as the source of father cache simultaneously.This scheme does not relate to the mutual transmission problem of multiple devices only at little client.
In sum:
File content method for synchronous among the present invention adopts main control server to send synchronous task according to the minimal time delay principle to the destination node synchronization server, this destination node synchronization server is successfully downloaded a file content from the source station, synchronization server by other nodes is downloaded, thereby finishes the content distribution; If this destination node synchronization server failed download, then utilizing the minimal time delay principle to carry out task once more issues, until content synchronization and download whole positions, system in the present embodiment is corresponding with described method, described system constructing be core with the main control server, with the destination node synchronization server is loading source, the network of being downloaded mutually by a plurality of node synchronization servers constitutes, at the shortcoming of existing file content method for synchronous promptness deficiency, realized reaching synchronously the raising that file content is downloaded promptness;
In addition, embodiments of the invention have been used the monitoring of the transmission speed of path between node and the source station and the mode of searching for best loading source file path, and the promptness that file is downloaded is further enhanced.
Further, embodiments of the invention are according to the file size of source file, with the corresponding a plurality of territories of synchronization server of node; Each territory corresponding stored server and one group of speed buffering server.Under this kind situation, the top layer point is the node synchronization server, uses the wget mode to obtain client's source file, uses synchronous dynamic transmission mode synchronous documents mutually between lower level node, and the transmission means of this kind layering has guaranteed jumbo file transfer.
Each embodiment adopts the mode of going forward one by one to describe in this specification, and what each embodiment stressed all is and the difference of other embodiment that identical similar part is mutually referring to getting final product between each embodiment.For the disclosed system of embodiment, because it is corresponding with the embodiment disclosed method, so description is fairly simple, relevant part partly illustrates referring to method and gets final product.
The professional can also further recognize, the unit and the algorithm steps of each example of describing in conjunction with embodiment disclosed herein, can realize with electronic hardware, computer software or the combination of the two, for the interchangeability of hardware and software clearly is described, the composition and the step of each example described prevailingly according to function in the above description.These functions still are that software mode is carried out with hardware actually, depend on the application-specific and the design constraint of technical scheme.The professional and technical personnel can use distinct methods to realize described function to each specific should being used for, but this realization should not thought and exceeds scope of the present invention.
The method of describing in conjunction with embodiment disclosed herein or the step of algorithm can directly use the software module of hardware, processor execution, and perhaps the combination of the two is implemented.Software module can place the storage medium of any other form known in random asccess memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or the technical field.
To the above-mentioned explanation of the disclosed embodiments, make this area professional and technical personnel can realize or use the present invention.Multiple modification to these embodiment will be conspicuous concerning those skilled in the art, and defined herein General Principle can realize under the situation that does not break away from the spirit or scope of the present invention in other embodiments.Therefore, the present invention will can not be restricted to these embodiment shown in this article, but will meet and principle disclosed herein and features of novelty the wideest corresponding to scope.