CN112346765B - Application program upgrading method and device, electronic equipment and readable storage medium - Google Patents

Application program upgrading method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN112346765B
CN112346765B CN202011228902.2A CN202011228902A CN112346765B CN 112346765 B CN112346765 B CN 112346765B CN 202011228902 A CN202011228902 A CN 202011228902A CN 112346765 B CN112346765 B CN 112346765B
Authority
CN
China
Prior art keywords
application program
service process
upgrade
authority
service
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011228902.2A
Other languages
Chinese (zh)
Other versions
CN112346765A (en
Inventor
张海兵
慕林通
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202011228902.2A priority Critical patent/CN112346765B/en
Publication of CN112346765A publication Critical patent/CN112346765A/en
Application granted granted Critical
Publication of CN112346765B publication Critical patent/CN112346765B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/604Tools and structures for managing or administering access control systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2141Access rights, e.g. capability lists, access control lists, access tables, access matrices

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Automation & Control Theory (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention provides an upgrading method and device of an application program, electronic equipment and a readable storage medium, wherein the upgrading method is applied to the electronic equipment, the electronic equipment comprises a first service process and an upgrading package process, and the method comprises the following steps: under the condition that an upgrade instruction is received, the first service process acquires the authority of an administrator; the first service process starts an upgrade package process of a target application program associated with the first service process by utilizing the administrator authority; and the upgrade package process upgrades the target application program. The embodiment of the invention can improve the convenience of application program upgrading.

Description

Application program upgrading method and device, electronic equipment and readable storage medium
Technical Field
The present invention relates to the field of computer software technologies, and in particular, to an application program upgrading method and apparatus, an electronic device, and a readable storage medium.
Background
Application upgrade refers to the update of an application from a low version to a high version. Since the high version often repairs part of defects of the low version, the performance of the application program is generally better than that of the original edition, the optimized effect is obtained, and the user can have better experience.
Currently, an application program is usually upgraded by popup UAC (user account control ) popup, requesting upgrade authorization from a user, and after obtaining the upgrade authorization of the user, upgrading the application program, which has poor convenience.
Disclosure of Invention
The embodiment of the invention aims to provide an upgrading method and device of an application program, electronic equipment and a readable storage medium, so as to solve the problem of poor convenience in upgrading the application program.
In a first aspect of the present invention, there is provided an upgrade method for an application program, including:
under the condition that an upgrade instruction is received, the first service process acquires the authority of an administrator;
the first service process starts an upgrade package process of a target application program associated with the first service process by utilizing the administrator authority;
and the upgrade package process upgrades the target application program.
In a second aspect of the embodiment of the present invention, there is also provided an apparatus for upgrading an application program, including:
the first acquisition module is used for acquiring the authority of the administrator under the condition of receiving the upgrade instruction;
the starting module is used for starting an upgrade package process of the target application program related to the first service process by utilizing the administrator authority;
and the upgrading module is used for upgrading the target application program by the upgrading packet process.
In yet another aspect of the present invention, there is also provided a computer readable storage medium having instructions stored therein that, when executed on a computer, cause the computer to perform the method of upgrading an application program as described in any of the above.
In yet another aspect of the invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the method of upgrading an application as described in any of the preceding.
According to the method for upgrading the application program, provided by the embodiment of the invention, under the condition that an upgrade instruction is received, a first service process acquires the authority of an administrator; the first service process starts an upgrade package process of a target application program associated with the first service process by utilizing the administrator authority; and the upgrade package process upgrades the target application program. The upgrade package process is started by using the administrator rights acquired by the service process, and the upgrade package process of the target application program has the administrator rights, so that the UAC popup window can be prevented from being popped up in the upgrade process, silent upgrade is realized, the upgrade steps of the application program are simplified, and the convenience of application program upgrade is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
FIG. 1 is a flowchart of an upgrade method for an application program according to an embodiment of the present invention;
FIG. 2 is a flowchart of another method for upgrading an application according to an embodiment of the present invention;
FIG. 3 is a block diagram of an upgrade apparatus for an application program according to an embodiment of the present invention;
fig. 4 is a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the accompanying drawings in the embodiments of the present invention. It will be apparent that the described embodiments are some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus. Furthermore, the use of "and/or" in the specification and claims means at least one of the connected objects, e.g., a and/or B, meaning that it includes a single a, a single B, and that there are three cases of a and B.
In embodiments of the invention, words such as "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "e.g." in an embodiment should not be taken as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
Referring to fig. 1, fig. 1 is a flowchart of an application program upgrading method provided in an embodiment of the present invention, which is applied to an electronic device including a first service process and an upgrade package process. As shown in fig. 1, the method comprises the steps of:
step 101, under the condition that an upgrade instruction is received, the first service process acquires the administrator authority.
The upgrading method of the application program provided by the embodiment of the invention is used for realizing silent upgrading of the application program. Silent upgrading means that the upgrading of the application program can be automatically completed without disturbing the user, and the user is not disturbed, particularly the UAC popup window is not popped up. The method for upgrading the application program provided by the embodiment of the invention can be applied to electronic equipment such as Windows operating systems, and the electronic equipment can be a computer, a server or other network equipment.
For example, the method for upgrading an application program provided by the embodiment of the invention can be applied to a computer with a Windows operating system and is used for managing the upgrading of the application program installed on the computer. The first service process may be understood as a Microsoft Windows service process, and the first service process may be started automatically when the computer is started, or may be started manually after the computer is started, or may be started by other processes. Wherein, the automatic start of the first service process when the computer is started can be understood as: the first service process is started in the process of starting the Windows operating system. It should be noted that, after the computer is started, the user may actively control the first service process that is currently started to be suspended or restarted.
It should be appreciated that the first service process need not be exposed through any interface when it is started or suspended. Thus, the first service process can be used on the server and can run for a long time, and the long-time running of the first service process has little influence on other processes working on the same computer.
In addition to the first service process being started following the start of the operating system, the first service process may be started by other processes in a closed state, which is described in detail later. In this case, when the new version of the application program is released, the first service process can timely receive the upgrade instruction, and timely provide the latest version of service for the user of the application program. The upgrade instruction is issued by the target application program in the running condition, specifically, the upgrade instruction is issued by the server to which the target application program corresponds.
In the embodiment of the invention, the first service process is a service process corresponding to a target application program to be upgraded. Specifically, the service processes and the application programs can be in one-to-one correspondence; alternatively, a service process may be used to implement silent upgrade of multiple applications when multiple applications are corresponding to the service process. Further, taking the first service process as an example, when the first service process is used for implementing silent upgrade of a plurality of application programs, the first service process may be used for implementing silent upgrade of all application programs in the electronic device, or the first service process may also be used for implementing silent upgrade of one or more preset application programs. For example, the electronic device may be provided with a plurality of service processes, where the service process a is used to implement silent upgrade of the game application, the service process b is used to implement silent upgrade of the communication application, and the service process c is used to implement silent upgrade of the video application, which is not exhaustive.
In the embodiment of the invention, before the first service process acquires the administrator authority, the system authority is acquired first. The system rights are also referred to as system rights, and the first service process has the ability to acquire the system rights, so that the system rights can be acquired by the first service process. The system permission is utilized to upgrade the application program, the UAC popup window can be avoided, but the problem that the application program cannot acquire a correct path during installation and the like can be caused, so that the method for upgrading the application program based on the system permission acquires the associated manager permission, and the manager permission is utilized to upgrade the application program, and the problem that the application program cannot acquire the correct path during installation and the like can be avoided.
The system authority is related to operation management of the system, and the administrator authority and the general authority are related to operation management of the user. In particular, system rights may be understood as rights of the operating system itself. The administrator authority may be understood as an operation authority owned by an administrator user (administrator), and the general authority is an authority owned by a general user. Wherein the administrator authority is greater than the authority of the ordinary user. For example, in one embodiment, the administrator privileges may include operating privileges to access applications, install applications, delete applications, upgrade applications, and change system settings. The general rights include operation rights to access the application.
Step 102, the first service process starts an upgrade package process of a target application program associated with the first service process by using the administrator authority.
The target application program is an application program to be upgraded in the embodiment of the invention. The upgrade package process is started by utilizing the administrator authority acquired by the first service process, and the upgrade package process of the target application program has the administrator authority, so that the UAC popup window can be prevented from being popped up in the upgrade process, silent upgrade is realized, the upgrade steps of the application program are simplified, and the convenience of application program upgrade is improved.
Step 103, the upgrade package process upgrades the target application program.
It should be understood that in the embodiment of the present invention, the timing of upgrading the application program is not particularly limited. For example, the upgrade may be performed when the application is started or the electronic device is started, may be performed while the user is using the application, or may be performed when the application is running in the background.
According to the upgrading method of the application program, provided by the embodiment of the invention, the administrator authority is obtained through the first service process, so that the upgrading of the target application program is realized, the silent upgrading of the application program is realized, the UAC popup window is prevented from being popped up in the upgrading process, the upgrading step of the application program is simplified, the operation of the application program which is required to be participated by a user is less, and the convenience of the application program upgrading is improved; meanwhile, the application program can be conveniently and quickly iterated, and new functions can be quickly released. In the prior art, by popup UAC popup window, upgrade authorization is requested to a user, and after upgrade authorization of the user is obtained, application program upgrade is performed, and the blocking type behavior disturbs the user, influences user experience, easily causes fragmentation of application program version, and causes that a server needs to consume corresponding resources to realize compatible multi-version application programs. In contrast, the method for upgrading the application program provided by the embodiment of the invention simplifies the upgrading steps of the application program, improves the convenience of upgrading the application program, can avoid unnecessary resource consumption to a certain extent, and improves the utilization rate of resources.
It should be appreciated that, in an alternative embodiment, before performing the step of obtaining the administrator rights by the first service process, the method further includes:
the upgrade package process creates a first service process with the administrator rights. After the application program is installed and when the application program is upgraded, the upgrade package process creates a first service process by using the administrator authority.
As previously described, the first service process may correspond to an application program one by one. The first service process may also correspond to a class of applications, which may be understood as a plurality of applications of the same class. The first service process may also be adapted to all applications. When the first service process corresponds to the application program one by one, the response speed of the computer side can be improved. When the first service process is adapted to all applications, the resource occupation on the computer side can be reduced.
It should be noted that, when an application program starts from installation, it may undergo multiple upgrade processes. The technical scheme provided by the embodiment of the invention is suitable for the installation scene and the upgrading scene of the application program. It can be understood that the installation package process and the upgrade package process are different in names based on different scenes, so for convenience of description, the upgrade package process is directly taken as an example for illustration. It should be appreciated that in the scenario of initial installation of an application, the upgrade package process actually behaves as an installation package process; in any upgrade scene of the application program, the upgrade is realized through an upgrade package process, and is irrelevant to an installation package process.
Specifically, the initial installation of the application is typically manually triggered by a user, which may also be referred to as manual installation. In this case, the first service process is created in response to the user manually installing the application, when the application is in the first upgrade after installation. When a user manually installs an application program, the installation package process acquires the administrator authority based on the user request, and then the installation package process creates a first service process by using the administrator authority and modifies the DACL of the first service process. In an embodiment, the first service process is a service process created at the time of manual installation of (an installation package process of) the associated target application, in which case the administrator authority may be obtained by popup UAC popup authorization in the case of initial installation and manual installation, the installation package process creates the first service process with the administrator authority and modifies the DACL of the first service process.
In the subsequent upgrading process (not the first upgrade) of the application program, the first service process obtains the administrator authority based on the service process corresponding to the last upgrade when the application program is upgraded last time, and the upgrade package process creates the first service process by using the administrator authority and modifies the DACL of the first service process. At this time, this will be described later in connection with the specific implementation of S103.
Specifically, the installation package process or the upgrade package process registers the first service process with the computer operating system, modifies the DACL of the first service process, and the computer operating system and any process with ordinary rights can start the first service process.
The installation package process is used for installing the application program, and the upgrade package process is used for upgrading the application program.
Optionally, in an embodiment, the electronic device further includes an upgrade process, where the upgrade process may be used to determine whether the application program supports upgrade, and in a case where the application program supports upgrade, the upgrade process downloads an upgrade package corresponding to the application program, and the upgrade process notifies the first service process (or a second service process mentioned later) to start the upgrade package process, that is, the upgrade process may be used to trigger the upgrade package process.
In the embodiment of the present invention, the starting right of the first service process is a common right, which means that the first service process can be started by any process having the common right.
The starting right of the first service process may be set automatically when the first service process is created, or may be set after the first service process is created.
In particular, the startup authority of the first service process may be set or modified by modifying the autonomous access control list (Discretionary Access Control List, DACL) of the first service process so that the first service process can be started by any process having ordinary authority. In an actual implementation scenario, the DACL of the first service process is modified by an upgrade package process (an installation package process in an APP installation scenario).
Under the condition that the target application program is initially installed and the initial installation is manual installation, acquiring the authority of an administrator by popping up a UAC popup window; the installation package process modifies the DACL of the first service process by using the administrator rights so that the starting rights of the first service process are ordinary rights, and the first service process can be started by any process with ordinary rights. For example, the upgrade process and the main process of the application program are processes having ordinary rights, and the first service process may be started by the upgrade process or the main process of the application program.
The starting authority of a process may be an administrator authority or a normal authority, and when the starting authority of a process is an administrator authority, the process may be started by other processes having the administrator authority, and the process may not be started by other processes having the normal authority. When the starting authority of a process is the ordinary authority, the process can be started by any process with the ordinary authority, and of course, the process can also be started by other processes with the administrator authority. The administrator authority is greater than the normal authority. If the DACL of the first service process is not modified, the first service process can only be restarted by processes that have administrator rights when the first service process is blocked and disabled by the computer security tool. Therefore, the DACL of the first service process is modified so that the starting authority of the first service process is the ordinary authority, the first service process can be started by any process with the ordinary authority, and the reliability of the upgrading method of the application program is improved.
Optionally, the electronic device further includes a third process, and the method further includes: and when the first service process stops running, the third process starts the first service process. In this embodiment, the third process may be a main process of the application program, and the main process of the application program may monitor an operation state of each process in the application package, and when the main process monitors that the first service process stops operating, the main process starts the first service process. Alternatively, the host process may access the first service process every fixed period of time, and when the host process monitors that the first service process is stopped, the host process starts the first service process. In addition, the third process may be any process related to the upgrade process and at least has a common authority, which is not limited in particular by the embodiment of the present invention.
And under the condition that the application program is initially installed and the initial installation is manually installed, acquiring the administrator authority in a manner of popup of the UAC popup window. Or in the subsequent upgrading process, the administrator authority can be obtained through the service process created by the last upgrade. In summary, the upgrade package process having administrator rights modifies the DACL of the first service process through the service control manager (Service Control Manager, SCM), specifically as follows:
a) Adding default authority of a local system;
b) Adding default rights of an administrator;
c) Adding a default right of the authenticated user;
d) Adding default rights of the advanced user;
e) The right to "start service, stop interactive user service" is added.
When the step of adding the right of the start service and stopping the interactive user service is completed, the starting right of the first service process is the common right, and the first service process can be started by any process with the common right.
The default authority may be understood as an original authority or a self-contained authority, for example, the default authority of the local system may be understood as an original authority of the local system or a self-contained authority of the local system.
In this embodiment, the upgrade package process modifies the DACL of the first service process using the administrator authority, so that when the first service process is disabled, the first service process may still be started by any process having the ordinary authority; when an application program is started, a first service process can be actively started through any process with ordinary authority; the success rate of the application program upgrading is improved, and the reliability of the application program upgrading method is improved.
The computer security tool may intercept a first service process that is started upon startup of the windows system. The purpose of the upgrade package process to modify the DACL of the first service process is: after the target application is started, the target application can have authority to rescue (start up) the first service process.
And under the condition that the target application program is initially installed and manually installed, the administrator authority is obtained through popup of the UAC popup window, and the upgrade package process utilizes the administrator authority to modify the DACL of the first service process.
The specific implementation of step S103 will now be further described based on the embodiment shown in fig. 1.
In the embodiment of the present invention, the step of upgrading the target application program by the upgrade package process may include:
the upgrade package process upgrades the version of the target application program;
the upgrade package process creates a second service process corresponding to the upgrade package process based on the administrator authority, and modifies DACL of the second service process, wherein the second service process is used for starting the upgrade package process when upgrading next time.
In other words, in the embodiment of the invention, in addition to the version upgrade of the application program, the service process matched with the version upgrade is recreated in the process of each upgrade. Accordingly, during or after the creation of a new service process (i.e. the second service process mentioned above), the DACL of the second service process may be modified such that the starting right of the second service process is the normal right. It can be understood that after the upgrade is completed, if the target application program needs to be upgraded again, the second service process undertakes the processing undertaken by the first service process in the upgrade process.
The upgrade process is specifically described in two aspects:
in one aspect, the manner of upgrading the version of the target application program may be: the upgrading process in the electronic equipment downloads an upgrading packet corresponding to the target application program; the upgrade package process releases an upgrade component of the upgrade package; and the upgrade package process upgrades the target application program by utilizing the upgrade component.
The step of downloading the upgrade package corresponding to the target application program by the upgrade package process, the step of releasing the upgrade package by the upgrade package process and the step of upgrading the target application program by the upgrade package process by utilizing the upgrade package are all completed by utilizing the authority of an administrator.
When the server corresponding to the application program issues the new version of the application program, the upgrade process downloads the upgrade package corresponding to the target application program, which can be downloaded when the application program is started, can be downloaded in the process that the user is using the application program, and can also be downloaded when the application program stops running, without limitation. Similarly, the step of releasing the upgrade package by the upgrade package process and the step of upgrading the target application program by the upgrade package process using the upgrade package may be performed when the application program is started, may be performed during the process that the user is using the application program, and may be performed when the application program stops running, which is not limited.
An upgrade package is a collection of self-decompressing files, including all files needed to install an application. And running the upgrade package (executable file) to release all files of the application program to the hard disk, thereby completing the work of modifying the registry, modifying the system setting, creating the shortcut and the like.
After the upgrade process downloads the upgrade package, the upgrade package process firstly decompresses the upgrade package, the upgrade package process releases the upgrade component of the upgrade package, and the upgrade package replaces the old version of the application program by the released upgrade component to upgrade the application program to the new version. The upgrade component is a component of a version of the application program after upgrade, and includes files in the forms of dll, exe and the like.
The target application upgrade is completed with the target application started or running. When the target application upgrade is performed with the target application program stopped running, the first service process fails to upgrade because it is vulnerable to interception by the computer security tool. Thus, the target application upgrade is completed with the target application started or running, which may improve the success rate of the upgrade.
In one embodiment, when the target application is being started, the upgrade process notifies the first service process, the first service process obtains the administrator authority, the first service process starts the upgrade package process, and the upgrade package process releases the upgrade component of the upgrade package to upgrade the target application. The application program upgrading is completed when the application program is started, the replacement of the new version is completed in the process of starting the application program, the disturbance to the user is reduced, the user is not interfered to use the application program, and the user experience is good.
In an embodiment, the application program is updated in the running process of the application program, so that the overlong starting time of the application program caused by the updating of the application program in starting is avoided, the time for a user to wait for starting the application program is reduced, and the user experience is improved.
Optionally, the step of upgrading the target application program by the upgrade package process through the upgrade component includes:
under the condition that the target application program is restarted, the upgrade package process upgrades the target application program by utilizing the upgrade component.
In the following, description will be made of this alternative implementation with reference to fig. 2, and fig. 2 is a flowchart of another method for upgrading an application program according to an embodiment of the present invention, where, as shown in fig. 2, when a target application program runs for the current time, a step of releasing an upgrade component of an upgrade package by an upgrade package process is completed. When the target application program is started next time (namely, when the target application program is restarted), the upgrade package process upgrades the target application program by using the upgrade component. The first step of upgrading is set to be executed when the target application program runs at the current time, so that the influence on the starting time of the target application program caused by upgrading is reduced; the step of replacing the old version with the new version of the upgrade package is set to be executed under the condition that the application program is restarted, the application program is not interfered by the user, the user is prevented from being interrupted to use the application program, and the user experience is good.
As shown in fig. 2, after the target application confirms that the upgrade is supported, the server notifies the first service process corresponding to the target application, and the first service process authorizes the upgrade package process, and the upgrade package process releases the upgrade component. The user exits the application program, finishes upgrading the application program in the restarting process of the application program, specifically, the server informs the first service process, the first service process authorizes the upgrade package process, and the new version of the application program replaces the old version. It should be noted that, the user exiting the application program and restarting the application program is a natural choice of the user, which is the user's own use requirement of the application program.
For any one upgrade process, the new version of the application refers to the version of the application after the upgrade, and the old version of the application refers to the version of the application before the upgrade.
On the other hand, when upgrading the target application program, acquiring a system authority through a first service process associated with the current application program version, acquiring an associated manager authority based on the system authority, and creating a second service process and an upgrade package process associated with the upgrade version of the application program by utilizing the manager authority; further, the upgrade package process may also utilize the administrator rights to modify the DACL of the second service process associated with the upgraded version of the application.
The process of upgrading the target application program by the upgrade package process may include the following steps: the first service process acquires the authority of an administrator; the upgrade package process creates a second service process corresponding to the upgrade package process based on the administrator authority and modifies DACL of the second service process, wherein the second service process is used for starting the upgrade package process when upgrading next time.
It should be appreciated that during an upgrade, the first service process may acquire administrator privileges multiple times and may perform different steps or operations using the acquired administrator privileges, respectively. That is, the first service process performs one step or one operation only with the administrator authority after each acquisition of the administrator authority. For example, in one embodiment, before the upgrade package process upgrades the target application program, the first service process obtains the administrator authority, and the first service process starts the upgrade package process of the target application program associated with the first service process by using the administrator authority. When the upgrade package process upgrades the target application program, a first service process acquires an administrator authority; and the upgrade package process establishes a second service process corresponding to the upgrade package process based on the administrator authority.
The first service process is a service process created when the associated target application program is installed or updated last time, and if the initial installation is performed and the manual installation is performed, the first service process is created by popup UAC popup authorization, and the manager permission is acquired. If the application program is in silent upgrading, the administrator authority is acquired through a first service process (the DACL of the first service process is modified by the upgrade package process at the moment) associated with the current application program version, the first service process starts the upgrade package process, the upgrade package process creates a second service process of the upgrade version, the DACL of the second service process of the upgrade version is modified, and when the target application program is in next upgrading, the second service process acquires the administrator authority and starts the upgrade package process, so that the silent upgrading of the application program is realized. The second service process acts like the first service process in the next upgrade of the target application program.
The current application version refers to the version of the application before the upgrade, and the upgraded version of the application refers to the version of the application after the upgrade. The service process associated with the current application version refers to the service process of the version of the application package before the upgrade, and the service process associated with the upgrade version of the application refers to the service process of the version after the upgrade of the application.
The first service process having administrator rights is understood to mean that system rights, also called system rights, are available through the first service process, and that associated administrator rights are available through the system rights. The first service process and the second service process in the embodiment of the invention have the administrator authority. In general, other related processes of the application program have ordinary rights, for example, an upgrade process and a main process of the application program are processes having ordinary rights.
According to the method for upgrading the application program, provided by the embodiment of the invention, under the condition that an upgrade instruction is received, a first service process acquires the authority of an administrator; the first service process starts an upgrade package process of a target application program associated with the first service process by utilizing the administrator authority; and the upgrade package process upgrades the target application program. The upgrade package process is started by using the administrator rights acquired by the service process, and the upgrade package process of the target application program has the administrator rights, so that the UAC popup window can be prevented from being popped up in the upgrade process, silent upgrade is realized, the upgrade steps of the application program are simplified, and the convenience of application program upgrade is improved.
Referring to fig. 3, fig. 3 is a block diagram of an apparatus for upgrading an application program according to an embodiment of the present invention, and as shown in fig. 3, an apparatus 300 for upgrading an application program includes:
the service module 301 is configured to obtain an administrator right when receiving an upgrade instruction;
the service module 301 is configured to start an upgrade package process of a target application associated with a first service process by using the administrator authority;
and the upgrading module 302 is configured to upgrade the target application program.
Optionally, the starting authority of the first service process is a common authority, and the first service process can be started by any process with the common authority.
Optionally, the application upgrading device 300 further includes:
and the starting module is used for starting the first service process when the first service process stops running.
Optionally, the application upgrading device 300 further includes:
and the modification module is used for modifying the autonomous access control list DACL of the first service process so as to enable the starting authority of the first service process to be the ordinary authority.
Optionally, the application upgrading device 300 further includes:
and the first creation module is used for creating a first service process with the administrator authority.
Optionally, the application upgrading device 300 further includes:
and the second acquisition module is used for acquiring the administrator authority based on the user request.
And the second creating module is used for creating the first service process by utilizing the administrator authority.
Optionally, the application upgrading device 300 further includes:
the third acquisition module is used for acquiring the authority of the administrator;
and the third creating module is used for creating a second service process corresponding to the upgrade package process based on the administrator authority and modifying the DACL of the second service process, wherein the second service process is used for starting the upgrade package process when upgrading next time.
Optionally, the upgrade module 302 includes:
and the downloading sub-module is used for downloading the upgrade package corresponding to the target application program.
And the release sub-module is used for releasing the upgrade component of the upgrade package.
And the upgrading sub-module is used for upgrading the target application program by utilizing the upgrading component under the condition that the target application program is restarted.
The device for upgrading the application program provided by the embodiment of the invention can realize each process realized by the device for upgrading the application program in the method embodiment of the invention, can achieve the same beneficial effects, and is not repeated here for avoiding repetition.
The embodiment of the invention also provides an electronic device, as shown in fig. 4, which comprises a processor 401, a communication interface 402, a memory 403 and a communication bus 404, wherein the processor 401, the communication interface 402 and the memory 403 complete communication with each other through the communication bus 404;
a memory 403 for storing a computer program;
the processor 401, when executing the computer program stored in the memory 403, implements the following steps:
under the condition that an upgrade instruction is received, the first service process acquires the authority of an administrator;
the first service process starts an upgrade package process of a target application program associated with the first service process by utilizing the administrator authority;
and the upgrade package process upgrades the target application program.
The communication bus mentioned by the above terminal may be a peripheral component interconnect standard (Peripheral Component Interconnect, abbreviated as PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated as EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the terminal and other devices.
The memory may include random access memory (Random Access Memory, RAM) or non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but also digital signal processors (Digital Signal Processing, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field-programmable gate arrays (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In yet another embodiment of the present invention, a computer readable storage medium is provided, in which instructions are stored, which when run on a computer, cause the computer to perform the method for upgrading an application program according to any of the above embodiments.
In yet another embodiment of the present invention, a computer program product comprising instructions that, when executed on a computer, cause the computer to perform the method of upgrading an application of any of the embodiments described above is also provided.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.

Claims (8)

1. An upgrade method of an application program, applied to an electronic device, wherein the electronic device comprises a first service process and an upgrade package process, the method comprising:
under the condition that an upgrade instruction is received, the first service process acquires the authority of an administrator;
the first service process starts an upgrade package process of a target application program associated with the first service process by utilizing the administrator authority;
the upgrade package process upgrades the target application program;
the starting authority of the first service process is a common authority, and the first service process can be started by any process with the common authority;
before the first service process obtains the administrator authority, the method further includes:
the upgrade package process modifies an autonomous access control list DACL of the first service process so that the starting authority of the first service process is the ordinary authority;
the electronic device further includes a third process, the method further including:
when the first service process stops running, the third process starts the first service process;
the upgrade package process may also be capable of modifying the autonomous access control list DACL of the first service process using the administrator authority.
2. The method of claim 1, wherein prior to the first service process obtaining administrator rights, the method further comprises:
the upgrade package process creates a first service process with the administrator rights.
3. The method of any of claims 1-2, wherein the electronic device further comprises an installation package process, the method further comprising, prior to the first service process obtaining administrator rights:
the installation package process acquires the administrator authority based on a user request;
the installation package process creates the first service process using the administrator rights.
4. The method of any of claims 1-2, wherein the upgrade package process upgrades the target application program comprises:
the upgrade package process upgrades the version of the target application program;
the upgrade package process creates a second service process corresponding to the upgrade package process based on the administrator authority, and modifies DACL of the second service process, wherein the second service process is used for starting the upgrade package process when upgrading next time.
5. The method of claim 4, wherein the upgrade package process upgrades the version of the target application program, comprising:
the upgrade package process releases an upgrade component of the upgrade package;
and under the condition that the target application program is restarted, the upgrade package process upgrades the target application program by utilizing the upgrade component.
6. An application program upgrading apparatus, comprising:
the service module is used for acquiring the authority of the administrator under the condition of receiving the upgrade instruction;
the service module is used for starting an upgrade package process of a target application program associated with a first service process by utilizing the administrator authority;
the upgrading module is used for upgrading the target application program;
the starting authority of the first service process is a common authority, and the first service process can be started by any process with the common authority;
the device for upgrading the application program further comprises:
the modification module is used for modifying the autonomous access control list DACL of the first service process so that the starting authority of the first service process is the ordinary authority;
the device for upgrading the application program further comprises:
the starting module starts the first service process when the first service process stops running;
the upgrade package process may also be capable of modifying the autonomous access control list DACL of the first service process using the administrator authority.
7. An electronic device, comprising: a processor, a communication interface, a memory, and a communication bus; the processor, the communication interface and the memory complete communication with each other through a communication bus;
a memory for storing a computer program;
a processor for implementing the method for upgrading an application program according to any one of claims 1 to 5 when executing a computer program stored on a memory.
8. A computer-readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements a method of upgrading an application according to any one of claims 1 to 5.
CN202011228902.2A 2020-11-06 2020-11-06 Application program upgrading method and device, electronic equipment and readable storage medium Active CN112346765B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011228902.2A CN112346765B (en) 2020-11-06 2020-11-06 Application program upgrading method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011228902.2A CN112346765B (en) 2020-11-06 2020-11-06 Application program upgrading method and device, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN112346765A CN112346765A (en) 2021-02-09
CN112346765B true CN112346765B (en) 2024-03-01

Family

ID=74428435

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011228902.2A Active CN112346765B (en) 2020-11-06 2020-11-06 Application program upgrading method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN112346765B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115904462A (en) * 2023-02-10 2023-04-04 中航金网(北京)电子商务有限公司 Application program upgrading method and device, electronic equipment and readable storage medium
CN117493027B (en) * 2024-01-02 2024-04-09 中移(苏州)软件技术有限公司 Thermal upgrading method and device and electronic equipment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013185570A1 (en) * 2012-06-13 2013-12-19 腾讯科技(深圳)有限公司 Software update method, software update system and computer storage medium
WO2015033554A1 (en) * 2013-09-09 2015-03-12 Canon Kabushiki Kaisha Image forming apparatus and control method for image forming apparatus
CN104462978A (en) * 2014-12-24 2015-03-25 北京奇虎科技有限公司 Method and device for application program authority management
CN105955773A (en) * 2016-04-29 2016-09-21 乐视控股(北京)有限公司 System upgrading method and device
CN106155727A (en) * 2015-04-17 2016-11-23 腾讯科技(深圳)有限公司 The update method of a kind of application program, device and terminal
CN110069266A (en) * 2018-01-24 2019-07-30 腾讯科技(深圳)有限公司 Application upgrade method, apparatus, computer equipment and storage medium
CN110471689A (en) * 2019-08-22 2019-11-19 北京元安物联技术有限公司 A kind of application program updating method and device
CN110806888A (en) * 2019-12-23 2020-02-18 北京奇艺世纪科技有限公司 Application program upgrading method and device and electronic equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8612516B2 (en) * 2011-11-28 2013-12-17 Wyse Technology Inc. Deployment of a driver or an application on a client device having a write-filter

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013185570A1 (en) * 2012-06-13 2013-12-19 腾讯科技(深圳)有限公司 Software update method, software update system and computer storage medium
WO2015033554A1 (en) * 2013-09-09 2015-03-12 Canon Kabushiki Kaisha Image forming apparatus and control method for image forming apparatus
CN104462978A (en) * 2014-12-24 2015-03-25 北京奇虎科技有限公司 Method and device for application program authority management
CN106155727A (en) * 2015-04-17 2016-11-23 腾讯科技(深圳)有限公司 The update method of a kind of application program, device and terminal
CN105955773A (en) * 2016-04-29 2016-09-21 乐视控股(北京)有限公司 System upgrading method and device
CN110069266A (en) * 2018-01-24 2019-07-30 腾讯科技(深圳)有限公司 Application upgrade method, apparatus, computer equipment and storage medium
CN110471689A (en) * 2019-08-22 2019-11-19 北京元安物联技术有限公司 A kind of application program updating method and device
CN110806888A (en) * 2019-12-23 2020-02-18 北京奇艺世纪科技有限公司 Application program upgrading method and device and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
赵越 ; 姜参 ; .非管理员操作下的用户帐户控制.辽宁行政学院学报.2008,(04),全文. *

Also Published As

Publication number Publication date
CN112346765A (en) 2021-02-09

Similar Documents

Publication Publication Date Title
US11474829B2 (en) Customizing program logic for booting a system
US10884806B1 (en) Systems and methods of optimized tuning of resources
CN105955782B (en) Application program operation control method and device
US5935242A (en) Method and apparatus for initializing a device
US9270732B2 (en) System and method for automatically uploading updates
US6434744B1 (en) System and method for patching an installed application program
RU2377638C2 (en) Effective program update
US20180150306A1 (en) Systems and methods for eliminating reboot during initial machine configuration of operating systems
EP1584007B1 (en) System to automatically process components on a device
US20090100420A1 (en) Automatic Acquisition and Installation of Software Upgrades for Collections of Virtual Machines
US9195450B2 (en) Program execution service windows
US20130318512A1 (en) Hot Pluggable Extensions for Access Management System
CN112346765B (en) Application program upgrading method and device, electronic equipment and readable storage medium
CN110196722B (en) Cloud host batch management method, system, equipment and storage medium
CN107665302B (en) Android application multi-open implementation method, mobile terminal and storage medium
US20060265756A1 (en) Disk protection using enhanced write filter
US7409538B2 (en) Update in-use flash memory without external interfaces
US8769521B2 (en) Calendar aware adaptive patching of a computer program
US9058231B2 (en) Deployment of operating systems with detection of loop conditions
US11341233B2 (en) Enforcing policies for unmanaged applications
US20030120827A1 (en) Method and apparatus for automatically detecting machine states during an operating system installation through a network
CN113377487A (en) Method, apparatus and computer program product for managing virtual machine upgrades
US11972265B2 (en) Parallel booting operating system
US9348849B1 (en) Backup client zero-management
US11630591B1 (en) System and method to manage storage system for startup

Legal Events

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