Summary of the invention
In view of the above problems, propose the present invention to provide a kind of method of data synchronization based on content distributing network CDN, a kind of data sync client end based on content distributing network CDN, and, a kind of data syn-chronization seed resource based on content distributing network CDN inquiry server.
According to one aspect of the present invention, provide a kind of method of data synchronization based on content distributing network CDN, described content distributing network CDN includes Distributor, the node server communicated with described Distributor, the client communicated with described node server, and, inquire about server with the seed resource of described client communication;In described client, storage has the latest features information of data file;
Described method includes:
Described client downloads data file from the node server distributed for it;
Described client is according to the latest features information of described data file, it is judged that described data file is the most up-to-date;
If it is not, the most described client submits the inquiry request of up-to-date data file to described seed resource inquiry server;
Described client receives the seed resource information that described up-to-date data file that described seed resource inquiry server returns for described request is corresponding;
Node server and/or client-side that described client indicates from described seed resource information download described up-to-date data file.
Alternatively, the step that described client downloads data file from the node server distributed for it includes:
Client receives the HTTP download information that Distributor sends;Described HTTP downloads information and includes the instruction information of node server;
Described client is downloaded information according to described HTTP and is connected corresponding node server download data file.
Alternatively, the step that described client downloads, according to described HTTP, the node server download data file that information connects correspondence includes:
Described client is downloaded information according to described HTTP and is connected to the node server of correspondence, and from described node server, multiple preset start-stop location segment download described data file;
Described client combines described segmentation and downloads the data file obtained.
Alternatively, described client is according to the latest features information of described data file, it is judged that the most up-to-date step of described data file includes:
Described client calculates current characteristic information according to described data file;
Described client judges that described latest features information is the most consistent with current characteristic information;
The most described client judges that described data file is up-to-date;
If it is not, the most described client judges that described data file is not as up-to-date.
Alternatively, described latest features information is the data content mark of latest data file, and described current characteristic information is the data content mark of current data file.
Alternatively, the data content of described latest data file is designated the MD5 value of latest data file;The data content of described current data file is designated the MD5 value of current data file.
Alternatively, described seed resource information includes that one or more P2SP downloads index information, after the node server indicated from described seed resource information in described client and/or client-side download the step of described up-to-date data file, described method also includes:
Described client reports the P2SP of self to download index information and inquires about server to described seed resource.
Alternatively, also include:
If described client is according to the latest features information of described data file, it is judged that described data file is up-to-date, then reports the P2SP of self to download index information and inquire about server to seed resource.
Alternatively, described HTTP download information includes uniform resource position mark URL;Described P2SP downloads index information and includes the deposit position of file, file size, file place server and/or the address of client, and/or the address of file distribution person.
According to another aspect of the present invention, also disclose a kind of method of data synchronization based on content distributing network CDN, described content distributing network CDN includes Distributor, the node server communicated with described Distributor, the client communicated with described node server, and, inquire about server with the seed resource of described client communication;In described client, storage has the latest features information of data file;
Described method includes:
Described seed resource inquiry server receives the inquiry request of the up-to-date data file that client sends;Described request is the described client latest features information according to described data file, it is judged that submit to when described data file is not up-to-date;
Described seed resource inquiry server is according to the seed resource information of data file up-to-date described in described requesting query;
Described seed resource inquiry server returns described seed resource information to described client.
Alternatively, described seed resource information includes that one or more P2SP downloads index information, and described method also includes:
Described seed resource inquiry server receives described client and reports the P2SP of self to download index information.
According to another aspect of the present invention, also disclose the client in a kind of content distributing network CDN, wherein, described client and node server communication, described node server and Distributor communication, described client also inquires about server communication with seed resource, and, in described client, storage has the latest features information of data file;
Described client includes:
First download module, is suitable to download data file from the node server distributed for it;
Judge module, is suitable to the latest features information according to described data file, it is judged that described data file is the most up-to-date;If it is not, then perform to submit module to;
Submit module to, be suitable to submit to described seed resource inquiry server the inquiry request of up-to-date data file;
Receiver module, is suitable to receive the seed resource information that described up-to-date data file that described seed resource inquiry server returns for described request is corresponding;
Second download module, is suitable to node server and/or client-side from the instruction of described seed resource information and downloads described up-to-date data file.
Alternatively, described first download module includes:
HTTP downloads information and receives submodule, is suitable to receive the HTTP download information that Distributor sends;Described HTTP downloads information and includes the instruction information of node server;
Connexon module, is suitable to download information according to described HTTP and connects corresponding node server download data file.
Alternatively, described connexon module includes:
Segmentation download unit, is suitable to download information according to described HTTP and is connected to the node server of correspondence, and from described node server, multiple preset start-stop location segment download described data file;
Assembled unit, is suitable to combine described segmentation and downloads the data file obtained.
Alternatively, described judge module includes:
Calculating sub module, is suitable to calculate current characteristic information according to described data file;
Judge submodule, be suitable to judge that described latest features information is the most consistent with current characteristic information;The most then call the first decision sub-module, if it is not, then call the second decision sub-module;
First decision sub-module, is suitable to judge that described data file is up-to-date;
Second decision sub-module, is suitable to judge that described data file is not as up-to-date.
Alternatively, described latest features information is the data content mark of latest data file, and described current characteristic information is the data content mark of current data file.
Alternatively, described latest features information is the MD5 value of latest data file;Described current characteristic information is the MD5 value of current data file.
Alternatively, described seed resource information includes that one or more P2SP downloads index information, and described client also includes:
First reporting module, is suitable to report the P2SP of self to download index information and inquires about server to described seed resource.
Alternatively, described client also includes:
Second reporting module, is suitable in the latest features information according to described data file, it is judged that when described data file is up-to-date, reports the P2SP of self to download index information and inquires about server to seed resource.
Alternatively, described HTTP download information includes uniform resource position mark URL;Described P2SP downloads index information and includes the deposit position of file, file size, file place server and/or the address of client, and/or the address of file distribution person.
According to another aspect of the present invention, also disclose the seed resource inquiry server of a kind of data syn-chronization based on content distributing network CDN, wherein, described seed resource inquiry server and client communication, described client and node server communication, described node server and Distributor communication, wherein, in described client, storage has the latest features information of data file;
Described seed resource inquiry server includes:
Receiver module, is suitable to receive the inquiry request of the up-to-date data file that client sends;Described request is the described client latest features information according to described data file, it is judged that submit to when described data file is not up-to-date;
Enquiry module, is suitable to the seed resource information according to data file up-to-date described in described requesting query;
Return module, be adapted to return to described seed resource information to described client.
Alternatively, described seed resource information includes that one or more P2SP downloads index information, and described seed resource inquiry server also includes:
Download information receiving module, be suitable to receive described client and report the P2SP of self to download index information.
In embodiments of the present invention, it is each client distribution node server at CDN, and when there being new data file to issue, sends latest features information to each client.When client downloads to data file from node server, can judge that data file is the most up-to-date according to latest features information, if it is determined that data file is not up-to-date, seed resource inquiry server can also be sent a request to, get the seed resource information of the node server closed on, and quickly go to download up-to-date data file according in the node server indicated by this seed resource information and/or client, data synchronization efficiency can be improved, ensure accuracy and the safety of latest data simultaneously.
Additionally, download to the client of latest data, the P2SP of himself can also be downloaded index information and report to seed resource inquiry server, this P2SP just can be downloaded index information after receiving and retain as seed resource information by seed resource inquiry server, other client just can arrive this client downloads data file, the server that thus can effectively script be isolated and its mirror image resources and P2P resource consolidation are together, when there being more client downloads data file, download efficiency is higher.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the technological means of the present invention, and can be practiced according to the content of description, and in order to above and other objects of the present invention, feature and advantage can be become apparent, below especially exemplified by the detailed description of the invention of the present invention.
Detailed description of the invention
It is more fully described the exemplary embodiment of the disclosure below with reference to accompanying drawings.Although accompanying drawing showing the exemplary embodiment of the disclosure, it being understood, however, that may be realized in various forms the disclosure and should not limited by embodiments set forth here.On the contrary, it is provided that these embodiments are able to be best understood from the disclosure, and complete for the scope of the present disclosure can be conveyed to those skilled in the art.
One of core of the embodiment of the present invention is, the problem coordinating CDN scheme process data syn-chronization by P2SP, when client downloads to data file it is found to be up-to-date after verification time, the downloading mode of P2SP can be used to go other node servers or the up-to-date data file of client downloads.
With reference to Fig. 2, show the flow chart of steps of a kind of method of data synchronization embodiment one based on content distributing network CDN, described content distributing network CDN can include Distributor, the node server communicated with described Distributor, the client communicated with described node server, and, inquire about server with the seed resource of described client communication;Described client can store the latest features information of data file;
Described method specifically may include steps of:
Step 101, described client downloads data file from the node server distributed for it;
In one preferred embodiment of the invention, described step 101 can include following sub-step:
Sub-step S11, client receives the HTTP download information that Distributor sends;Described HTTP downloads information and includes the instruction information of node server;
Sub-step S12, described client is downloaded information according to described HTTP and is connected corresponding node server download data file.
In implementing, Distributor in CDN, or the stronger server of other promptnesses is when issuing new data file, in each network element that can latest features information corresponding for this data file and download information etc. be distributed in CDN, i.e. node server or client.Owing to latest features information relative content is less, therefore in CDN, do not have nonsynchronous problem, therefore can be as judging whether data file is up-to-date foundation.
In actual applications, CDN can be made a decision by close and server load, can provide the user service in the extremely efficient mode of one.Specifically, CDN is usually the client distribution node server nearby of user, when the HTTP of the network element closed on that the Distributor that client receives sends downloads information, it is possible to carry out quick-downloading data file according to the node server that HTTP downloads information connection corresponding.
As in a kind of example of the concrete application of the present invention, it can be to specify the address (URL, URL) of node server that described HTTP downloads information.Distributor can be that the HTTP specifying node server of client distribution downloads information, can also be Distributor be the fixing node server mapped, certainly, can be to avoid as far as possible on the Internet, likely affecting data transmission bauds and the bottleneck of stability and link, the node server that status is joined is look up and down for client, depending on specifically can be according to actual demand, the invention is not limited in this regard.
In one preferred embodiment of the invention, described sub-step S12, the most described client downloads information according to described HTTP and connects corresponding node server and download the step of data file and can include following sub-step:
Sub-step S12-1, described client is connected to the node server of correspondence according to described HTTP download information, and from described node server, multiple preset start-stop location segment download described data files;
Sub-step S12-2, described client combines described segmentation and downloads the data file obtained.
In implementing, when client downloads, according to HTTP, the node server that information is connected to correspondence, it is possible to start to download the data file of correspondence from this node server.Owing to the data file of part is bigger, in order to quickening download progress, the downloading mode of a kind of many segmentations of concurrent type frog file can be used, i.e. can download from data file difference start-stop location segment, such as save from the first character of a file and start to download, can also download, after file fragmentation has been downloaded by client from the 100th byte of a file simultaneously, carry out local splicing, be reassembled into a complete data file.Owing to using the mode of many segmentations parallel downloading, the speed downloading file is greatly improved.
Step 102, described client is according to the latest features information of described data file, it is judged that described data file is the most up-to-date;If it is not, then perform step 103;
In one preferred embodiment of the invention, described step 102 can include following sub-step:
Sub-step S31, described client calculates current characteristic information according to described data file;
Sub-step S32, described client judges that described latest features information is the most consistent with current characteristic information;The most then perform sub-step S33, if it is not, then perform sub-step S34;
Sub-step S33, described client judges that described data file is up-to-date;
Sub-step S34, described client judges that described data file is not as up-to-date.
In a kind of preferred exemplary of the present invention, described latest features information can be the data content mark of latest data file, and described current characteristic information can be the data content mark of current data file.
In implementing, latest features information can be unique data content mark that the content according to data file generates, it is for instance possible to use CRC (Cyclic Redundancy Check, CRC) calculates.After up-to-date data file is issued, each the network element simultaneously content identification of latest data file can being distributed in CDN, owing to data content mark is that the content according to data file generates, if file is written over, the data content mark of the current data file calculated in client is inconsistent with the data content mark of latest data file, illustrates that current data file is likely to have problem.
Preferably, the data content mark of described latest data file can be the MD5 value of latest data file;The data content mark of described current data file can be the MD5 value of current data file.
In embodiments of the present invention, described MD5 value can be that the data file using MD5 (Message-Digest Algorithm 5, Message-Digest Algorithm 5) to calculate uniquely identifies.Specifically, can be to utilize MD5 algorithm to calculate MD5 value according to the binary information of file.
MD5 algorithm is one of widely used hash algorithm of computer, and data operation is another fixed-length value by it, and Information Compression becomes the form of a kind of secrecy.MD5 has the advantages that collision rate is low, uses unique mark of MD5 algorithm calculation document, it is possible to effectively prevent repetition and the collision of file.For example, it is assumed that file is by virus or inbreaking of Trojan horse, or file is not up-to-date, then calculate the MD5 value arrived by inconsistent with the MD5 value that client this locality preserves, it is possible to be very easy to find this document problematic.
Certainly, in actual applications, being not limited to MD5 algorithm, those skilled in the art can also select other suitable algorithm to generate unique mark of file with low collision rate as principle, the present invention to this without being any limitation as.
Step 103, described client submits the inquiry request of up-to-date data file to described seed resource inquiry server;
Step 104, described client receives the seed resource information that described up-to-date data file that described seed resource inquiry server returns for described request is corresponding;
Step 105, node server and/or client-side that described client indicates from described seed resource information download described up-to-date data file.
In embodiments of the present invention, if the data file downloaded verifies unsuccessfully, then can illustrate that the data downloaded to are not up-to-date, now can also download file by other means, such as P2SP (Peer to Server&Peer, user is to server and user).
Using P2SP technology, data file can be transmitted mutually in each network element on CDN, and resource consolidation is together for the server effectively script isolated and its mirror image resources and P2P (peer-to-peer, point-to-point).Specifically, it is the information with inquiry kind subkey that P2SP downloads index information, can arrive particular server and obtain corresponding resource.
In implementing, client can inquire about server lookup seed resource information from seed resource, get the server with up-to-date resource (i.e. data file), or, after the seed resource information of the client with up-to-date resource, client just can go in seed resource information indicated server or the up-to-date data file of client downloads.
In a kind of preferred exemplary of the present invention, client can also include according to data file calculated MD5 value in the request that seed resource inquiry server sends, seed resource inquiry server can be compared with the MD5 value in the seed resource information that this locality preserves after receiving, if it find that the seed resource information of same MD5 value, illustrate that the data file in the network element that this seed resource information is corresponding remains old, seed resource inquiry server can select its labelling, or directly delete, to be that this seed resource information is sent to client equally to avoid, thus cause client to be downloaded to legacy data.
Additionally, the resources such as new data file are when CDN issues, the information of the predetermined server downloading this resource can be uploaded to seed resource inquiry server, thus can ensure that on part server preserve must be new data, when whether the data in uncertain certain server or client are up-to-date, the corresponding seed resource information of this book server can be sent directly to the client of request seed resource information.
In one preferred embodiment of the invention, described seed resource information can include that one or more P2SP downloads index information, after the node server indicated from described seed resource information in described client and/or client-side download the step of described up-to-date data file, described method can also comprise the steps:
Described client reports the P2SP of self to download index information and inquires about server to described seed resource.
In another preferred embodiment of the present invention, described method can also comprise the steps:
If described client is according to the latest features information of described data file, it is judged that described data file is up-to-date, then reports the P2SP of self to download index information and inquire about server to seed resource.
In embodiments of the present invention, when client downloads to up-to-date data file, can also be by own IP address and the relevant information having resource, i.e. P2SP downloads index information and reports to seed resource inquiry server, seed resource inquiry server can be included, and so other clients just can carry out communication with this client.Specifically, described P2SP downloads index information can include the deposit position of file, file size, file place server and/or the address of client, and/or address of file distribution person etc., it is, of course, also possible to include the MD5 value that client calculates.
With reference to Fig. 3, show the flow chart of steps of a kind of method of data synchronization embodiment two based on content distributing network CDN, described content distributing network CDN can include Distributor, the node server communicated with described Distributor, the client communicated with described node server, and, inquire about server with the seed resource of described client communication;Described client can store the latest features information of data file;
Described method specifically may include steps of:
Step 201, described seed resource inquiry server receives the inquiry request of the up-to-date data file that client sends;Described request is the described client latest features information according to described data file, it is judged that submit to when described data file is not up-to-date;
Step 202, described seed resource inquiry server is according to the seed resource information of data file up-to-date described in described requesting query;
Step 203, described seed resource inquiry server returns described seed resource information to described client.
In one preferred embodiment of the invention, described seed resource information can include that one or more P2SP downloads index information, and described method can also comprise the steps:
Described seed resource inquiry server receives described client and reports the P2SP of self to download index information.
In actual applications, seed resource inquiry server can be set in CDN, preserve multiple seed resource information at seed resource inquiry server.When client detects that data file is not up-to-date, seed resource inquiry server can receive the inquiry request that client sends, seed resource inquiry server can be that this server sends the server or the seed resource information of client closed on, the node server that client just can indicate rapidly from seed resource information, or client downloads is to latest data.
In order to make those skilled in the art further appreciate that the embodiment of the present invention, a concrete application example is below used to illustrate.
In implementing, it is for security reasons that the network of Some Enterprises and government bodies is all isolated with external network, i.e. can not connect the Internet.In complicated enterprise network, the careless omission of any one employee, Vulnerability Management careless omission, all may bring threat to enterprise security.Although the network of business and government office is all isolated with external network, but need nonetheless remain for therein running the software of redaction or transmission data, these problems just become thorny.
A kind of based on content distributing network CDN data syn-chronization with reference to the present invention shown in Fig. 4 implements structural representation, Distributor can be included in CDN, the node server communicated with described Distributor, the client communicated with described node server, and, inquire about server with the seed resource of described client communication.Wherein, this CDN can be to set up voluntarily, it is of course also possible to be to use third-party CDN.
In separation net, can preferentially use the common downloading mode of CDN to download resource, common customer end directly can download to data file from the node server closed on.If the data file that client downloads arrives verifies unsuccessfully, if it is found to be up-to-date data file, so can also use the downloading mode of P2SP, specifically, client can be inquired about server lookup at seed resource and obtain seed resource information, and the quick-downloading up-to-date data file of node server of instruction from seed resource information.
It should be noted that, for embodiment of the method, in order to be briefly described, therefore it is all expressed as a series of combination of actions, but those skilled in the art should know, the embodiment of the present invention is not limited by described sequence of movement, because according to the embodiment of the present invention, some step can use other orders or carry out simultaneously.Secondly, those skilled in the art also should know, embodiment described in this description belongs to preferred embodiment, necessary to the involved action not necessarily embodiment of the present invention.
With reference to Fig. 5, show the structured flowchart of a kind of data sync client end embodiment based on content distributing network CDN, wherein, described client and node server communication, described node server and Distributor communication, described client also inquires about server communication with seed resource, and, in described client, storage has the latest features information of data file;
Described client specifically can include such as lower module:
First download module 301, is suitable to download data file from the node server distributed for it;
In one preferred embodiment of the invention, described first download module 301 may include that
HTTP downloads information and receives submodule, is suitable to client and receives the HTTP download information that Distributor sends;Described HTTP downloads information and includes the instruction information of node server;
Connexon module, is suitable to download information according to described HTTP and connects corresponding node server download data file.
In one preferred embodiment of the invention, described connexon module may include that
Segmentation download unit, is suitable to download information according to described HTTP and is connected to the node server of correspondence, and from described node server, multiple preset start-stop location segment download described data file;
Assembled unit, is suitable to combine described segmentation and downloads the data file obtained.
Judge module 302, is suitable to the latest features information according to described data file, it is judged that described data file is the most up-to-date;If it is not, then perform to submit module to;
In one preferred embodiment of the invention, described judge module 302 may include that
Calculating sub module, is suitable to calculate current characteristic information according to described data file;
Judge submodule, be suitable to judge that described latest features information is the most consistent with current characteristic information;The most then call the first decision sub-module, if it is not, then call the second decision sub-module;
First decision sub-module, is suitable to judge that described data file is up-to-date;
Second decision sub-module, is suitable to judge that described data file is not as up-to-date.
In one preferred embodiment of the invention, described latest features information can be the data content mark of latest data file, and described current characteristic information can be the data content mark of current data file.
In one preferred embodiment of the invention, the data content mark of described latest data file can be the MD5 value of latest data file;The data content mark of described current data file can be the MD5 value of current data file.
Submit module 303 to, be suitable to submit to described seed resource inquiry server the inquiry request of up-to-date data file;
Receiver module, is suitable to receive the seed resource information that described up-to-date data file that described seed resource inquiry server returns for described request is corresponding;
Second download module, is suitable to node server and/or client-side from the instruction of described seed resource information and downloads described up-to-date data file.
In one preferred embodiment of the invention, described seed resource information includes that one or more P2SP downloads index information, and described device can also include:
First reporting module, is suitable to report the P2SP of self to download index information and inquires about server to described seed resource.
In one preferred embodiment of the invention, described device can also include:
Second reporting module, is suitable in the latest features information according to described data file, it is judged that when described data file is up-to-date, reports the P2SP of self to download index information and inquires about server to seed resource.
In one preferred embodiment of the invention, described HTTP download information can include uniform resource position mark URL;Described P2SP downloads index information can include the deposit position of file, file size, file place server and/or the address of client, and/or the address of file distribution person.
With reference to Fig. 6, it is shown that the structured flowchart of a kind of data syn-chronization seed resource based on content distributing network CDN inquiry server example,
Wherein, described seed resource inquiry server and client communication, described client and node server communication, described node server and Distributor communication, wherein, in described client, storage has the latest features information of data file;
Described seed resource inquiry server includes:
Receiver module 401, is suitable to receive the inquiry request of the up-to-date data file that client sends;Described request is the described client latest features information according to described data file, it is judged that submit to when described data file is not up-to-date;
Enquiry module 402, is suitable to the seed resource information according to data file up-to-date described in described requesting query;
Return module 403, be adapted to return to described seed resource information to described client.
In one preferred embodiment of the invention, described seed resource information can include that one or more P2SP downloads index information, and described seed resource inquiry server can also include:
Download information receiving module, be suitable to receive described client and report the P2SP of self to download index information.
For device embodiment, due to itself and embodiment of the method basic simlarity, so describe is fairly simple, relevant part sees the part of embodiment of the method and illustrates.
Algorithm and display are not intrinsic to any certain computer, virtual system or miscellaneous equipment relevant provided herein.Various general-purpose systems can also be used together with based on teaching in this.As described above, construct the structure required by this kind of system to be apparent from.Additionally, the present invention is also not for any certain programmed language.It is understood that, it is possible to use various programming languages realize the content of invention described herein, and the description done language-specific above is the preferred forms in order to disclose the present invention.
In description mentioned herein, illustrate a large amount of detail.It is to be appreciated, however, that embodiments of the invention can be put into practice in the case of not having these details.In some instances, it is not shown specifically known method, structure and technology, in order to do not obscure the understanding of this description.
Similarly, it is to be understood that, one or more in order to simplify that the disclosure helping understands in each inventive aspect, above in the description of the exemplary embodiment of the present invention, each feature of the present invention is grouped together in single embodiment, figure or descriptions thereof sometimes.But, the method for the disclosure should not being construed to reflect an intention that, i.e. the present invention for required protection requires than the more feature of feature being expressly recited in each claim.More precisely, as the following claims reflect, inventive aspect is all features less than single embodiment disclosed above.Therefore, it then follows claims of detailed description of the invention are thus expressly incorporated in this detailed description of the invention, the most each claim itself is as the independent embodiment of the present invention.
Those skilled in the art are appreciated that and can adaptively change the module in the equipment in embodiment and they are arranged in one or more equipment different from this embodiment.Module in embodiment or unit or assembly can be combined into a module or unit or assembly, and multiple submodule or subelement or sub-component can be put them in addition.In addition at least some in such feature and/or process or unit excludes each other, can use any combination that all features disclosed in this specification (including adjoint claim, summary and accompanying drawing) and so disclosed any method or all processes of equipment or unit are combined.Unless expressly stated otherwise, each feature disclosed in this specification (including adjoint claim, summary and accompanying drawing) can be replaced by the alternative features providing identical, equivalent or similar purpose.
In addition, those skilled in the art it will be appreciated that, although embodiments more described herein include some feature included in other embodiments rather than further feature, but the combination of the feature of different embodiment means to be within the scope of the present invention and formed different embodiments.Such as, in the following claims, one of arbitrarily can mode the using in any combination of embodiment required for protection.
The all parts embodiment of the present invention can realize with hardware, or realizes with the software module run on one or more processor, or realizes with combinations thereof.It will be understood by those of skill in the art that the some or all functions of the some or all parts that microprocessor or digital signal processor (DSP) can be used in practice to realize in data syn-chronization equipment based on content distributing network CDN according to embodiments of the present invention.The present invention is also implemented as part or all the equipment for performing method as described herein or device program (such as, computer program and computer program).The program of such present invention of realization can store on a computer-readable medium, or can be to have the form of one or more signal.Such signal can be downloaded from internet website and obtain, or provides on carrier signal, or provides with any other form.
The present invention will be described rather than limits the invention to it should be noted above-described embodiment, and those skilled in the art can design alternative embodiment without departing from the scope of the appended claims.In the claims, any reference marks that should not will be located between bracket is configured to limitations on claims.Word " comprises " and does not excludes the presence of the element or step not arranged in the claims.Word "a" or "an" before being positioned at element does not excludes the presence of multiple such element.The present invention by means of including the hardware of some different elements and can realize by means of properly programmed computer.If in the unit claim listing equipment for drying, several in these devices can be specifically to be embodied by same hardware branch.Word first, second and third use do not indicate that any order.Can be title by these word explanations.
The invention discloses A1, a kind of method of data synchronization based on content distributing network CDN, described content distributing network CDN includes Distributor, the node server communicated with described Distributor, the client communicated with described node server, and, inquire about server with the seed resource of described client communication;In described client, storage has the latest features information of data file;
Described method includes:
Described client downloads data file from the node server distributed for it;
Described client is according to the latest features information of described data file, it is judged that described data file is the most up-to-date;
If it is not, the most described client submits the inquiry request of up-to-date data file to described seed resource inquiry server;
Described client receives the seed resource information that described up-to-date data file that described seed resource inquiry server returns for described request is corresponding;
Node server and/or client-side that described client indicates from described seed resource information download described up-to-date data file.
A2, method as described in A1, it is characterised in that the step that described client downloads data file from the node server distributed for it includes:
Client receives the HTTP download information that Distributor sends;Described HTTP downloads information and includes the instruction information of node server;
Described client is downloaded information according to described HTTP and is connected corresponding node server download data file.
A3, method as described in A2, it is characterised in that described client is downloaded information according to described HTTP and connected corresponding node server and download the step of data file and include:
Described client is downloaded information according to described HTTP and is connected to the node server of correspondence, and from described node server, multiple preset start-stop location segment download described data file;
Described client combines described segmentation and downloads the data file obtained.
A4, method as described in A1 or A2 or A3, it is characterised in that described client is according to the latest features information of described data file, it is judged that the most up-to-date step of described data file includes:
Described client calculates current characteristic information according to described data file;
Described client judges that described latest features information is the most consistent with current characteristic information;
The most described client judges that described data file is up-to-date;
If it is not, the most described client judges that described data file is not as up-to-date.
A5, method as described in A4, it is characterised in that described latest features information is the data content mark of latest data file, described current characteristic information is the data content mark of current data file.
A6, method as described in A4, it is characterised in that the data content of described latest data file is designated the MD5 value of latest data file;The data content of described current data file is designated the MD5 value of current data file.
A7, method as described in A6, it is characterized in that, described seed resource information includes that one or more P2SP downloads index information, after the node server indicated from described seed resource information in described client and/or client-side download the step of described up-to-date data file, described method also includes:
Described client reports the P2SP of self to download index information and inquires about server to described seed resource.
A8, method as described in A7, it is characterised in that also include:
If described client is according to the latest features information of described data file, it is judged that described data file is up-to-date, then reports the P2SP of self to download index information and inquire about server to seed resource.
A9, method as described in A7, it is characterised in that described HTTP downloads information and includes uniform resource position mark URL;Described P2SP downloads index information and includes the deposit position of file, file size, file place server and/or the address of client, and/or the address of file distribution person.
The invention also discloses B10, a kind of method of data synchronization based on content distributing network CDN, described content distributing network CDN includes Distributor, the node server communicated with described Distributor, the client communicated with described node server, and, inquire about server with the seed resource of described client communication;In described client, storage has the latest features information of data file;
Described method includes:
Described seed resource inquiry server receives the inquiry request of the up-to-date data file that client sends;Described request is the described client latest features information according to described data file, it is judged that submit to when described data file is not up-to-date;
Described seed resource inquiry server is according to the seed resource information of data file up-to-date described in described requesting query;
Described seed resource inquiry server returns described seed resource information to described client.
B11, method as described in B10, it is characterised in that described seed resource information includes that one or more P2SP downloads index information, and described method also includes:
Described seed resource inquiry server receives described client and reports the P2SP of self to download index information.
The invention also discloses the client in C12, a kind of content distributing network CDN, wherein, described client and node server communication, described node server and Distributor communication, described client also inquires about server communication with seed resource, further, in described client, storage has the latest features information of data file;
Described client includes:
First download module, is suitable to download data file from the node server distributed for it;
Judge module, is suitable to the latest features information according to described data file, it is judged that described data file is the most up-to-date;If it is not, then perform to submit module to;
Submit module to, be suitable to submit to described seed resource inquiry server the inquiry request of up-to-date data file;
Receiver module, is suitable to receive the seed resource information that described up-to-date data file that described seed resource inquiry server returns for described request is corresponding;
Second download module, is suitable to node server and/or client-side from the instruction of described seed resource information and downloads described up-to-date data file.
C13, client as described in C12, it is characterised in that described first download module includes:
HTTP downloads information and receives submodule, is suitable to client and receives the HTTP download information that Distributor sends;Described HTTP downloads information and includes the instruction information of node server;
Connexon module, is suitable to download information according to described HTTP and connects corresponding node server download data file.
C14, client as described in C13, it is characterised in that described connexon module includes:
Segmentation download unit, is suitable to download information according to described HTTP and is connected to the node server of correspondence, and from described node server, multiple preset start-stop location segment download described data file;
Assembled unit, is suitable to combine described segmentation and downloads the data file obtained.
C15, client as described in C12 or C13 or C14, it is characterised in that described judge module includes:
Calculating sub module, is suitable to calculate current characteristic information according to described data file;
Judge submodule, be suitable to judge that described latest features information is the most consistent with current characteristic information;The most then call the first decision sub-module, if it is not, then call the second decision sub-module;
First decision sub-module, is suitable to judge that described data file is up-to-date;
Second decision sub-module, is suitable to judge that described data file is not as up-to-date.
C16, client as described in C15, it is characterised in that described latest features information is the data content mark of latest data file, described current characteristic information is the data content mark of current data file.
C17, client as described in C16, it is characterised in that described latest features information is the MD5 value of latest data file;Described current characteristic information is the MD5 value of current data file.
C18, client as described in C17, it is characterised in that described seed resource information includes that one or more P2SP downloads index information, and described device also includes:
First reporting module, is suitable to report the P2SP of self to download index information and inquires about server to described seed resource.
C19, client as described in C18, it is characterised in that also include:
Second reporting module, is suitable in the latest features information according to described data file, it is judged that when described data file is up-to-date, reports the P2SP of self to download index information and inquires about server to seed resource.
C20, client as described in C18, it is characterised in that described HTTP downloads information and includes uniform resource position mark URL;Described P2SP downloads index information and includes the deposit position of file, file size, file place server and/or the address of client, and/or the address of file distribution person.
The invention also discloses the seed resource inquiry server of D21, a kind of data syn-chronization based on content distributing network CDN, wherein, described seed resource inquiry server and client communication, described client and node server communication, described node server and Distributor communication, wherein, in described client, storage has the latest features information of data file;
Described seed resource inquiry server includes:
Receiver module, is suitable to receive the inquiry request of the up-to-date data file that client sends;Described request is the described client latest features information according to described data file, it is judged that submit to when described data file is not up-to-date;
Enquiry module, is suitable to the seed resource information according to data file up-to-date described in described requesting query;
Return module, be adapted to return to described seed resource information to described client.
D22, as described in D21 seed resource inquiry server, it is characterised in that described seed resource information include one or more P2SP download index information, described seed resource inquiry server also include:
Download information receiving module, be suitable to receive described client and report the P2SP of self to download index information.