A method and apparatus for updating a program

By detecting whether the server has revoked the published application version in the mobile terminal and deciding whether to install it, the problem of users automatically downloading the revoked version is solved and the user experience and system stability are improved.

CN111813429BActive Publication Date: 2024-10-01QINGDAO HISENSE MOBILE COMM TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010631269.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2016-12-13
Publication Date
2024-10-01
Estimated Expiration
2036-12-13

AI Technical Summary

Technical Problem

In mobile terminals, users may automatically download and install canceled application versions, resulting in poor user experience and making the problem difficult to control.

Method used

Detect the installation operation of the installation package on the mobile terminal and determine whether the server has revoked the release of the installation package of this version. If it has been revoked, the installation will be prohibited. Otherwise, it will be updated to ensure that only the unrevoked version is installed.

Benefits of technology

By detecting whether the server has revoked the release before installation, it avoids installing a revoked version, prevents the problem from amplifying, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111813429B_ABST
    Figure CN111813429B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a method and device for updating a program, which is applied in a mobile terminal, wherein the mobile terminal is installed with a first version of the program and stores an installation package of a second version of the program, wherein the method comprises: detecting an installation operation for the installation package; detecting whether the server has revoked the release of the second version of the installation package according to the installation operation; if so, prohibiting the installation of the installation package; if not, installing the installation package to update the program from the first version to the second version. By detecting whether the release is revoked before installation, thereby determining whether to install the installation package, it is possible to avoid installing a revoked version of the installation package, prevent the impact of the problematic version from being amplified, and improve the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of Chinese invention patent application 201611146429.7, filed on December 13, 2016, with the invention name “A method and device for updating a program”. Technical Field

[0002] The present invention relates to the field of communication technology, and in particular to a program updating method and a program updating device. Background Art

[0003] At present, with the rapid development of the Internet, network programs tend to be diversified. Especially with the large-scale popularization of mobile terminals, various operating systems and third-party applications (Application, App for short) such as instant messaging tools, e-mail, web browsers, etc. are widely used in all aspects of users' lives and work.

[0004] In actual use, operating systems and third-party applications often make functional improvements, and upgrade their versions to enhance user experience.

[0005] After a new version is released, if there are serious problems with the version, the version may be revoked and the release of the version may be stopped.

[0006] However, during the period from release to withdrawal, some mobile terminal applications connected to Wi-Fi (Wireless Fidelity) automatic download strategy, downloaded through other channels, etc., and had already downloaded this version of the installation package. Users were unaware that this version had problems and had been withdrawn, and they continued to upgrade, causing the impact of the problematic version to be magnified and resulting in a poor user experience. Summary of the invention

[0007] In view of the above problems, in order to solve the problem of amplified impact caused by installing a revoked installation package, an embodiment of the present invention proposes a program updating method and a corresponding program updating device.

[0008] In order to solve the above problem, an embodiment of the present invention discloses a method for updating a program, which is applied in a mobile terminal, wherein the mobile terminal has a first version of the program installed and stores an installation package of a second version of the program, and the method comprises:

[0009] Detecting an installation operation on the installation package;

[0010] Detecting, according to the installation operation, whether the server has revoked the release of the second version of the installation package;

[0011] If so, prohibit installation of the installation package; if not, install the installation package to update the program from the first version to the second version.

[0012] The embodiment of the present invention further discloses a program update device, which is applied in a mobile terminal, wherein the mobile terminal is installed with a first version of the program and stores an installation package of a second version of the program, wherein the device comprises an installation operation detection module, a version revocation judgment module, an installation package prohibition module, and an installation package installation module:

[0013] The installation operation detection module is used to detect the installation operation for the installation package;

[0014] The version revocation judgment module is used to detect whether the server has revoked the release of the second version of the installation package according to the installation operation; if so, call the installation package installation prohibition module; if not, call the installation package installation module;

[0015] The installation package installation prohibition module is used to prohibit the installation of the installation package;

[0016] The installation package installation module is used to install the installation package to update the program from the first version to the second version.

[0017] The embodiments of the present invention include the following advantages:

