Disclosure of Invention
The invention provides an application upgrading method and device, and aims to improve the fault tolerance of the application upgrading method and improve the success rate of application upgrading.
In order to solve the above technical problem, the present invention provides an application upgrading method, including:
if the new version application is detected to exist, downloading an upgrade package which upgrades the local application into the new version application through a first downloading channel;
if the downloading through the first downloading channel fails, downloading the upgrade package through a second downloading channel;
and running the upgrade package to upgrade the local application into the new version application.
Optionally, the downloading the upgrade package through a second download channel includes:
skipping to a browser interface corresponding to the second download channel, wherein a download link corresponding to the upgrade package is displayed on the browser interface;
downloading the upgrade package in response to a triggering event for the download link.
Optionally, the downloading the upgrade package through a second download channel further includes:
displaying prompt information about downloading of the upgrade package through a second download channel; and
jumping to a browser interface corresponding to the second download channel comprises the following steps:
and responding to the confirmation event aiming at the prompt information, and jumping to a browser interface corresponding to the second downloading channel.
Optionally, the method further comprises:
sending failure information about downloading the upgrade package through the first downloading channel to a server side, so that the server side carries out downloading channel configuration on the upgrade package according to the failure information;
receiving configuration information issued by the server after the downloading channel configuration is completed;
and downloading the upgrade package through a second download channel, including:
and downloading the upgrade package through the second download channel indicated by the configuration information.
Optionally, the method further comprises:
sending upgrade verification information to a server, wherein the upgrade verification information carries the identification of the local application;
receiving remote version information corresponding to the local application fed back by the server according to the identification;
comparing the current version information of the local application with the remote version information;
and if the current version information is lower than the remote version information, detecting that the new version application exists.
In order to solve the above technical problem, the present invention further provides an application upgrading apparatus, including:
the first downloading module is used for downloading and upgrading the local application into an upgrading package corresponding to the new version application through a first downloading channel if the new version application is detected to exist;
the second downloading module is used for downloading the upgrading package through a second downloading channel if the downloading through the first downloading channel fails;
and the upgrading module is used for operating the upgrading package to upgrade the local application into the new version application.
The technical scheme provided by the embodiment of the invention is that a download channel is additionally arranged on the basis of an application program self-download channel, when the application program self-download channel can not normally download the application program upgrade package, the additionally arranged download channel is started to download the upgrade package so as to ensure the normal upgrade of the application program, and a user does not need to search a corresponding installation package on a designated application market or official website, download and re-install the corresponding installation package to finish the upgrade of the application program. By the method, the fault tolerance of the application program upgrading method is effectively improved, and the success rate of application program upgrading is improved.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, and "a" and "an" generally include at least two, but do not exclude at least one, unless the context clearly dictates otherwise.
It should be understood that the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
It should be understood that although the terms first, second, third, etc. may be used to describe XXX in embodiments of the present invention, these XXX should not be limited to these terms. These terms are only used to distinguish XXX from each other. For example, a first XXX may also be referred to as a second XXX, and similarly, a second XXX may also be referred to as a first XXX, without departing from the scope of embodiments of the present invention.
The words "if", as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to a monitoring", depending on the context. Similarly, the phrase "if it is determined" or "if it is monitored (a stated condition or event)" may be interpreted as "when determining" or "in response to determining" or "when monitoring (a stated condition or event)" or "in response to monitoring (a stated condition or event)", depending on the context.
It is also noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a good or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such good or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a commodity or system that includes the element.
Fig. 1 is a schematic flowchart of an application upgrade method according to an embodiment of the present invention. As shown in fig. 1, the method includes:
101. and if the new version application is detected to exist, downloading the local application to be the upgrading package corresponding to the new version application through a first downloading channel.
102. And if the downloading through the first downloading channel fails, downloading the upgrade package through a second downloading channel.
103. And running the upgrade package to upgrade the local application into the new version application.
In practical application, when a user starts an application program, whether a corresponding new version application exists or not can be detected in response to the starting operation, for example, the user selects to click a shortcut icon of an application program on an application program shortcut icon list page, and the clicking operation can be identified as the starting operation; or when the user touches a preset new version detection control, responding to the touch event, and detecting whether a corresponding new version application exists, for example, the user enters an application program 'setting' interface and clicks the preset 'new version detection' control to perform upgrade detection; the upgrading detection can also be preset in the wifi network, for example, when a user starts an application program, the user responds to the starting operation to detect the type of the currently connected network; and when the network type is the wifi network, detecting whether a corresponding new version application exists. And if the corresponding new version application exists, downloading a corresponding upgrade package from the server side through a first downloading channel by default, wherein the upgrade package is used for upgrading the local old version application into the new version application.
And if the first downloading channel fails to download, starting a second downloading channel to download the upgrade package from the server. There are two situations when the first download channel fails to download: the first case is that the first download channel fails to start, that is, the upgrade package has not yet started to download; the second situation is that the first downloading channel is started successfully, but the downloading is abnormal or interrupted in the process of downloading the upgrade package. And directly starting a second downloading channel to download the upgrade package without any processing aiming at the first condition. And for the second condition, after the upgrade package which is not downloaded is locally deleted, starting a second downloading channel to download the upgrade package.
And after the upgrade package is downloaded successfully, the upgrade package is operated to realize the upgrade of the application program from the old version to the new version.
The technical scheme provided by the embodiment of the invention is that a download channel is additionally arranged on the basis of an application program self-download channel, when the application program self-download channel can not normally download the application program upgrade package, the additionally arranged download channel is started to download the upgrade package so as to ensure the normal upgrade of the application program, and the upgrade of the application program can be completed without the need that a user searches a corresponding installation package on a specified application market or official website, downloads and re-installs the installation package. By the method, the fault tolerance of the application program upgrading method is effectively improved, and user loss caused by poor experience is effectively avoided.
In the foregoing embodiment and the following embodiments, the application upgrade method further includes: sending failure information about downloading the upgrade package through the first downloading channel to a server side, so that the server side carries out downloading channel configuration on the upgrade package according to the failure information; receiving configuration information issued by the server after the downloading channel configuration is completed; and downloading the upgrade package through a second download channel, including: and downloading the upgrade package through the second download channel indicated by the configuration information. After receiving the download failure information of the first download channel, the server configures a second download channel to the client, so that the client downloads the upgrade package through the second download channel.
Fig. 2 is a schematic flowchart of an application upgrade method according to an embodiment of the present invention. As shown in fig. 2, the method includes:
201. and if the new version application is detected to exist, downloading the local application to be the upgrading package corresponding to the new version application through a first downloading channel.
202. And if the downloading through the first downloading channel fails, skipping to a browser interface corresponding to the second downloading channel, wherein a downloading link corresponding to the upgrading packet is displayed on the browser interface.
203. Downloading the upgrade package in response to a triggering event for the download link.
204. And running the upgrade package to upgrade the local application into the new version application.
In step 201, the first download channel refers to a channel through which the application downloads the upgrade package through a download tool implemented by the built-in code.
The step of detecting whether a new version application exists, namely the step of detecting the upgrade, can be specifically realized by the following modes: sending upgrade verification information to a server, wherein the upgrade verification information carries the identification of the local application; receiving remote version information corresponding to the local application fed back by the server according to the identification; comparing the current version information of the local application with the remote version information; and if the current version information is lower than the remote version information, detecting that the new version application exists.
Specifically, a local upgrade configuration file may be locally stored, where the upgrade configuration file stores current version information of a local application, and a remote upgrade configuration file stores at a server, where the remote upgrade configuration file stores version information of a latest version application, where the version information includes a version number, a version date, and the like.
After receiving upgrade verification information sent by a client, a server acquires a corresponding remote upgrade configuration file according to a local application identifier carried in the upgrade verification information, extracts a latest version number from the remote upgrade configuration file, sends the latest version number to the client, and after receiving the latest version number, the client acquires a current version number in the local configuration file corresponding to the local application, compares the current version number with the latest version number, and does not need to download and upgrade if the version numbers are the same; otherwise, the first downloading channel can be directly started to download the corresponding upgrade package or pop up the prompt message of the upgrade program, and after the user confirms, the first downloading channel is started in response to the confirmation event aiming at the prompt message of the upgrade program.
Optionally, before the step of detecting upgrade, whether the local network and the server are valid is detected, if so, the step of detecting upgrade is executed, and if not, the step of detecting upgrade is not executed. And detecting whether the local network and the server are effective, namely detecting whether the local network is normally connected and whether the server is online.
In the step 202, when the first download channel fails to download, directly skipping to a browser interface corresponding to the second download channel, or displaying a prompt message about downloading the upgrade package through the second download channel to remind a user whether to select the second download channel to download the download package; and responding to the confirmation event aiming at the prompt information, and jumping to a browser interface corresponding to the second downloading channel.
After the user interface jumps to the browser interface, a user can click a download link on the browser interface to enable a browser to internally install a download tool to download the upgrade package. And after downloading, running the upgrade package to upgrade the application and updating a local upgrade configuration file, wherein the local upgrade configuration file comprises an updated current version number and a current version date.
The technical scheme provided by the embodiment of the invention is that a browser downloading channel is additionally arranged on the basis of an application program downloading channel, when the application program downloading tool has problems and cannot normally download the application program upgrading package, the additionally arranged downloading channel is started, namely, the browser built-in downloading tool is started to download the upgrading package so as to ensure the normal upgrading of the application program, and a user does not need to search a corresponding installation package on a designated application market or official website, download and re-install the corresponding installation package and can finish the upgrading of the application program. By the method, the fault tolerance of the application program upgrading method is effectively improved, and user loss caused by poor experience is effectively avoided.
Fig. 3 is a schematic structural diagram of an application upgrading apparatus according to an embodiment of the present invention. As shown in fig. 3, the apparatus includes: a first download module 301, a second download module 302, and an upgrade module 303.
The first downloading module 301 is configured to, if it is detected that a new version application exists, download the local application through a first downloading channel to an upgrade package corresponding to the new version application.
A second downloading module 302, configured to download the upgrade package through a second downloading channel if the downloading through the first downloading channel fails.
An upgrade module 303, configured to run the upgrade package to upgrade the local application to the new version application.
Optionally, the second downloading module 302 includes:
and the skipping unit is used for skipping to a browser interface corresponding to the second downloading channel, and a downloading link corresponding to the upgrading packet is displayed on the browser interface.
And the downloading unit is used for responding to a trigger event aiming at the downloading link and downloading the upgrading package.
Optionally, the second downloading module 302 further includes:
and the display unit is used for displaying prompt information about the downloading of the upgrade package through a second downloading channel.
The skip unit is further configured to:
and responding to the confirmation event aiming at the prompt information, and jumping to a browser interface corresponding to the second downloading channel.
Optionally, the apparatus further comprises:
and the first sending module is used for sending failure information about downloading the upgrade package through the first downloading channel to a server so that the server carries out downloading channel configuration on the upgrade package according to the failure information.
And the first receiving module is used for receiving the configuration information issued by the server after the downloading channel configuration is completed.
And the second downloading module 302 is further configured to:
and downloading the upgrade package through the second download channel indicated by the configuration information.
Optionally, the apparatus further comprises:
and the second sending module is used for sending upgrade verification information to the server, wherein the upgrade verification information carries the identifier of the local application.
And the second receiving module is used for receiving the remote version information corresponding to the local application fed back by the server according to the identifier.
The comparison module is used for comparing the current version information of the local application with the remote version information; and if the current version information is lower than the remote version information, detecting that the new version application exists.
The technical scheme provided by the embodiment of the invention is that a browser downloading channel is additionally arranged on the basis of an application program downloading channel, when the application program downloading tool has problems and cannot normally download the application program upgrading package, the additionally arranged downloading channel is started, namely, the browser built-in downloading tool is started to download the upgrading package so as to ensure the normal upgrading of the application program, and a user does not need to search a corresponding installation package on a designated application market or official website, download and re-install the corresponding installation package and can finish the upgrading of the application program. By the method, the fault tolerance of the application program upgrading method is effectively improved, and user loss caused by poor experience is effectively avoided.
Here, it should be noted that: the application upgrading apparatus provided in the above embodiments may implement the technical solutions described in the above method embodiments, and the specific implementation principle of each module or unit may refer to the corresponding content in the above method embodiments, which is not described herein again.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.