Embodiment
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme of the present invention is clearly and completely described.Obviously, each following embodiment is all the embodiment of a part of the present invention.Based on each embodiment that the present invention is following, those of ordinary skill in the art are even without making creative work, also the even whole technical characteristic of equivalent transformation part can be passed through, and acquisition can solve the technology of the present invention problem, realize other embodiment of the technology of the present invention effect, and these each embodiments converting and come obviously do not depart from scope disclosed in this invention.
Provide two kinds of update mechanisms in the embodiment of the present invention, one is incremental update, and namely pusher sends the first data flow described in following embodiment to terminal, and it is for making the data under terminal renewal assigned catalogue; Another kind be full dose upgrade and incremental update in conjunction with update mode, full dose renewal is mainly that pusher sends the second data flow described in following embodiment to terminal, and it upgrades data under all catalogues for making terminal.
In concrete implementation, the first above-mentioned data flow and the second data flow all can comprise fullpath structure and describe, upgrade instruction, and the data file corresponding with upgrading instruction, compare so that terminal can describe according to the fullpath structure that the Actual path structure of inside describes and pusher issues, and then adopt renewal instruction, in conjunction with the data of data file update terminal inner.Particularly, renewal instruction is XML configuration file, and its XML configuration file is encapsulated in special OC mode and broadcasts, and the service_tye of this OC mode is defined as 0x90, and the directory object that fullpath structure is described through OC is broadcast.Especially, full dose upgrades and incremental update is labelled by proglnfo-> islncrement configuration item in XML configuration file, islncrement value is that true shows that program incremental update is broadcast, and value is false or does not describe and represent that program full dose upgrades and broadcast.
It should be noted that, new-programme generally adopts full dose to upgrade and plays, and when Program sections upgrades, can first adopt incremental update to play redaction programme content, follow-uply can regularly full dose upgrade and play, situation that the program data that can effectively prevent aforesaid incremental update from broadcasting thus is missed occurs.
By upper, pusher only fullpath structure need be described and relevant more new data sends, and need not send total data, can save bandwidth thus.Further, regularly carry out full dose renewal, in order to ensure that terminal does not omit any data.
Fig. 1 shows the scene graph of the data-updating method of the embodiment of the present invention, and as shown in Figure 1, the data-updating method in the present embodiment comprises:
Pusher adopts OC mode to send the first data flow to terminal, and the first data flow comprises: be used to indicate that terminal upgrades new data file in the renewal instruction of the first data under assigned catalogue, the catalogue corresponding with renewal instruction, fullpath structure describes; To make terminal the Actual path structure of storage inside described and describes compare with fullpath structure, and then according to upgrading instruction, adopt the first data of above-mentioned data file update terminal inner.
Above-mentioned data-updating method adopts OC mode to send to terminal by pusher to comprise only for the first data flow of the data file under more new change catalogue, to make terminal according to the renewal instruction in the first data flow, adopt the first data of data file update terminal inner, the bandwidth resources in transmission network can be saved thus, reduce the wasting of resources.
In actual applications, the renewal instruction in above-mentioned arbitrary first data flow can be extend markup language (ExtensibleMarkupLanguage is called for short XML) configuration file.
Further, as shown in Figure 2, Fig. 2 shows the schematic flow sheet of the data-updating method of the embodiment of the present invention, and the data-updating method in the present embodiment as mentioned below.
201, pusher adopts OC mode to send the first data flow to terminal, and the first data flow comprises: be used to indicate that terminal upgrades new data file in the renewal instruction of the first data under assigned catalogue, the catalogue corresponding with renewal instruction, fullpath structure describes; To make terminal the Actual path structure of storage inside described and describes compare with fullpath structure, and then according to renewal instruction, the first data of terminal inner described in employing data file update.
202, the second data flow of data under pusher regularly comprises all catalogues to terminal transmission, second data flow comprises: for the renewal instruction of the mark of data under all catalogues in more new terminal, the data file corresponding with the renewal instruction in the second data flow, to make terminal according to all data upgrading instruction renewal terminal inner.
Above-mentioned data-updating method while envoy's bandwidth-saving resource, can ensure that terminal does not omit any data.
In addition, the first data flow in above-mentioned step and the second data flow all can comprise fullpath structure and describe.That is, pusher can the fullpath structure of a real-time servicing receiving terminal describe and all data, and forms the mirror image of a terminal Actual path structure and data, the change of all data can all reflect on mirror image.
In the data flow of actual transmissions, fullpath structure is described data inserting stream by pusher, simultaneously, insert the renewal instruction that aforesaid XML configures in a stream, and then terminal compares by the Actual path structure that fullpath structure describes and this locality stores being described, to check the change that the part-structure that in data flow, fullpath structure describes describes, coordinate the descriptor upgrading instruction to download the data issued in data flow, the full dose that just can realize program upgrades and incremental update.
Certainly, the path objects that in data flow, fullpath structure is described through OC is broadcast, and the renewal instruction of XML configuration file is also encapsulated in special OC broadcasts, and the service_type of this OC is defined as 0x90.
Full dose in the present embodiment upgrades and terminal can be made not download preservation to celebrate a festival object file, then direct from OC mode All Files under program downloading root; If terminal has been downloaded preservation and to have been celebrated a festival object file and to download not be latest edition entirely or not, then the All Files downloaded before first deleting, more again download from OC mode and preserve All Files under program root.
Incremental update in the present embodiment refers to, when program version upgrades, pusher carries out differentiation and broadcasts on the basis of last version, makes the program of terminal realize the renewal of content file according to the catalogue in corresponding fullpath structure description.
Particularly, the propelling movement mode of the catalogue during pusher has following five kinds of complete path structures to describe: retain catalogue, deltree, newly-increased file or replace existing file, complete replacement catalogue under newly-increased catalogue, catalogue.Especially, front 4 kinds of mode respective directories can not describe in the proglnfo-> replaceDirs of programme xml, and the 5th kind of mode then needs to describe in proglnfo-> replaceDirs.
Shown in composition graphs 3A, Fig. 3 B, Fig. 3 C, Fig. 3 D, Fig. 3 A shows the schematic diagram that the original Actual path structure in one embodiment of the invention terminal describes, Fig. 3 B shows the schematic diagram that the fullpath structure in one embodiment of the invention in the first data flow describes, Fig. 3 C shows one embodiment of the invention terminal and adopts the first data flow to upgrade schematic diagram after Actual path structure describes, and Fig. 3 D shows the schematic flow sheet of the data-updating method in one embodiment of the invention.Data-updating method in the present embodiment as mentioned below.
301, pusher adopts OC mode to send the first data flow to terminal, and the first data flow comprises: be used to indicate terminal and upgrade new data file in the renewal instruction of the first data under assigned catalogue, the catalogue corresponding with described renewal instruction and fullpath structure describes (as shown in Figure 3 B).
It should be noted that, the data file at this place is empty.
302, terminal is after reception first data flow, terminal describes (as shown in Figure 3A) and fullpath structure according to the Actual path structure of inside and describes (as shown in Figure 3 B) and compare, if be an empty list (as shown in Figure 3 B " dir0 " catalogue) according to the assigned catalogue that renewal instruction determination pusher sends, then the All Files (" dir01 ", " file01 " as shown in fig. 3) under this catalogue inner is retained.As shown in Figure 3 C for upgrade after Actual path structure describe.
Certainly, in actual applications, a catalogue during the fullpath structure that above-mentioned first data flow comprises describes can moreover be only all subdirectories (" dir01 ", " file01 ") under an empty list (" dir0 " catalogue as in Fig. 3 B) and this catalogue, now subdirectory is also empty, and then forms complete empty path structure.It should be noted that now, must retain the subdirectory of bottom.Thus, it is an empty list in a stream that terminal is checked through this catalogue, the All Files under this catalogue on disk can be retained.
Above-mentioned data-updating method while envoy's bandwidth-saving resource, can ensure that terminal does not omit any data.
Shown in composition graphs 4A, Fig. 4 B, Fig. 4 C, Fig. 4 D, Fig. 4 A shows the schematic diagram that the original Actual path structure in one embodiment of the invention terminal describes, Fig. 4 B shows the schematic diagram that the fullpath structure in another embodiment of the present invention in the first data flow describes, Fig. 4 C shows another embodiment of the present invention terminal and adopts the first data flow to upgrade schematic diagram after Actual path structure describes, and Fig. 4 D shows the schematic flow sheet of the data-updating method in one embodiment of the invention.Data-updating method in the present embodiment as mentioned below.
401, pusher adopts OC mode to send the first data flow to terminal, and the first data flow comprises: be used to indicate terminal and upgrade new data file in the renewal instruction of the first data under assigned catalogue, the catalogue corresponding with described renewal instruction and fullpath structure describes (as shown in Figure 4 B).
It should be noted that, the data file at this place is empty.
402, terminal is after reception first data flow, terminal describes (as shown in Figure 4 A) and fullpath structure according to the Actual path structure of inside and describes (as shown in Figure 4 B) and compare, if according to upgrade assigned catalogue that instruction determination pusher sends be one deltree (as in Fig. 4 B without shown " dir0 " catalogue), then by the All Files (" dir01 " as shown in Figure 4 A under this catalogue inner, " file01 ") all delete, and the upper level catalogue without any file is also deleted (" dir0 " catalogue as shown in Figure 4 A).As shown in Figure 4 C for upgrade after Actual path structure describe.
Above-mentioned data-updating method while envoy's bandwidth-saving resource, can ensure that terminal does not omit any data.
Shown in composition graphs 5A, Fig. 5 B, Fig. 5 C, Fig. 5 D, Fig. 5 A shows the schematic diagram that the original Actual path structure in one embodiment of the invention terminal describes, Fig. 5 B shows the schematic diagram that the fullpath structure in another embodiment of the present invention in the first data flow describes, Fig. 5 C shows another embodiment of the present invention terminal and adopts the first data flow to upgrade schematic diagram after Actual path structure describes, and Fig. 5 D shows the schematic flow sheet of the data-updating method in one embodiment of the invention.Data-updating method in the present embodiment as mentioned below.
501, pusher adopts OC mode to send the first data flow to terminal, and the first data flow comprises: be used to indicate terminal and upgrade new data file in the renewal instruction of the first data under assigned catalogue, the catalogue corresponding with renewal instruction and fullpath structure describes (as shown in Figure 5 B).
502, terminal is after reception first data flow, terminal describes (as shown in Figure 5A) and fullpath structure according to the Actual path structure of inside and describes (as shown in Figure 5 B) and compare, if be newly-increased catalogue (as shown in Figure 5 B " dir2 " catalogue) according to the assigned catalogue that renewal instruction determination pusher sends, then directly download the All Files under this catalogue and catalogue thereof and preserve (" dir21 ", " file21 " as shown in Figure 5 B).Actual path structure after renewal as shown in Figure 5 C describes.
Above-mentioned data-updating method while envoy's bandwidth-saving resource, can ensure that terminal does not omit any data.
Shown in composition graphs 6A, Fig. 6 B, Fig. 6 C, Fig. 6 D, Fig. 6 A shows the schematic diagram that the original Actual path structure in one embodiment of the invention terminal describes, Fig. 6 B shows the schematic diagram that the fullpath structure in another embodiment of the present invention in the first data flow describes, Fig. 6 C shows another embodiment of the present invention terminal and adopts the first data flow to upgrade schematic diagram after Actual path structure describes, and Fig. 6 D shows the schematic flow sheet of the data-updating method in one embodiment of the invention.Data-updating method in the present embodiment as mentioned below.
601, pusher adopts OC mode to send the first data flow to terminal, and the first data flow comprises: be used to indicate terminal and upgrade new data file in the renewal instruction of the first data under assigned catalogue, the catalogue corresponding with renewal instruction and fullpath structure describes (as shown in Figure 6B).
602, terminal is after reception first data flow, terminal describes (as shown in Figure 6A) and fullpath structure according to the Actual path structure of inside and describes (as shown in Figure 6B) and compare, if according to having increased some files (" file13 " as depicted in figure 6b) newly under upgrading assigned catalogue that instruction determination pusher sends and some files are replaced (" file12 " as depicted in figure 6b), and retain some files (" file11 " as shown in Figure 5 B), delete all subdirectories under dir11 catalogue and this catalogue thereof and file (" dir11 " catalogue as shown in FIG), dir12 is described as empty list, and then according to renewal instruction, each catalogue in terminal and file are upgraded.Actual path structure after renewal as shown in Figure 6 C describes.
Above-mentioned data-updating method while envoy's bandwidth-saving resource, can ensure that terminal does not omit any data.
Shown in composition graphs 7A, Fig. 7 B, Fig. 7 C, Fig. 7 D, Fig. 7 A shows the schematic diagram that the original Actual path structure in one embodiment of the invention terminal describes, Fig. 7 B shows the schematic diagram that the fullpath structure in another embodiment of the present invention in the first data flow describes, Fig. 7 C shows another embodiment of the present invention terminal and adopts the first data flow to upgrade schematic diagram after Actual path structure describes, and Fig. 7 D shows the schematic flow sheet of the data-updating method in one embodiment of the invention.Data-updating method in the present embodiment as mentioned below.
701, pusher adopts OC mode to send the first data flow to terminal, and the first data flow comprises: be used to indicate terminal and upgrade new data file in the renewal instruction of the first data under assigned catalogue, the catalogue corresponding with renewal instruction and fullpath structure describes (as shown in Figure 7 B).
702, terminal is after reception first data flow, terminal describes (as shown in Figure 7 A) and fullpath structure according to the Actual path structure of inside and describes (as shown in Figure 7 B) and compare, if carry out replacing (" dir0 " as shown in fig.7b) according to All Files under the assigned catalogue " dir0 " upgrading the transmission of instruction determination pusher.Actual path structure after renewal as seen in figure 7 c describes.
That is, catalogue " dir0 " is placed on proglnfo-> replaceDirs in xml and describes, namely this catalogue has corresponding replaceDirs-> replaceDir and configures in the path of program root.Catalogue " dir0 " (and " dir0 " in Fig. 7 A) whole deletion during Actual path structure on disk first describes by terminal, then from data flow, download the All Files under this catalogue of preservation and subdirectory thereof.
Above-mentioned data-updating method while envoy's bandwidth-saving resource, can ensure that terminal does not omit any data.
Fig. 8 shows the flow chart of the data-updating method in another embodiment of the present invention, and as shown in Figure 8, the data-updating method of the present embodiment comprises:
801, terminal receives the first data flow that pusher adopts object carousel mode to send, and the first data flow comprises: be used to indicate that terminal upgrades new data file in the renewal instruction of the first data under assigned catalogue, the catalogue corresponding with renewal instruction, fullpath structure describes.
802, the description of the Actual path structure of storage inside describes with fullpath structure and compares by terminal, and then according to renewal instruction, adopts the first data of data file update terminal inner.
Certainly, above-mentioned terminal regularly (as one week, three days etc.) receive second data flow comprising data under all catalogues of pusher transmission, second data flow comprises: for the renewal instruction of the mark of data under all catalogues in more new terminal, the data file corresponding with described renewal instruction, and then all data upgrading described terminal inner according to the renewal instruction in described second data flow.
Above-mentioned data-updating method while envoy's bandwidth-saving resource, can ensure that terminal does not omit any data.
According to a further aspect in the invention, the invention provides a kind of pusher, it comprises: transmitting element, this transmitting element, for adopting object carousel mode to send the first data flow to terminal, described first data flow comprises: be used to indicate that terminal upgrades new data file in the renewal instruction of the first data under assigned catalogue, the catalogue corresponding with renewal instruction, fullpath structure describes; To make terminal the Actual path structure of storage inside described and describes compare with fullpath structure, and then according to renewal instruction, the first data of employing data file update terminal inner.
Further, transmitting element, also send for regular the second data flow comprising data under all catalogues to terminal, second data flow comprises: for the renewal instruction of the mark of data under all catalogues in more new terminal, the data file corresponding with upgrading instruction, to make terminal according to all data upgrading instruction renewal terminal inner.
Above-mentioned pusher can save bandwidth resources preferably, ensures that terminal does not omit any data simultaneously.
According to a further aspect in the invention, the present invention also provides a kind of terminal, this terminal comprises receiving element and updating block, wherein, the first data flow that receiving element adopts object carousel mode to send for receiving pusher, the first data flow comprises: be used to indicate that terminal upgrades new data file in the renewal instruction of the first data under assigned catalogue, the catalogue corresponding with renewal instruction, fullpath structure describes;
Updating block is used for the description of the Actual path structure of storage inside to describe with fullpath structure to compare, and then according to renewal instruction, adopts the first data of data file update terminal inner.
Preferably, receiving element is also for receiving the second data flow comprising data under all catalogues that described pusher sends, described second data flow comprises: for the renewal instruction of the mark of data under all catalogues in more new terminal, the data file corresponding with described renewal instruction;
Correspondingly, updating block is used for all data upgrading terminal inner according to the renewal instruction in the second data flow.
One of ordinary skill in the art will appreciate that: all or part of step realizing above-mentioned each embodiment of the method can have been come by the hardware that program command is relevant.Aforesaid program can be stored in a computer read/write memory medium.This program, when performing, performs the step comprising above-mentioned each embodiment of the method; And aforesaid storage medium comprises: ROM, RAM, magnetic disc or CD etc. various can be program code stored medium.
Last it is noted that above each embodiment is only in order to illustrate technical scheme of the present invention, be not intended to limit; Although with reference to foregoing embodiments to invention has been detailed description, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme described in foregoing embodiments, or carries out equivalent replacement to wherein some or all of technical characteristic; And these amendments or replacement, do not make the essence of appropriate technical solution depart from the scope of various embodiments of the present invention technical scheme.