[0018] In an embodiment of the present invention, a mobile terminal is installed with a first version of a program and stores an installation package of a second version of the program. If an installation operation of the installation package in the mobile terminal is detected, it can be detected whether the server has revoked the release of the second version of the installation package. If not, the installation of the installation package is prohibited. Otherwise, the installation package is installed to update the program from the first version to the second version. Since the problematic version will revoke the installation package, by detecting whether the release is revoked before installation, thereby deciding whether to install the installation package, it is possible to avoid installing the revoked version of the installation package, prevent the impact of the problematic version from being amplified, and improve user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 is a flowchart of steps of an embodiment of a program updating method of the present invention;

[0020] Figure 2 is a flowchart of another embodiment of a program updating method of the present invention;

[0021] Figure 3 is a flowchart of another embodiment of a program updating method of the present invention;

[0022] Figure 4 It is a structural block diagram of an embodiment of a program updating method and device of the present invention;

[0023] Figure 5It is a structural block diagram of another program updating method device embodiment of the present invention. DETAILED DESCRIPTION

[0024] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0025] Reference Figure 1 , shows a flowchart of a method for updating a program according to an embodiment of the present invention, which may specifically include the following steps:

[0026] Step 101: Detect the installation operation for the installation package.

[0027] Step 102, based on the installation operation, detect whether the server has revoked the release of the second version of the installation package; if so, execute step 103, if not, execute step 104.

[0028] Step 103: prohibiting the installation package from being installed.

[0029] Step 104: Install the installation package to update the program from the first version to the second version.

[0030] In a specific implementation, the embodiments of the present invention may be applied in mobile terminals, such as mobile phones, tablet computers, personal digital assistants, wearable devices (such as glasses, watches, etc.), and the like.

[0031] In the embodiment of the present invention, the mobile terminal has a first version of the program installed and stores an installation package of a second version of the program.

[0032] It should be noted that the program may be an operating system, or a third-party application (App) installed on the operating system, and the embodiment of the present invention is not limited to this.

[0033] When the program is an operating system, the first version is higher or lower than the second version.

[0034] If the first version is higher than the second version, then after installing the installation package of the second version, the operating system can be downgraded; if the first version is lower than the second version, after installing the installation package of the second version, the operating system can be upgraded.

[0035] Due to some limitations of the operating system, when the program is a third-party application, the first version is generally lower than the second version. If the first version is higher than the second version, the installation is generally prohibited.

[0036] The operating systems of these mobile terminals may include Android, IOS, Windows Phone, Windows, etc.

[0037] In order to enable those skilled in the art to better understand the embodiments of the present invention, in this specification, Android is used as an example of an operating system for explanation.

[0038] The server can provide a differential mechanism, such as Google diff arithmetic, so the installation package can support full images and differential images.

[0039] The whole package may be generated based on the program files of the second version, and installing the whole package may directly install the program of the second version.

[0040] The differential package can be generated based on the difference file between the first version of the program file and the second version of the program file. On the basis of the first version of the program file, the program file is modified, replaced, added, etc. according to the differential package to complete the installation of the second version of the program.

[0041] In a specific implementation, when a user starts a program, if an installation package is detected, an update prompt message may be generated. If the user confirms the update by clicking a control in the prompt message, it is confirmed that an installation operation for the installation package has been detected.

[0042] Of course, in addition to the prompt information, the installation operation for the installation package can also be detected by other means. For example, for a third-party application, a broadcast receiver can be registered to receive the installation broadcast "android.intent.action.PACKAGE_ADDED". If the installation broadcast is monitored, it can be confirmed that the installation operation for the installation package is detected, and so on. The embodiments of the present invention are not limited to this.

[0043] In the embodiment of the present invention, if the installation operation of the second version of the installation package is detected, it can be detected before the installation whether the server has revoked the release of the second version of the installation package.

[0044] In one approach, it can be determined whether the server has published an update policy from the first version to the second version; if so, it is determined that the server has not revoked the release of the second version installation package; if not, it is determined that the server has revoked the release of the second version installation package.

[0045] In another way, it can be determined whether the server currently publishes the second version of the installation package; if so, it is determined that the server has not revoked the release of the second version of the installation package; if not, it is determined that the server has revoked the release of the second version of the installation package.

[0046] Of course, the above-mentioned detection method of revoking a release is only used as an example. When implementing the embodiment of the present invention, other detection methods of revoking a release may be set according to actual conditions, and the embodiment of the present invention does not limit this. In addition, in addition to the above-mentioned detection method of revoking a release, those skilled in the art may also adopt other detection methods of revoking a release according to actual needs, and the embodiment of the present invention does not limit this.

