Summary of the invention
In view of the above problems, the present invention has been proposed to the method for data synchronization of a kind of content-based distributing network CDN is provided, a data sync client end of content-based distributing network CDN, and, the synchronous seed resource querying server of data of a kind of content-based distributing network CDN.
According to one aspect of the present invention, the method of data synchronization of a kind of content-based distributing network CDN is provided, described content distributing network CDN comprises Distributor, the node server of communicating by letter with described Distributor, the client of communicating by letter with described node server, and, with the seed resource querying server of described client communication; In described client, store the latest features information of data file;
Described method comprises:
Described client is from being the node server download data files of its distribution;
Described client, according to the latest features information of described data file, judges that whether described data file is up-to-date;
If not, described client is submitted the inquiry request of up-to-date data file to described seed resource querying server;
Seed resource information corresponding to described up-to-date data file that described in described client, seed resource querying server returns for described request;
Described client is downloaded described up-to-date data file from node server and/or the client-side of described seed resource information indication.
Alternatively, described client comprises from the step of the node server download data files for its distribution:
The HTTP Download Info that client Distributor sends; Described HTTP Download Info comprises the indication information of node server;
Described client connects corresponding node server download data files according to described HTTP Download Info.
Alternatively, the step that described client connects corresponding node server download data files according to described HTTP Download Info comprises:
Described client is connected to corresponding node server according to described HTTP Download Info, and from described node server, a plurality of preset start-stop location segment are downloaded described data file;
Described client combines described segmentation and downloads the data file obtaining.
Alternatively, described client, according to the latest features information of described data file, judges that the whether up-to-date step of described data file comprises:
Described client is calculated current characteristic information according to described data file;
Described client judges that whether described latest features information is consistent with current characteristic information;
If so, described client judges that described data file is up-to-date;
If not, described client judges that described data file is not for up-to-date.
Alternatively, the data content sign that described latest features information is latest data file, the data content sign that described current characteristic information is 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 comprises that one or more P2SP downloads index information, in described client, from node server and/or the client-side of described seed resource information indication, download the step of described up-to-date data file, described method also comprises:
Described client reports the P2SP of self to download index information to described seed resource querying server.
Alternatively, also comprise:
If described client, according to the latest features information of described data file, judges that described data file is up-to-date, report the P2SP of self to download index information to seed resource querying server.
Alternatively, described HTTP Download Info comprises uniform resource position mark URL; Described P2SP downloads the deposit position that index information comprises file, file size, the address of file place server and/or client, and/or file distribution person's address.
According to another aspect of the present invention, the method of data synchronization of a kind of content-based distributing network CDN is also disclosed, described content distributing network CDN comprises Distributor, the node server of communicating by letter with described Distributor, the client of communicating by letter with described node server, and, with the seed resource querying server of described client communication; In described client, store the latest features information of data file;
Described method comprises:
Described seed resource querying server receives the inquiry request of the up-to-date data file of client transmission; Described request is the latest features information of the described data file of described client foundation, does not judge when described data file is not up-to-date and submits to;
Described seed resource querying server is according to the seed resource information of the described up-to-date data file of described request inquiry;
Described seed resource querying server returns to described seed resource information to described client.
Alternatively, described seed resource information comprises that one or more P2SP downloads index information, and described method also comprises:
Described seed resource querying server receives described client and reports the P2SP of self to download index information.
According to another aspect of the present invention, client in a kind of content distributing network CDN is also disclosed, wherein, described client is communicated by letter with node server, described node server is communicated by letter with Distributor, described client is also communicated by letter with seed resource querying server, and, in described client, store the latest features information of data file;
Described client comprises:
The first download module, is suitable for from being the node server download data files of its distribution;
Judge module, is suitable for the latest features information according to described data file, judges that whether described data file is up-to-date; If not, carry out and submit module to;
Submit module to, be suitable for submitting to described seed resource querying server the inquiry request of up-to-date data file;
Receiver module, is suitable for receiving seed resource information corresponding to described up-to-date data file that described seed resource querying server returns for described request;
The second download module, is suitable for downloading described up-to-date data file from node server and/or the client-side of described seed resource information indication.
Alternatively, described the first download module comprises:
HTTP Download Info receives submodule, is suitable for receiving the HTTP Download Info that Distributor sends; Described HTTP Download Info comprises the indication information of node server;
Connexon module, is suitable for connecting corresponding node server download data files according to described HTTP Download Info.
Alternatively, described connexon module comprises:
Segmentation download unit, is suitable for being connected to corresponding node server according to described HTTP Download Info, and from described node server, a plurality of preset start-stop location segment are downloaded described data file;
Assembled unit, is suitable for combining described segmentation and downloads the data file obtaining.
Alternatively, described judge module comprises:
Calculating sub module, is suitable for calculating current characteristic information according to described data file;
Judgement submodule, is suitable for judging that whether described latest features information is consistent with current characteristic information; If so, call the first decision sub-module, if not, call the second decision sub-module;
The first decision sub-module, is suitable for judging that described data file is up-to-date;
The second decision sub-module, is suitable for judging that described data file is not for up-to-date.
Alternatively, the data content sign that described latest features information is latest data file, the data content sign that described current characteristic information is current data file.
Alternatively, the MD5 value that described latest features information is latest data file; The MD5 value that described current characteristic information is current data file.
Alternatively, described seed resource information comprises that one or more P2SP downloads index information, and described client also comprises:
The first reporting module, is suitable for reporting the P2SP of self to download index information to described seed resource querying server.
Alternatively, described client also comprises:
The second reporting module, is suitable for, in the latest features information according to described data file, judging when described data file is up-to-date, reports the P2SP of self to download index information to seed resource querying server.
Alternatively, described HTTP Download Info comprises uniform resource position mark URL; Described P2SP downloads the deposit position that index information comprises file, file size, the address of file place server and/or client, and/or file distribution person's address.
According to another aspect of the present invention, the synchronous seed resource querying server of data of a kind of content-based distributing network CDN is also disclosed, wherein, described seed resource querying server and client communication, described client is communicated by letter with node server, described node server is communicated by letter with Distributor, wherein, stores the latest features information of data file in described client;
Described seed resource querying server comprises:
Receiver module, is suitable for receiving the inquiry request of the up-to-date data file that client sends; Described request is the latest features information of the described data file of described client foundation, does not judge when described data file is not up-to-date and submits to;
Enquiry module, is suitable for the seed resource information according to the described up-to-date data file of described request inquiry;
Return to module, be suitable for returning described seed resource information to described client.
Alternatively, described seed resource information comprises that one or more P2SP downloads index information, and described seed resource querying server also comprises:
Download Info receiver module, is suitable for receiving described client and reports the P2SP of self to download index information.
In embodiments of the present invention, at CDN, be each client distribution node server, and when having new data file issue, send latest features information to each client.When client downloads to data file from node server, can judge that whether up-to-date data file is according to latest features information, if decision data file is not up-to-date, can also send a request to seed resource querying server, get the seed resource information of the node server closing on, and according to going fast to download up-to-date data file in the indicated node server of this seed resource information and/or client, data synchronization efficiency be can improve, accuracy and the fail safe of latest data guaranteed simultaneously.
In addition, download to the client of latest data, the P2SP of himself can also be downloaded to index information and report to seed resource querying server, seed resource querying server just can be downloaded index information using this P2SP after receiving and retain as seed resource information, other client just can arrive this client downloads data file, so just can be effectively originally isolated server and its mirror image resources and P2P resource consolidation together, when having more client downloads data file, download efficiency is higher.
Above-mentioned explanation is only the general introduction of technical solution of the present invention, in order to better understand technological means of the present invention, and can be implemented according to the content of specification, and for above and other objects of the present invention, feature and advantage can be become apparent, below especially exemplified by the specific embodiment of the present invention.
Embodiment
Exemplary embodiment of the present disclosure is described below with reference to accompanying drawings in more detail.Although shown exemplary embodiment of the present disclosure in accompanying drawing, yet should be appreciated that and can realize the disclosure and the embodiment that should do not set forth limits here with various forms.On the contrary, it is in order more thoroughly to understand the disclosure that these embodiment are provided, and can by the scope of the present disclosure complete convey to those skilled in the art.
One of core of the embodiment of the present invention is, by P2SP, coordinate the synchronous problem of CDN scheme deal with data, when client downloads to data file after verification, find while not being up-to-date, can adopt the downloading mode of P2SP 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 the method for data synchronization embodiment mono-of a kind of according to an embodiment of the invention content-based distributing network CDN, in described content distributing network CDN, can comprise Distributor, the node server of communicating by letter with described Distributor, the client of communicating by letter with described node server, and, with the seed resource querying server of described client communication; In described client, can store the latest features information of data file;
Described method specifically can comprise the steps:
Step 101, described client is from being the node server download data files of its distribution;
In a preferred embodiment of the present invention, described step 101 can comprise following sub-step:
Sub-step S11, the HTTP Download Info that client Distributor sends; Described HTTP Download Info comprises the indication information of node server;
Sub-step S12, described client connects corresponding node server download data files according to described HTTP Download Info.
In specific implementation, Distributor in CDN, or the stronger server of other promptnesses is when the new data file of issue, latest features information corresponding to this data file and Download Info etc. can be distributed to each network element in CDN, in node server or client.Because the relative content of latest features information is less, therefore there will not be nonsynchronous problem in CDN, therefore can be used as and judge whether data file is up-to-date foundation.
In actual applications, CDN can make a decision by close and server load, and a kind of mode very efficiently of can take provides service as user.Particularly, the client that CDN is generally user is distribution node server nearby, when client to the HTTP Download Info of the network element closing on that sends of Distributor time, just can connect the quick-downloading data file of corresponding node server according to HTTP Download Info.
In a kind of example as concrete application of the present invention, described HTTP Download Info can be the address (URL, URL(uniform resource locator)) of specified node server.Distributor can be the HTTP Download Info of the specified node server of client distribution, also can be that Distributor is the node server of fixing mapping, certainly, can be bottleneck and the link of avoiding as far as possible likely affecting on the Internet data transmission bauds and stability, for client looks the node server that status is joined up and down, specifically can determine according to actual demand, the present invention is not restricted this.
In a preferred embodiment of the present invention, described sub-step S12, the step that described client connects corresponding node server download data files according to described HTTP Download Info can comprise following sub-step:
Sub-step S12-1, described client is connected to corresponding node server according to described HTTP Download Info, and from described node server, a plurality of preset start-stop location segment are downloaded described data file;
Sub-step S12-2, described client combines described segmentation and downloads the data file obtaining.
In specific implementation, when client is connected to corresponding node server according to HTTP Download Info, just can start to download corresponding data file from this node server.Because the data file of part is larger, in order to accelerate download progress, can adopt the downloading mode of the many segmentations of a kind of concurrent type frog file, can download from the different start-stop location segment of data file, such as first byte from a file starts to download, can also download from the 100th byte of a file, after client has been downloaded file fragmentation simultaneously, carry out this locality splicing, be reassembled into a complete data file.Owing to adopting the mode of the concurrent download of many segmentations, the speed of download file is greatly improved.
Step 102, described client, according to the latest features information of described data file, judges that whether described data file is up-to-date; If not, perform step 103;
In a preferred embodiment of the present invention, described step 102 can comprise following sub-step:
Sub-step S31, described client is calculated current characteristic information according to described data file;
Sub-step S32, described client judges that whether described latest features information is consistent with current characteristic information; If so, carry out sub-step S33, if not, carry out 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 for up-to-date.
In a kind of preferred exemplary of the present invention, described latest features information can be the data content sign of latest data file, and described current characteristic information can be the data content sign of current data file.
In specific implementation, latest features information can be the unique data content sign generating according to the content of data file, for example, can adopt CRC(Cyclic Redundancy Check, cyclic redundancy check (CRC) code) calculate.After up-to-date data file issue, can the content identification of latest data file be distributed to each network element in CDN simultaneously, because data content sign is to generate according to the content of data file, if file is rewritten, the data content sign of the current data file calculating in client is inconsistent with the data content sign of latest data file, illustrates that current data file probably has problem.
Preferably, the data content of described latest data file sign can be the MD5 value of latest data file; The data content sign 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 adopt MD5(Message-Digest Algorithm 5, Message-Digest Algorithm5) the data file unique identification that calculates.Particularly, can be to utilize MD5 algorithm to calculate MD5 value according to the binary message of file.
MD5 algorithm is one of widely used hash algorithm of computer, and it is another fixed-length value by data operation, and Information Compression is become to a kind of secret form.MD5 has the advantages that collision rate is low, uses the unique identification of MD5 algorithm calculation document, can effectively prevent repetition and the collision of file.For example, suppose that file is by virus or inbreaking of Trojan horse, or file is not up-to-date, the MD5 value calculating is so inconsistent by the MD5 value of preserving with client terminal local, and just can be very easy to find this document had problem.
Certainly, in actual applications, be not limited to MD5 algorithm, those skilled in the art can also be take low collision rate as principle, select the unique identification of other suitable algorithm spanned file, the present invention to this without being limited.
Step 103, described client is submitted the inquiry request of up-to-date data file to described seed resource querying server;
Step 104, seed resource information corresponding to described up-to-date data file that seed resource querying server returns for described request described in described client;
Step 105, described client is downloaded described up-to-date data file from node server and/or the client-side of described seed resource information indication.
In the present invention, be in embodiment, if the data file verification of downloading failure, can illustrate that the data that download to are not up-to-date so, download file by other means now, P2SP (Peer to Server & Peer, user is to server and user) for example.
Adopt P2SP technology, data file can be transmitted mutually in each network element on CDN, effectively originally isolated server and its mirror image resources and P2P(peer-to-peer, point-to-point) resource consolidation is together.Specifically, it is an information of planting subkey with inquiry that P2SP downloads index information, can arrive particular server and obtain corresponding resource.
In specific implementation, client can be from seed resource querying server inquiry seed resource information, get the server with up-to-date resource (being data file), or, after seed resource information with the client of up-to-date resource, client just can be gone server indicated in seed resource information or the up-to-date data file of client downloads.
In a kind of preferred exemplary of the present invention, in the request that client sends to seed resource querying server, can also comprise the MD5 value calculating according to data file, MD5 value in the seed resource information that can preserve with this locality after seed resource querying server receives is compared, if find the seed resource information of same MD5 value, illustrate that the data file in network element corresponding to this seed resource information remains old, seed resource querying server can be selected its mark, or directly delete, to avoid, will be that this seed resource information sends to client equally, thereby cause client again to download to legacy data.
In addition, the new resources such as data file are when CDN issues, the predetermined information that will download the server of this resource can be uploaded to seed resource querying server, what so just can guarantee to preserve on part server must be new data, when whether the data in uncertain certain server or client are up-to-date, can directly to the client of request seed resource information, send the corresponding seed resource information of this book server.
In a preferred embodiment of the present invention, described seed resource information can comprise that one or more P2SP downloads index information, in described client, from node server and/or the client-side of described seed resource information indication, 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 to described seed resource querying server.
In another preferred embodiment of the present invention, described method can also comprise the steps:
If described client, according to the latest features information of described data file, judges that described data file is up-to-date, report the P2SP of self to download index information to seed resource querying server.
In embodiments of the present invention, when client downloads arrives up-to-date data file, can also be by self IP address and the relevant information that has resource, be that P2SP download index information reports to seed resource querying server, seed resource querying server can be included, and other clients just can be carried out communication with this client like this.Specifically, described P2SP downloads the deposit position that index information can comprise file, file size, and the address of file place server and/or client, and/or file distribution person's address etc., certainly, can also comprise the MD5 value that client is calculated.
With reference to Fig. 3, show the flow chart of steps of the method for data synchronization embodiment bis-of a kind of according to an embodiment of the invention content-based distributing network CDN, in described content distributing network CDN, can comprise Distributor, the node server of communicating by letter with described Distributor, the client of communicating by letter with described node server, and, with the seed resource querying server of described client communication; In described client, can store the latest features information of data file;
Described method specifically can comprise the steps:
Step 201, described seed resource querying server receives the inquiry request of the up-to-date data file of client transmission; Described request is the latest features information of the described data file of described client foundation, does not judge when described data file is not up-to-date and submits to;
Step 202, described seed resource querying server is according to the seed resource information of the described up-to-date data file of described request inquiry;
Step 203, described seed resource querying server returns to described seed resource information to described client.
In a preferred embodiment of the present invention, described seed resource information can comprise that one or more P2SP downloads index information, and described method can also comprise the steps:
Described seed resource querying server receives described client and reports the P2SP of self to download index information.
In actual applications, seed resource querying server can be set in CDN, at seed resource querying server, preserve a plurality of seed resource information.When client is not when to detect data file be up-to-date, seed resource querying server can receive the inquiry request that client sends, seed resource querying server can send the server that closes on or the seed resource information of client for this server, the node server that client just can be indicated rapidly from seed resource information, or client downloads is to latest data.
In order to make those skilled in the art further understand the embodiment of the present invention, below adopt a concrete application example to describe.
In specific implementation, due to safety, the network of Some Enterprises and government bodies is all isolated with external network, can not connecting Internet.In complicated enterprise network, any one employee's careless omission, 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, portion still needs move the software of redaction or transmit data within it, and it is thorny that these problems just become.
Data synchronization implementation structural representation with reference to the of the present invention a kind of content-based distributing network CDN shown in Fig. 4, in CDN, can comprise Distributor, the node server of communicating by letter with described Distributor, the client of communicating by letter with described node server, and, with the seed resource querying server of described client communication.Wherein, this CDN sets up voluntarily, certainly, can be also to use third-party CDN.
In separation net, can preferentially adopt the common downloading mode downloaded resources of CDN, common customer end directly can download to data file from the node server closing on.If the data file verification that client downloads arrives failure, find it is not the words of up-to-date data file, can also adopt the downloading mode of P2SP so, particularly, seed resource information be inquired about and be obtained to client can at seed resource querying server, and the quick-downloading up-to-date data file of the node server of indicating from seed resource information.
It should be noted that, for embodiment of the method, for simple description, therefore it is all expressed as to a series of combination of actions, but those skilled in the art should know, the embodiment of the present invention is not subject to the restriction of described sequence of movement, because according to the embodiment of the present invention, some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in specification all belongs to preferred embodiment, and related action might not be that the embodiment of the present invention is necessary.
With reference to Fig. 5, show the structured flowchart of the data sync client end embodiment of a kind of according to an embodiment of the invention content-based distributing network CDN, wherein, described client is communicated by letter with node server, described node server is communicated by letter with Distributor, described client is also communicated by letter with seed resource querying server, and, in described client, store the latest features information of data file;
Described client specifically can comprise as lower module:
The first download module 301, is suitable for from being the node server download data files of its distribution;
In a preferred embodiment of the present invention, described the first download module 301 can comprise:
HTTP Download Info receives submodule, is suitable for the HTTP Download Info that client Distributor sends; Described HTTP Download Info comprises the indication information of node server;
Connexon module, is suitable for connecting corresponding node server download data files according to described HTTP Download Info.
In a preferred embodiment of the present invention, described connexon module can comprise:
Segmentation download unit, is suitable for being connected to corresponding node server according to described HTTP Download Info, and from described node server, a plurality of preset start-stop location segment are downloaded described data file;
Assembled unit, is suitable for combining described segmentation and downloads the data file obtaining.
Judge module 302, is suitable for the latest features information according to described data file, judges that whether described data file is up-to-date; If not, carry out and submit module to;
In a preferred embodiment of the present invention, described judge module 302 can comprise:
Calculating sub module, is suitable for calculating current characteristic information according to described data file;
Judgement submodule, is suitable for judging that whether described latest features information is consistent with current characteristic information; If so, call the first decision sub-module, if not, call the second decision sub-module;
The first decision sub-module, is suitable for judging that described data file is up-to-date;
The second decision sub-module, is suitable for judging that described data file is not for up-to-date.
In a preferred embodiment of the present invention, described latest features information can be the data content sign of latest data file, and described current characteristic information can be the data content sign of current data file.
In a preferred embodiment of the present invention, the data content of described latest data file sign can be the MD5 value of latest data file; The data content sign of described current data file can be the MD5 value of current data file.
Submit module 303 to, be suitable for submitting to described seed resource querying server the inquiry request of up-to-date data file;
Receiver module, is suitable for receiving seed resource information corresponding to described up-to-date data file that described seed resource querying server returns for described request;
The second download module, is suitable for downloading described up-to-date data file from node server and/or the client-side of described seed resource information indication.
In a preferred embodiment of the present invention, described seed resource information comprises that one or more P2SP downloads index information, and described device can also comprise:
The first reporting module, is suitable for reporting the P2SP of self to download index information to described seed resource querying server.
In a preferred embodiment of the present invention, described device can also comprise:
The second reporting module, is suitable for, in the latest features information according to described data file, judging when described data file is up-to-date, reports the P2SP of self to download index information to seed resource querying server.
In a preferred embodiment of the present invention, described HTTP Download Info can comprise uniform resource position mark URL; Described P2SP downloads the deposit position that index information can comprise file, file size, the address of file place server and/or client, and/or file distribution person's address.
With reference to Fig. 6, show the structured flowchart of the synchronous seed resource querying server of the data embodiment of a kind of according to an embodiment of the invention content-based distributing network CDN,
Wherein, described seed resource querying server and client communication, described client is communicated by letter with node server, and described node server is communicated by letter with Distributor, wherein, stores the latest features information of data file in described client;
Described seed resource querying server comprises:
Receiver module 301, is suitable for receiving the inquiry request of the up-to-date data file that client sends; Described request is the latest features information of the described data file of described client foundation, does not judge when described data file is not up-to-date and submits to;
Enquiry module 302, is suitable for the seed resource information according to the described up-to-date data file of described request inquiry;
Return to module 303, be suitable for returning described seed resource information to described client.
In a preferred embodiment of the present invention, described seed resource information can comprise that one or more P2SP downloads index information, and described seed resource querying server can also comprise:
Download Info receiver module, is suitable for receiving described client and reports the P2SP of self to download index information.
For device embodiment, because it is substantially similar to embodiment of the method, so description is fairly simple, relevant part is referring to the part explanation of embodiment of the method.
The algorithm providing at this is intrinsic not relevant to any certain computer, virtual system or miscellaneous equipment with demonstration.Various general-purpose systems also can with based on using together with this teaching.According to description above, it is apparent constructing the desired structure of this type systematic.In addition, the present invention is not also for any certain programmed language.It should be understood that and can utilize various programming languages to realize content of the present invention described here, and the description of above language-specific being done is in order to disclose preferred forms of the present invention.
In the specification that provided herein, a large amount of details have been described.Yet, can understand, embodiments of the invention can not put into practice in the situation that there is no these details.In some instances, be not shown specifically known method, structure and technology, so that not fuzzy understanding of this description.
Similarly, be to be understood that, in order to simplify the disclosure and to help to understand one or more in each inventive aspect, in the above in the description of exemplary embodiment of the present invention, each feature of the present invention is grouped together into single embodiment, figure or sometimes in its description.Yet, the method for the disclosure should be construed to the following intention of reflection: the present invention for required protection requires than the more feature of feature of clearly recording in each claim.Or rather, as reflected in claims below, inventive aspect is to be less than all features of disclosed single embodiment above.Therefore, claims of following embodiment are incorporated to this embodiment thus clearly, and wherein each claim itself is as independent embodiment of the present invention.
Those skilled in the art are appreciated that and can the module in the equipment in embodiment are adaptively changed 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 can put them into a plurality of submodules or subelement or sub-component in addition.At least some in such feature and/or process or unit are mutually repelling, and can adopt any combination to combine all processes or the unit of disclosed all features in this specification (comprising claim, summary and the accompanying drawing followed) and disclosed any method like this or equipment.Unless clearly statement in addition, in this specification (comprising claim, summary and the accompanying drawing followed) disclosed each feature can be by providing identical, be equal to or the alternative features of similar object replaces.
In addition, those skilled in the art can understand, although embodiment more described herein comprise some feature rather than further feature included in other embodiment, the combination of the feature of different embodiment means within scope of the present invention and forms different embodiment.For example, in the following claims, the one of any of embodiment required for protection can be used with compound mode arbitrarily.
All parts embodiment of the present invention can realize with hardware, or realizes with the software module moved on one or more processor, or realizes with their combination.It will be understood by those of skill in the art that and can use in practice microprocessor or digital signal processor (DSP) to realize according to the some or all functions of the some or all parts in the data synchronizer of the content-based distributing network CDN of the embodiment of the present invention.The present invention for example can also be embodied as, for carrying out part or all equipment or device program (, computer program and computer program) of method as described herein.Realizing program of the present invention and can be stored on computer-readable medium like this, or can there is the form of one or more signal.Such signal can be downloaded and obtain from internet website, or provides on carrier signal, or provides with any other form.
It should be noted above-described embodiment the present invention will be described rather than limit the invention, and those skilled in the art can design alternative embodiment in the situation that do not depart from the scope of claims.In the claims, any reference symbol between bracket should be configured to limitations on claims.Word " comprises " not to be got rid of existence and is not listed as element or step in the claims.Being positioned at word " " before element or " one " does not get rid of and has a plurality of such elements.The present invention can be by means of including the hardware of some different elements and realizing by means of the computer of suitably programming.In having enumerated the unit claim of some devices, several in these devices can be to carry out imbody by same hardware branch.The use of word first, second and C grade does not represent any order.Can be title by these word explanations.
The invention discloses the method for data synchronization of A1, a kind of content-based distributing network CDN, described content distributing network CDN comprises Distributor, the node server of communicating by letter with described Distributor, the client of communicating by letter with described node server, and, with the seed resource querying server of described client communication; In described client, store the latest features information of data file;
Described method comprises:
Described client is from being the node server download data files of its distribution;
Described client, according to the latest features information of described data file, judges that whether described data file is up-to-date;
If not, described client is submitted the inquiry request of up-to-date data file to described seed resource querying server;
Seed resource information corresponding to described up-to-date data file that described in described client, seed resource querying server returns for described request;
Described client is downloaded described up-to-date data file from node server and/or the client-side of described seed resource information indication.
A2, the method as described in claim A1, is characterized in that, described client comprises from the step of the node server download data files for its distribution:
The HTTP Download Info that client Distributor sends; Described HTTP Download Info comprises the indication information of node server;
Described client connects corresponding node server download data files according to described HTTP Download Info.
A3, the method as described in claim A2, is characterized in that, the step that described client connects corresponding node server download data files according to described HTTP Download Info comprises:
Described client is connected to corresponding node server according to described HTTP Download Info, and from described node server, a plurality of preset start-stop location segment are downloaded described data file;
Described client combines described segmentation and downloads the data file obtaining.
A4, the method as described in claim A1 or A2 or A3, is characterized in that, described client, according to the latest features information of described data file, judges that the whether up-to-date step of described data file comprises:
Described client is calculated current characteristic information according to described data file;
Described client judges that whether described latest features information is consistent with current characteristic information;
If so, described client judges that described data file is up-to-date;
If not, described client judges that described data file is not for up-to-date.
A5, the method as described in claim A4, is characterized in that, the data content sign that described latest features information is latest data file, the data content sign that described current characteristic information is current data file.
A6, the method as described in claim A4, is characterized 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, the method as described in claim A6, it is characterized in that, described seed resource information comprises that one or more P2SP downloads index information, in described client, from node server and/or the client-side of described seed resource information indication, download the step of described up-to-date data file, described method also comprises:
Described client reports the P2SP of self to download index information to described seed resource querying server.
A8, the method as described in claim A7, is characterized in that, also comprises:
If described client, according to the latest features information of described data file, judges that described data file is up-to-date, report the P2SP of self to download index information to seed resource querying server.
A9, the method as described in claim A7, is characterized in that, described HTTP Download Info comprises uniform resource position mark URL; Described P2SP downloads the deposit position that index information comprises file, file size, the address of file place server and/or client, and/or file distribution person's address.
The invention also discloses the method for data synchronization of B10, a kind of content-based distributing network CDN, described content distributing network CDN comprises Distributor, the node server of communicating by letter with described Distributor, the client of communicating by letter with described node server, and, with the seed resource querying server of described client communication; In described client, store the latest features information of data file;
Described method comprises:
Described seed resource querying server receives the inquiry request of the up-to-date data file of client transmission; Described request is the latest features information of the described data file of described client foundation, does not judge when described data file is not up-to-date and submits to;
Described seed resource querying server is according to the seed resource information of the described up-to-date data file of described request inquiry;
Described seed resource querying server returns to described seed resource information to described client.
B11, the method as described in claim B10, is characterized in that, described seed resource information comprises that one or more P2SP downloads index information, and described method also comprises:
Described seed resource querying 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 is communicated by letter with node server, described node server is communicated by letter with Distributor, described client is also communicated by letter with seed resource querying server, and, in described client, store the latest features information of data file;
Described client comprises:
The first download module, is suitable for from being the node server download data files of its distribution;
Judge module, is suitable for the latest features information according to described data file, judges that whether described data file is up-to-date; If not, carry out and submit module to;
Submit module to, be suitable for submitting to described seed resource querying server the inquiry request of up-to-date data file;
Receiver module, is suitable for receiving seed resource information corresponding to described up-to-date data file that described seed resource querying server returns for described request;
The second download module, is suitable for downloading described up-to-date data file from node server and/or the client-side of described seed resource information indication.
C13, the client as described in claim C12, is characterized in that, described the first download module comprises:
HTTP Download Info receives submodule, is suitable for the HTTP Download Info that client Distributor sends; Described HTTP Download Info comprises the indication information of node server;
Connexon module, is suitable for connecting corresponding node server download data files according to described HTTP Download Info.
C14, the client as described in claim C13, is characterized in that, described connexon module comprises:
Segmentation download unit, is suitable for being connected to corresponding node server according to described HTTP Download Info, and from described node server, a plurality of preset start-stop location segment are downloaded described data file;
Assembled unit, is suitable for combining described segmentation and downloads the data file obtaining.
C15, the client as described in claim C12 or C13 or C14, is characterized in that, described judge module comprises:
Calculating sub module, is suitable for calculating current characteristic information according to described data file;
Judgement submodule, is suitable for judging that whether described latest features information is consistent with current characteristic information; If so, call the first decision sub-module, if not, call the second decision sub-module;
The first decision sub-module, is suitable for judging that described data file is up-to-date;
The second decision sub-module, is suitable for judging that described data file is not for up-to-date.
C16, the client as described in claim C15, is characterized in that, the data content sign that described latest features information is latest data file, the data content sign that described current characteristic information is current data file.
C17, the client as described in claim C16, is characterized in that, the MD5 value that described latest features information is latest data file; The MD5 value that described current characteristic information is current data file.
C18, the client as described in claim C17, is characterized in that, described seed resource information comprises that one or more P2SP downloads index information, and described device also comprises:
The first reporting module, is suitable for reporting the P2SP of self to download index information to described seed resource querying server.
C19, the client as described in claim C18, is characterized in that, also comprises:
The second reporting module, is suitable for, in the latest features information according to described data file, judging when described data file is up-to-date, reports the P2SP of self to download index information to seed resource querying server.
C20, the client as described in claim C18, is characterized in that, described HTTP Download Info comprises uniform resource position mark URL; Described P2SP downloads the deposit position that index information comprises file, file size, the address of file place server and/or client, and/or file distribution person's address.
The invention also discloses the synchronous seed resource querying server of data of D21, a kind of content-based distributing network CDN, wherein, described seed resource querying server and client communication, described client is communicated by letter with node server, described node server is communicated by letter with Distributor, wherein, in described client, store the latest features information of data file;
Described seed resource querying server comprises:
Receiver module, is suitable for receiving the inquiry request of the up-to-date data file that client sends; Described request is the latest features information of the described data file of described client foundation, does not judge when described data file is not up-to-date and submits to;
Enquiry module, is suitable for the seed resource information according to the described up-to-date data file of described request inquiry;
Return to module, be suitable for returning described seed resource information to described client.
D22, the seed resource querying server as described in claim D21, is characterized in that, described seed resource information comprises that one or more P2SP downloads index information, and described seed resource querying server also comprises:
Download Info receiver module, is suitable for receiving described client and reports the P2SP of self to download index information.