CN107122174B - Application program updating method and device - Google Patents

Application program updating method and device Download PDF

Info

Publication number
CN107122174B
CN107122174B CN201710204077.4A CN201710204077A CN107122174B CN 107122174 B CN107122174 B CN 107122174B CN 201710204077 A CN201710204077 A CN 201710204077A CN 107122174 B CN107122174 B CN 107122174B
Authority
CN
China
Prior art keywords
page
module
information
version number
update
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.)
Active
Application number
CN201710204077.4A
Other languages
Chinese (zh)
Other versions
CN107122174A (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 Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201710204077.4A priority Critical patent/CN107122174B/en
Publication of CN107122174A publication Critical patent/CN107122174A/en
Application granted granted Critical
Publication of CN107122174B publication Critical patent/CN107122174B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • Stored Programmes (AREA)

Abstract

The disclosure relates to an application program updating method and device, and belongs to the technical field of mobile communication. The method comprises the following steps: acquiring second page information of a second page corresponding to a page identifier in a server based on the page identifier of a first page to be updated; if the first page information is inconsistent with the second page information, downloading page data of the second page based on the second page information; and loading the page data of the second page to finish the updating of the application program. According to the method and the device, the second page corresponding to the first page is obtained, whether the first page is updated or not is judged based on the second page, if the first page is updated, page data of the second page is downloaded and loaded, and updating of the application program is completed, so that the user can complete updating of the application program without manual downloading, a large amount of manpower and material resources are saved, and the intelligence is better.

Description

Application program updating method and device
Technical Field
The present disclosure relates to the field of mobile communications technologies, and in particular, to an application updating method and apparatus.
Background
In recent years, terminal devices such as tablet computers and smart phones have been installed with various applications that are run by an operating system of the terminal device from the time of purchase. In the subsequent use process, in order to achieve the purposes of adding new functions, correcting defects or improving safety, many application programs will frequently be updated, that is, the old version of the application program is updated to the new version of the application program, so as to provide better service for users.
In the related art, when an application needs to be updated, a server connected to a terminal device provides a terminal with a designated page capable of downloading an update installation package, and the terminal acquires the designated page and generates an update prompt, so that the update prompt carries the designated page, and displays the update prompt to a user, so that the user confirms the update application in the designated page carried by the update prompt. And after the user confirms the updating of the application program on the appointed page, the terminal downloads a corresponding installation package from the server, and the installation package is installed based on the old version of the application program to finish the updating of the application program.
Disclosure of Invention
To overcome the problems in the related art, the present disclosure provides an application program updating method and apparatus.
According to a first aspect of the embodiments of the present disclosure, there is provided an application program updating method, the method including:
acquiring second page information of a second page corresponding to a page identifier in a server based on the page identifier of a first page to be updated;
if the first page information is inconsistent with the second page information, downloading page data of the second page based on the second page information;
and loading the page data of the second page to finish the updating of the application program.
According to the method provided by the embodiment of the disclosure, the second page corresponding to the first page is obtained, whether the first page is updated or not is judged based on the second page, if the first page is updated, page data of the second page is downloaded and loaded, and updating of the application program is completed, so that the user can complete updating of the application program without manually downloading, a large amount of manpower and material resources are saved, and the method is excellent in intelligence.
In another embodiment, the downloading the page data of the second page based on the second page information includes:
packaging the second page information to obtain a first updating module;
determining a first version number of the first update module based on a current version number in the first page information;
downloading a second updating module matched with the first version number based on the first version number;
and decompressing the second updating module to obtain the page data of the second page.
According to the method provided by the embodiment of the disclosure, the first updating module is obtained by packaging the second page information, the first version number of the first updating module is determined based on the current version number of the first page information, and the second updating module is downloaded based on the first version number, so that the downloaded second updating module meets the requirement of the first version number.
In another embodiment, the downloading, based on the first version number, a second update module that matches the first version number includes:
comparing the first version number of the first updating module with a second version number of at least one second updating module in the server;
and downloading a second updating module with a second version number higher than the first version number.
According to the method provided by the embodiment of the disclosure, the second version number of at least one second updating module in the server is obtained, the second updating module with the second version number higher than the first version number is obtained, the downloaded version of the second updating module is ensured to be higher than the first updating module, and the success rate of updating the application program is ensured.
In another embodiment, before decompressing the second update module to obtain the page data of the second page, the method further includes:
downloading configuration information of the first updating module, wherein the configuration information at least comprises first verification information used for verifying whether the second updating module is correct;
comparing first check information in the configuration information with second check information in the second updating module, and judging whether the first check information is consistent with the second check information, wherein the second check information is downloaded check information of the second updating module;
and if the first check information is consistent with the second check information, the step of decompressing the second updating module to obtain the page data of the second page is executed.
According to the method provided by the embodiment of the disclosure, the configuration information of the first updating module is downloaded, and the first check information in the configuration information of the first updating module is compared with the second check information of the second updating module, so that whether the downloaded second updating module is correct or not is determined, and the application program is ensured to be correctly updated.
In another embodiment, after downloading the second update module matching the first version number based on the first version number, the method further comprises:
when the second updating module starts downloading, starting downloading monitoring of the second updating module;
and when the second updating module finishes downloading, decompressing the second updating module to obtain the page data of the second page.
According to the method provided by the embodiment of the disclosure, the second updating module is monitored by downloading, so that the step of decompressing the second updating module to obtain the page data of the second page can be executed after the second updating module is monitored to be downloaded, and the updating efficiency of the application program updating is improved.
According to a second aspect of the embodiments of the present disclosure, there is provided an application updating apparatus, the apparatus including:
the acquisition module is configured to acquire second page information of a second page corresponding to a page identifier in a server based on the page identifier of a first page to be updated;
the downloading module is configured to download the page data of the second page based on the second page information if the first page information is inconsistent with the second page information;
and the loading module is configured to load the page data of the second page so as to complete the application program updating.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
the second page corresponding to the first page is obtained, whether the first page is updated or not is judged based on the second page, if the first page is updated, page data of the second page is downloaded and loaded, and updating of the application program is completed, so that a user can complete updating of the application program without manually downloading, a large amount of manpower and material resources are saved, and the intelligent performance is excellent.
In another embodiment, the download module comprises:
the packaging sub-module is configured to package the second page information to obtain a first updating module;
a determining sub-module configured to determine a first version number of the first update module based on a current version number in the first page information;
a download sub-module configured to download a second update module that matches the first version number based on the first version number determined by the determination sub-module;
and the decompression sub-module is configured to decompress the second updating module to obtain the page data of the second page.
In another embodiment, the download sub-module is configured to compare the first version number of the first update module with a second version number of at least one second update module in a server; and downloading a second updating module with a second version number higher than the first version number.
In another embodiment, the download module further comprises:
the downloading submodule is further configured to download configuration information of the first updating module, where the configuration information at least includes first verification information used for verifying whether the second updating module is correct;
the comparison sub-module is configured to compare first check information in the configuration information with second check information in the second updating module, and determine whether the first check information is consistent with the second check information, where the second check information is downloaded check information of the second updating module;
the decompression sub-module is further configured to perform the step of decompressing the second update module to obtain the page data of the second page if the comparison sub-module determines that the first check information is consistent with the second check information.
In another embodiment, the download module further comprises:
the monitoring submodule is configured to start downloading monitoring of the second updating module when the second updating module starts downloading;
the downloading submodule is further configured to, when the monitoring submodule monitors that the downloading of the second updating module is completed, execute a step of decompressing the second updating module to obtain the page data of the second page.
According to a third aspect of the embodiments of the present disclosure, there is provided an application updating apparatus, the apparatus including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to: acquiring second page information of a second page corresponding to a page identifier in a server based on the page identifier of a first page to be updated; if the first page information is inconsistent with the second page information, downloading page data of the second page based on the second page information; and loading the page data of the second page to finish the updating of the application program.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a flow diagram illustrating an application update method in accordance with an exemplary embodiment.
FIG. 2A is a flow diagram illustrating an application update method in accordance with an exemplary embodiment.
FIG. 2B is a schematic diagram illustrating an application update method according to an example embodiment.
FIG. 2C is a schematic diagram illustrating an application update method according to an example embodiment.
FIG. 2D is a schematic diagram illustrating an application update method in accordance with an exemplary embodiment.
FIG. 3A is a block diagram illustrating an application update apparatus according to an example embodiment.
FIG. 3B is a block diagram illustrating an application update apparatus according to an example embodiment.
FIG. 3C is a block diagram illustrating an application update apparatus according to an example embodiment.
FIG. 3D is a block diagram illustrating an application update apparatus according to an example embodiment.
FIG. 4 is a block diagram illustrating an application update apparatus 400 in accordance with an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
FIG. 1 is a flow chart illustrating a method for application update, as shown in FIG. 1, according to an exemplary embodiment, the method comprising the steps of:
in step 101, based on the page identifier of the first page to be updated, second page information of a second page corresponding to the page identifier is obtained in the server.
In step 102, if the first page information is inconsistent with the second page information, the page data of the second page is downloaded based on the second page information.
In step 103, the page data of the second page is loaded to complete the application update.
According to the method provided by the embodiment of the disclosure, the second page corresponding to the first page is obtained, whether the first page is updated or not is judged based on the second page, if the first page is updated, page data of the second page is downloaded and loaded, and the updating of the application program is completed, so that a user can complete the updating of the application program without manually downloading, a large amount of manpower and material resources are saved, and the intelligence is better.
In another embodiment, downloading the page data of the second page based on the second page information includes:
packaging the second page information to obtain a first updating module;
determining a first version number of the first updating module based on the current version number in the first page information;
downloading a second updating module matched with the first version number based on the first version number;
and decompressing the second updating module to obtain the page data of the second page.
In another embodiment, downloading, based on the first version number, a second update module that matches the first version number includes:
comparing the first version number of the first updating module with the second version number of at least one second updating module in the server;
and downloading a second updating module with a second version number higher than the first version number.
In another embodiment, before decompressing the second update module to obtain the page data of the second page, the method further includes:
downloading configuration information of the first updating module, wherein the configuration information at least comprises first verification information used for verifying whether the second updating module is correct;
comparing the first check information in the configuration information with the second check information in the second updating module, and judging whether the first check information is consistent with the second check information, wherein the second check information is the downloaded check information of the second updating module;
and if the first check information is consistent with the second check information, the step of decompressing the second updating module to obtain the page data of the second page is executed.
In another embodiment, after downloading the second update module matching the first version number based on the first version number, the method further comprises:
when the second updating module starts downloading, starting downloading monitoring of the second updating module;
and when the second updating module finishes downloading, decompressing the second updating module to obtain the page data of the second page.
All the above optional technical solutions may be combined arbitrarily to form the optional embodiments of the present disclosure, and are not described herein again.
FIG. 2A is a flow chart illustrating a method for application update, as shown in FIG. 2A, according to an exemplary embodiment, the method comprising the steps of:
in step 201, based on the page identifier of the first page to be updated, second page information of a second page corresponding to the page identifier is obtained in the server.
Applications are frequently updated in order to add new functionality, fix bugs, or improve security. When an application needs to be updated, pages in a new version of the application and pages in an old version of the application are different, so that only the different pages can be updated during updating, and the data transmission amount during updating is reduced. When the first page to be updated is determined, the determination may be performed according to the page identifier of each page of the application program, for example, whether the page identifier of each page has an update identifier is detected, and if a certain page identifier on the server side has an update identifier, the page is determined to be the first page. Of course, the glue may also be marked by using information such as a timestamp, for example, for the page identifier of each page, a timestamp of the page identifier stored on the server and a timestamp of the page identifier on the terminal side are detected, and if the timestamp on the server side is later than the timestamp on the terminal side, the page may be determined to be the first page. The page identifier may be a page name, a page tag, and the like of the first page. After the first page to be updated is determined, second page information of a second page in the application program of the version currently stored by the server may be acquired in the server according to the page identifier of the first page in the application program which has been downloaded currently. The second page information may be a page address URL (Uniform Resource Locator) of the second page, and the like.
It should be noted that, the process of determining the first page may be performed when the application program is started, and once the application program is started, a version number or the like of the application program may be queried to determine whether the application program has an update, and further, which page in the application program is the first page may be determined. Of course, the process of determining the first page may also be performed based on any page started by the application program when the application program starts the page a, for example, when the application program starts the page a, the page identifier of the page a and the application identifier of the application program are sent to the server, and the server determines whether the page a of the application program is the first page, which is not limited in what manner is specifically adopted to determine the first page.
For an application program, the application program comprises at least one page, and at least one page has first page information corresponding to the page, so that second page information corresponding to at least one page is stored in the server. When an administrator updates an application program or the server detects an updated application program, the server may delete page information of an old version of the application program, and store the page information of a new version of the application program in correspondence with a new version number of the application program, and of course, the server may compare the new version with the old version corresponding to the confirmation manner of the first page, so as to determine which page is updated, thereby adding an update identifier to the page identifier where the update occurs, so as to perform first page determination based on the update identifier, and may also add an update timestamp to the updated page identifier, so as to perform first page determination based on the timestamp.
In step 202, determining whether the second page information is consistent with the first page information of the first page, if so, executing the following step 203; if the second page information is not consistent with the first page information, the following step 204 is executed.
In the embodiment of the present disclosure, if it is determined that the second page information is consistent with the first page information, it represents that there is no update in the current page, and therefore the following steps 204 to 210 may not be executed any more, and the following step 203 may be directly executed; if it is determined that the second page information is inconsistent with the first page information, it represents that there is an update in the current page, so that the first page to be updated in the application program needs to be updated, that is, the following steps 204 to 210 are performed.
And when judging whether the second page information is consistent with the first page information, the application program acquires the stored second page information from the server according to the application identifier of the application program, and compares the second page information with the current first page information of the application program.
For example, for an application a, which includes page 1, page 2, page 3, and page 4, if the current first page information of page 1 is www.wer.1, the second page information of page 1 acquired in the server is www.wer.2; the current first page information of the page 2 is www.wet.1, and the second page information of the page 2 acquired in the server is www.wet.1; the current first page information of the page 3 is www.wey.1, and the second page information of the page 3 acquired in the server is www.wey.1; the current first page information of page 4 is www.weu.1, and the second page information of page 4 acquired in the server is www.weu.2, and the first page information of page 1 and page 4 is different from the second page information, which indicates that there is an update to page 1 and page 4 included in application a.
In step 203, if the second page information is consistent with the first page information, the application program is maintained in the current version, and the process is ended.
In the embodiment of the present disclosure, for an application, if the second page information of all the pages included in the application is consistent with the first page information, it represents that there is no update in the current application, and the application is maintained in the current version, and then the process is ended.
In step 204, if the second page information is inconsistent with the first page information, the second page information is encapsulated to obtain a first update module.
In the embodiment of the present disclosure, in order to avoid a situation of mismatch or a download error occurring when the page data of the second page is subsequently downloaded, the second page information may be packaged as the first update module, and the page data of the second page is downloaded based on the first update module. The first updating module includes a manifest file as shown in fig. 2B, in the manifest file, a module indicates a second updating module that needs to be downloaded for updating the application program, and since the second page information stored in the server has a version number corresponding thereto, the second updating module also has a version number corresponding thereto, and the version number of the second page information is consistent with the version number of the second updating module matching thereto. Because the current version of the application program may not be updated for a long time and then the application programs of multiple versions are missed, the application program needs to be updated to the next version first during updating, and so on until the application program of the current latest version is updated, so that the manifest file is provided with a minLevel attribute which represents the lowest version number which can be downloaded by the application program during updating and is higher than the current version number of the application program. For example, for the application program a, the current version is 3.1, and the server stores the second update modules with version numbers of 3.2, 3.3, and 3.4, respectively, then in the manifest file of the first update module of the application program a, the minLevel attribute needs to be set to 3.2.
Since the number of the first pages to be updated in the application program may be one or more, the number of the second page information of the second page matching the first page may also be one or more. Therefore, when the second page information is packaged, one second page information can be packaged into one first updating module to obtain a plurality of first updating modules; a plurality of second page information matched with a plurality of first pages to be updated in the application program can also be packaged in a first updating module.
In step 205, a first version number of the first update module is determined based on the current version number in the first page information.
In the embodiment of the present disclosure, the current version number of the application program is the current version number of the first page information, and thus the current version number is also the first version number when the version number of the first update module is determined.
In step 206, the first version number of the first update module is compared with the second version number of at least one second update module in the server, and the second update module with the second version number higher than the first version number is downloaded.
In this embodiment of the present disclosure, for an application program of a current version, at least one second update module may be stored in the server, and the application program needs to compare a first version number of the first update module with a second version number of the at least one second update module, obtain a second update module with the second version number higher than the first version number, and download the second update module, so as to ensure that an update content of the application program exists in the downloaded second update module. The second update module comprises a manifest file as shown in fig. 2C, in the manifest file, a name represents a module name of the second update module, a moduleContent attribute is content included in the module, and a dex represents that the second update module comprises a Java code; res represents that the second updating module comprises page resources; and lib represents that the native code is included in the second updating module.
In order to ensure the efficiency of updating the application program, the following step 207 can be executed after the second updating module finishes downloading, so that the following step one and step two can be executed in the application program, and the downloading monitoring of the second updating module is set.
Step one, when the second updating module starts downloading, starting the downloading monitoring of the second updating module.
Wherein, when the download listening to the second update module is started, the application program may transmit a callback interface to the server based on the code shown in fig. 2D. And after detecting that the second updating module is completely downloaded, the server sends a completion message to the application program through the callback interface, and the application program can continuously execute the following step two.
Step two, when it is monitored that the downloading of the second updating module is completed, the following step 207 is executed.
In step 207, downloading the configuration information of the first update module, comparing the first check information in the configuration information with the second check information in the second update module, and determining whether the first check information is consistent with the second check information, if the first check information is not consistent with the second check information, performing step 208; if the first check information is identical to the second check information, the following step 209 is performed.
During downloading, the module name of the first update module may be downloaded, and it should be noted that, during encapsulation of the first update module, the module identifier of the first update module may be obtained, so that during subsequent downloading, the module identifier may be downloaded based on the module identifier. The module identification may be a module name or other information that uniquely identifies the module.
In the embodiment of the present disclosure, the configuration information at least includes first verification information for verifying whether the second update module is correct, and the first verification information includes a download address, an MD5(Message Digest Algorithm, fifth version), and an application signature of the second update module; the second check information is the check information of the downloaded second updating module, and the second check information also comprises the download address, the MD5 value and the application signature of the second updating module.
In order to ensure that the downloaded second update module matches and is correct to the first update module, the first check information in the configuration information needs to be compared with the second check information included in the second update module, and if the first check information is completely consistent with the second check information, the steps 209 and 210 can be continued; if the first check information and the second check information are different, step 207 is executed. When the first check information is compared with the second check information, the download address of the second update module included in the first check information is compared with the download address of the second update module included in the second check information, and if the download address of the second update module included in the first check information is inconsistent with the download address of the second update module included in the second check information, it is determined that the downloaded second update module is not matched with the first update module or has an error, that is, the following step 208 is directly performed; if the download address of the second update module included in the first check information is consistent with the download address of the second update module included in the second check information, comparing the MD5 value included in the first check information with the MD5 value included in the second check information, and if the MD5 value included in the first check information is inconsistent with the MD5 value included in the second check information, determining that the downloaded second update module is not matched with the first update module or has an error, that is, directly performing the following step 208; if the MD5 value included in the first check information is consistent with the MD5 value included in the second check information, comparing the application signature included in the first check information with the application signature included in the second check information, and if the application signature included in the first check information is not consistent with the application signature included in the second check information, determining that the downloaded second update module is not matched with the first update module or an error occurs, that is, directly performing the following step 208; if the application signature included in the first verification information is identical to the application signature included in the second verification information, the downloaded second update module is determined to be correct, and the following steps 209 and 210 can be executed.
In step 208, if the first check information is not consistent with the second check information, the second update module is discarded, and the steps 201 to 207 are executed again.
In the embodiment of the present disclosure, if the first check information and the second check information are different, it indicates that the downloaded second update module may not match the first update module or an error occurs during downloading, and therefore, it is necessary to determine the second page information again and download the second update module again, that is, the above steps 201 to 207 are performed again.
In step 209, if the first check information is consistent with the second check information, the second update module is decompressed to obtain the page data of the second page.
In the embodiment of the present disclosure, if the first check information is consistent with the second check information, it indicates that the downloaded second update module is matched with the first update module and is correct, and the second update module is decompressed to obtain the page data of the second page. The page data is page code and page resources which are depended by the second page.
In step 210, the page data of the second page is loaded to complete the application update.
In the embodiment of the present disclosure, since the second update module includes the manifest file, the page data of the second page may be loaded through the moduleContent attribute of the manifest file, that is, the Java code of the second page is loaded through the dex; loading the page resource of the second page through res; loading a native code of a second page through lib; and after the loading is finished, the application program completes the updating, so that when the user opens the application program display page next time, the application program displays the page data of the second page loaded based on the second updating module, and the page displayed to the user is ensured to be the current latest page.
According to the method provided by the embodiment of the disclosure, the second page corresponding to the first page is obtained, whether the first page is updated or not is judged based on the second page, if the first page is updated, page data of the second page is downloaded and loaded, and updating of the application program is completed, so that the user can complete updating of the application program without manually downloading, a large amount of manpower and material resources are saved, and the method is excellent in intelligence.
In another embodiment, the first update module is obtained by encapsulating the second page information, the first version number of the first update module is determined based on the current version number of the first page information, and the second update module is downloaded based on the first version number, so that the downloaded second update module meets the requirement of the first version number.
In another embodiment, by obtaining the second version number of at least one second update module in the server, obtaining the second update module with the second version number higher than the first version number, it is ensured that the downloaded version of the second update module is higher than that of the first update module, and the success rate of the application program update is ensured.
In another embodiment, the configuration information of the first updating module is downloaded, and the first check information in the configuration information of the first updating module is compared with the second check information of the second updating module to determine whether the downloaded second updating module is correct, so as to ensure that the application program is correctly updated.
In another embodiment, the downloading monitoring is performed on the second updating module, so that the step of decompressing the second updating module to obtain the page data of the second page can be performed after the downloading of the second updating module is monitored, and the updating efficiency of the application program updating is improved.
FIG. 3A is a block diagram illustrating an application update apparatus according to an example embodiment. Referring to fig. 3A, the apparatus includes an acquisition module 301, a download module 302, and a load module 303.
The obtaining module 301 is configured to obtain, in the server, second page information of a second page corresponding to the page identifier, based on the page identifier of the first page to be updated.
The downloading module 302 is configured to download the page data of the second page based on the second page information if the first page information is inconsistent with the second page information.
The loading module 303 is configured to load the page data of the second page to complete the application update.
The device provided by the embodiment of the disclosure acquires the second page corresponding to the first page, judges whether the first page is updated or not based on the second page, and if the first page is updated, downloads and loads the page data of the second page to complete the updating of the application program, so that the user can complete the updating of the application program without manually downloading the application program, a large amount of manpower and material resources are saved, and the device is excellent in intelligence.
In another embodiment, referring to fig. 3B, the download module 302 includes a packaging sub-module 3021, a determination sub-module 3022, a download sub-module 3023, and a decompression sub-module 3024.
The encapsulation submodule 3021 is configured to encapsulate the second page information to obtain a first update module;
the determining sub-module 3022, configured to determine a first version number of the first update module based on the current version number in the first page information;
the download submodule 3023 configured to download, based on the first version number determined by the determination submodule, a second update module that matches the first version number;
the decompression sub-module 3024 is configured to decompress the second update module to obtain the page data of the second page.
In another embodiment, the download sub-module 3023 is configured to compare the first version number of the first update module with a second version number of at least one second update module in the server; and downloading a second updating module with a second version number higher than the first version number.
In another embodiment, referring to fig. 3C, the download module 302 further comprises a sub-module 3025.
The downloading sub-module 3023 is further configured to download configuration information of the first update module, where the configuration information at least includes first verification information for verifying whether the second update module is correct;
the comparison sub-module 3025 is configured to compare the first check information in the configuration information with the second check information in the second update module, and determine whether the first check information is consistent with the second check information, where the second check information is the check information of the downloaded second update module;
the decompressing sub-module 3024 is further configured to, if the comparing sub-module determines that the first check information is consistent with the second check information, perform the step of decompressing the second update module to obtain the page data of the second page.
In another embodiment, referring to fig. 3D, the download module 302 further includes a listening sub-module 3026.
The monitoring submodule 3026 is configured to start downloading monitoring for the second update module when the second update module starts downloading;
the downloading submodule 3023 is further configured to, when the monitoring submodule monitors that the downloading of the second updating module is completed, perform a step of decompressing the second updating module to obtain the page data of the second page.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
FIG. 4 is a block diagram illustrating an application update apparatus 400 in accordance with an example embodiment. For example, the apparatus 400 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 4, the apparatus 400 may include one or more of the following components: processing component 402, memory 404, power component 406, multimedia component 408, audio component 410, interface to I/O (Input/Output) 412, sensor component 414, and communication component 416.
The processing component 402 generally controls overall operation of the apparatus 400, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 402 may include one or more processors 420 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 402 can include one or more modules that facilitate interaction between the processing component 402 and other components. For example, the processing component 402 can include a multimedia module to facilitate interaction between the multimedia component 408 and the processing component 402.
The memory 404 is configured to store various types of data to support operations at the apparatus 400. Examples of such data include instructions for any application or method operating on the device 400, contact data, phonebook data, messages, pictures, videos, and so forth. The Memory 404 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as an SRAM (Static Random Access Memory), an EEPROM (Electrically-Erasable Programmable Read-Only Memory), an EPROM (Erasable Programmable Read-Only Memory), a PROM (Programmable Read-Only Memory), a ROM (Read-Only Memory), a magnetic Memory, a flash Memory, a magnetic disk, or an optical disk.
Power supply components 406 provide power to the various components of device 400. The power components 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 400.
The multimedia component 408 includes a screen that provides an output interface between the device 400 and the user. In some embodiments, the screen may include an LCD (Liquid Crystal Display) and a TP (Touch Panel). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 408 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the apparatus 400 is in an operation mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 410 is configured to output and/or input audio signals. For example, the audio component 410 may include a Microphone (MIC) configured to receive external audio signals when the device 400 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 404 or transmitted via the communication component 416. In some embodiments, audio component 410 also includes a speaker for outputting audio signals.
The I/O interface 412 provides an interface between the processing component 402 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 414 includes one or more sensors for providing various aspects of status assessment for the apparatus 400. For example, the sensor component 414 can detect the open/closed state of the device 400, the relative positioning of components, such as a display and keypad of the apparatus 400, the sensor component 414 can also detect a change in the position of the apparatus 400 or a component of the apparatus 400, the presence or absence of user contact with the apparatus 400, orientation or acceleration/deceleration of the apparatus 400, and a change in the temperature of the apparatus 400. The sensor assembly 414 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 414 may also include a light sensor, such as a CMOS (Complementary Metal Oxide Semiconductor) or CCD (Charge-coupled Device) image sensor, for use in imaging applications. In some embodiments, the sensor assembly 414 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 416 is configured to facilitate wired or wireless communication between the apparatus 400 and other devices. The apparatus 400 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 416 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the Communication component 416 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on an RFID (Radio Frequency Identification) technology, an IrDA (infrared-Data Association) technology, an UWB (Ultra Wideband) technology, a BT (Bluetooth) technology, and other technologies.
In an exemplary embodiment, the apparatus 400 may be implemented by one or more ASICs (Application Specific Integrated circuits), DSPs (Digital signal processors), DSPDs (Digital signal processing devices), PLDs (Programmable Logic devices), FPGAs (Field Programmable Gate arrays), controllers, microcontrollers, microprocessors or other electronic components for performing the above Application program update methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 404 comprising instructions, executable by the processor 420 of the apparatus 400 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a RAM (Random Access Memory), a CD-ROM (Compact Disc Read-Only Memory), a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium, wherein instructions of the storage medium, when executed by a processor of an application update apparatus, enable the application update apparatus to perform the application update method described above.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (7)

1. An application update method, the method comprising:
acquiring second page information of a second page corresponding to a page identifier in a server based on the page identifier of a first page to be updated;
if the first page information is inconsistent with the second page information, downloading page data of the second page based on the second page information;
loading the page data of the second page to complete the updating of the application program;
wherein the step of determining the first page to be updated comprises:
detecting whether a page identifier of each page of an application program has an update identifier, and if a certain page identifier on a server has an update identifier, determining that the page is a first page, wherein the update identifier is obtained by comparing new and old versions and adding the new and old versions to the updated page identifier when the server detects the updated application program;
the downloading the page data of the second page based on the second page information includes:
packaging the second page information to obtain a first updating module;
determining a first version number of the first update module based on a current version number in the first page information;
based on the first version number, download a second update module matched with the first version number, including: comparing the first version number of the first updating module with a second version number of at least one second updating module in the server; downloading a second updating module with a second version number higher than the first version number;
and decompressing the second updating module to obtain the page data of the second page.
2. The method of claim 1, wherein before decompressing the second update module to obtain the page data of the second page, the method further comprises:
downloading configuration information of the first updating module, wherein the configuration information at least comprises first verification information used for verifying whether the second updating module is correct;
comparing first check information in the configuration information with second check information in the second updating module, and judging whether the first check information is consistent with the second check information, wherein the second check information is downloaded check information of the second updating module;
and if the first check information is consistent with the second check information, the step of decompressing the second updating module to obtain the page data of the second page is executed.
3. The method of claim 1, wherein after downloading a second updated module that matches the first version number based on the first version number, the method further comprises:
when the second updating module starts downloading, starting downloading monitoring of the second updating module;
and when the second updating module finishes downloading, decompressing the second updating module to obtain the page data of the second page.
4. An application update apparatus, comprising:
the acquisition module is configured to acquire second page information of a second page corresponding to a page identifier in a server based on the page identifier of a first page to be updated;
the downloading module is configured to download the page data of the second page based on the second page information if the first page information is inconsistent with the second page information;
a loading module configured to load page data of the second page to complete the application program update;
wherein the step of determining the first page to be updated comprises:
detecting whether a page identifier of each page of an application program has an update identifier, and if a certain page identifier on a server has an update identifier, determining that the page is a first page, wherein the update identifier is obtained by comparing new and old versions and adding the new and old versions to the updated page identifier when the server detects the updated application program;
the download module comprises:
the packaging sub-module is configured to package the second page information to obtain a first updating module;
a determining sub-module configured to determine a first version number of the first update module based on a current version number in the first page information;
a download sub-module configured to download, based on the first version number determined by the determination sub-module, a second update module that matches the first version number, including: comparing the first version number of the first updating module with a second version number of at least one second updating module in the server; downloading a second updating module with a second version number higher than the first version number;
and the decompression sub-module is configured to decompress the second updating module to obtain the page data of the second page.
5. The apparatus of claim 4, wherein the download module further comprises:
the downloading sub-module is further configured to download configuration information of the first updating module based on a module name of the first updating module, where the configuration information at least includes first verification information for verifying whether the second updating module is correct;
the comparison sub-module is configured to compare first check information in the configuration information with second check information in the second updating module, and determine whether the first check information is consistent with the second check information, where the second check information is downloaded check information of the second updating module;
the decompression sub-module is further configured to perform the step of decompressing the second update module to obtain the page data of the second page if the comparison sub-module determines that the first check information is consistent with the second check information.
6. The apparatus of claim 4, wherein the download module further comprises:
the monitoring submodule is configured to start downloading monitoring of the second updating module when the second updating module starts downloading;
the downloading submodule is further configured to, when the monitoring submodule monitors that the downloading of the second updating module is completed, execute a step of decompressing the second updating module to obtain the page data of the second page.
7. An application program update apparatus, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to: acquiring second page information of a second page corresponding to a page identifier in a server based on the page identifier of a first page to be updated; if the first page information is inconsistent with the second page information, downloading page data of the second page based on the second page information; loading the page data of the second page to complete the updating of the application program; wherein the step of determining the first page to be updated comprises:
detecting whether a page identifier of each page of an application program has an update identifier, and if a certain page identifier on a server has an update identifier, determining that the page is a first page, wherein the update identifier is obtained by comparing new and old versions and adding the new and old versions to the updated page identifier when the server detects the updated application program;
the downloading the page data of the second page based on the second page information includes:
packaging the second page information to obtain a first updating module;
determining a first version number of the first update module based on a current version number in the first page information;
based on the first version number, download a second update module matched with the first version number, including: comparing the first version number of the first updating module with a second version number of at least one second updating module in the server; downloading a second updating module with a second version number higher than the first version number;
and decompressing the second updating module to obtain the page data of the second page.
CN201710204077.4A 2017-03-30 2017-03-30 Application program updating method and device Active CN107122174B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710204077.4A CN107122174B (en) 2017-03-30 2017-03-30 Application program updating method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710204077.4A CN107122174B (en) 2017-03-30 2017-03-30 Application program updating method and device

Publications (2)

Publication Number Publication Date
CN107122174A CN107122174A (en) 2017-09-01
CN107122174B true CN107122174B (en) 2021-06-01

Family

ID=59717492

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710204077.4A Active CN107122174B (en) 2017-03-30 2017-03-30 Application program updating method and device

Country Status (1)

Country Link
CN (1) CN107122174B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109726097A (en) * 2018-01-23 2019-05-07 平安普惠企业管理有限公司 Environment changing method, apparatus and electronic equipment
CN109445832A (en) * 2018-10-09 2019-03-08 深圳点猫科技有限公司 Language carries out the method and electronic equipment of hot update to application program based on programming

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103023941A (en) * 2011-09-26 2013-04-03 腾讯科技(深圳)有限公司 Terminal application program updating method and system based on Web page
CN105893607A (en) * 2016-04-25 2016-08-24 青岛海信传媒网络技术有限公司 Page data management method, device and data server

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100396132C (en) * 2005-12-16 2008-06-18 北京金山软件有限公司 Method for realizing programme update of wireless terminal
GB0612673D0 (en) * 2006-06-27 2006-08-09 Gems Tv Ltd Computer system
CN102497407B (en) * 2011-12-07 2015-04-01 宇龙计算机通信科技(深圳)有限公司 Terminal and server-based data updating method
CN103761115B (en) * 2013-11-30 2017-11-03 北京中启智源数字信息技术有限责任公司 A kind of method for realizing self upgrading of software
CN105404622B (en) * 2014-08-20 2019-10-18 阿里巴巴集团控股有限公司 A kind of customer terminal webpage display methods, apparatus and system
CN104834549B (en) * 2015-05-26 2018-06-22 广东小天才科技有限公司 The application file update method and device of mobile terminal

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103023941A (en) * 2011-09-26 2013-04-03 腾讯科技(深圳)有限公司 Terminal application program updating method and system based on Web page
CN105893607A (en) * 2016-04-25 2016-08-24 青岛海信传媒网络技术有限公司 Page data management method, device and data server

Also Published As

Publication number Publication date
CN107122174A (en) 2017-09-01

Similar Documents

Publication Publication Date Title
WO2016041312A1 (en) Application program running method and device
CN113110852A (en) Firmware upgrading method and device and storage medium
US20160077819A1 (en) Method and device for running application program
CN106851695B (en) Method, device and system for testing network speed
CN115185717B (en) Interface calling method and device, electronic equipment and storage medium
CN110839073A (en) Method for acquiring push information, method and device for sending push information
CN107122174B (en) Application program updating method and device
CN110852163A (en) Binding method and device
CN110865823B (en) Pre-installation application control method, pre-installation application control device and storage medium
CN104866349A (en) Application updating method and device
CN110209401B (en) Application program loading method and device
CN109885360B (en) Data processing method, device and storage medium
US10091236B2 (en) Methods apparatuses, and storage mediums for acquiring legitimate installation packages
CN112733092B (en) Information processing method and device
CN113885914A (en) Application program processing method and device, electronic equipment and storage medium
CN108011882B (en) Method, device and system for data synchronization
CN114489706A (en) Upgrading method, device and storage medium
CN110990073B (en) Method and device for verifying customization requirements of application program
CN111597106A (en) Point burying management method and device
CN106846050B (en) Method, device and system for sending display notification
CN111221559B (en) Application updating method, device, storage medium, terminal and server
CN107992333B (en) Theme acquisition method and device
CN113821244B (en) Offline package updating method, device, system, electronic equipment and storage medium
CN110311968B (en) Method and device for loading file in streaming mode and intelligent equipment
CN114416218B (en) Data processing method and device, electronic equipment and storage medium

Legal Events

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