[0047] If the server does not revoke the release of the second version installation package, it means that the second version generally does not have a serious problem, and the installation package can be installed to update the program from the first version to the second version.

[0048] If the server has revoked the release of the second version of the installation package, it means that the second version may have more serious problems and has been revoked. The user can be prompted that there is a problem with the second version and the user is advised to prohibit or prohibit the installation of the installation package on his own to avoid the expansion of the problem.

[0049] In an embodiment of the present invention, a mobile terminal is installed with a first version of a program and stores an installation package of a second version of the program. If an installation operation of the installation package in the mobile terminal is detected, it can be detected whether the server has revoked the release of the second version of the installation package. If not, the installation of the installation package is prohibited. Otherwise, the installation package is installed to update the program from the first version to the second version. Since the problematic version will revoke the installation package, by detecting whether the release is revoked before installation, thereby deciding whether to install the installation package, it is possible to avoid installing the revoked version of the installation package, prevent the impact of the problematic version from being amplified, and improve user experience.

[0050] Reference Figure 2 , shows a flowchart of another program update method embodiment of the present invention, which is applied in a mobile terminal, the mobile terminal has a first version of the program installed, and stores an installation package of a second version of the program, and specifically may include the following steps:

[0051] Step 201: Detect the installation operation for the installation package.

[0052] Step 202: Detect the update policy of the program issued by the server according to the installation operation.

[0053] In an embodiment of the present invention, the server is the official server that publishes the program. Since the program may have multiple versions, version 01, version 02, version 03, and version 04, not all versions can be directly upgraded. Therefore, in addition to publishing the installation packages of each version of the program, the server also publishes the update policy of the program. The update policy includes information on updating from the source version to the target version, such as the update policy indicating upgrading from version 01 to version 02, and from version 02 to 03.

[0054] Of course, if the installation package of the second version is a universal installation package, any version of the first version can be updated to the second version by installing the universal installation package, and the embodiment of the present invention does not limit this.

[0055] If a version has serious problems, such as crashes or malfunctions, the installation package of that version and the upgrade strategy to that version will generally be revoked and the release will stop.

[0056] In a specific implementation, since different mobile terminals are adapted to different programs, the first version (characterized by version information) and the terminal information of the mobile terminal may be sent to the server.

[0057] An update policy returned by the receiving server that uses the first version as the source version and matches the terminal information is received.

[0058] For the operating system, the terminal information may be the terminal model, IMEI (International Mobile Equipment Identity), etc. Some versions of the operating system are restricted to be installed in certain types (terminal models) of mobile terminals or even certain specific (IMEI) mobile terminals.

[0059] For example, the operating system of the mobile terminal has four versions, 6.10.20, 6.10.27, 6.11.3, and 6.11.10. If the first version of the operating system of the mobile terminal is 6.10.27, the update strategy is:

[0060] 1. Downgrade from 6.10.27 to 6.10.20

[0061] 2. Upgrade from 6.10.27 to 6.11.3

[0062] 3. Upgrade from 6.10.27 to 6.11.10

[0063] If it is found that 6.11.10 has serious problems, 6.11.10 will be revoked, and at the same time, the update policy for upgrading from 6.10.27 to 6.11.10 will be revoked. Therefore, after the first version 6.10.27 and the terminal information of the mobile terminal are sent to the server, the update policies returned by the server are all update policies with 6.10.27 as the source version and matching the terminal information, that is, the update policies for downgrading from 6.10.27 to 6.10.20 and upgrading from 6.10.27 to 6.11.3.

[0064] For third-party applications, the terminal information may include terminal model, system version, etc. Some versions of third-party applications are restricted to be installed in mobile terminals of certain types (terminal models) and mobile terminals of certain system environments (system versions).

[0065] Step 203 , determining whether there is an update policy for updating from the first version to the second version; if so, executing step 204 ; if not, executing step 205 .

[0066] Step 204 , determining that the server has not revoked the release of the second version of the installation package, and then executing step 206 .

[0067] Step 205 , determining that the server has revoked the release of the second version of the installation package, and then executing step 207 .

[0068] In the embodiment of the present invention, the update strategy includes information about updating from a source version to a target version.

[0069] If the server publishes an update policy for updating from the first version to the second version, it is determined that the server has not revoked publishing of the installation package of the second version.

[0070] If the server has not published an update policy for updating from the first version to the second version, it is determined that the server has revoked publishing of the installation package of the second version.

