CN104933085A - Electronic book update method, terminal and server - Google Patents

Electronic book update method, terminal and server Download PDF

Info

Publication number
CN104933085A
CN104933085A CN201510231052.4A CN201510231052A CN104933085A CN 104933085 A CN104933085 A CN 104933085A CN 201510231052 A CN201510231052 A CN 201510231052A CN 104933085 A CN104933085 A CN 104933085A
Authority
CN
China
Prior art keywords
fragment
book
identification
updated
framework file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510231052.4A
Other languages
Chinese (zh)
Other versions
CN104933085B (en
Inventor
张磊
张家方
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Technology Co Ltd
Xiaomi Inc
Original Assignee
Xiaomi Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xiaomi Inc filed Critical Xiaomi Inc
Priority to CN201510231052.4A priority Critical patent/CN104933085B/en
Publication of CN104933085A publication Critical patent/CN104933085A/en
Application granted granted Critical
Publication of CN104933085B publication Critical patent/CN104933085B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present disclosure, belonging to the technical field of terminals, relates to an electronic book update method, terminal and server. The method comprises: sending an electronic book update request carrying an identifier of an electronic book; receiving a first architecture file comprising segment information of each segment of the electronic book; and determining, according to the first architecture file and a second architecture file a segment identifier of a segment to be updated, the second architecture file comprising segment information of segments of a locally stored electronic book; and updating the locally stored electronic book according to the segment identifier of the segment to be updated. According to the present disclosure, a first architecture file of an electronic book returned by a server is received, a segment identifier of a segment to be updated is determined according to the first architecture file and a second architecture file locally stored in a terminal, and an electronic book stored locally in the terminal is updated according to the segment identifier of the segment to be updated, such that a segment whose content is changed needs to be updated only, with no need of updating the whole electronic book. In this way, the update speed and efficiency are improved.

Description

The update method of e-book, terminal and server
Technical field
The disclosure relates to field of terminal technology, particularly a kind of update method of e-book, terminal and server.
Background technology
Along with developing rapidly of terminal technology, increasing terminal supports electronic book function.User directly can carry e-book in terminal up and down, and passes through the display screen read electronic books of terminal.After terminal downloads e-book, need under many circumstances to upgrade e-book.Such as, when in the e-book downloaded, some content is wrong, or when author increases the content of e-book, terminal all needs to upgrade the local e-book stored.
In correlation technique, terminal is when upgrading e-book, and the method usually adopted is: send e-book download request to server, this e-book download request comprises the mark of e-book; The chained address of this e-book latest edition that reception server returns; According to the chained address of this latest edition, again download this e-book, and use the e-book again downloaded to replace original e-book stored.
Summary of the invention
The disclosure provides a kind of update method of e-book, terminal and server.
According to the first aspect of disclosure embodiment, provide a kind of update method of e-book, described method comprises:
Send e-book update request to server, described e-book update request carries the mark of e-book;
Receive the first framework file of the described e-book that described server returns, described first framework file comprises the frag info of described each fragment of e-book of described server stores, and described frag info at least comprises fragment identification;
According to described first framework file and the second framework file, determine the fragment identification of the fragment to be updated of the local described e-book stored, described second framework file comprises the frag info of local described each fragment of e-book stored;
According to the fragment identification of described fragment to be updated, the described e-book that described this locality stores is upgraded.
In conjunction with first aspect, in the first possible implementation of first aspect, the described fragment identification determining the fragment to be updated of the local described e-book stored, comprising:
When described first framework file exists newly-increased fragment identification relative to described second framework file, using the fragment identification of described newly-increased fragment identification as fragment to be updated;
When described first framework file has deleted fragment identification relative to described second framework file existence, delete the fragment identification of fragment identification as fragment to be updated using described;
When described first framework file is all identical with all fragment identification in described second framework file, and when in described first framework file, arbitrary fragment cryptographic hash is different from the homologous segment cryptographic hash in described second framework file, using the fragment identification of fragment identification different for described fragment cryptographic hash as fragment to be updated, described frag info also comprises fragment cryptographic hash.
In conjunction with the first possible implementation of first aspect, in the implementation that the second of first aspect is possible, the described fragment identification according to described fragment to be updated, upgrades the described e-book that described this locality stores, comprising:
When the fragment identification of described fragment to be updated is the different fragment identification of newly-increased fragment identification or cryptographic hash, content update request is sent to described server, the fragment identification of described fragment to be updated is carried in described content update request, makes described server return to the chained address of the fragment identification corresponding content of described fragment to be updated; Receive the chained address that described server returns; The content corresponding according to the fragment identification of the described fragment to be updated of described chained address download;
When the fragment identification of described fragment to be updated is for deleting fragment identification, deletes in the local described e-book stored and having deleted content corresponding to fragment identification.
In conjunction with first aspect to any one the possible implementation in the possible implementation of the second of first aspect, in the third possible implementation of first aspect, the described fragment identification according to described fragment to be updated, after the described e-book of described this locality storage is upgraded, also comprise:
According to the fragment identification of described fragment to be updated, upgrade described second framework file.
According to the second aspect of disclosure embodiment, provide a kind of update method of e-book, described method comprises:
The e-book update request that receiving terminal sends, described e-book update request carries the mark of e-book;
According to the mark of described e-book, the first framework file of the local described e-book stored is returned to described terminal, make the second framework file that described terminal stores according to described first framework file and described terminal local, determine the fragment identification of fragment to be updated, and according to the fragment identification of described fragment to be updated, the described e-book that described terminal local stores is upgraded, described first framework file comprises the frag info of described each fragment of e-book, and described frag info at least comprises fragment identification.
In conjunction with second aspect, in the first possible implementation of second aspect, the described mark according to described e-book, before returning the first framework file of the local described e-book stored, also comprises to described terminal:
Described e-book is divided into multiple fragment;
For each fragment allocation fragment identification;
According to the content of each fragment, generate the fragment cryptographic hash of each fragment, using the fragment identification of each fragment and the fragment cryptographic hash frag info as each fragment;
According to the frag info of all fragments, generate the first framework file.
In conjunction with second aspect, in the implementation that the second of second aspect is possible, the described mark according to described e-book, after described terminal returns the first framework file of the local described e-book stored, also comprises:
Receive the content update request that described terminal sends, the fragment identification of fragment to be updated is carried in described content update request, the fragment identification of described fragment to be updated is determined by the second framework file of described terminal according to described first framework file and described terminal storage, and the fragment identification of described fragment to be updated is the fragment identification that newly-increased fragment identification or cryptographic hash are different;
Obtain the chained address of the fragment identification corresponding content of described fragment to be updated;
Return to described chained address to described terminal, make the content that described terminal is corresponding according to the fragment identification of the described fragment to be updated of described chained address download.
According to the third aspect of disclosure embodiment, provide a kind of terminal, described terminal comprises:
Sending module, for sending e-book update request to server, described e-book update request carries the mark of e-book;
Receiver module, for receiving the first framework file of the described e-book that described server returns, described first framework file comprises the frag info of described each fragment of e-book of described server stores, and described frag info at least comprises fragment identification;
Determination module, for according to described first framework file and the second framework file, determine the fragment identification of the fragment to be updated of the local described e-book stored, described second framework file comprises the frag info of local described each fragment of e-book stored;
First update module, for the fragment identification according to described fragment to be updated, upgrades the described e-book that described this locality stores.
In conjunction with the third aspect, in the first possible implementation of the third aspect, described determination module is used for:
When described first framework file exists newly-increased fragment identification relative to described second framework file, using the fragment identification of described newly-increased fragment identification as fragment to be updated;
When described first framework file has deleted fragment identification relative to described second framework file existence, delete the fragment identification of fragment identification as fragment to be updated using described;
When described first framework file is all identical with all fragment identification in described second framework file, and when in described first framework file, arbitrary fragment cryptographic hash is different from the homologous segment cryptographic hash in described second framework file, using the fragment identification of fragment identification different for described fragment cryptographic hash as fragment to be updated, described frag info also comprises fragment cryptographic hash.
In conjunction with the first possible implementation of the third aspect, in the implementation that the second of the third aspect is possible, described first update module is used for:
When the fragment identification of described fragment to be updated is the different fragment identification of newly-increased fragment identification or cryptographic hash, content update request is sent to described server, the fragment identification of described fragment to be updated is carried in described content update request, makes described server return to the chained address of the fragment identification corresponding content of described fragment to be updated; Receive the chained address that described server returns; The content corresponding according to the fragment identification of the described fragment to be updated of described chained address download;
When the fragment identification of described fragment to be updated is for deleting fragment identification, deletes in the local described e-book stored and having deleted content corresponding to fragment identification.
In conjunction with the third aspect to any one the possible implementation in the possible implementation of the second of the third aspect, in the third possible implementation of the third aspect, described terminal also comprises:
Second update module, for the fragment identification according to described fragment to be updated, upgrades described second framework file.
According to the fourth aspect of disclosure embodiment, provide a kind of server, described server comprises:
First receiver module, for the e-book update request that receiving terminal sends, described e-book update request carries the mark of e-book;
First returns module, for the mark according to described e-book, the first framework file of the local described e-book stored is returned to described terminal, make the second framework file that described terminal stores according to described first framework file and described terminal local, determine the fragment identification of fragment to be updated, and according to the fragment identification of described fragment to be updated, the described e-book that described terminal local stores is upgraded, described first framework file comprises the frag info of described each fragment of e-book, and described frag info at least comprises fragment identification.
In conjunction with fourth aspect, in the first possible implementation of fourth aspect, described server also comprises:
Segmentation module, for being divided into multiple fragment by described e-book;
Distribution module, for being each fragment allocation fragment identification;
First generation module, for the content according to each fragment, generates the fragment cryptographic hash of each fragment, using the fragment identification of each fragment and the fragment cryptographic hash frag info as each fragment;
Second generation module, for the frag info according to all fragments, generates the first framework file.
In conjunction with fourth aspect, in the implementation that the second of fourth aspect is possible, described server also comprises:
Second receiver module, for receiving the content update request that described terminal sends, the fragment identification of fragment to be updated is carried in described content update request, the fragment identification of described fragment to be updated is determined by the second framework file of described terminal according to described first framework file and described terminal storage, and the fragment identification of described fragment to be updated is the fragment identification that newly-increased fragment identification or cryptographic hash are different;
Acquisition module, for obtaining the chained address of the fragment identification corresponding content of described fragment to be updated;
Second returns module, for returning to described chained address to described terminal, makes the content that described terminal is corresponding according to the fragment identification of the described fragment to be updated of described chained address download.
According to the 5th aspect of disclosure embodiment, provide a kind of terminal, described terminal comprises:
Processor;
For the storer of storage of processor executable instruction;
Wherein, described processor is configured to:
Send e-book update request to server, described e-book update request carries the mark of e-book;
Receive the first framework file of the described e-book that described server returns, described first framework file comprises the frag info of described each fragment of e-book of described server stores, and described frag info at least comprises fragment identification;
According to described first framework file and the second framework file, determine the fragment identification of the fragment to be updated of the local described e-book stored, described second framework file comprises the frag info of local described each fragment of e-book stored;
According to the fragment identification of described fragment to be updated, the described e-book that described this locality stores is upgraded.
According to the 6th aspect of disclosure embodiment, provide a kind of server, described server comprises:
Processor;
For the storer of storage of processor executable instruction;
Wherein, described processor is configured to:
The e-book update request that receiving terminal sends, described e-book update request carries the mark of e-book;
According to the mark of described e-book, the first framework file of the local described e-book stored is returned to described terminal, make the second framework file that described terminal stores according to described first framework file and described terminal local, determine the fragment identification of fragment to be updated, and according to the fragment identification of described fragment to be updated, the described e-book that described terminal local stores is upgraded, described first framework file comprises the frag info of described each fragment of e-book, and described frag info at least comprises fragment identification.
The technical scheme that embodiment of the present disclosure provides can comprise following beneficial effect:
First framework file of the e-book returned by reception server, and after determining the fragment identification of fragment to be updated according to the second framework file that the first framework file and terminal local store, fragment identification according to fragment to be updated upgrades the e-book that terminal local stores, when making the e-book when server side occur to upgrade, the fragment that terminal only needs update content to change, and without the need to upgrading whole e-book, improve renewal speed and efficiency.
Should be understood that, it is only exemplary and explanatory that above general description and details hereinafter describe, and can not limit the disclosure.
Accompanying drawing explanation
Accompanying drawing to be herein merged in instructions and to form the part of this instructions, shows embodiment according to the invention, and is used from instructions one and explains principle of the present invention.
Fig. 1 is the process flow diagram of the update method of a kind of e-book according to an exemplary embodiment.
Fig. 2 is the process flow diagram of the update method of a kind of e-book according to an exemplary embodiment.
Fig. 3 is the process flow diagram of the update method of a kind of e-book according to an exemplary embodiment.
Fig. 4 is the block diagram of a kind of terminal according to an exemplary embodiment.
Fig. 5 is the block diagram of a kind of terminal according to an exemplary embodiment.
Fig. 6 is the block diagram of a kind of terminal according to an exemplary embodiment.
Fig. 7 is the block diagram of a kind of server according to an exemplary embodiment.
Fig. 8 is the block diagram of a kind of server according to an exemplary embodiment.
Fig. 9 is the block diagram of a kind of server according to an exemplary embodiment.
Figure 10 is the block diagram of a kind of server according to an exemplary embodiment.
Figure 11 is the block diagram of the renewal system of a kind of e-book according to an exemplary embodiment.
Embodiment
Here will be described exemplary embodiment in detail, its sample table shows in the accompanying drawings.When description below relates to accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawing represents same or analogous key element.Embodiment described in following exemplary embodiment does not represent all embodiments consistent with the present invention.On the contrary, they only with as in appended claims describe in detail, the example of apparatus and method that aspects more of the present invention are consistent.
Fig. 1 is the process flow diagram of the update method of a kind of e-book according to an exemplary embodiment, and the update method of e-book is used in terminal.For the method that terminal execution disclosure embodiment provides, as shown in Figure 1, the method that disclosure embodiment provides comprises the following steps.
In step S101, send e-book update request to server, wherein, e-book update request carries the mark of e-book.
In step s 102, the first framework file of the e-book that reception server returns, wherein, the first framework file comprises the frag info of each fragment of e-book of server stores, and frag info at least comprises fragment identification.
In step s 103, according to the first framework file and the second framework file, determine the fragment identification of the fragment to be updated of the local e-book stored, wherein, the second framework file comprises the frag info of local each fragment of e-book stored.
In step S104, according to the fragment identification of fragment to be updated, the e-book that this locality stores is upgraded.
The method that disclosure embodiment provides, first framework file of the e-book returned by reception server, and after determining the fragment identification of fragment to be updated according to the second framework file that the first framework file and terminal local store, fragment identification according to fragment to be updated upgrades the e-book that terminal local stores, when making the e-book when server side occur to upgrade, the fragment that terminal only needs update content to change, and without the need to upgrading whole e-book, improve renewal speed and efficiency.
In another embodiment, determine the fragment identification of the fragment to be updated of the local e-book stored, comprising:
When the first framework file exists newly-increased fragment identification relative to the second framework file, using the fragment identification of newly-increased fragment identification as fragment to be updated;
When the first framework file has deleted fragment identification relative to the second framework file existence, will delete the fragment identification of fragment identification as fragment to be updated;
When the first framework file is all identical with all fragment identification in the second framework file, and when in the first framework file, arbitrary fragment cryptographic hash is different from the homologous segment cryptographic hash in the second framework file, using the fragment identification of fragment identification different for fragment cryptographic hash as fragment to be updated, wherein, frag info also comprises fragment cryptographic hash.
In another embodiment, according to the fragment identification of fragment to be updated, the e-book that this locality stores is upgraded, comprising:
When the fragment identification of fragment to be updated is the different fragment identification of newly-increased fragment identification or cryptographic hash, content update request is sent to server, wherein, the fragment identification of fragment to be updated is carried in content update request, makes server return to the chained address of the fragment identification corresponding content of fragment to be updated; The chained address that reception server returns; Content corresponding to the fragment identification of fragment to be updated is downloaded according to chained address;
When the fragment identification of fragment to be updated is for deleting fragment identification, deletes in the local e-book stored and having deleted content corresponding to fragment identification.
In another embodiment, according to the fragment identification of fragment to be updated, after the e-book of this locality storage is upgraded, also comprise:
According to the fragment identification of fragment to be updated, upgrade the second framework file.
Above-mentioned all alternatives, can adopt and combine arbitrarily formation optional embodiment of the present invention, this is no longer going to repeat them.
Fig. 2 is the process flow diagram of the update method of a kind of e-book according to an exemplary embodiment, and the update method of e-book is used in server.For the method that server execution disclosure embodiment provides, as shown in Figure 2, the method that disclosure embodiment provides comprises the following steps.
In step s 201, the e-book update request that receiving terminal sends, wherein, e-book update request carries the mark of e-book.
In step S202, according to the mark of e-book, the first framework file of the local e-book stored is returned to terminal, make the second framework file that terminal stores according to the first framework file and terminal local, determine the fragment identification of fragment to be updated, and according to the fragment identification of fragment to be updated, the e-book that terminal local stores is upgraded, wherein, first framework file comprises the frag info of each fragment of e-book, and frag info at least comprises fragment identification.
The method that disclosure embodiment provides, by the first framework file of e-book returned to terminal, after making terminal determine the fragment identification of fragment to be updated according to the second framework file that the first framework file and terminal local store, fragment identification according to fragment to be updated upgrades the e-book that terminal local stores, when making the e-book when server side occur to upgrade, the fragment that terminal only needs update content to change, and without the need to upgrading whole e-book, improve renewal speed and efficiency.
In another embodiment, according to the mark of e-book, return the first framework file of the local e-book stored to terminal before, also comprise:
E-book is divided into multiple fragment;
For each fragment allocation fragment identification;
According to the content of each fragment, generate the fragment cryptographic hash of each fragment, using the fragment identification of each fragment and the fragment cryptographic hash frag info as each fragment;
According to the frag info of all fragments, generate the first framework file.
In another embodiment, according to the mark of e-book, after terminal returns the first framework file of the local e-book stored, also comprise:
The content update request that receiving terminal sends, wherein, the fragment identification of fragment to be updated is carried in content update request, the fragment identification of fragment to be updated is determined by the second framework file of terminal according to the first framework file and terminal storage, and the fragment identification of fragment to be updated is the fragment identification that newly-increased fragment identification or cryptographic hash are different;
Obtain the chained address of the fragment identification corresponding content of fragment to be updated;
To terminal back link address, terminal is made to download content corresponding to the fragment identification of fragment to be updated according to chained address.
Above-mentioned all alternatives, can adopt and combine arbitrarily formation optional embodiment of the present invention, this is no longer going to repeat them.
Fig. 3 is the process flow diagram of the update method of a kind of e-book according to an exemplary embodiment.Perform for terminal and server the method that disclosure embodiment provides alternately, as shown in Figure 3, the method that disclosure embodiment provides comprises the following steps.
In step S301, terminal to server sends e-book update request, and wherein, e-book update request carries the mark of e-book.
Particularly, when terminal needs to upgrade the e-book that it stores, trigger by sending e-book update request to server.In order to make the clear and definite terminal of server need to upgrade which e-book, in e-book update request, carry the mark of e-book.Wherein, e-book identifies for distinguishing different e-books, the mark of the e-book that e-book correspondence overall situation is unique.
Send the trigger condition of e-book update request about terminal to server, can have a variety of.Such as, after server determines that this e-book upgrades, the notification message of e-book renewal can be sent to terminal.After terminal receives this notification message, send e-book update request to server.Or terminal, according to the operation of user, sends e-book update request to server.Wherein, terminal can provide e-book more new option.On this basis, when user upgrades e-book, can by choose this e-book more new option realize.Particularly, user choose e-book more new option time, can by click, double-click or long by this e-book more new option realize.
In addition, whether terminal can also there occurs renewal by periodic test e-book, and when determining that e-book occurs to upgrade, sends e-book update request.Wherein, terminal, can by periodically realizing to the renewal apply for information of server transmission e-book when whether periodic test e-book occurs to upgrade.The mark of e-book is carried, so that server determination terminal needs to inquire about which e-book whether there occurs renewal in this renewal apply for information.About the cycle that terminal checks, can be 3 days, 5 days etc., disclosure embodiment do concrete restriction to this.
In step s 302, after the e-book update request that server receiving terminal sends, according to the mark of e-book, the first framework file of the local e-book stored is returned to terminal, wherein, first framework file comprises the frag info of each fragment of e-book of server stores, and frag info at least comprises fragment identification.
In the disclosed embodiments, upgrade e-book for the ease of terminal, e-book can be divided into multiple fragment by server in advance, and generates the framework file of this e-book, and this framework file comprises the frag info of each fragment of e-book.On this basis, when terminal needs to upgrade e-book, upgrade needing the fragment upgraded according to framework file.Wherein, server, when generating the framework file of e-book, includes but not limited to be realized to step 4 by following step one:
Step one: e-book is divided into multiple fragment by server.
Wherein, e-book, when splitting e-book, can be divided into multiple fragment according to the catalogue of e-book by server.Now, chapters and sections of e-book can a corresponding fragment.In addition, the often appointment numerical value page of e-book according to the number of pages of e-book, can also be divided into a fragment by server.Such as, a fragment is divided into by every 50 pages, 100 pages of e-book.
Step 2: server is each fragment allocation fragment identification.
For the ease of distinguishing each fragment, server is the unique fragment identification of each fragment allocation overall situation, to be different from the fragment identification of other fragment.
Step 3: according to the content of each fragment, generates the fragment cryptographic hash of each fragment.
Wherein, e-book, when upgrading, may occur that the partial content of a certain fragment has carried out more news.Such as, upgrade because content is before wrong in some chapters and sections.In order to make terminal when upgrading e-book, determine whether because the content of some fragments changes and upgrade this fragment, server according to the content of each fragment, can generate the fragment cryptographic hash of each fragment.Wherein, server, when generating the fragment cryptographic hash of each fragment, can realize by specifying cryptographic algorithm according to the content of each fragment.This appointment cryptographic algorithm includes but not limited to as MD5 (Message-Digest Algorithm 5, message digest algorithm 5).
Particularly, after for each fragment allocation fragment identification, terminal can determine whether there is non-existent fragment relative to the e-book of server stores in the local e-book stored according to fragment identification, or whether has the deleted fragment of server.When after the fragment cryptographic hash generating each fragment, according to fragment cryptographic hash, terminal can determine whether the content of a certain fragment upgrades.
In the disclosed embodiments, the frag info of each fragment at least comprises the fragment identification of each fragment and the fragment cryptographic hash of each fragment.Certainly, the frag info of fragment can also have other content, and disclosure embodiment does not limit the particular content of frag info.Such as, frag info can also comprise the mode that e-book is divided, and this dividing mode comprises by chapter construction or according to number of pages division etc.
Step 4: according to the frag info of all fragments, generates the first framework file.
In order to identify the frag info of all fragments of e-book, server, according to the frag info of all fragments, generates the first framework file.In the disclosed embodiments, the first framework file refers to the current architecture file of the e-book of server stores.Wherein, after e-book upgrades, server upgrades the framework file that server this locality stores, to obtain the first framework file in real time.Therefore, the first framework file is used in reference to the up-to-date framework file of the e-book of server stores.
As shown in table 1, it is a kind of signal table of the first framework file.
Table 1
Fragment identification Fragment cryptographic hash
1st fragment Cryptographic hash 1
2nd fragment Cryptographic hash 2
…… ……
N-th fragment Cryptographic hash n
Certainly, the data in table 1 only for citing, can not form the restriction to disclosure embodiment.
In conjunction with foregoing, in order to make which fragment of clear and definite this e-book of terminal there occurs renewal, this first framework file is back to terminal by server.
In step S303, after first framework file of the e-book that terminal reception server returns, according to the first framework file and the second framework file, determine the fragment identification of the fragment to be updated of the local e-book stored, wherein, the second framework file comprises the frag info of local each fragment of e-book stored.
In the disclosed embodiments, the second framework file refers to the framework file of this e-book that terminal local stores.In order to determine to upgrade which fragment, terminal, according to the first framework file and the second framework file, determines the fragment identification of the fragment to be updated of the local e-book stored, and upgrades the local e-book stored at the follow-up fragment identification according to fragment to be updated.
Wherein, when terminal determines the fragment identification of the fragment to be updated of the local e-book stored, following several situation has been included but not limited to:
The first situation: when the first framework file exists newly-increased fragment identification relative to the second framework file, using the fragment identification of newly-increased fragment identification as fragment to be updated.
Particularly, when some fragment identification are present in the first framework file, and be not present in the second framework file, then illustrate in the e-book of server stores to there is newly-increased fragment.In order to this newly-increased fragment is kept at terminal local, terminal determines that this newly-increased fragment identification is the fragment identification of fragment to be updated.
The second situation: when the first framework file has deleted fragment identification relative to the second framework file existence, will delete the fragment identification of fragment identification as fragment to be updated.
Particularly, when some fragment identification are not present in the first framework file, and be present in the second framework file, then illustrate in the e-book of server stores and deleted fragment corresponding to this fragment identification.Now, terminal can be determined to need to delete this fragment in this locality, and therefore, terminal determines that this has deleted the fragment identification that fragment identification is defined as fragment to be updated.
The third situation: when the first framework file is all identical with all fragment identification in the second framework file, and when in the first framework file, arbitrary fragment cryptographic hash is different from the homologous segment cryptographic hash in the second framework file, using the fragment identification of fragment identification different for fragment cryptographic hash as fragment to be updated, frag info also comprises fragment cryptographic hash.
Particularly, when the first framework file is all identical with all fragment identification in the second framework file, then the not newly-increased fragment of the e-book of server stores is described, does not also delete fragment.But, when fragment cryptographic hash arbitrary in the first framework file is different from the homologous segment cryptographic hash in the second framework file, then illustrate that the content of this fragment there occurs renewal, therefore, terminal is using the fragment identification of fragment identification different for this fragment cryptographic hash as fragment to be updated.
Such as, if the fragment identification of Segment A is identical with the fragment identification of Segment A in the first framework file in the second framework file, and the fragment cryptographic hash of Segment A is " 222345 " in the first framework file, in second framework file, the fragment cryptographic hash of Segment A is " 222346 ", then the server update content of Segment A is described.Now, terminal is using the fragment identification of Segment A as fragment to be updated.
In step s 304, terminal, according to the fragment identification of fragment to be updated, upgrades the e-book that this locality stores.
After terminal determines the fragment identification of fragment to be updated, then specify which fragment needs to upgrade, therefore, terminal, according to the fragment identification of fragment to be updated, upgrades the e-book that this locality stores.
Particularly, in conjunction with the above-mentioned content determining the fragment identification of fragment to be updated, terminal, according to the fragment identification of fragment to be updated, when upgrading the e-book of this locality storage, has included but not limited to following several situation:
The first situation: when the fragment identification of fragment to be updated is the different fragment identification of newly-increased fragment identification or cryptographic hash, terminal needs to carry out newly-increased fragment by the fragment identification downloading fragment to be updated or upgrade the content of some fragment.In that case, when terminal upgrades the segment contents of these fragments, can be realized by step S3041 to step S3044:
In step S3041, terminal to server sends content update request, and wherein, the fragment identification of fragment to be updated is carried in content update request.
Particularly, need for the ease of server determination terminal which fragment upgrading e-book, the fragment identification of fragment to be updated is carried in the content update request that terminal to server sends.Disclosure embodiment does not limit the mode that terminal to server sends content update request.
In step S3042, after server receives this content update request, obtain the chained address of the fragment identification corresponding content of fragment to be updated, and return to the chained address of the fragment identification corresponding content of fragment to be updated to terminal.
Determine the content which chained address to download fragment to be updated to enable terminal, server obtains the chained address of the fragment identification corresponding content of fragment to be updated, and returns to the chained address of the fragment identification corresponding content of fragment to be updated to terminal.Now, terminal can be downloaded from this chained address and obtain content corresponding to the fragment identification of fragment to be updated.
Certainly, server also can return the content of fragment corresponding to fragment identification to be updated directly to terminal, but, because the content of certain fragment may be many, the segment contents directly returning fragment to be updated may be more consuming time, therefore, in the disclosed embodiments, server upgrades content corresponding to the fragment identification of fragment to be updated, to save the e-book update time of terminal preferably by carrying out triggering terminal to terminal back link address.
In step S3043, behind the chained address that terminal reception server returns, download content corresponding to the fragment identification of fragment to be updated according to chained address.
Wherein, disclosure embodiment does not limit the mode that terminal downloads content corresponding to the fragment identification of fragment to be updated according to chained address.During concrete enforcement, terminal in the click of detection user on this chained address, double-click or long by when operating, can trigger the content that the fragment identification of download fragment to be updated is corresponding.
The second situation: when the fragment identification of fragment to be updated is for deleting fragment identification, terminal can obtain in the local e-book stored and delete content corresponding to fragment identification, and delete in the e-book that terminal local stores and deleted content corresponding to fragment identification, thus to be consistent with the content of the e-book of server side.
Such as, when fragment B is for deleting fragment identification, terminal, from the e-book that this locality stores, obtains the content of fragment B, and deletes the content of fragment B.
In step S305, terminal, according to the fragment identification of fragment to be updated, upgrades the second framework file.
Particularly, after upgrading the local e-book stored, terminal according to the fragment identification of fragment to be updated, can also upgrade the second framework file.When follow-up renewal e-book, can realize according to the second framework file after renewal.
Wherein, this newly-increased fragment identification, when renewal second framework file, for newly-increased fragment identification, is added in local the second framework file stored by terminal; For deleting fragment identification, deleting this in the first framework file that terminal stores in terminal local and deleting fragment identification; For the fragment identification that cryptographic hash is different, then the fragment cryptographic hash that the fragment identification that local this cryptographic hash stored of change is different is corresponding.
The method that disclosure embodiment provides, first framework file of the e-book that terminal returns at reception server, and after determining the fragment identification of fragment to be updated according to the second framework file that the first framework file and terminal local store, fragment identification according to fragment to be updated upgrades the e-book that terminal local stores, when making the e-book when server side occur to upgrade, the fragment that terminal only needs update content to change, and without the need to upgrading whole e-book, improve renewal speed and efficiency.In addition, when renewal e-book needs the content again downloading fragment to be updated, and the content downloading these fragments is when needing data traffic, by upgrading the flow waste that individual segments can be avoided causing because upgrading whole e-book, thus data traffic can be saved.
Fig. 4 is the block diagram of a kind of terminal according to an exemplary embodiment, and this terminal may be used for performing the function in the update method of the e-book that any embodiment provides in embodiment corresponding to above-mentioned Fig. 1 to Fig. 3 performed by terminal.See Fig. 4, this terminal comprises sending module 401, receiver module 402, determination module 403 and the first update module 404.Wherein:
This sending module 401 is configured to send e-book update request to server, and wherein, e-book update request carries the mark of e-book;
This receiver module 402 is configured to the first framework file of the e-book that reception server returns, and wherein, the first framework file comprises the frag info of each fragment of e-book of server stores, and frag info at least comprises fragment identification;
This determination module 403 is configured to according to the first framework file and the second framework file, determines the fragment identification of the fragment to be updated of the local e-book stored, and wherein, the second framework file comprises the frag info of local each fragment of e-book stored;
This first update module 404 is configured to the fragment identification according to fragment to be updated, upgrades the e-book that this locality stores.
The terminal that disclosure embodiment provides, first framework file of the e-book returned by reception server, and after determining the fragment identification of fragment to be updated according to the second framework file that the first framework file and terminal local store, fragment identification according to fragment to be updated upgrades the e-book that terminal local stores, when making the e-book when server side occur to upgrade, the fragment that terminal only needs update content to change, and without the need to upgrading whole e-book, improve renewal speed and efficiency.
In another embodiment, this determination module 403 is configured to:
When the first framework file exists newly-increased fragment identification relative to the second framework file, using the fragment identification of newly-increased fragment identification as fragment to be updated;
When the first framework file has deleted fragment identification relative to the second framework file existence, will delete the fragment identification of fragment identification as fragment to be updated;
When the first framework file is all identical with all fragment identification in the second framework file, and when in the first framework file, arbitrary fragment cryptographic hash is different from the homologous segment cryptographic hash in the second framework file, using the fragment identification of fragment identification different for fragment cryptographic hash as fragment to be updated, wherein, frag info also comprises fragment cryptographic hash.
In another embodiment, this first update module 404 is configured to:
When the fragment identification of fragment to be updated is the different fragment identification of newly-increased fragment identification or cryptographic hash, content update request is sent to server, wherein, update request carries the fragment identification of fragment to be updated, makes server return to the chained address of the fragment identification corresponding content of fragment to be updated; The chained address that reception server returns; Content corresponding to the fragment identification of fragment to be updated is downloaded according to chained address;
When the fragment identification of fragment to be updated is for deleting fragment identification, deletes in the local e-book stored and having deleted content corresponding to fragment identification.
In another embodiment, see Fig. 5, terminal also comprises the second update module 405.
This second update module 405 is configured to the fragment identification according to fragment to be updated, upgrades the second framework file.
About the terminal in above-described embodiment, wherein the concrete mode of modules executable operations has been described in detail in about the embodiment of the method, will not elaborate explanation herein.
Above-mentioned all alternatives, can adopt and combine arbitrarily formation optional embodiment of the present invention, this is no longer going to repeat them.
Fig. 6 is the block diagram of a kind of terminal 600 according to an exemplary embodiment, and this terminal 600 may be used for performing the function in the update method of the e-book that any embodiment provides in embodiment corresponding to above-mentioned Fig. 1 to Fig. 3 performed by terminal.Such as, terminal 600 can be mobile phone, computing machine, digital broadcast terminal, messaging devices, game console, tablet device, Medical Devices, body-building equipment, personal digital assistant etc.
With reference to Fig. 6, terminal 600 can comprise following one or more assembly: processing components 602, storer 604, power supply module 606, multimedia groupware 608, audio-frequency assembly 610, I/O (Input/Output, I/O) interface 612, sensor module 614, and communications component 616.
The integrated operation of the usual control terminal 600 of processing components 602, such as with display, call, data communication, camera operation and record operate the operation be associated.Processing components 602 can comprise one or more processor 620 to perform instruction, to complete all or part of step of above-mentioned method.In addition, processing components 602 can comprise one or more module, and what be convenient between processing components 602 and other assembly is mutual.Such as, processing components 602 can comprise multi-media module, mutual with what facilitate between multimedia groupware 608 and processing components 602.
Storer 604 is configured to store various types of data to be supported in the operation of terminal 600.The example of these data comprises for any application program of operation in terminal 600 or the instruction of method, contact data, telephone book data, message, picture, video etc.Storer 604 can be realized by the volatibility of any type or non-volatile memory device or their combination, as SRAM (Static Random AccessMemory, static RAM), EEPROM (Electrically-Erasable ProgrammableRead-Only Memory, Electrically Erasable Read Only Memory), EPROM (ErasableProgrammable Read Only Memory, Erasable Programmable Read Only Memory EPROM), PROM (Programmable Read-Only Memory, programmable read only memory), ROM (Read-OnlyMemory, ROM (read-only memory)), magnetic store, flash memory, disk or CD.
The various assemblies that power supply module 606 is terminal 600 provide electric power.Power supply module 606 can comprise power-supply management system, one or more power supply, and other and the assembly generating, manage and distribute electric power for terminal 600 and be associated.
Multimedia groupware 608 is included in the screen providing an output interface between described terminal 600 and user.In certain embodiments, screen can comprise LCD (Liquid Crystal Display, liquid crystal display) and TP (Touch Panel, touch panel).If screen comprises touch panel, screen may be implemented as touch-screen, to receive the input signal from user.Touch panel comprises one or more touch sensor with the gesture on sensing touch, slip and touch panel.Touch sensor can the border of not only sensing touch or sliding action, but also detects the duration relevant with touch or slide and pressure.In certain embodiments, multimedia groupware 608 comprises a front-facing camera and/or post-positioned pick-up head.When terminal 600 is in operator scheme, during as screening-mode or video mode, front-facing camera and/or post-positioned pick-up head can receive outside multi-medium data.Each front-facing camera and post-positioned pick-up head can be fixing optical lens systems or have focal length and optical zoom ability.
Audio-frequency assembly 610 is configured to export and/or input audio signal.Such as, audio-frequency assembly 610 comprises a MIC (Microphone, microphone), and when terminal 600 is in operator scheme, during as call model, logging mode and speech recognition mode, microphone is configured to receive external audio signal.The sound signal received can be stored in storer 604 further or be sent via communications component 616.In certain embodiments, audio-frequency assembly 610 also comprises a loudspeaker, for output audio signal.
I/O interface 612 is for providing interface between processing components 602 and peripheral interface module, and above-mentioned peripheral interface module can be keyboard, some striking wheel, button etc.These buttons can include but not limited to: home button, volume button, start button and locking press button.
Sensor module 614 comprises one or more sensor, for providing the state estimation of various aspects for terminal 600.Such as, sensor module 614 can detect the opening/closing state of terminal 600, the relative positioning of assembly, such as assembly is display and the keypad of terminal 600, the position of all right sense terminals 600 of sensor module 614 or terminal 600 1 assemblies changes, the presence or absence that user contacts with terminal 600, the temperature variation of terminal 600 orientation or acceleration/deceleration and terminal 600.Sensor module 614 can comprise proximity transducer, be configured to without any physical contact time detect near the existence of object.Sensor module 614 can also comprise optical sensor, as CMOS (Complementary Metal OxideSemiconductor, CMOS (Complementary Metal Oxide Semiconductor)) or CCD (Charge-coupled Device, charge coupled cell) imageing sensor, for using in imaging applications.In certain embodiments, this sensor module 614 can also comprise acceleration transducer, gyro sensor, Magnetic Sensor, pressure transducer or temperature sensor.
Communications component 616 is configured to the communication being convenient to wired or wireless mode between terminal 600 and other equipment.Terminal 600 can access the wireless network based on communication standard, as WiFi, 2G or 3G, or their combination.In one exemplary embodiment, communications component 616 receives from the broadcast singal of external broadcasting management system or broadcast related information via broadcast channel.In one exemplary embodiment, described communications component 616 also comprises NFC (Near Field Communication, near-field communication) module, to promote junction service.Such as, can based on RFID (Radio Frequency Identification in NFC module, radio-frequency (RF) identification) technology, IrDA (Infra-red Data Association, Infrared Data Association) technology, UWB (Ultra Wideband, ultra broadband) technology, BT (Bluetooth, bluetooth) technology and other technologies realize.
In the exemplary embodiment, terminal 600 can by one or more ASIC (Application SpecificIntegrated Circuit, application specific integrated circuit), DSP (Digital signal Processor, digital signal processor), DSPD (Digital signal Processor Device, digital signal processing appts), PLD (Programmable Logic Device, programmable logic device (PLD)), FPGA (Field ProgrammableGate Array, field programmable gate array), controller, microcontroller, microprocessor or other electronic components realize, for performing the update method of the e-book that any embodiment provides in embodiment corresponding to above-mentioned Fig. 1 to Fig. 3.
In the exemplary embodiment, additionally provide a kind of non-transitory computer-readable recording medium comprising instruction, such as, comprise the storer 604 of instruction, above-mentioned instruction can perform said method by the processor 620 of terminal 600.Such as, described non-transitory computer-readable recording medium can be ROM, RAM (Random Access Memory, random access memory), CD-ROM (Compact Disc Read-OnlyMemory, compact disc read-only memory), tape, floppy disk and optical data storage devices etc.
A kind of non-transitory computer-readable recording medium, when the instruction in described storage medium is performed by the processor of terminal, make terminal can perform the update method of e-book, described method comprises:
Send e-book update request to server, wherein, e-book update request carries the mark of e-book;
First framework file of the e-book that reception server returns, wherein, the first framework file comprises the frag info of each fragment of e-book of server stores, and frag info at least comprises fragment identification;
According to the first framework file and the second framework file, determine the fragment identification of the fragment to be updated of the local e-book stored, wherein, the second framework file comprises the frag info of local each fragment of e-book stored;
According to the fragment identification of fragment to be updated, the e-book that this locality stores is upgraded.
Suppose that above-mentioned is the first possible embodiment, in the embodiment that the second then provided based on the embodiment that the first is possible is possible, in the storer of terminal, also comprise the instruction for performing following operation: the fragment identification determining the fragment to be updated of the local e-book stored, comprising:
When the first framework file exists newly-increased fragment identification relative to the second framework file, using the fragment identification of newly-increased fragment identification as fragment to be updated;
When the first framework file has deleted fragment identification relative to the second framework file existence, will delete the fragment identification of fragment identification as fragment to be updated;
When the first framework file is all identical with all fragment identification in the second framework file, and when in the first framework file, arbitrary fragment cryptographic hash is different from the homologous segment cryptographic hash in the second framework file, using the fragment identification of fragment identification different for fragment cryptographic hash as fragment to be updated, wherein, frag info also comprises fragment cryptographic hash.
In the third the possible embodiment provided based on the embodiment that the second is possible, the instruction for performing following operation is also comprised: according to the fragment identification of fragment to be updated in the storer of terminal, the e-book that this locality stores is upgraded, comprising:
When the fragment identification of fragment to be updated is the different fragment identification of newly-increased fragment identification or cryptographic hash, content update request is sent to server, wherein, the fragment identification of fragment to be updated is carried in content update request, makes server return to the chained address of the fragment identification corresponding content of fragment to be updated; The chained address that reception server returns; Content corresponding to the fragment identification of fragment to be updated is downloaded according to chained address;
When the fragment identification of fragment to be updated is for deleting fragment identification, deletes in the local e-book stored and having deleted content corresponding to fragment identification.
In the 4th kind of possible embodiment provided based on any one possible embodiment in the embodiment that the first is possible to the third, the instruction for performing following operation is also comprised: according to the fragment identification of fragment to be updated in the storer of terminal, after the e-book of this locality storage is upgraded, also comprise:
According to the fragment identification of fragment to be updated, upgrade the second framework file.
The non-transitory computer-readable recording medium that disclosure embodiment provides, first framework file of the e-book returned by reception server, and after determining the fragment identification of fragment to be updated according to the second framework file that the first framework file and terminal local store, fragment identification according to fragment to be updated upgrades the e-book that terminal local stores, when making the e-book when server side occur to upgrade, the fragment that terminal only needs update content to change, and without the need to upgrading whole e-book, improve renewal speed and efficiency.
Fig. 7 is the block diagram of a kind of server according to an exemplary embodiment, and this server may be used for performing the function in the update method of the e-book that any embodiment provides in embodiment corresponding to above-mentioned Fig. 1 to Fig. 3 performed by server.See Fig. 7, this server comprises the first receiver module 701 and first and returns module 702.Wherein:
This first receiver module 701 is configured to the e-book update request that receiving terminal sends, and wherein, e-book update request carries the mark of e-book;
This first returns the mark that module 702 is configured to according to e-book, the first framework file of the local e-book stored is returned to terminal, make the second framework file that terminal stores according to the first framework file and terminal local, determine the fragment identification of fragment to be updated, and according to the fragment identification of fragment to be updated, the e-book that terminal local stores is upgraded, wherein, the first framework file comprises the frag info of each fragment of e-book, and frag info at least comprises fragment identification.
The server that disclosure embodiment provides, by the first framework file of e-book returned to terminal, after making terminal determine the fragment identification of fragment to be updated according to the second framework file that the first framework file and terminal local store, fragment identification according to fragment to be updated upgrades the e-book that terminal local stores, when making the e-book when server side occur to upgrade, the fragment that terminal only needs update content to change, and without the need to upgrading whole e-book, improve renewal speed and efficiency.
In another embodiment, see Fig. 8, server also comprises segmentation module 703, distribution module 704, first generation module 705 and the second generation module 706.Wherein:
This segmentation module 703 is configured to e-book to be divided into multiple fragment;
This distribution module 704 is configured to as each fragment allocation fragment identification;
This first generation module 705 is configured to the content according to each fragment, generates the fragment cryptographic hash of each fragment, using the fragment identification of each fragment and the fragment cryptographic hash frag info as each fragment;
This second generation module 706 is configured to the frag info according to all fragments, generates the first framework file.
In another embodiment, see Fig. 9, server also comprises the second receiver module 707, acquisition module 708 and second returns module 709.Wherein:
This second receiver module 707 is configured to the content update request that receiving terminal sends, wherein, the fragment identification of fragment to be updated is carried in content update request, the fragment identification of fragment to be updated is determined by the second framework file of terminal according to the first framework file and terminal storage, and the fragment identification of fragment to be updated is the fragment identification that newly-increased fragment identification or cryptographic hash are different;
This acquisition module 708 is configured to the chained address of the fragment identification corresponding content obtaining fragment to be updated;
This second returns module 709 and is configured to terminal back link address, makes terminal download content corresponding to the fragment identification of fragment to be updated according to chained address.
About the server in above-described embodiment, wherein the concrete mode of modules executable operations has been described in detail in about the embodiment of the method, will not elaborate explanation herein.
Above-mentioned all alternatives, can adopt and combine arbitrarily formation optional embodiment of the present invention, this is no longer going to repeat them.
Figure 10 is the block diagram of a kind of server 1000 according to an exemplary embodiment.With reference to Figure 10, server 1000 comprises processing components 1022, and it comprises one or more processor further, and the memory resource representated by storer 1032, can such as, by the instruction of the execution of processing components 1022, application program for storing.The application program stored in storer 1032 can comprise each module corresponding to one group of instruction one or more.In addition, processing components 1022 is configured to perform instruction, the to perform the above method update method of e-book.
Server 1000 can also comprise the power management that a power supply module 1026 is configured to perform server 1000, a wired or wireless network interface 1050 is configured to server 1000 to be connected to network, and input and output (I/O) interface 1058.Server 1000 can operate the operating system based on being stored in storer 1032, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or similar.
Wherein, the update method of described e-book, comprising:
The e-book update request that receiving terminal sends, wherein, e-book update request carries the mark of e-book;
According to the mark of e-book, the first framework file of the local e-book stored is returned to terminal, make the second framework file that terminal stores according to the first framework file and terminal local, determine the fragment identification of fragment to be updated, and according to the fragment identification of fragment to be updated, the e-book that terminal local stores is upgraded, wherein, the first framework file comprises the frag info of each fragment of e-book, and frag info at least comprises fragment identification.
Suppose that above-mentioned is the first possible embodiment, in the embodiment that the second then provided based on the embodiment that the first is possible is possible, the instruction for performing following operation is also comprised: according to the mark of e-book in the storer of server, return the first framework file of the local e-book stored to terminal before, also comprise:
E-book is divided into multiple fragment;
For each fragment allocation fragment identification;
According to the content of each fragment, generate the fragment cryptographic hash of each fragment, using the fragment identification of each fragment and the fragment cryptographic hash frag info as each fragment;
According to the frag info of all fragments, generate the first framework file.
In the third the possible embodiment provided based on the embodiment that the first is possible, the instruction for performing following operation is also comprised: according to the mark of e-book in the storer of server, after terminal returns the first framework file of the local e-book stored, also comprise:
The content update request that receiving terminal sends, wherein, the fragment identification of fragment to be updated is carried in content update request, the fragment identification of fragment to be updated is determined by the second framework file of terminal according to the first framework file and terminal storage, and the fragment identification of fragment to be updated is the fragment identification that newly-increased fragment identification or cryptographic hash are different;
Obtain the chained address of the fragment identification corresponding content of fragment to be updated;
To terminal back link address, terminal is made to download content corresponding to the fragment identification of fragment to be updated according to chained address.
The server that disclosure embodiment provides, by the first framework file of e-book returned to terminal, after making terminal determine the fragment identification of fragment to be updated according to the second framework file that the first framework file and terminal local store, fragment identification according to fragment to be updated upgrades the e-book that terminal local stores, when making the e-book when server side occur to upgrade, the fragment that terminal only needs update content to change, and without the need to upgrading whole e-book, improve renewal speed and efficiency.
Figure 11 is the block diagram of the renewal system of a kind of e-book according to an exemplary embodiment.See Figure 11, the renewal system of this e-book comprises terminal 1101 and server 1102.Wherein:
The terminal that in described terminal 1101 embodiment corresponding to above-mentioned Fig. 4 to Fig. 6, any embodiment provides, specifically see the content of embodiment corresponding to above-mentioned Fig. 4 to Fig. 6, can repeat no more herein.
The terminal that in described server 1102 embodiment corresponding to above-mentioned Fig. 7 to Figure 10, any embodiment provides, specifically see the content of embodiment corresponding to above-mentioned Fig. 7 to Figure 10, can repeat no more herein.
The system that disclosure embodiment provides, first framework file of the e-book that terminal returns at reception server, and after determining the fragment identification of fragment to be updated according to the second framework file that the first framework file and terminal local store, fragment identification according to fragment to be updated upgrades the e-book that terminal local stores, when making the e-book when server side occur to upgrade, the fragment that terminal only needs update content to change, and without the need to upgrading whole e-book, improve renewal speed and efficiency.
Those skilled in the art, at consideration instructions and after putting into practice invention disclosed herein, will easily expect other embodiment of the present invention.The application is intended to contain any modification of the present invention, purposes or adaptations, and these modification, purposes or adaptations are followed general principle of the present invention and comprised the undocumented common practise in the art of the disclosure or conventional techniques means.Instructions and embodiment are only regarded as exemplary, and true scope of the present invention and spirit are pointed out by claim below.
Should be understood that, the present invention is not limited to precision architecture described above and illustrated in the accompanying drawings, and can carry out various amendment and change not departing from its scope.Scope of the present invention is only limited by appended claim.

Claims (16)

1. a update method for e-book, is characterized in that, described method comprises:
Send e-book update request to server, described e-book update request carries the mark of e-book;
Receive the first framework file of the described e-book that described server returns, described first framework file comprises the frag info of described each fragment of e-book of described server stores, and described frag info at least comprises fragment identification;
According to described first framework file and the second framework file, determine the fragment identification of the fragment to be updated of the local described e-book stored, described second framework file comprises the frag info of local described each fragment of e-book stored;
According to the fragment identification of described fragment to be updated, the described e-book that described this locality stores is upgraded.
2. method according to claim 1, is characterized in that, the described fragment identification determining the fragment to be updated of the local described e-book stored, comprising:
When described first framework file exists newly-increased fragment identification relative to described second framework file, using the fragment identification of described newly-increased fragment identification as fragment to be updated;
When described first framework file has deleted fragment identification relative to described second framework file existence, delete the fragment identification of fragment identification as fragment to be updated using described;
When described first framework file is all identical with all fragment identification in described second framework file, and when in described first framework file, arbitrary fragment cryptographic hash is different from the homologous segment cryptographic hash in described second framework file, using the fragment identification of fragment identification different for described fragment cryptographic hash as fragment to be updated, described frag info also comprises fragment cryptographic hash.
3. method according to claim 2, is characterized in that, the described fragment identification according to described fragment to be updated, upgrades, comprising the described e-book that described this locality stores:
When the fragment identification of described fragment to be updated is the different fragment identification of newly-increased fragment identification or cryptographic hash, content update request is sent to described server, the fragment identification of described fragment to be updated is carried in described content update request, makes described server return to the chained address of the fragment identification corresponding content of described fragment to be updated; Receive the chained address that described server returns; The content corresponding according to the fragment identification of the described fragment to be updated of described chained address download;
When the fragment identification of described fragment to be updated is for deleting fragment identification, deletes in the local described e-book stored and having deleted content corresponding to fragment identification.
4. the method according to claim arbitrary in claims 1 to 3, is characterized in that, the described fragment identification according to described fragment to be updated, after upgrading, also comprises the described e-book of described this locality storage:
According to the fragment identification of described fragment to be updated, upgrade described second framework file.
5. a update method for e-book, is characterized in that, described method comprises:
The e-book update request that receiving terminal sends, described e-book update request carries the mark of e-book;
According to the mark of described e-book, the first framework file of the local described e-book stored is returned to described terminal, make the second framework file that described terminal stores according to described first framework file and described terminal local, determine the fragment identification of fragment to be updated, and according to the fragment identification of described fragment to be updated, the described e-book that described terminal local stores is upgraded, described first framework file comprises the frag info of described each fragment of e-book, and described frag info at least comprises fragment identification.
6. method according to claim 5, is characterized in that, the described mark according to described e-book, before returning the first framework file of the local described e-book stored, also comprises to described terminal:
Described e-book is divided into multiple fragment;
For each fragment allocation fragment identification;
According to the content of each fragment, generate the fragment cryptographic hash of each fragment, using the fragment identification of each fragment and the fragment cryptographic hash frag info as each fragment;
According to the frag info of all fragments, generate the first framework file.
7. method according to claim 5, is characterized in that, the described mark according to described e-book, after described terminal returns the first framework file of the local described e-book stored, also comprises:
Receive the content update request that described terminal sends, the fragment identification of fragment to be updated is carried in described content update request, the fragment identification of described fragment to be updated is determined by the second framework file of described terminal according to described first framework file and described terminal storage, and the fragment identification of described fragment to be updated is the fragment identification that newly-increased fragment identification or cryptographic hash are different;
Obtain the chained address of the fragment identification corresponding content of described fragment to be updated;
Return to described chained address to described terminal, make the content that described terminal is corresponding according to the fragment identification of the described fragment to be updated of described chained address download.
8. a terminal, is characterized in that, described terminal comprises:
Sending module, for sending e-book update request to server, described e-book update request carries the mark of e-book;
Receiver module, for receiving the first framework file of the described e-book that described server returns, described first framework file comprises the frag info of described each fragment of e-book of described server stores, and described frag info at least comprises fragment identification;
Determination module, for according to described first framework file and the second framework file, determine the fragment identification of the fragment to be updated of the local described e-book stored, described second framework file comprises the frag info of local described each fragment of e-book stored;
First update module, for the fragment identification according to described fragment to be updated, upgrades the described e-book that described this locality stores.
9. terminal according to claim 8, is characterized in that, described determination module is used for:
When described first framework file exists newly-increased fragment identification relative to described second framework file, using the fragment identification of described newly-increased fragment identification as fragment to be updated;
When described first framework file has deleted fragment identification relative to described second framework file existence, delete the fragment identification of fragment identification as fragment to be updated using described;
When described first framework file is all identical with all fragment identification in described second framework file, and when in described first framework file, arbitrary fragment cryptographic hash is different from the homologous segment cryptographic hash in described second framework file, using the fragment identification of fragment identification different for described fragment cryptographic hash as fragment to be updated, described frag info also comprises fragment cryptographic hash.
10. terminal according to claim 9, is characterized in that, described first update module is used for:
When the fragment identification of described fragment to be updated is the different fragment identification of newly-increased fragment identification or cryptographic hash, content update request is sent to described server, the fragment identification of described fragment to be updated is carried in described content update request, makes described server return to the chained address of the fragment identification corresponding content of described fragment to be updated; Receive the chained address that described server returns; The content corresponding according to the fragment identification of the described fragment to be updated of described chained address download;
When the fragment identification of described fragment to be updated is for deleting fragment identification, deletes in the local described e-book stored and having deleted content corresponding to fragment identification.
Terminal in 11. according to Claim 8 to 10 described in arbitrary claim, is characterized in that, described terminal also comprises:
Second update module, for the fragment identification according to described fragment to be updated, upgrades described second framework file.
12. 1 kinds of servers, is characterized in that, described server comprises:
First receiver module, for the e-book update request that receiving terminal sends, described e-book update request carries the mark of e-book;
First returns module, for the mark according to described e-book, the first framework file of the local described e-book stored is returned to described terminal, make the second framework file that described terminal stores according to described first framework file and described terminal local, determine the fragment identification of fragment to be updated, and according to the fragment identification of described fragment to be updated, the described e-book that described terminal local stores is upgraded, described first framework file comprises the frag info of described each fragment of e-book, and described frag info at least comprises fragment identification.
13. servers according to claim 12, is characterized in that, described server also comprises:
Segmentation module, for being divided into multiple fragment by described e-book;
Distribution module, for being each fragment allocation fragment identification;
First generation module, for the content according to each fragment, generates the fragment cryptographic hash of each fragment, using the fragment identification of each fragment and the fragment cryptographic hash frag info as each fragment;
Second generation module, for the frag info according to all fragments, generates the first framework file.
14. servers according to claim 12, is characterized in that, described server also comprises:
Second receiver module, for receiving the content update request that described terminal sends, the fragment identification of fragment to be updated is carried in described content update request, the fragment identification of described fragment to be updated is determined by the second framework file of described terminal according to described first framework file and described terminal storage, and the fragment identification of described fragment to be updated is the fragment identification that newly-increased fragment identification or cryptographic hash are different;
Acquisition module, for obtaining the chained address of the fragment identification corresponding content of described fragment to be updated;
Second returns module, for returning to described chained address to described terminal, makes the content that described terminal is corresponding according to the fragment identification of the described fragment to be updated of described chained address download.
15. 1 kinds of terminals, is characterized in that, described terminal comprises:
Processor;
For the storer of storage of processor executable instruction;
Wherein, described processor is configured to:
Send e-book update request to server, described e-book update request carries the mark of e-book;
Receive the first framework file of the described e-book that described server returns, described first framework file comprises the frag info of described each fragment of e-book of described server stores, and described frag info at least comprises fragment identification;
According to described first framework file and the second framework file, determine the fragment identification of the fragment to be updated of the local described e-book stored, described second framework file comprises the frag info of local described each fragment of e-book stored;
According to the fragment identification of described fragment to be updated, the described e-book that described this locality stores is upgraded.
16. 1 kinds of servers, is characterized in that, described server comprises:
Processor;
For the storer of storage of processor executable instruction;
Wherein, described processor is configured to:
The e-book update request that receiving terminal sends, described e-book update request carries the mark of e-book;
According to the mark of described e-book, the first framework file of the local described e-book stored is returned to described terminal, make the second framework file that described terminal stores according to described first framework file and described terminal local, determine the fragment identification of fragment to be updated, and according to the fragment identification of described fragment to be updated, the described e-book that described terminal local stores is upgraded, described first framework file comprises the frag info of described each fragment of e-book, and described frag info at least comprises fragment identification.
CN201510231052.4A 2015-05-08 2015-05-08 Update method, terminal and the server of e-book Active CN104933085B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510231052.4A CN104933085B (en) 2015-05-08 2015-05-08 Update method, terminal and the server of e-book

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510231052.4A CN104933085B (en) 2015-05-08 2015-05-08 Update method, terminal and the server of e-book

Publications (2)

Publication Number Publication Date
CN104933085A true CN104933085A (en) 2015-09-23
CN104933085B CN104933085B (en) 2018-09-25

Family

ID=54120253

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510231052.4A Active CN104933085B (en) 2015-05-08 2015-05-08 Update method, terminal and the server of e-book

Country Status (1)

Country Link
CN (1) CN104933085B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106412033A (en) * 2016-09-14 2017-02-15 广东欧珀移动通信有限公司 Data migration method and terminal
CN108519995A (en) * 2018-03-05 2018-09-11 珠海格力电器股份有限公司 A kind of specification method for pushing, device, storage medium and server
CN117240478A (en) * 2023-11-13 2023-12-15 深圳合纵富科技有限公司 POS machine data transmission method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101631398A (en) * 2009-08-05 2010-01-20 深圳市五巨科技有限公司 Mobile terminal electronic-book management system and mobile terminal electronic-book management method
CN104462469A (en) * 2014-12-17 2015-03-25 小米科技有限责任公司 Updating method and updating device for website static files
US8997082B1 (en) * 2013-07-16 2015-03-31 Amazon Technologies, Inc. Differential patch of content

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101631398A (en) * 2009-08-05 2010-01-20 深圳市五巨科技有限公司 Mobile terminal electronic-book management system and mobile terminal electronic-book management method
US8997082B1 (en) * 2013-07-16 2015-03-31 Amazon Technologies, Inc. Differential patch of content
CN104462469A (en) * 2014-12-17 2015-03-25 小米科技有限责任公司 Updating method and updating device for website static files

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106412033A (en) * 2016-09-14 2017-02-15 广东欧珀移动通信有限公司 Data migration method and terminal
CN108519995A (en) * 2018-03-05 2018-09-11 珠海格力电器股份有限公司 A kind of specification method for pushing, device, storage medium and server
CN117240478A (en) * 2023-11-13 2023-12-15 深圳合纵富科技有限公司 POS machine data transmission method and system
CN117240478B (en) * 2023-11-13 2024-02-13 深圳合纵富科技有限公司 POS machine data transmission method and system

Also Published As

Publication number Publication date
CN104933085B (en) 2018-09-25

Similar Documents

Publication Publication Date Title
CN104461725A (en) Application process starting control method and device
CN105488112A (en) Information pushing method and device
CN104778063A (en) Method and device for updating resource
CN105183513A (en) Application recommendation method and apparatus
CN104615350A (en) Method and device for displaying information on screen locking interface
CN105225096A (en) The disposal route of reminder announced message, device and terminal
CN104123341A (en) Method and device for downloading file and route device
CN104580637A (en) Telephone number marking method, terminal and cloud server
CN104462277A (en) Application program installation data statistical method, server and terminal
CN105094931A (en) Software upgrading method and device
CN105208015A (en) Application multi-account login processing method and device and terminal device
CN105516270A (en) Information push method and device
CN105511907A (en) Application program upgrade method, device and system
CN105426386A (en) File synchronization method and apparatus, and terminal device
CN104320774A (en) Updating method, device and facility
CN105094904A (en) Application program installation method and device
CN104536783A (en) Method and device for setting reserved space
CN105808305A (en) Static resource loading method and device
CN104462296A (en) File managing method and device and terminal
CN104767857A (en) Telephone calling method and device based on cloud name cards
CN104636475A (en) Method and device for optimizing multimedia file storage space
CN104219378A (en) Information processing method and device
CN103916468A (en) System upgrading method, terminal, server and upgrading system
CN105208177A (en) Address book updating method, device and terminal
CN104881304A (en) Resource downloading method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant