Embodiment
After the digital content information that the webserver will upgrade in the embodiment of the invention generates the tree structure data bag; According to the corresponding relation of message identification and the node of the preserving tree structure data bag, the node of this tree structure data bag is carried out message identification.After mobile device obtains this tree structure data bag from network side, resolve this tree structure data bag acquired information sign and update mode sign, mobile device upgrades the tree structure data bag of preserving according to said message identification and update mode sign.
Wherein, the detailed process that mobile device upgrades digital content information is following, referring to Fig. 1:
Step 101: information extraction sign and update mode sign from the digital content information that the need that obtain upgrade.
Before this step; The webserver is at first according to the node of the tree structure data bag of preserving and the corresponding relation of digital content information; The digital content information that needs are upgraded generates the tree structure data bag; And, confirm the message identification of the node of this tree structure data bag according to the corresponding relation of message identification and the node of the preserving tree structure data bag.Simultaneously, server is confirmed the update mode sign of said tree structure data bag according to the variable condition of digital content information.
Mobile device is resolved this tree structure data bag after obtaining this tree structure data bag from network side, acquired information sign and update mode sign.
Step 102:, confirm the digital content information of message identification correspondence in the tree structure data bag of preserving of extraction in the step 101 according to the message identification of preserving and the corresponding relation of digital content information.
Here; At first according to first corresponding relation of the node of message identification of preserving and tree structure data bag; In the tree structure data bag of preserving, search the message identification corresponding nodes of extraction; According to the node of the tree structure data bag of preserving and second corresponding relation of digital content information, confirm the corresponding digital content information of the said node that finds then.
When first corresponding relation according to the node of message identification of preserving and tree structure data bag; In the time of in the tree structure data bag of preserving, can not finding the message identification corresponding nodes of extraction; Then can the digital content information in the tree structure data bag of preserving be confirmed as the corresponding digital content information of message identification of extraction; In subsequent step,, the digital content information in the tree structure data bag of preserving is upgraded according to the update mode sign of extracting.
Step 103:, confirm the corresponding update strategy of update mode sign that extracts according to the corresponding relation of the update mode sign of preserving with update strategy.Here update strategy comprises: editor, deletion or insertion.
Step 104: the digital content information that the need that adopt step 101 to obtain upgrade, the digital content information that the update strategy step of updating of confirming according to step 103 102 is confirmed.
Here, in the tree structure data bag that step 102 is being preserved, can find the message identification corresponding nodes of extraction, and when update strategy is editor, the digital content information that the digital content information replacement step 102 that the need that step 101 is obtained upgrade is confirmed.
In the tree structure data bag that step 102 is being preserved, can find the message identification corresponding nodes of extraction, and when update strategy is deletion, the digital content information that deletion step 102 is confirmed.
In the tree structure data bag that step 102 is being preserved, can not find the message identification corresponding nodes of extraction; And when update strategy is when inserting, in the digital content information in the tree structure data bag of the preservation that the digital content information inserting step 102 that the need that then according to the update mode sign of extracting step 101 obtained upgrade is confirmed.
Only need to extract earlier the message identification and the update mode sign of the digital content information that need upgrade in the embodiment of the invention; Obtain the message identification and corresponding digital content information and the update strategy of update mode sign that extract then respectively; Adopt the digital content information of the need renewal that obtains at last; Upgrade the digital content information of said correspondence according to the update strategy of said correspondence; Therefore, obtain the corresponding digital content information of the message identification that extracts, and the sequencing that obtains the corresponding update strategy of the update mode sign extracted does not influence and in mobile device, upgrades digital content information.In the above-described embodiments, carried out step 102 earlier, back execution in step 103 also can first execution in step 103, and execution in step 102 again.
After having upgraded digital content information, mobile device is also showed the digital content information after the renewal.
Below in conjunction with Figure of description the embodiment of the invention is described in further detail.In the embodiment of the invention, the tree structure data bag is represented with the form of tree-like digital content tabulation.The webserver is confirmed to organize data content information with the form of tree-like digital content tabulation; And each node in the tree-like digital content tabulation has been carried out message identification, preserved corresponding relation and the node of tree-like digital content tabulation and the corresponding relation of digital content information of the node of message identification and tree-like digital content tabulation simultaneously.Thereby before the data content information in upgrading mobile device; In mobile device, preserved original digital content information, and preserved corresponding relation and the node of tree-like digital content tabulation and the corresponding relation of digital content information of the node of message identification and the tabulation of tree-like digital content with the form of tree-like digital content tabulation.
The detailed process of form of tree-like digital content tabulation that all data content information sets is made into tape identification is following, referring to Fig. 2:
Step 201: all digital content informations are generated a tree-like digital content tabulation, and preserve the node of tree-like digital content tabulation and the corresponding relation of digital content information.Here, can digital content information be organized into the document form of a tree structure with extendible markup language (XML, Extensible Markup Language), just the formal representation of digital content information with tree-like digital content tabulation be come out.
Here, can tabulate the structure of organization number content information with tree-like digital content according to the natural classification situation of digital content information and the characteristics of XML.Referring to Fig. 3:
Root node, just the one-level node is " digital content ".Five two-level nodes " newspaper ", " periodical ", " books ", " music ", " video " are arranged under the root node.Some three grades of nodes are arranged again under each two-level node,, nodes such as " natural science ", " social science ", " other " are arranged under " periodical " as nodes such as " physical culture ", " other " are arranged under " newspaper ".Three grades of nodes can be down the concrete clauses and subclauses of concrete book, newspaper, periodical and medium, i.e. level Four node.So just generate a tree-like digital content tabulation.
Step 202: the node of tree-like digital content being tabulated according to the natural classification situation of digital content information carries out message identification, sets up and preserve the nodes at different levels of tree-like digital content tabulation and the one-to-one relationship of message identification.Referring to Fig. 3, one, two, three node of the tree structures list of the information of digital content is carried out message identification.The concrete mode of message identification can utilize the principle of XML to carry out, as, the ID attribute of node is set.In the present embodiment; The ID of root node is set to ROOT; The ID of two-level node is set to NP, JN, BK, MC and VD respectively; And having set gradually the ID value of three grades of nodes, each node all has a unique ID, so just sets up the nodes at different levels of tree-like digital content tabulation and the one-to-one relationship of message identification.
In the embodiment of the invention, the tabulation of tree-like digital content is divided into three layers, but the present invention does not limit so, can be divided into one deck, two layers, three layers, four layers, five layers----according to the natural classification situation of digital content information.And successively each node in every layer is carried out message identification according to the method described above, like this, the message identification of each node all is unique.
After the expression-form of specified data content information; In mobile device, preserved original digital content information with the form of tree-like digital content tabulation; And each node all has message identification in this tree-like digital content tabulation; Then specific as follows to the renewal process of the information of the digital content in the mobile device, referring to Fig. 4:
Step 401: the digital content information that server will upgrade generates tree-like digital content tabulation.Variation has taken place in some digital content informations in the database; For example increased " roundup news " this type newspaper newly, variation, table 1 as shown in Figure 5 have taken place in the tree-like digital content tabulation of server for saving so; When mobile device is upgraded; Need whole table 1 not sent to mobile device, only need the information of the digital content that these are newly-increased to generate tree-like digital content tabulation, here can be according to the node of the tree-like digital content tabulation of preserving and the corresponding relation of digital content information; The digital content information that needs are upgraded generates a tree-like digital content tabulation 2 (1) that only comprises " roundup news " node and subordinate's child node thereof, and is as shown in Figure 6.
In the embodiment of the invention,, here, the information of data updated content is generated tree-like digital content tabulates two kinds of processing modes are arranged if " roundup news " at present below " newspaper " with some newspaper in " physical culture " renewal have taken place all:
(1) generates the digital content tabulation 2 (2) that comprises " newspaper " node and all subordinate's nodes thereof, referring to Fig. 7 (a);
(2) handle at twice, generate the digital content tabulation 2 (3) that comprises " roundup news " node and subordinate's child node thereof earlier, referring to Fig. 7 (b); After carrying out subsequent treatment, accomplish renewal, then to " roundup news " part; Generation comprises the digital content tabulation 2 (4) of " physical culture " node and subordinate's child node thereof; Referring to Fig. 7 (c), carry out subsequent treatment again, accomplish renewal to " physical culture " part.It is thus clear that this step can all be handled the digital content information that upgrades in batches.
Certainly, in the embodiment of the invention, if " newspaper ", " periodical " in the database, variation has all taken place in the information of some digital content below " books ", generates the tree-like digital content tabulation 1 of the information that comprises all digital contents so, and is as shown in Figure 5.
During if the present invention implements,, then generate the digital content tabulation 2 (5) that only comprises " physical culture " node, referring to Fig. 8 if removed the newspaper of " physical culture " this classification in the database.
Step 402: according to the nodes at different levels in the tree structures list of the digital content information of preserving and the one-to-one relationship of message identification; Server carries out message identification to the nodes at different levels that comprise in the tree-like digital content tabulation that needs updated portion that generate; And according to the situation of change of digital content information node to the highest level in this tree structures list; Just the root node in this tree structure digital content tabulation carries out the sign of update mode, forms a tree-like digital content tabulation that contains message identification and update mode sign.
If server is informed in the newspaper that database has increased " roundup news " these classifications; The tree-like digital content tabulation 2 (1) that generates in the step 401; At first,, can utilize the principle of XML to carry out message identification here according to the one-to-one relationship of the node of server for saving and message identification the sign of carrying out three grades of nodes to the root node " roundup news " of this tabulation; As the ID attribute of node is set, the ID of the root node " roundup news " of therefore should tree-like digital content tabulating is " NP-NP ".
Because of having increased the newspaper of " roundup news " these types in the database newly, the update mode like the root node of tree-like digital content tabulation 2 (1) that then forms in the step 401 be " new node needs insertion ", so update strategy is " insertion ".Here; Can identify with XML tag attribute rudstyle; Utilize two other XML tag attribute rtlevel and tagpos to represent rank and the order in this rank of new node in the up-to-date tree-like digital content tabulation of data-base recording respectively then, obviously the value of rtlevel and tagpos attribute is natural number.Here, the tree-like digital content tabulation 2 (1) that step 401 generates, its update strategy is carrying out after the message identification for inserting, and root node " roundup news " is carried out the update mode sign, can the udstyle property value of " roundup news " be made as 1.If latest digital contents list such as Fig. 5 of data-base recording are said, then " roundup news " are positioned at the third level, and the position that in the third level, is in first, so the value of rtlevel and tagpos attribute is respectively 3 and 1.
If server is known in the database some issue of a newspaper time variation has been taken place; And the tree-like digital content tabulation 2 (2) that generates in the step 401; Then to the message identification that carries out two-level node of " newspaper ", therefore the ID of this tree-like digital content tabulation root node " newspaper " is " NP ".And " roundup news ", " physical culture ", " other " etc. are carried out the message identification of three grades of nodes, its ID be respectively " NP-NP ", " NP-SP ", " NP-OT ".
Variation has taken place in a lot of concrete issue of a newspaper times of " newspaper " the inside, and the update mode of the root node of then tree-like digital content tabulation 2 (2) is " old node needs replacement ", so update strategy is " editor ".Here, can use udstyle property value=2 to identify.
If server is informed in the newspaper that database has been deleted " physical culture " this classification; And the tree-like digital content tabulation 2 (5) that step 401 generates has only a node " physical culture ", and therefore the ID of " physical culture " is " NP_SP "; And the update mode of this node is " an old node; need deletion ", and promptly the update mode strategy is " deletion ", can use udstyle property value=3 to identify.
These update strategies of server for saving and the corresponding relation of new logo more.
Step 403: the tree-like digital content tabulation that contains message identification and update mode sign that mobile device obtains to form in the step 402.
In this step, mobile device has multiple mode to obtain this tree-like digital content tabulation, should tree-like digital content tabulation copy mobile device to; Perhaps,, download this tree-like digital content tabulation, copy mobile device then to through the PC online; Perhaps, mobile device is directly downloaded this tree-like digital content tabulation through the WiFi online; Perhaps, mobile device directly obtains this tree-like digital content tabulation through the GPRS online; Perhaps the address of tree-like digital content tabulation is sent to the mobile device of cell phone type through note, trigger mobile device and obtain tree-like digital content tabulation through the GPRS online by network side.
Step 404: mobile device is resolved the tree data contents list that from step 403, acquires.Because this tree-like digital content tabulation is the data of one section XML structure in essence, mobile device adopts XML resolver commonly used can resolve, discern, the tree structure of reconstructing digital contents list.After the parsing; Mobile device can obtain the message identification and the update mode sign of the highest level node of the tree-like digital content tabulation that step 403 obtains, the value of ID, udstyle, rtlevel and the tagpos attribute of the root node of the tree-like digital content tabulation that just acquires.
If the tree data contents list 2 (1) that acquires in the step 403; Then through after XML resolver resolves, the identification; The message identification of the root node that gets access to and update mode sign, just the ID of " roundup news " is " NP_NP ", udstyle is " 1 "; Rtlevel is " 3 ", and tagpos is " 1 ".If the tree data contents list 2 (2) that acquires in the step 404, then through after XML resolver resolves, the identification, the message identification of the root node that gets access to and update mode sign, just the ID of " newspaper " is " NP ", udstyle is " 2 ".If the tree data contents list 2 (5) that acquires in the step 404, then through after XML resolver resolves, the identification, the message identification of the root node that gets access to and update mode sign, just the ID of " physical culture " is " NP-SP ", udstyle is " 3 ".
Step 405: according to the message identification of the highest level node that identifies in the step 404 ID of root node just; In the original tree-like digital content tabulation of mobile device self; According to corresponding relation that preserve and node common message identification of arranging of server and the tabulation of tree-like digital content; Search this message identification corresponding nodes, when finding this message identification corresponding nodes, then execution in step 406; If can not find this message identification corresponding nodes, then execution in step 410.
Here; The concrete grammar of searching this message identification corresponding nodes in the tree-like digital content tabulation of in mobile device, preserving has multiple; Can be directly the ID of each node in the tree-like digital content tabulation of the ID of the root node that identifies and preservation be compared, judge whether it is identical.Also can classification searching of one-level one-level from high to low; The highest node that the ID of the root node of promptly looking for earlier and identifying is complementary; The second level node that the ID of the root node of in this subordinate's node of highest node, searching and identifying then is complementary; And then the node that is complementary of the ID of the root node of in subordinate's node of this second level node, searching and identifying, the one-level one-level is down searched like this.
The original tree-like digital content tabulation table of in mobile device, preserving 3 as shown in Figure 9; If the ID that identifies in the step 404 is " NP_NP "; According to corresponding relation that preserve and node common message identification of arranging of server and the tabulation of tree-like digital content; In table 3, search " NP_NP " corresponding nodes, do not find " NP_NP " corresponding nodes, so execution in step 410.
If the ID that identifies in the step 404 is " NP "; According to corresponding relation that preserve and node common message identification of arranging of server and the tabulation of tree-like digital content; In table 3, search " NP " corresponding nodes, find after " NP " corresponding nodes is newspaper execution in step 406.
If the ID that identifies in the step 404 is " NP_SP "; According to corresponding relation that preserve and node common message identification of arranging of server and the tabulation of tree-like digital content; In table 3, search " NP_SP " corresponding nodes; Find after " NP_SP " corresponding nodes is physical culture execution in step 406.
Step 406: the update mode sign of the highest level node that identifies in the determining step 404, just whether the value of the udstyle of root node equals 2, is, and then execution in step 407, are not, and then execution in step 408.
Step 407: when the tree-like digital content that step 403 obtains tabulates 2 (2); The value that step 404 identifies the udstyle of its root node " newspaper " is 2 o'clock; According to that preserve and the corresponding relation of the update mode sign common agreement of server with update strategy; Can know that update strategy is " editor ", the update mode of root node is " an old node, need replacement ", node and all subordinate's nodes thereof that the root node in the tree-like digital content tabulation that therefore acquires with step 404 and whole subordinate's node replacement step 405 thereof find; Other nodes in original tree-like digital content tabulation table 3 keep, and do not upgrade.
Step 408: the update mode sign of the highest level node that identifies in the determining step 404, just whether the value of the udstyle of root node equals 3, is, and then execution in step 409, are not, and then execution in step 412.
Step 409: when the tree-like digital content that step 403 obtains tabulates 2 (5); The value that step 404 identifies the udstyle of its root node " physical culture " is 3 o'clock; According to that preserve and the corresponding relation of the update mode sign common agreement of server with update strategy; Can know that update strategy is " deletion ", the update mode of root node is " old node, need deletion ", therefore deletes node and all the subordinate's nodes thereof that step 405 finds; Other nodes in original tree-like digital content tabulation table 3 keep, and do not upgrade.
Step 410: the update mode sign of the highest level node that identifies in the determining step 404, just whether the value of the udstyle of root node equals 1, is, and then execution in step 411, are not, and then execution in step 412.
Step 411: identify udstyle, the rtlevel of root node just, the value of tagpos according to the update mode of the highest level node that identifies in the step 404, the tree-like digital content tabulation that step 403 acquires is inserted in the tree-like digital content tabulation of preserving.
When the tree-like digital content that step 403 obtains tabulates 2 (1); The value that step 404 identifies the udstyle of root node " roundup news " is 1 o'clock; According to that preserve and the corresponding relation of the update mode sign common agreement of server with update strategy; Can know that update strategy is " insertion ", the update mode of root node is " new node, need insert ", and the rtlevel that identifies this moment, the property value of tagpos are respectively 3 and 1; The particular location that can obtain being inserted into the tree-like digital content tabulation table 3 that mobile device preserves is the position that ranked first in the third level node; Therefore the tree-like digital content tabulation that acquires of step 404 is inserted this position, the tree-like digital content tabulation after obtaining to upgrade, table 4 shown in figure 10.
Step 412: this method finishes, and mobile device does not upgrade the tree-like digital content tabulation of preservation.
Mobile device is showed the tree-like digital content tabulation after upgrading.Mobile device can be showed the tree-like digital content tabulation after the renewal as required by rights.Such as show the whole contents tabulation according to the list mode in the explorer in the Windows operational network.
Especially; When not having original digital content information in the mobile device; After then the webserver digital content information that mobile device is needed generates the tree-like digital content tabulation of the breath sign of taking a message; Mobile device acquires this tree-like digital content tabulation, and displaying by rights, thereby the digital content information of accomplishing this mobile device upgrades.
The foregoing description is to be that example is described in mobile device, to upgrade digital content information; Therefore but can not think that the embodiment of the invention only can be used for mobile device, in the such mobile device of PC, also can use the information updating that the method for the invention is carried out digital content.
Certainly; In the foregoing description; Digital content information that the webserver will upgrade generates a root node and takes a message after the tree-like digital content tabulation of breath sign and update mode sign, can also should tree-like digital content tabulation carry out encryption according to the needs of practical application, thereby after this tree-like digital content of mobile device acquisition is tabulated; Also need this tree-like digital content tabulation is deciphered, carry out update processing then.
Mobile device in the embodiment of the invention comprises: extraction unit 100, the first confirms that unit 200, second confirm unit 300 and updating block 400, referring to Figure 11:
Extraction unit 100 is used for digital content information information extraction sign and the update mode sign upgraded from the need that obtain.
First definite unit 200 is used for according to the message identification of preserving and the corresponding relation of digital content information, confirms the digital content information of message identification correspondence in the tree structure data bag of preserving of extraction.
Second confirms unit 300, is used for confirming the corresponding update strategy of update mode sign that extracts according to the corresponding relation of the update mode sign of preserving with update strategy.
Updating block 400, the digital content information that is used to adopt the need of said acquisition to upgrade upgrades the digital content information of said correspondence according to the update strategy of said correspondence.
Further, extraction unit 100 is resolved said tree structure data bag after obtaining to comprise the tree structure data bag of the digital content information that needs renewal from network side, acquired information sign and update mode sign.
First confirms that unit 200 is at first according to first corresponding relation of the node of message identification of preserving and tree structure data bag; In the tree structure data bag of preserving, search the message identification corresponding nodes of extraction; According to the node of the tree structure data bag of preserving and second corresponding relation of digital content information, confirm to find the corresponding digital content information of corresponding nodes then.In the first tree structure data bag confirming to preserve unit 200, can not find the message identification corresponding nodes of extraction, then first confirms that unit 200 confirms the message identification corresponding digital content information of tree structure data bags for extracting of preserving.
After first definite unit 200 finds said message identification corresponding nodes; And when update mode was designated editor, the digital content information that unit 200 is confirmed was confirmed in the digital content information replacement first that the need that updating block 400 acquires extraction unit 100 upgrade.Perhaps,
When first confirm single unit 200 is found said message identification corresponding nodes after, and update mode is when being designated deletion, the digital content information that unit 200 is definite is confirmed in updating block 400 deletions first.Perhaps,
After first definite list does not find said message identification corresponding nodes with unit 200; And when update mode is designated to insertion, in the digital content information that the digital content information insertion first that updating block 400 obtains to upgrade according to the update mode sign with extraction unit 100 is confirmed to confirm unit 200.
In the embodiment of the invention, mobile device also comprises display unit, is used to show the digital content information after the renewal.
Server in the embodiment of the invention comprises: generation unit 100, message identification unit 200 and update mode identify unit 300, referring to Figure 12:
Generation unit 100 is used for according to the node of the tree structure data bag of preserving and second corresponding relation of digital content information, and the digital content information that needs are upgraded generates the tree structure data bag.
Message identification unit 200 is used for first corresponding relation according to message identification and the node of the preserving tree structure data bag, and the node of said tree structure data bag is carried out message identification.
Update mode identify unit 300 is used for according to the variable condition of digital content information said tree structure data bag being carried out the update mode sign.
In the embodiment of the invention mobile device at first from the digital content information that the need that obtain upgrade the information extraction sign identify with update mode; Then according to the message identification of preserving and the corresponding relation of digital content information; Confirm the digital content information of message identification correspondence in the tree structure data bag of preservation of extraction, and, confirm that the update mode of extracting identifies the update strategy of correspondence according to the update mode sign of preserving and the corresponding relation of update strategy; Adopt the digital content information of the need renewal of said acquisition at last; Upgrade the digital content information of said correspondence according to said update strategy, like this, when mobile device upgrades digital content information through the GPRS online; Can reduce the information flow-rate when downloading; Improve the success rate of operation, and can search, improve the speed of upgrading through layering; Thereby the digital content information of renewal can contain the digital content information of flood tide, transmission, the reduction mobile device software and hardware that can divide batch in time to transmit, farthest stop duplicate message fast requires, reduces customer charge, makes things convenient for the user to show.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, belong within the scope of claim of the present invention and equivalent technologies thereof if of the present invention these are revised with modification, then the present invention also is intended to comprise these changes and modification interior.