[0071] In a specific implementation, it can be determined whether the source version is the first version and whether the target version is the second version.

[0072] If so, it is determined that there is an update strategy from the first version to the second version.

[0073] If not, it is determined that there is no update policy for updating from the first version to the second version.

[0074] Step 206: Install the installation package to update the program from the first version to the second version.

[0075] If there is an update policy for updating from the first version to the second version, it means that the second version generally does not have a serious problem, and the installation package can be installed to update the program from the first version to the second version.

[0076] For the operating system, you can verify the downloaded installation package. After the verification is successful, restart and enter the Recovery mode to update.

[0077] For third-party applications, you can copy the APK installation package to the data / app directory, decompress and scan the installation package, save the dex file (Dalvik bytecode) to the dalvik-cache directory, and create a corresponding application data directory in the data / data directory.

[0078] In one embodiment of the present invention, in order to ensure the authenticity of the installation package, on the one hand, the first installation package information of the installation package can be extracted. The first installation package information can be the information attached when downloaded from the server, or it can be directly extracted from the installation package. The embodiment of the present invention is not limited to this.

[0079] On the other hand, the second installation package information of the target version may be downloaded from the server. The second installation package information may be downloaded from the server separately or returned together with the installation package information of the target version in step 202. This is not limited in the embodiment of the present invention.

[0080] Determine whether the first installation package information is the same as the second installation package information.

[0081] In one example, the first installation package information includes one or more of the following:

[0082] Version number, name, size.

[0083] The second installation package information includes one or more of the following:

[0084] Version number, name, size.

[0085] When determining whether the first installation package information is identical to the second installation package information, it can be determined whether the first installation package information and the second installation package information of the same type are identical. If all the information is identical, it can be considered that the first installation package information is identical to the second installation package information. If at least one piece of information is different, it can be considered that the first installation package information and the second installation package information are different.

[0086] If the first installation package information is the same as the second installation package information, it means that the local installation package is consistent with the installation package in the server and the installation package can be installed.

[0087] If the first installation package information is different from the second installation package information, it means that the local installation package is inconsistent with the installation package in the server, and there is an official modification of the server installation package or a third party modification of the local installation package, etc., and the installation of the installation package can be prohibited.

[0088] If the installation package is prohibited from being installed, the user may be prompted to delete the installation package or the installation package may be automatically deleted to prevent the installation package from occupying storage space of the mobile terminal.

[0089] In addition, the version information of the latest version of the program can be downloaded from the server, and the version information can be used to generate upgrade prompt information, such as JSON (JavaScript Object Notation, a lightweight data exchange format) object, to prompt users to upgrade the program to the latest version.

[0090] When a confirmation operation for the upgrade prompt information is detected, such as the user clicking a control such as confirmation or upgrade, the latest version of the installation package can be downloaded from the server for upgrading.

[0091] Of course, this upgrade can be performed in accordance with the update method of the embodiment of the present invention. Under the condition that the program is directly upgraded, the upgrade can also be performed without following the update method of the embodiment of the present invention. The embodiment of the present invention does not impose any restrictions on this.

[0092] Step 207: prohibiting the installation package from being installed.

[0093] If there is no update strategy from the first version to the second version, it means that the second version may have more serious problems and has been revoked. The user can be prompted that there is a problem with the second version and the user is advised to prohibit or prohibit the installation of the installation package by himself to avoid the expansion of the problem.

[0094] Likewise, if the installation package is prohibited from being installed, the user may be prompted to delete the installation package or the installation package may be automatically deleted to prevent the installation package from occupying storage space of the mobile terminal.

[0095] In addition, the version information of the latest version of the program can be downloaded from the server, and the version information is used to generate upgrade prompt information, such as a JSON object, to prompt the user to upgrade the program to the latest version.

[0096] When a confirmation operation for the upgrade prompt information is detected, such as the user clicking a control such as confirmation or upgrade, the latest version of the installation package can be downloaded from the server for upgrading.

