Detection method, terminal and the server that a kind of theme updates
Technical field
The present invention relates to field of computer technology, particularly to detection method, terminal and server that a kind of theme updates.
Background technology
Along with the development of computer technology, programming personnel is constantly types of applications more redaction, with the function of application and patching a leak.User then obtains the application of the application replacement legacy version of redaction in the terminal by the more New function of application from server.
Each version of application can be set a version information, and is saved in the application.When, after the order receiving more new opplication, the version information of application is sent to the renewal server specified by terminal, updating server and can judge that the application self whether having more redaction exists according to the version information received, if had, prompting user is updated.
Theme, as the substitute files of a kind of pattern style changing operating system, is also a kind of application, equally also has the renewal identical with other kinds of application to need.
But strictly limiting owing to not having as common application for the design specification of subject document at present, do not have unified specification with the name of subject document and version definition, the upgrading of subject document is difficult to be managed.Such as, domestic consumer can carry out random amendment by the subject editing device title to theme and version information.
Therefore, the foundation that the version number carried by obtaining subject document is detected as renewal is very unreliable, it is easy to mistake, reduction Consumer's Experience occur to update.
Summary of the invention
Embodiments provide detection method, terminal and server that a kind of theme updates, it is possible to when avoiding the version information using theme as detection foundation, cause that owing to version information is easily modified theme cannot detect the defect of renewal.Described technical scheme is as follows:
On the one hand, it is provided that the detection method that a kind of theme updates, described method includes:
The detection to preset themes receiving first terminal transmission is asked, and carries the digital digest information of described preset themes in described detection request;
Digital digest information according to the first subject information table prestored and described preset themes determines that described preset themes is the need of renewal, and is sent to described first terminal as testing result;
Wherein, described first subject information table at least includes the digital digest information of latest edition theme.
On the one hand, it is provided that the detection method that a kind of theme updates, described method includes:
Obtain the end message of preset themes, and according to preset algorithm, obtain the digital digest information of preset themes;
Send the detection to preset themes to server to ask, described more detection request is carried digital digest information and the end message of described preset themes;
Receiving the testing result that described server returns according to described detection request, if described testing result is the information needing to update, then preset themes described in prompting user needs to update.
On the one hand, it is provided that the detection server that a kind of theme updates, described server includes:
First receiver module, the detection to preset themes sent for receiving first terminal is asked, and carries the digital digest information of described preset themes in described detection request;
First detection module, for determining that described preset themes is the need of renewal according to the digital digest information of the first subject information table prestored and described preset themes, and is sent to described first terminal as testing result;
Wherein, described first subject information table at least includes the digital digest information of latest edition theme.
On the other hand, it is provided that the detection terminal that a kind of theme updates, described terminal includes:
Acquisition module, for obtaining the end message of preset themes, and according to preset algorithm, obtains the digital digest information of preset themes;
Sending module, asks for sending the detection to preset themes to server, carries digital digest information and the end message of described preset themes in described more detection request;
Second receiver module, for receiving the testing result that described server returns according to described detection request, if described testing result is the information needing to update, then preset themes described in prompting user needs to update.
The technical scheme that the embodiment of the present invention provides has the benefit that
By the foundation using the digital digest information possessing deterministic preset themes that will not be modified to update as detection theme, when avoiding the version information using theme as detection foundation, this version information is easily modified and causes that theme cannot detect the defect of renewal.
Accompanying drawing explanation
In order to be illustrated more clearly that the technical scheme in the embodiment of the present invention, below the accompanying drawing used required during embodiment is described is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the premise not paying creative work, it is also possible to obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the detection method flow chart that the theme that the embodiment of the present invention one provides updates;
Fig. 2 is the detection method flow chart that the theme that the embodiment of the present invention two provides updates;
Fig. 3 is the detection method flow chart that the theme that the embodiment of the present invention three provides updates;
Fig. 4 is the detection server architecture schematic diagram that the theme that the embodiment of the present invention four provides updates;
Fig. 5 is the detection terminal structure schematic diagram that the theme that the embodiment of the present invention five provides updates.
Detailed description of the invention
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
Embodiment one
Embodiments providing the detection method that a kind of theme updates, referring to Fig. 1, method flow includes:
101: the detection to preset themes receiving first terminal transmission is asked, described detection request carries the digital digest information of described preset themes;
102: determine that described preset themes is the need of renewal according to the digital digest information of the first subject information table prestored and described preset themes, and be sent to described first terminal as testing result;
Wherein, described first subject information table at least includes the digital digest information of latest edition theme.
The foundation that the embodiment of the present invention updates as detection theme by using the digital digest information possessing deterministic preset themes that will not be modified, when avoiding the version information using theme as detection foundation, this version information is easily modified and causes that theme cannot detect the defect of renewal.
Embodiment two
Embodiments providing the detection method that a kind of theme updates, referring to Fig. 2, method flow includes:
201: obtain the end message of preset themes, and according to preset algorithm, obtain the digital digest information of preset themes;
202: send the detection to preset themes to server and ask, described more detection request is carried digital digest information and the end message of described preset themes;
203: receive the testing result that described server returns according to described detection request, if described testing result is the information needing to update, then preset themes described in prompting user needs to update.
The foundation that the embodiment of the present invention updates as detection theme by using the digital digest information possessing deterministic preset themes that will not be modified, when avoiding the version information using theme as detection foundation, this version information is easily modified and causes that theme cannot detect the defect of renewal.
Embodiment three
Embodiments provide the detection method that a kind of theme updates, referring to Fig. 3.
It should be noted that, after terminal updates the order of theme in user's detection trigger, first send the detection to preset themes to server to ask, server is according to whether this theme of this requesting query has renewal, if there being renewal, return the testing result needing to update to terminal, there is renewal in the theme that terminal notifying is corresponding, and waits user's further more newer command;If without updating, returning without the testing result updated to terminal.
Further, the mode of the order that user triggers renewal theme can be: user actively sends the more newer command to a theme or multiple theme;Can also be that terminal updates the order of theme according to preset time period detection trigger, this is not defined at this.
Described method includes:
301: terminal obtains the end message of preset themes, and according to preset algorithm, obtains the digital digest information of preset themes.
Preferably, end message confirms the information of terminal models or version for server, wherein end message can be model information or the operating system firmware version number of terminal, and wherein model information can include the type model of terminal, it is also possible to for information such as the screen resolution of terminal, screen sizes.
Further, digital digest information is by preset algorithm, the theme compressed package that preset themes is corresponding is calculated, and obtains the identification information uniquely corresponding with preset themes.Wherein preset algorithm can be: hash algorithm, is cryptographic Hash by the calculated digital digest information of this algorithm;MD5(Message-DigestAlgorithm5, Message-Digest algorithm the 5th edition can also be passed through) algorithm, calculated digital digest information is MD5 value.
302: terminal to server sends the detection to preset themes and asks, described more detection request is carried digital digest information and the end message of described preset themes.
303: server receives the detection to preset themes of first terminal transmission and asks, described detection request carries the digital digest information of described preset themes.
Preferably, server is preserved two tables that theme is corresponding, first table is the first subject information table, wherein storage has the subject information of the latest edition that theme is corresponding, and each list item in the first subject information table comprises: the digital digest information of theme correspondence latest edition, end message, compatible information, theme ID(IDentity, mark), the information such as version information;Second table is second theme information table, and wherein storage has the information of each version of history that theme is corresponding, and each list item in second theme information table comprises: the digital digest information of each old version that theme is corresponding, end message, compatible information, theme ID, the information such as version information.Wherein, the information such as compatible information is applicable to every configuration of terminal for recording theme, it is possible to including: the screen resolution of terminal, screen size.
Further, be divided into two tables to carry out the purpose mated, be due in the first subject information table storage be all the information of the latest edition that each theme is corresponding, the historical information that its Capacity Ratio theme is corresponding is much smaller.And in second theme information table storage be the information of all old versions except latest edition that theme is corresponding, therefore the quantity of information of this table can be much larger relative to the quantity of information of the first subject information table, therefore after subject information being divided into two tables, first detection request terminal sent carries out coupling in the first subject information table and can mate or query script to save the time than being saved in a table by all subject informations to carry out, and saves the resource of server.
304: determine that described preset themes is the need of renewal according to the digital digest information of the first subject information table prestored and described preset themes, and be sent to described first terminal as testing result;
Wherein, described first subject information table at least includes the digital digest information of latest edition theme.
Step 304 can be:
3041: in described first subject information table, search the subject information of the latest edition theme corresponding with the digital digest information of described preset themes.
3042: when finding the subject information of described latest edition theme in described first subject information table, then the end message according to the subject information of described latest edition theme, described first terminal, detects described preset themes the need of renewal;
Wherein, the end message of the terminal that the subject information of described latest edition theme is supported for indicating described latest edition theme.
First subject information table is searched the digital digest information of preset themes, when the subject information of latest edition theme corresponding to the digital digest information finding preset themes, then illustrate that preset themes is latest edition, however it is necessary that the end message in the subject information of the end message by detecting in request and latest edition theme further determines that whether this theme is applicable to this terminal.
Therefore step 3042 can be:
30421: relatively whether the end message of the terminal that described latest edition theme is supported is identical with the end message of described first terminal.
If identical, then illustrate that terminal preset themes is without updating, if difference, performs step 30422.
30422: when the end message of the terminal that described latest edition theme is supported is different with the end message of described preset themes, then search the target topic of the latest edition mated with the end message of described first terminal, and judge that whether described preset themes is consistent with the compatible information of described target topic.
When the end message of the terminal that end message and latest edition theme are supported is inconsistent, then show that likely user has downloaded the theme being not particularly suited for own terminal, therefore need in the server to find the terminal with user to match, and the theme consistent with the theme that user downloads, i.e. target topic.Continue to make a look up target topic by two contents of end message of the theme ID comprised in the subject information that finds and preset themes in the first subject information table, after finding, determine whether that whether the compatible information in the subject information of latest edition theme is consistent with the compatible information of target topic.
30423: when the compatible information of described preset themes and described target topic is inconsistent, it is determined that described preset themes needs to update.
Compatible information is consistent, then the end message of the theme that explanation preset themes is corresponding with target topic is consistent, and compatible information is also consistent, therefore illustrates that this theme is up-to-date and is applicable to this terminal.Therefore without updating, it is possible to send the information without updating to terminal.If compatible information is inconsistent, then confirm that preset themes needs to update.
305: when not finding the subject information of described latest edition theme in described first subject information table, end message according to the second theme information table prestored, the digital digest information of described preset themes and described first terminal, detects described preset themes the need of renewal;
Described second theme information table is for preserving the digital digest information of old version theme and the corresponding relation of subject information.
First subject information table does not match, then further makes a look up in second theme information table, confirm that theme is the need of renewal.
Step 305 can particularly as follows:
3051: according to described digital digest information to be detected, described second theme information table is searched the subject information of the old version theme corresponding with the digital digest information of described preset themes.
If not finding, then illustrating that the not serviced device of preset themes is included, therefore cannot judge whether to need to update, it is possible to return the information that cannot update to terminal.If finding, illustrating that this theme is legacy version, and performing step 3052.
3052: when finding the subject information of old version theme of correspondence in described second theme information table, then the end message according to the subject information of described old version theme and described first terminal, detects described preset themes the need of renewal.
The step detecting preset themes in second theme information table can be:
30521: the theme ID included according to the subject information of the described old version theme subject information searching latest edition theme corresponding to described preset themes with the end message of described first terminal at described first subject information table.
After matching, then needing to search the theme of corresponding latest edition for this theme, this process needs to make a look up in the first subject information table.First the list item matched in second theme information table obtains the theme ID of this theme, uses this theme ID to search, in the first subject information table, the latest edition that this preset themes is corresponding with the end message in detection request.If finding, perform step 30522;Then illustrating that preset themes is for a certain reason not already present in server if finding, now server cannot provide the renewal of this theme, then return the information that cannot update to terminal.
30522: the digital digest information of the digital digest information that relatively subject information of the latest edition theme that described preset themes is corresponding includes and described preset themes.
After first subject information table finds the subject information of latest edition corresponding to preset themes, in order to further confirm that this theme needs to update, then mated by the digital digest information in the subject information of the digital digest information of the preset themes latest edition theme corresponding with preset themes, matching result is inconsistent under normal circumstances, because legacy version confirmed as in step 305 in the theme of user's inquiry, this process is only further confirmation process.
30523: if the digital digest information that the subject information of latest edition theme corresponding to described preset themes includes is different from the digital digest information of described preset themes, it is determined that described preset themes needs to update.
Now, confirm that this theme needs to be updated, it is possible to return the information needing to update to terminal.
306: terminal receives the testing result that described server returns according to described detection request, if described testing result is the information needing to update, then preset themes described in prompting user needs to update.
It is also preferred that the left after receiving the renewal result that server returns, the content according to updating result is pointed out to user.Mode can be to the mark needing the theme updated to carry out word or symbol, is updated to point out this theme of user to need.
The foundation that the embodiment of the present invention updates as detection theme by using the digital digest information possessing deterministic preset themes that will not be modified, when avoiding the version information using theme as detection foundation, this version information is easily modified and causes that theme cannot detect the defect of renewal.Simultaneously by using end message and compatible information that preset themes is detected, can assist and determine whether preset themes is applicable to terminal, the theme display mistake avoiding user to download to the theme not being suitable for own terminal and to cause, further improves the efficiency that detection theme updates.
Embodiment four
Embodiments providing the detection server that a kind of theme updates, referring to Fig. 4, this server includes:
First receiver module 401, the detection to preset themes sent for receiving first terminal is asked, and carries the digital digest information of described preset themes in described detection request;
First detection module 402, for determining that described preset themes is the need of renewal according to the digital digest information of the first subject information table prestored and described preset themes, and is sent to described first terminal as testing result;
Wherein, described first subject information table at least includes the digital digest information of latest edition theme.
In a specific embodiment, when described detection request also carries the end message of described first terminal, described first detection module 401, including:
First searches unit 4011, for searching the subject information of the latest edition theme corresponding with the digital digest information of described preset themes in described first subject information table;
First detection unit 4012, for when finding the subject information of described latest edition theme in described first subject information table, the then end message according to the subject information of described latest edition theme, described first terminal, detects described preset themes the need of renewal;
Wherein, the end message of the terminal that the subject information of described latest edition theme is supported for indicating described latest edition theme.
Wherein, described first detection unit 4012, including:
First compares subelement 40121, and whether the end message for the relatively terminal that described latest edition theme is supported is identical with the end message of described first terminal;
First searches subelement 40122, for when the end message of the terminal that described latest edition theme is supported is different with the end message of described preset themes, then search the target topic of the latest edition mated with the end message of described first terminal, and judge that whether described preset themes is consistent with the compatible information of described target topic;
First determines subelement 40123, for when the compatible information of described preset themes and described target topic is inconsistent, it is determined that described preset themes needs to update.
Further, when not finding the subject information of described latest edition theme in described first subject information table, described server also includes:
Second detection module 403, for the end message according to the second theme information table prestored, the digital digest information of described preset themes and described first terminal, detects described preset themes the need of renewal;
Described second theme information table is for preserving the digital digest information of old version theme and the corresponding relation of subject information.
Wherein, described second detection module 403, including:
Second searches unit 4031, for according to described digital digest information to be detected, searching the subject information of the old version theme corresponding with the digital digest information of described preset themes in described second theme information table;
Second detection unit 4032, for when finding the subject information of old version theme of correspondence in described second theme information table, the then end message according to the subject information of described old version theme and described first terminal, detects described preset themes the need of renewal.
Wherein, described second detection unit 4032, including:
Second searches subelement 40321, searches the subject information of latest edition theme corresponding to described preset themes at described first subject information table for the theme ID that includes according to the subject information of described old version theme and the end message of described first terminal;
Second compares subelement 40322, the digital digest information of the digital digest information included for the subject information of latest edition theme corresponding to relatively described preset themes and described preset themes;
Second determines subelement 40323, if the digital digest information that the subject information being used for latest edition theme corresponding to described preset themes includes is different from the digital digest information of described preset themes, it is determined that described preset themes needs to update.
Wherein, the digital digest information of described preset themes includes: the cryptographic Hash of described preset themes or the Message Digest Algorithm 5 MD5 value of described preset themes.
The foundation that the embodiment of the present invention updates as detection theme by using the digital digest information possessing deterministic preset themes that will not be modified, when avoiding the version information using theme as detection foundation, this version information is easily modified and causes that theme cannot detect the defect of renewal.Simultaneously by using end message and compatible information that preset themes is detected, can assist and determine whether preset themes is applicable to terminal, the theme display mistake avoiding user to download to the theme not being suitable for own terminal and to cause, further improves the efficiency that detection theme updates.
Embodiment five
Embodiments providing the detection terminal that a kind of theme updates, referring to Fig. 5, this terminal includes:
Acquisition module 501, for obtaining the end message of preset themes, and according to preset algorithm, obtains the digital digest information of preset themes;
Sending module 502, asks for sending the detection to preset themes to server, carries digital digest information and the end message of described preset themes in described more detection request;
Second receiver module 503, for receiving the testing result that described server returns according to described detection request, if described testing result is the information needing to update, then preset themes described in prompting user needs to update.
The foundation that the embodiment of the present invention updates as detection theme by using the digital digest information possessing deterministic preset themes that will not be modified, when avoiding the version information using theme as detection foundation, this version information is easily modified and causes that theme cannot detect the defect of renewal.Simultaneously by using end message and compatible information that preset themes is detected, can assist and determine whether preset themes is applicable to terminal, the theme display mistake avoiding user to download to the theme not being suitable for own terminal and to cause, further improves the efficiency that detection theme updates.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can be completed by hardware, can also be completed by the hardware that program carrys out instruction relevant, described program can be stored in a kind of computer-readable recording medium, storage medium mentioned above can be read only memory, disk or CD etc..
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all within the spirit and principles in the present invention, any amendment of making, equivalent replacement, improvement etc., should be included within protection scope of the present invention.