Disclosure of Invention
In view of this, the present invention provides an APP application upgrading method and apparatus, so as to achieve the technical purpose of upgrading an APP application in a module for a specific user.
The technical scheme of the invention is to provide an upgrading method of an APP application, wherein installation packages of all versions of the APP application have installation package authority codes, whether all modules of the installation packages are updated or not can be determined according to the installation package authority codes of any installation package, and the method comprises the following steps:
when a user executes the current client version of the APP application, verifying the upgrading authority of the user, and when the upgrading authority of the user exists, determining a user authority code of the user, and determining whether the user has access right to each module of the installation package according to the user authority code;
and determining whether to upgrade the current client version according to the user permission code and the installation package permission code of the installation package of the latest version of the APP application, wherein when the module with the access right of the user is updated, the upgrade of the current client version is determined.
Optionally, verifying the upgrade authority of the user includes: if the information of the user exists in an authority list, acquiring the user authority code of the user from the authority list;
if the information of the user does not exist in the authority list, the user is authenticated through a service system, if the authentication is passed, the user authority code of the user is generated in the authority list, and the user authority code of the user is obtained.
Optionally, when it is determined to upgrade the current client version, the upgrade to the current client version is automatically performed immediately.
Optionally, when it is determined that the current client version is upgraded, sending a prompt and a corresponding installation package path to the user, and downloading and installing the installation package by the user to complete the upgrade of the current client version.
Optionally, each module of each installation package is respectively assigned with a module permission code, and for each installation package, the installation package permission code of the installation package is formed according to the module permission code of each module included in the installation package.
Optionally, the module permission codes are represented by binary numbers, the length of the binary numbers is equal to the number of modules in the installation package, the bit corresponding to the module serial number in the module permission code of each module is 1, the rest bits are 0, and the or operation result of the module permission codes of each module is the installation package permission code of the corresponding installation package.
The present invention further provides an apparatus for upgrading an APP application, where an installation package of each version of the APP application has an installation package permission code, and whether each module of the installation package is updated can be determined according to the installation package permission code of any installation package, where the apparatus includes:
the authority verification module is used for verifying the upgrading authority of the user when the user executes the current client version of the APP application, determining the user authority code of the user when the upgrading authority of the user exists, and determining whether the user has access right to each module of the installation package according to the user authority code;
and the upgrading module is used for determining whether to upgrade the current client version according to the user permission code and the installation package permission code of the installation package of the latest version of the APP application, wherein when the module with the access right of the user is updated, the upgrading of the current client version is determined.
Optionally, the right verifying module includes: the inquiry module is used for acquiring the user authority code of the user from the authority table if the information of the user exists in the authority table;
and the authentication module authenticates the user through a service system if the information of the user does not exist in the authority list, generates the user authority code of the user in the authority list if the authentication is passed, and acquires the user authority code of the user.
Optionally, the upgrade module is further configured to: and when the current client version is determined to be upgraded, immediately and automatically executing the upgrade of the current client version.
Optionally, the upgrade module is further configured to: and when the current client version is determined to be upgraded, sending a prompt and a corresponding installation package path to the user, downloading and installing the installation package by the user, and completing the upgrade of the current client version.
Optionally, the apparatus further comprises: and the authority distribution module is used for distributing module authority codes to the modules of each installation package respectively, and forming the installation package authority codes of the installation packages according to the module authority codes of the modules contained in each installation package.
Optionally, the module permission codes are represented by binary numbers, the length of the binary numbers is equal to the number of modules in the installation package, the bit corresponding to the module serial number in the module permission code of each module is 1, the rest bits are 0, and the or operation result of the module permission codes of each module is the installation package permission code of the corresponding installation package.
By the aid of the method and the device for upgrading the APP, the installation package of the new version APP can be issued for the specific function module or the specific user, maintenance cost of the APP can be effectively reduced, the function module is upgraded for the specific user, using risks of the new version APP are reduced, and user experience is improved.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention.
As will be appreciated by one skilled in the art, embodiments of the present invention may be embodied as a system, apparatus, device, method, or computer program product. Thus, the present invention may be embodied in the form of: entirely hardware, entirely software (including firmware, resident software, micro-code, etc.), or a combination of hardware and software.
With reference to fig. 1, a flowchart of an upgrade method for an APP application according to an exemplary embodiment of the present invention is described below, where an installation package of each version of the APP application has an installation package permission code, and whether each module of the installation package is updated can be determined according to the installation package permission code of any installation package, where the method includes:
step S101: when a user executes the current client version of the APP application, verifying the upgrading authority of the user, and when the upgrading authority of the user exists, determining a user authority code of the user, and determining whether the user has access right to each module of the installation package according to the user authority code;
step S102: and determining whether to upgrade the current client version according to the user permission code and the installation package permission code of the installation package of the latest version of the APP application, wherein when the module with the access right of the user is updated, the upgrade of the current client version is determined.
Optionally, verifying the upgrade authority of the user includes: if the information of the user exists in an authority list, acquiring the user authority code of the user from the authority list;
if the information of the user does not exist in the authority list, the user is authenticated through a service system, if the authentication is passed, the user authority code of the user is generated in the authority list, and the user authority code of the user is obtained.
Optionally, when it is determined to upgrade the current client version, the upgrade to the current client version is automatically performed immediately.
Optionally, when it is determined that the current client version is upgraded, sending a prompt and a corresponding installation package path to the user, and downloading and installing the installation package by the user to complete the upgrade of the current client version.
Optionally, each module of each installation package is respectively assigned with a module permission code, and for each installation package, the installation package permission code of the installation package is formed according to the module permission code of each module included in the installation package.
Optionally, the module permission codes are represented by binary numbers, the length of the binary numbers is equal to the number of modules in the installation package, the bit corresponding to the module serial number in the module permission code of each module is 1, the rest bits are 0, and the or operation result of the module permission codes of each module is the installation package permission code of the corresponding installation package.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Examples
The present invention will be described in detail with reference to a specific embodiment, but it should be noted that the specific embodiment is only for better describing the present invention and should not be construed as limiting the present invention.
When a developer releases a new version APP, permission codes need to be distributed to all modules in an installation package of the new version APP, and then the installation package of the new version APP is uploaded to a cloud storage server.
It should be noted that the identifier of the authority code is represented by a binary number, the length of the binary number is equal to the number of modules in the installation package, the bits corresponding to the module serial number in the authority code of each module are 1, the rest bits are 0, and the result of logical or operation performed on the authority code of each module is the authority code of the installation package.
When a user executes APP at a current client, the client sends a request to a background permission verification service interface of a server to verify the permission of the user, and if user information of the user exists in a permission list, a user permission code of the user is obtained from the permission list.
If the user information of the user does not exist in the authority list, the client sends a request to the service system authority interface to verify the user information of the user, and if the user information passes the verification, the user information of the user is generated in the authority list and the user authority code of the user is obtained.
After the user permission code is acquired, a version list of the installation package larger than the current client side APP version number is acquired according to parameters (such as version, operating system, formal version or trial version) of the installation package, and the versions of the installation package are arranged in a reverse order, so that the installation package of the latest version can be confirmed.
And then, determining whether the user has access rights to each module in the installation package of the latest version according to the user permission code of the user, and determining whether to upgrade the current client version according to the user permission code and the installation package permission code of the installation package of the latest version of the current client APP.
And when the module with the access right of the user is updated, determining to perform upgrading operation on the current client version.
In an embodiment of the present invention, the authority code of the user and the authority code of the installation package of the APP in the version list are logically and-operated.
If the result is greater than 0, confirming that the installation package of the APP of the current version is the version to be upgraded;
the following describes, by way of example, upgrading each module in any installation package in blocks.
For example, in an installation package of an APP, four functional modules are a module a, a module B, a module C, and a module D, and authority codes corresponding to the four functional modules are 0001, 0010, 0100, and 1000, respectively.
If the selected installation package permission code of the APP of the currently released new version is 1100, it indicates that the APP of the new version is updated for the functional module C and the functional module D, and the functional module a and the functional module B do not perform the update operation.
In addition, it can be assumed from the above that the authority code of the user is 0100, which indicates that the user has the access authority of the function module C, and when the function module C is updated, the user should be prompted to perform the update.
Specifically, the user permission code 0100 of the user and the installation package permission code 1100 of the APP are subjected to bitwise logical and operation, and the operation result is 0100, and if the result is known to be greater than 0, the user is prompted to perform upgrade operation on the function module C in the current client version.
And finally, after the current version is confirmed to be upgraded to the version to be upgraded, the cloud storage server sends an installation package path of the version to be upgraded to the user, and the mobile terminal where the user is located downloads and installs the installation package of the version to be upgraded according to the path, so that the upgrade of the current client version is completely finished.
Fig. 2 is a schematic structural diagram of an apparatus for upgrading an APP application according to an embodiment of the present invention, where an installation package of each version of the APP application has an installation package permission code, and whether each module of the installation package is updated can be determined according to the installation package permission code of any installation package, where the apparatus 2 includes:
an authority verification module 21, configured to verify an upgrade authority of a user when the user executes a current client version of the APP application, and determine a user authority code of the user when the upgrade authority of the user exists, and determine whether the user has an access right to each module of the installation package according to the user authority code;
an upgrade module 22, configured to determine whether to upgrade the current client version according to the user permission code and an installation package permission code of an installation package of a latest version of the APP application, where when the module that the user has access right is updated, the upgrade of the current client version is determined.
Optionally, the right verifying module 21 includes: the inquiry module is used for acquiring the user authority code of the user from the authority table if the information of the user exists in the authority table;
and the authentication module authenticates the user through a service system if the information of the user does not exist in the authority list, generates the user authority code of the user in the authority list if the authentication is passed, and acquires the user authority code of the user.
Optionally, the upgrade module 22 is further configured to: and when the current client version is determined to be upgraded, immediately and automatically executing the upgrade of the current client version.
Optionally, the upgrade module is further configured to: and when the current client version is determined to be upgraded, sending a prompt and a corresponding installation package path to the user, downloading and installing the installation package by the user, and completing the upgrade of the current client version.
Optionally, the apparatus 2 further comprises: and the authority distribution module is used for distributing module authority codes to the modules of each installation package respectively, and forming the installation package authority codes of the installation packages according to the module authority codes of the modules contained in each installation package.
Optionally, the module permission codes are represented by binary numbers, the length of the binary numbers is equal to the number of modules in the installation package, the bit corresponding to the module serial number in the module permission code of each module is 1, the rest bits are 0, and the or operation result of the module permission codes of each module is the installation package permission code of the corresponding installation package.
The upgrading device of the APP application provided by the invention is a device corresponding to the method, and is not described herein again.
By the aid of the method and the device for upgrading the APP, the installation package of the new version APP can be issued for the specific function module or the specific user, maintenance cost of the APP can be effectively reduced, the function module is upgraded for the specific user, using risks of the new version APP are reduced, and user experience is improved.
Moreover, while the operations of the method of the invention are depicted in the drawings in a particular order, this does not require or imply that all of the depicted operations must be performed to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.