[0097] Of course, this upgrade can be performed in accordance with the update method of the embodiment of the present invention. In the case of ensuring that the program is directly upgraded, it can also be performed without following the update method of the embodiment of the present invention. The embodiment of the present invention does not limit this. In the embodiment of the present invention, the mobile terminal is installed with a first version of the program, and stores an installation package of a second version of the program. If the installation operation of the installation package in the mobile terminal is detected, the update policy of the program published by the server can be detected. If the server publishes an update policy for updating from the first version to the second version, the installation package is installed to update the program from the first version to the second version. Otherwise, the installation of the installation package is prohibited. Since the problematic version will revoke the release of the installation package and the update policy, therefore, by detecting whether there is an update policy for updating from the first version to the second version before installation, thereby deciding whether to install the installation package, it is possible to avoid installing the installation package of the revoked version, prevent the expansion of the impact of the problematic version, and improve the user experience.

[0098] Reference Figure 3 , shows a flowchart of another program update method embodiment of the present invention, which is applied in a mobile terminal, the mobile terminal has a first version of the program installed, and stores an installation package of a second version of the program, and specifically may include the following steps:

[0099] Step 301: Detect the installation operation for the installation package.

[0100] Step 302: When it is detected that the mobile terminal is not connected to the network, a network request for a certain network is added to the data card of the mobile terminal.

[0101] Step 303: When the request to add the network is completed, connect to the network.

[0102] Step 304: When the network is successfully connected, an interface of the network is added to the process currently updating the program to allow the process to access the network.

[0103] The mobile terminal needs to be connected to the Internet when detecting update policies from the server, downloading the second version information of the target version, downloading the latest version information, downloading the latest version installation package, etc. If the mobile terminal is detected to be connected to the Internet, such as connecting to Wi-Fi or turning on mobile network data, these operations can be performed directly.

[0104] If the mobile terminal is not connected to the Internet, you can force dial-up to perform these operations.

[0105] In the Android system, you can add a network at the framework (application framework) layer, such as the networks of operators such as China Mobile, China Unicom, and China Telecom.

[0106] Add (build) the network request networkrequest of this network with the identifier of a data card (such as subId), and set the callback function networkCallback.

[0107] The data card includes a SIM (Subscriber Identity Module) card, a USIM (Universal Subscriber Identity Module), etc. The selected data card is generally the primary card. Of course, the user can also specify a data card to use.

[0108] After adding, directly request the network. If the request is successful, the network interface will be added to the current process in the callback function networkCallback. Its implementation is bindProcessToNetwork(network), where network is the network interface.

[0109] In this way, only this process is allowed to use this network, and other processes cannot use this network.

[0110] Step 305 , based on the installation operation, detect whether the server has revoked the release of the second version of the installation package; if so, execute step 306 ; if not, execute step 307 .

[0111] In the embodiment of the present invention, the process may access the server through the network to detect whether the server has revoked the release of the second version of the installation package.

[0112] Step 306: prohibiting the installation package from being installed.

[0113] In the embodiment of the present invention, if the installation package is prohibited from being installed, the process can access the server through the network to download the latest version of the version information, download the latest version of the installation package, and so on.

[0114] Step 307: Install the installation package to update the program from the first version to the second version.

[0115] In an embodiment of the present invention, the process may access the server through a network to download the second version information of the target version, so as to verify it with the first version information of the installation package stored in the mobile terminal and decide whether to install the installation package.

[0116] Step 308: When a preset shutdown condition is met, shut down the network.

[0117] In the embodiment of the present invention, a closing condition may be set in advance for the network. If the closing condition is met, the network is closed to avoid occupying resources.

[0118] In one example, the closing condition may include one or more of the following:

[0119] Check whether the release is undo, update is complete, or update is prohibited.

[0120] It should be noted that detecting the completion of the revocation of the release may refer to determining whether the server has revoked the release of the second version of the installation package, completing the update may refer to installing the second version of the installation package in the mobile terminal, or installing the latest version of the installation package downloaded from the server, and stopping the update may refer to prohibiting the installation of the second version of the installation package in the mobile terminal, canceling the latest version of the installation package downloaded from the server, and so on.

[0121] Optionally, after step 305, after the mobile terminal obtains the update policy and second version information released by the server, step 308 can be executed to shut down the network. After prohibiting the installation of the installation package, the user can be prompted to connect to the network to download the latest version of the version information and the latest version of the installation package through the network to which the user is connected.

[0122] Of course, in order to protect the user's privacy and right to know, you can first check whether the user of the mobile terminal has joined the designated plan. If so, it is confirmed that the user of the mobile terminal has authorized forced dial-up Internet access, and the mobile terminal can continue to execute operations such as detecting update policies from the server, downloading the second version information of the target version, downloading the latest version information, and downloading the latest version installation package. If the user of the mobile terminal has not joined the execution plan, it is confirmed that the user of the mobile terminal has not authorized forced dial-up Internet access, and the mobile terminal terminates the execution of operations such as detecting update policies from the server, downloading the second version information of the target version, downloading the latest version information, and downloading the latest version installation package.

[0123] The designated plan may include but is not limited to a user experience plan initiated by the platform to which the program belongs, and the like.

[0124] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0125] Reference Figure 4, shows a structural block diagram of an embodiment of a program update device of the present invention, which is applied in a mobile terminal, the mobile terminal has a first version of the program installed, and stores an installation package of a second version of the program, the device may specifically include the following installation operation detection module 401, version revocation judgment module 402, installation package installation prohibition module 403 and installation package installation module 404:

[0126] The installation operation detection module 401 is used to detect the installation operation for the installation package;

[0127] The version revocation judgment module 402 is used to detect whether the server has revoked the release of the second version of the installation package according to the installation operation; if so, the installation package installation prohibition module 403 is called; if not, the installation package installation module 404 is called;

[0128] The installation package installation prohibition module 403 is used to prohibit the installation of the installation package;

[0129] The installation package installation module 404 is used to install the installation package to update the program from the first version to the second version.

[0130] In one embodiment of the present invention, the version revocation judgment module 402 includes an update strategy detection submodule, an update strategy judgment submodule, a non-revocation judgment submodule, and a revoked judgment submodule:

[0131] The update policy detection submodule is used to detect the update policy of the program released by the server according to the installation operation;

[0132] The update strategy determination submodule is used to determine whether there is an update strategy from the first version to the second version; if so, the non-revoked determination submodule is called, and if not, the revoked determination submodule is called;

[0133] The non-revocation determination submodule is used to determine whether the server has not revoked the release of the second version of the installation package;

[0134] The revoked determination submodule is used to determine whether the server has revoked the release of the second version of the installation package.

[0135] In one embodiment of the present invention, the update strategy includes information updated from a source version to a target version;

[0136] The update strategy detection submodule includes:

[0137] A request parameter sending unit, configured to send the first version and the terminal information of the mobile terminal to a server;

[0138] An update policy receiving unit is used to receive an update policy returned by the server, which takes the first version as a source version and matches the terminal information.

[0139] In one embodiment of the present invention, the update strategy includes information updated from a source version to a target version;

[0140] The update strategy determination submodule includes a version determination unit, a first determination unit and a second determination unit:

[0141] The version determination unit is used to determine whether the source version is the first version and whether the target version is the second version; if so, the first determination unit is called, and if not, the second determination unit is called;

[0142] The first determining unit is used to determine an update strategy for updating from the first version to the second version;

[0143] The second determining unit is used to determine that there is no update strategy for updating from the first version to the second version.

[0144] In one embodiment of the present invention, the installation package installation module 404 includes a first installation package information extraction submodule, a second installation package information download submodule, an installation package information judgment submodule, an installation submodule, and a prohibition installation submodule:

[0145] The first installation package information extraction submodule is used to extract the first installation package information of the installation package;

[0146] The second installation package information downloading submodule is used to download the second installation package information of the target version from the server;

[0147] The installation package information determination submodule is used to determine whether the first installation package information is the same as the second installation package information; if so, the installation submodule is called; if not, the installation prohibition submodule is called;

[0148] The installation submodule is used to install the installation package;

[0149] The prohibition of installation submodule is used to prohibit the installation of the installation package.

[0150] In an example of an embodiment of the present invention, the first installation package information includes one or more of the following:

[0151] Version number, name, size;

[0152] The second installation package information includes one or more of the following:

[0153] Version number, name, size.

[0154] In one embodiment of the present invention, the device further includes the following modules:

[0155] An installation package deletion module, used to delete the installation package;

[0156] and / or,

[0157] A version information download module, used to download the version information of the latest version of the program from the server;

[0158] An upgrade prompt information generation module, used to generate upgrade prompt information using the version information;

[0159] The installation package downloading module is used to download the latest version of the installation package from the server for upgrading when a confirmation operation for the upgrade prompt information is detected.

[0160] In a specific implementation, when the program is an operating system, the first version is higher or lower than the second version;

[0161] When the program is a third-party application, the first version is lower than the second version.

[0162] Reference Figure 5 , shows a structural block diagram of another embodiment of a program update device of the present invention, which is applied in a mobile terminal, the mobile terminal has a first version of the program installed, and stores an installation package of a second version of the program, and the device may specifically include the following installation operation detection module 501, network request adding module 502, network connection module 503, network interface adding module 504, version revocation judgment module 505, installation package installation prohibition module 506, installation package installation module 507 and network closing module 508:

[0163] The installation operation detection module 501 is used to detect the installation operation for the installation package;

[0164] The network request adding module 502 is used to add a network request of a certain network to the data card of the mobile terminal when it is detected that the mobile terminal is not connected to the network;

[0165] The network connection module 503 is used to connect to the network when the request to add the network is completed;

[0166] The network interface adding module 504 is used to add the network interface to the process currently updating the program when the network is successfully connected, so as to allow the process to access the network;

[0167] The version revocation judgment module 505 is used to detect whether the server has revoked the release of the second version of the installation package according to the installation operation; if so, the installation package installation prohibition module 506 is called; if not, the installation package installation module 507 is called;

[0168] The installation package installation prohibition module 506 is used to prohibit the installation of the installation package;

[0169] The installation package installation module 507 is used to install the installation package to update the program from the first version to the second version;

[0170] The network closing module 508 is used to close the network when a preset closing condition is met.

[0171] In a specific implementation, the closing condition may include one or more of the following:

[0172] Check whether the release is undo, update is complete, or update is prohibited.

[0173] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0174] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0175] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0176] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0177] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0178] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0179] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0180] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0181] The above is a detailed introduction to a program updating method and a program updating device provided by the present invention. The principles and implementation methods of the present invention are explained in detail through specific examples in this article. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and program scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A method for updating a program, characterized in that: The method is applied in a mobile terminal, the mobile terminal is installed with a program whose source version is a first version, and stores an installation package upgraded from the source version to a second version, and the method includes: An installation package for software updates is detected; If the installation operation of the second version of the installation package is detected, it can be detected whether the server has revoked the release of the second version of the installation package before the installation; If the server has revoked the release of the second version of the installation package, it means that the second version may have a more serious problem, and the user may be prompted that there is a problem with the second version, and the user is advised to prohibit or prohibit the installation of the installation package by himself; Download the latest version information of the program from the server, and use the version information to generate upgrade prompt information to prompt the user to upgrade the program to the latest version; When a confirmation operation for the upgrade prompt information is detected, the latest version of the installation package can be downloaded from the server for upgrading.

2. The method according to claim 1, characterized in that The step of detecting an installation package with a software update comprises: Sending the first version and the terminal information of the mobile terminal to a server; An update policy returned by the server is received, which takes the first version as a source version and matches the terminal information.

3. The method according to claim 2, characterized in that The update strategy includes information about updating from a source version to a target version; Determine whether the source version is the first version and whether the target version is the second version; If so, determining that there is an update strategy from the first version to the second version; If not, it is determined that there is no update policy for updating from the first version to the second version, and prompt information for updating from the source version to the target version is displayed.

4. The method according to claim 1, characterized in that: The method further comprises: When it is detected that the mobile terminal is not connected to the network, adding a network request for a certain network to the data card of the mobile terminal; When the request to add the network is completed, connecting to the network; When the network is successfully connected, an interface of the network is added to the process currently updating the program to allow the process to access the network.

5. A program updating device, characterized in that: Applied in mobile terminals, The mobile terminal is installed with a program whose source version is a first version, and stores an installation package upgraded from the source version to a second version; The mobile terminal detects an installation package for a software update; If the installation operation of the second version of the installation package is detected, it can be detected whether the server has revoked the release of the second version of the installation package before the installation; If the server has revoked the release of the second version of the installation package, it means that the second version may have a more serious problem, and the user may be prompted that there is a problem with the second version, and the user is advised to prohibit or prohibit the installation of the installation package by himself; Download the latest version information of the program from the server, and use the version information to generate upgrade prompt information to prompt the user to upgrade the program to the latest version; When a confirmation operation for the upgrade prompt information is detected, the latest version of the installation package can be downloaded from the server for upgrading.

6. The device according to claim 5, characterized in that Also includes: Update strategy detection submodule, including: A request parameter sending unit, configured to send the first version and the terminal information of the mobile terminal to a server; An update policy receiving unit is used to receive an update policy returned by the server, which takes the first version as a source version and matches the terminal information.