CN115904462A - 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
CN115904462A
CN115904462A CN202310093292.7A CN202310093292A CN115904462A CN 115904462 A CN115904462 A CN 115904462A CN 202310093292 A CN202310093292 A CN 202310093292A CN 115904462 A CN115904462 A CN 115904462A
Authority
CN
China
Prior art keywords
application program
target application
upgrading
service
upgrade
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.)
Pending
Application number
CN202310093292.7A
Other languages
Chinese (zh)
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.)
AVIC INTERNATIONAL E-BUSINESS Inc
Original Assignee
AVIC INTERNATIONAL E-BUSINESS Inc
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 AVIC INTERNATIONAL E-BUSINESS Inc filed Critical AVIC INTERNATIONAL E-BUSINESS Inc
Priority to CN202310093292.7A priority Critical patent/CN115904462A/en
Publication of CN115904462A publication Critical patent/CN115904462A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention relates to the technical field of computers, and discloses an application program upgrading method and device, electronic equipment and a readable storage medium. Wherein, the method can comprise the following steps: acquiring a target application program, an installation directory of the target application program and an upgrading service corresponding to the target application program, wherein the upgrading service is a service with system level authority; when the target application program needs to be updated, acquiring an upgrade file package of the target application program; writing the upgrade file package into an installation directory of the target application program through the upgrade service; and upgrading the target application program based on the upgrading file package under the installation directory. By implementing the technical scheme of the invention, the self-service updating of the application program can be realized without considering the problem of system authority when the application program is updated, and the operation and maintenance cost is saved.

Description

Application program upgrading method and device, electronic equipment and readable storage medium
Technical Field
The invention relates to the technical field of computers, in particular to an application program upgrading method and device, electronic equipment and a readable storage medium.
Background
With the continuous update of the application version, the application program on the client side needs to perform an update operation at variable times. However, in the current scheme, upgrading of the application program requires that the Windows account has the administrator operation authority. When the Windows account does not have the administrator operation right, the upgrade installation operation of the application program cannot be executed.
Disclosure of Invention
In view of this, embodiments of the present invention provide an application program upgrading method and apparatus, an electronic device, and a readable storage medium, so as to solve the problem that it is difficult to complete application program upgrading due to limited system permissions.
According to a first aspect, an embodiment of the present invention provides an application program upgrading method, including: acquiring a target application program, an installation directory of the target application program and an upgrade service corresponding to the target application program, wherein the upgrade service is a service with system level authority deployed in the client; when the target application program needs to be updated, acquiring an upgrade file package of the target application program; writing the upgrade file package into an installation directory of the target application program through the upgrade service; and upgrading the target application program based on the upgrading file package under the installation directory.
According to the application program upgrading method provided by the embodiment of the invention, by deploying the upgrading service with the system level authority, when the target application program needs to be updated, the upgrading file package of the target application program can be written into the corresponding installation directory through the upgrading service, so that the target application program can be updated and upgraded. Therefore, when the application program is updated, the self-service updating of the application program can be realized without considering the problem of system authority, and the operation and maintenance cost is saved.
With reference to the first aspect, in a first implementation manner of the first aspect, the writing, by the upgrade service, the upgrade file package into the installation directory of the target application includes: acquiring a storage path of the upgrade file package in the client; calling an interface of the upgrading service, and transmitting the storage path to the upgrading service so that the upgrading service acquires the upgrading file package through the storage path; and writing the upgrade file package into an installation directory of the target application program based on the upgrade service.
With reference to the first implementation manner of the first aspect, in a second implementation manner of the first aspect, the transferring, by the interface that invokes the upgrade service, the storage path to the upgrade service includes: calling an interface of the upgrading service and determining a loopback address of a host; and transmitting the storage path to the upgrading service through a host loopback address.
According to the application program upgrading method provided by the embodiment of the invention, the storage path of the upgrading file package is transmitted to the upgrading service by calling the interface of the upgrading service, so that the upgrading service can conveniently obtain the upgrading file package of the target application program from the storage path, and the updating of the application program is not limited by the system authority any more.
With reference to the first aspect or the first implementation manner of the first aspect or the second implementation manner of the first aspect, in a third implementation manner of the first aspect, deploying the upgrade service in a client includes: detecting whether the target application program is installed for the first time; when the target application program is installed for the first time, the upgrading service is registered in an operating system where the target application program is located, and the upgrading service is controlled to be kept in an open state.
According to the application program upgrading method provided by the embodiment of the invention, the target application program is installed for the first time, the upgrading service with the system level authority is registered in the operating system, and the upgrading service is set to be kept in the open state, so that the upgrading service can be called conveniently when the target application program is upgraded.
With reference to the first aspect, in a fourth implementation manner of the first aspect, the obtaining an upgrade file package of the target application when the target application needs to be updated includes: when the target application program needs to be updated, acquiring version updating information aiming at the target application program; analyzing the version updating information and determining an upgrade package downloading address corresponding to the target application program; and downloading the upgrade file package corresponding to the target application program based on the upgrade package downloading address.
According to the application program upgrading method provided by the embodiment of the invention, the upgrading package downloading address is obtained by analyzing the version updating information of the target application program, so that the self-service downloading of the upgrading file package can be conveniently realized according to the upgrading package downloading address.
With reference to the first aspect or the fourth implementation manner of the first aspect, in a fifth implementation manner of the first aspect, the determining whether the target application needs to be updated includes: sending an update query request for the target application to a server; receiving version updating information which is fed back by the server and corresponds to the updating query request; detecting whether a target version number in the version updating information is higher than a current version number of the target application program; and when the target version number is higher than the current version number, judging that the target application program needs to be updated.
According to the application program upgrading method provided by the embodiment of the invention, whether the target application program needs to be updated or not is determined by comparing the current version number with the target version number in the version updating information. Thereby, accurate updating for the target application can be achieved.
With reference to the first aspect, in a sixth implementation manner of the first aspect, the upgrade file package includes: a complete installation package of the target application; or, a difference installation package between the latest version installation package and the current version installation package of the target application program.
The application program upgrading method provided by the embodiment of the invention supports the decompression and replacement of the complete installation package and the difference installation package, so that the updating and upgrading of the target application program can be suitable for various scenes, and the updating and upgrading mode is more flexible.
According to a second aspect, an embodiment of the present invention provides an apparatus for upgrading an application program, including: the system comprises an application program acquisition module, a service module and a service module, wherein the application program acquisition module is used for acquiring a target application program, an installation directory of the target application program and an upgrading service corresponding to the target application program, and the upgrading service is a service with system level authority; the upgrade package acquisition module is used for acquiring an upgrade file package of the target application program when the target application program needs to be updated; the trigger module is used for writing the upgrade file package into an installation directory of the target application program through the upgrade service; and the upgrading module is used for upgrading the target application program based on the upgrading file package under the installation directory.
According to a third aspect, embodiments of the present invention provide an electronic device, comprising: the device comprises a memory and a processor, wherein the memory and the processor are connected with each other in a communication mode, the memory stores computer instructions, and the processor executes the computer instructions to execute the upgrading method of the application program according to the first aspect or any embodiment of the first aspect.
According to a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where computer instructions are stored, and the computer instructions are configured to cause a computer to execute the method for upgrading an application program according to the first aspect or any implementation manner of the first aspect.
It should be noted that, for corresponding beneficial effects of the application program upgrading apparatus, the electronic device and the computer-readable storage medium provided in the embodiment of the present invention, please refer to descriptions of corresponding contents in the application program upgrading method, which are not described herein again.
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 embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of an upgrade method of an application according to an embodiment of the present invention;
FIG. 2 is another flow chart of a method for upgrading an application according to an embodiment of the present invention;
FIG. 3 is a further flowchart of an upgrade method for an application according to an embodiment of the present invention;
fig. 4 is a block diagram of an upgrade apparatus of an application according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present invention.
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.
With the continuous update of the application version, the application program on the client side needs to perform an update operation at variable times. The current application version updating method mainly comprises the following steps: performing online upgrade in a covering installation mode; and downloading the upgrade file to perform version upgrade in a decompression replacement mode.
The online upgrade is carried out in a covering installation mode, and the main implementation process is as follows: the client sends the detection update message of the application program to the server, the server returns information such as whether a new version, a latest version number, an upgrade package download address and the like exist, and the client can perform corresponding processing according to the information returned by the server. If the information returned by the server contains the latest version, the client can download the latest installation program of the application program to the local part of the client according to the obtained upgrade package download address, and execute the installation program update of the application program.
However, the upgrade package required to be downloaded in the upgrade method is a complete installation package, the file size of the upgrade package is large, downloading and installation are time-consuming, after the upgrade package is downloaded, the installation operation of the application program needs to have a windows administrator permission, and if the current windows account does not have the administrator permission, upgrade installation cannot be performed through the method.
The method comprises the following steps of downloading an upgrade file, and upgrading the version in a decompression replacement mode, wherein the main implementation process comprises the following steps: the client sends the detection update message of the application program to the server, the server returns information such as whether a new version, a latest version number, an upgrade package download address and the like exist, and the client can perform corresponding processing according to the information returned by the server. If the information returned by the server contains the latest version, the client can download an upgrade file compression package of the application program according to the download address of the upgrade package acquired by the client, wherein the upgrade file compression package contains files required by the update of the application program, but the upgrade file compression package is not a complete installation program. And then, writing the downloaded upgrade file compression package into an installation directory of the application program, thereby completing the upgrade aiming at the application program.
The key link of the upgrading mode is that the upgrading file compression packet is decompressed to an installation directory, partial files of the old version are replaced or newly added, and the installation of the application program does not need to be executed again in the whole process. However, since the installation path of the application downloaded in the windows system is basically on the system disk (C disk), and the installation directory (generally, programs files or program files (X86)) in the C disk is strictly controlled, only the administrator authority can perform read/write operations under the installation directory, and if the current windows account does not have the administrator authority, the file cannot be written into the installation directory of the application, so that the downloaded upgrade file compression package cannot be decompressed to the installation directory.
Therefore, in the current scheme, the Windows account is required to have the administrator operation authority for upgrading the application program. When the Windows account does not have the administrator operation right, the upgrade installation operation of the application program cannot be executed.
Based on this, when the application program is installed for the first time, an upgrade service with system level authority is registered in the operating system, and when the update upgrade of the application program is executed, the upgrade file package is transmitted to the installation directory for decompression and replacement by means of the upgrade service registered before, so that the upgrade file package is not limited by the system authority any more, and even if the current account does not have the authority of a windows administrator, the version upgrade aiming at the application program can be completed.
In accordance with an embodiment of the present invention, there is provided an embodiment of a method for upgrading an application program, it being noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowchart, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
In this embodiment, an upgrading method of an application program is provided, which can be used in electronic devices, such as a mobile phone, a tablet computer, a computer, and the like, fig. 1 is a flowchart of an upgrading method of an application program according to an embodiment of the present invention, and as shown in fig. 1, the flowchart includes the following steps:
s11, acquiring the target application program, the installation directory of the target application program and the upgrading service corresponding to the target application program.
Wherein, the upgrade service is a service with system level authority.
The target application is a computer program installed in the electronic device that needs to perform a certain job or jobs. The target application program runs in a user mode, can interact with a user and has a visual user interface, namely the target application program has a corresponding client in the electronic equipment.
The installation directory is a location where the target application is installed in the electronic device, for example, programinfiles in the C-disc. For different target applications, they all have corresponding installation directories.
The upgrade service is a service registered in the operating system of the electronic device for the initial installation of the target application program, and the upgrade service can have system level authority as the upgrade service is deployed in the operating system of the electronic device. For different target applications, the corresponding upgrading services are registered. Specifically, the target application program is provided with an upgrade registration program, and when the target application program is installed for the first time, corresponding upgrade services can be registered in the operating system of the electronic device through the upgrade registration program.
When a user starts a target application program client installed in the electronic equipment, the electronic equipment can determine the target application program started by the user in response to the operation of the user, and can determine an installation catalog and an upgrade service corresponding to the target application program based on the unique identification of the target application program.
And S12, when the target application program needs to be updated, acquiring an upgrade file package of the target application program.
The electronic device is communicatively coupled to a server for the target application, where the latest version for the target application is stored.
In an optional embodiment, when the electronic device starts the target application client, an update query request may be sent to the server through the target application client, and the server may return a query result corresponding to the update query request. If the target application program needs to be updated, the query result corresponding to the update query request includes the download address of the upgrade package. Accordingly, the electronic device can determine whether the target application program needs to be updated according to the query result returned by the server. If the target application program needs to be updated, the download address of the upgrade package can be extracted from the query result, and then the corresponding upgrade file package is downloaded according to the download address of the upgrade package.
In an optional embodiment, if the latest version for the target application exists in the server, after the electronic device starts the target application client, the server may sense the start of the target application and push version update information. If the user wants to update the target application program, the user can trigger the update operation aiming at the target application program, correspondingly, the electronic equipment can respond to the update operation of the user, extract the download address of the upgrade package from the version update information returned by the server based on the update operation, and download the corresponding upgrade file package according to the download address of the upgrade package.
And S13, writing the upgrade file package into the installation directory of the target application program through the upgrade service.
Because the upgrade service has system level authority, after the upgrade file package is downloaded, the electronic device can control the target application program client to call the upgrade service, and the upgrade service decompresses the upgrade file package into the corresponding installation directory.
And S14, upgrading the target application program based on the upgrade file package under the installation directory.
And replacing the old version data of the target application program by installing an upgrade file package in the directory, and adding new version data, so that the version data of the target application program is updated, and the upgrade aiming at the target application program is completed.
According to the application program upgrading method provided by the embodiment, by deploying the upgrading service with the system level authority, when the target application program needs to be updated, the upgrading file package of the target application program can be written into the corresponding installation directory through the upgrading service, so that the target application program can be updated and upgraded. Therefore, when the client executes the application program upgrading, the self-service updating of the application program can be realized without considering the system authority problem, and the operation and maintenance cost is saved.
In this embodiment, a method for upgrading an application program is provided, which may be used in an electronic device, such as a mobile phone, a tablet computer, a computer, and the like, and fig. 2 is a flowchart of a method for upgrading an application program according to an embodiment of the present invention, where as shown in fig. 2, the flowchart includes the following steps:
s21, acquiring the target application program, the installation catalog of the target application program and the upgrading service corresponding to the target application program, wherein the upgrading service is a service with system level authority.
The step of deploying the upgrade service at the client may include:
(1) And detecting whether the target application program is installed for the first time.
When the target application is installed, the electronic device may traverse all applications currently installed thereon to determine whether the target application is installed in the electronic device. If the target application program is detected to be installed on the mobile terminal, judging that the target application program is not installed for the first time; and if the target application program is not installed on the electronic equipment, judging that the target application program is installed for the first time.
(2) And when the target application program is installed for the first time, registering the upgrading service in an operating system where the target application program is located, and controlling the upgrading service to keep an open state.
If the target application program is installed on the electronic device for the first time, the target application program can register corresponding upgrade service in an operating system of the electronic device in the installation process, so that the upgrade service has system level authority. For example, a "service and application" is found in the computer management of an electronic device, in which the upgrade service is registered.
Meanwhile, the upgrading service is controlled to keep an open state so as to be called when the application program is upgraded. It should be noted that, even if the electronic device is in the standby state, the upgrade service is kept in the on state.
For the details of obtaining the target application program, the installation directory of the target application program, and the upgrade service corresponding to the target application program, reference is made to the relevant description corresponding to the foregoing embodiment, and details are not repeated here.
And S22, when the target application program needs to be updated, acquiring an upgrade file package of the target application program. For detailed description, reference is made to the corresponding related description of the above embodiments, and details are not repeated herein.
And S23, writing the upgrade file package into the installation directory of the target application program through the upgrade service.
Specifically, the step S23 may include:
s231, acquiring a storage path of the upgrade file package.
The storage path is used for representing the storage position of the upgrade file. After the electronic device finishes downloading the upgrade file package, the electronic device may store the upgrade file package locally. When the target application program needs to be upgraded, the electronic equipment can query the local storage space and determine the storage path of the upgrade file package.
S232, calling an interface of the upgrading service, and transmitting the storage path to the upgrading service so that the upgrading service can obtain the upgrading file package through the storage path.
The upgrade service corresponds to a corresponding interface, and the interface comprises a port number of the upgrade service and a host loopback address. When the target application program in the electronic equipment is upgraded, the target application program can call the corresponding interface of the upgrading service, and the storage path of the upgrading file package is transmitted to the upgrading service through the interface of the upgrading service. Then, the upgrade service may obtain the storage path and obtain the upgrade file package from the storage location corresponding to the storage path.
Specifically, the step S232 may include:
(1) And calling an interface of the upgrading service and determining a loopback address of the host.
(2) And transmitting the storage path to the upgrading service through the host loopback address.
The host loopback address is 127.0.0.1, i.e. any packet with address 127.0.0.1 should not leave the host (electronic device), and when the packet is sent, the packet is simply "looped back" by itself, rather than being sent to the local network or the internet, i.e. the host sending the packet is also the receiver of the packet.
The upgrade service is a service registered in an operating system of the electronic device and having system level authority, namely the upgrade service belongs to the electronic device, and is not a local network or the internet, and the transmission of the storage path is realized based on the idea of host loopback address.
Specifically, when the electronic device calls an interface of the upgrade service, the electronic device may resolve a host loopback address and a port number of the upgrade service from the interface. Then, based on the host loopback address and the port number, the storage path of the upgrade file package can be transmitted to the corresponding upgrade service.
And S233, writing the upgrade file package into the installation directory of the target application program based on the upgrade service.
The electronic equipment decompresses the upgrade file packet to the installation catalog of the target application program by means of the upgrade service registered in the operating system of the electronic equipment, namely, the version data required by the update of the target application program is written into the corresponding installation catalog through the upgrade service, so that the update of the target application program is realized.
And S24, upgrading the target application program based on the upgrade file package under the installation directory. For detailed description, reference is made to the corresponding related description of the above embodiments, and details are not repeated herein.
According to the application program upgrading method provided by the embodiment, the target application program is installed for the first time, the upgrading service with the system level authority is registered in the operating system, and the upgrading service is set to be kept in the open state, so that the upgrading service can be called conveniently when the target application program is upgraded. The storage path of the upgrade file package is transmitted to the upgrade service by calling the interface of the upgrade service, so that the upgrade service can conveniently acquire the upgrade file package of the target application program from the storage path, and the update of the application program is not limited by system authority any more.
In this embodiment, an upgrading method of an application program is provided, which can be used in electronic devices, such as a mobile phone, a tablet computer, a computer, and the like, fig. 3 is a flowchart of an upgrading method of an application program according to an embodiment of the present invention, and as shown in fig. 3, the flowchart includes the following steps:
s31, acquiring the target application program, the installation catalog of the target application program and the upgrading service corresponding to the target application program, wherein the upgrading service is a service with system level authority. For a detailed description, refer to the corresponding related description of the above embodiments, which is not repeated herein.
And S32, when the target application program needs to be updated, acquiring an upgrade file package of the target application program.
Specifically, the step S32 may include:
s321, when the target application program needs to be updated, version updating information aiming at the target application program is obtained.
The version update information is version data of the target application program, and the version update information may include whether the target application program has a new version, a version number of the target application program, an upgrade package download address, and the like. Specifically, after the target application client is started, the client may send an update query request to the server of the target application, and the server may feed back corresponding version update information. Accordingly, the electronic device may obtain version update information of the target application program.
S322, analyzing the version updating information and determining the download address of the upgrade package corresponding to the target application program.
The electronic equipment analyzes the acquired version updating information based on a preset communication protocol, and analyzes a corresponding download address of the upgrade package from the version updating information.
And S323, downloading the upgrade file package corresponding to the target application program based on the upgrade package downloading address.
The upgrade package download address contains an upgrade file package. Specifically, the electronic device may access the upgrade package download address and download the corresponding upgrade file package from the upgrade package download address.
Specifically, the upgrade file package may include: a complete installation package of the target application program; or a difference installation package between the latest version installation package and the current version installation package of the target application program.
By supporting the decompression and replacement of the complete installation package and the differential installation package, the updating and upgrading of the target application program can be suitable for various scenes, and the updating and upgrading mode is more flexible.
As an optional implementation, the step of determining whether the target application needs to be updated includes:
(1) An update query request for the target application is sent to the server.
The server stores the latest version and a plurality of historical versions for the target application program. After the target application client is started, the electronic device may send an update query request to the server through the target application client.
(2) And receiving version updating information which is fed back by the server and corresponds to the updating inquiry request.
When receiving the update query request, the server may detect version information of the target application according to the update query request. If the target application program has a new version, the server may feed back version update information to the target application program client of the electronic device, and accordingly, the target application program client in the electronic device may receive the version update information.
(3) And detecting whether the target version number in the version updating information is higher than the current version number of the target application program.
The target version number is the latest version number in the version-up information. After the electronic equipment receives the version updating information, the target version number is compared with the current version number to determine whether the target version number of the target application program is higher than the current version number.
(4) And when the target version number is higher than the current version number, judging that the target application program needs to be updated.
When the target version number is higher than the current version number, the target application program is indicated to have a new version, and the target application program can be judged to need to be updated at the moment.
And S33, writing the upgrade file package into the installation directory of the target application program through the upgrade service. For a detailed description, refer to the corresponding related description of the above embodiments, which is not repeated herein.
And S34, upgrading the target application program based on the upgrade file package under the installation directory. For a detailed description, refer to the corresponding related description of the above embodiments, which is not repeated herein.
According to the upgrading method of the application program provided by the embodiment, whether the target application program needs to be updated or not is determined by comparing the current version number with the target version number in the version updating information, so that accurate updating for the target application program can be realized. The upgrade package download address is obtained by analyzing the version update information of the target application program, so that the self-service download of the upgrade file package can be realized conveniently according to the upgrade package download address.
In this embodiment, an upgrading apparatus for an application program is further provided, and the apparatus is used to implement the foregoing embodiments and preferred embodiments, and the descriptions already given are omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
The present embodiment provides an upgrade apparatus for an application program, as shown in fig. 4, including:
the application obtaining module 41 is configured to obtain the target application, the installation directory of the target application, and an upgrade service corresponding to the target application, where the upgrade service is a service with system level permission.
And the upgrade package obtaining module 42 is configured to obtain the upgrade file package of the target application program when the target application program needs to be updated.
And a triggering module 43, configured to write the upgrade file package into the installation directory of the target application program through the upgrade service.
And the upgrading module 44 is used for upgrading the target application program based on the upgrading file package in the installation directory.
Optionally, the triggering module 43 may include:
and the first obtaining submodule is used for obtaining the storage path of the upgrade file package.
And the calling submodule is used for calling an interface of the upgrading service and transmitting the storage path to the upgrading service so that the upgrading service can obtain the upgrading file package through the storage path.
And the writing submodule is used for writing the upgrading file package into the installation catalog of the target application program based on the upgrading service.
Specifically, the calling submodule is configured to: calling an interface of the upgrading service, and determining a loopback address of the host; and transmitting the storage path to the upgrading service through the host loopback address.
Optionally, the apparatus for upgrading an application program may further include:
and the primary installation detection module is used for detecting whether the target application program is installed for the first time.
And the upgrading service registration module is used for registering upgrading service in the operating system where the target application program is located and controlling the upgrading service to keep an open state when the target application program is installed for the first time.
Optionally, the upgrade package obtaining module 42 may include:
and the second acquisition submodule is used for acquiring the version update information aiming at the target application program when the target application program needs to be updated.
And the analysis submodule is used for analyzing the version updating information and determining the download address of the upgrade package corresponding to the target application program.
And the downloading submodule is used for downloading the upgrading file package corresponding to the target application program based on the upgrading package downloading address.
Optionally, the apparatus for upgrading an application program may further include:
and the request sending module is used for sending an update inquiry request aiming at the target application program to the server.
And the receiving module is used for receiving the version updating information which is fed back by the server and corresponds to the updating query request.
And the version detection module is used for detecting whether the target version number in the version updating information is higher than the current version number of the target application program.
And the update judging module is used for judging that the target application program needs to be updated when the target version number is higher than the current version number.
The application upgrade mechanism in this embodiment is in the form of a functional unit, where the unit refers to an ASIC circuit, a processor and memory that execute one or more software or firmware programs, and/or other devices that provide the above-described functionality.
Further functional descriptions of the modules and sub-modules are the same as those of the corresponding embodiments, and are not repeated herein.
According to the upgrading device of the application program, by deploying the upgrading service with the system level authority, when the target application program needs to be updated, the upgrading file package of the target application program can be written into the corresponding installation directory through the upgrading service, so that the updating and upgrading aiming at the target application program are realized. Therefore, when the application program is updated, the self-service updating of the application program can be realized without considering the problem of system authority, and the operation and maintenance cost is saved.
An embodiment of the present invention further provides an electronic device, which includes the application program upgrading apparatus shown in fig. 4.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an electronic device according to an alternative embodiment of the present invention, and as shown in fig. 5, the electronic device may include: at least one processor 501, such as a Central Processing Unit (CPU), at least one communication interface 503, memory 504, and at least one communication bus 502. Wherein a communication bus 502 is used to enable connective communication between these components. The communication interface 503 may include a Display (Display) and a Keyboard (Keyboard), and the optional communication interface 503 may also include a standard wired interface and a standard wireless interface. The Memory 504 may be a high-speed volatile Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The memory 504 may alternatively be at least one memory device located remotely from the processor 501. Wherein the processor 501 may be in connection with the apparatus described in fig. 4, an application program is stored in the memory 504, and the processor 501 calls the program code stored in the memory 504 for performing any of the method steps described above.
The communication bus 502 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus 502 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 5, but this is not intended to represent only one bus or type of bus.
The memory 504 may include a volatile memory (volatile memory), such as a random-access memory (RAM); the memory may also include a non-volatile memory (non-volatile memory), such as a flash memory (flash memory), a hard disk (HDD) or a solid-state drive (SSD); the memory 504 may also comprise a combination of the above-described types of memory.
The processor 501 may be a Central Processing Unit (CPU), a Network Processor (NP), or a combination of the CPU and the NP.
The processor 501 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. The PLD may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), a General Array Logic (GAL), or any combination thereof.
Optionally, the memory 504 is also used to store program instructions. The processor 501 may call program instructions to implement the upgrade method of the application program as shown in the above embodiments of the present application.
The embodiment of the invention also provides a non-transitory computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions can execute the upgrading method of the application program in any method embodiment. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a flash Memory (FlashMemory), a Hard Disk (Hard Disk Drive, HDD), a Solid State Drive (SSD), or the like; the storage medium may also comprise a combination of memories of the kind described above.
Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope defined by the appended claims.

Claims (10)

1. An application program upgrading method, comprising:
acquiring a target application program, an installation directory of the target application program and an upgrade service corresponding to the target application program, wherein the upgrade service is a service with system level authority;
when the target application program needs to be updated, acquiring an upgrade file package of the target application program;
writing the upgrade file package into an installation directory of the target application program through the upgrade service;
and upgrading the target application program based on the upgrading file package under the installation directory.
2. The method of claim 1, wherein the writing, by the upgrade service, the upgrade file package to an installation directory of the target application comprises:
acquiring a storage path of the upgrade file package;
calling an interface of the upgrading service, and transmitting the storage path to the upgrading service so that the upgrading service acquires the upgrading file package through the storage path;
and writing the upgrade file packet into an installation directory of the target application program based on the upgrade service.
3. The method of claim 2, wherein the interface invoking the upgrade service transmitting the storage path to the upgrade service comprises:
calling an interface of the upgrading service and determining a loopback address of a host;
and transmitting the storage path to the upgrading service through a host loopback address.
4. The method of any of claims 1-3, wherein deploying the upgrade service in a client comprises:
detecting whether the target application program is installed for the first time;
and when the target application program is installed for the first time, registering the upgrading service in an operating system where the target application program is located, and controlling the upgrading service to keep an open state.
5. The method according to claim 1, wherein the obtaining the upgrade file package of the target application when the target application needs to be updated comprises:
when the target application program needs to be updated, acquiring version updating information aiming at the target application program;
analyzing the version updating information and determining an upgrade package downloading address corresponding to the target application program;
and downloading the upgrade file package corresponding to the target application program based on the upgrade package downloading address.
6. The method of claim 1 or 5, wherein determining whether the target application needs to be updated comprises:
sending an update query request for the target application to a server;
receiving version updating information which is fed back by the server and corresponds to the updating query request;
detecting whether a target version number in the version updating information is higher than a current version number of the target application program;
and when the target version number is higher than the current version number, judging that the target application program needs to be updated.
7. The method of claim 1 or 5, wherein the upgrade file package comprises:
a complete installation package of the target application; or the like, or, alternatively,
a difference installation package between a latest version installation package and a current version installation package of the target application.
8. An apparatus for upgrading an application, the apparatus comprising:
the system comprises an application program acquisition module, a service module and a service module, wherein the application program acquisition module is used for acquiring a target application program, an installation directory of the target application program and an upgrading service corresponding to the target application program, and the upgrading service is a service with system level authority;
the upgrade package acquisition module is used for acquiring an upgrade file package of the target application program when the target application program needs to be updated;
the trigger module is used for writing the upgrade file package into an installation directory of the target application program through the upgrade service;
and the upgrading module is used for upgrading the target application program based on the upgrading file package under the installation directory.
9. An electronic device, comprising:
a memory and a processor, the memory and the processor being communicatively connected to each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the method for upgrading an application program according to any one of claims 1 to 7.
10. A computer-readable storage medium storing computer instructions for causing a computer to execute the method for upgrading an application program according to any one of claims 1 to 7.
CN202310093292.7A 2023-02-10 2023-02-10 Application program upgrading method and device, electronic equipment and readable storage medium Pending CN115904462A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310093292.7A CN115904462A (en) 2023-02-10 2023-02-10 Application program upgrading method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310093292.7A CN115904462A (en) 2023-02-10 2023-02-10 Application program upgrading method and device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN115904462A true CN115904462A (en) 2023-04-04

Family

ID=86491644

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310093292.7A Pending CN115904462A (en) 2023-02-10 2023-02-10 Application program upgrading method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN115904462A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111741087A (en) * 2020-06-09 2020-10-02 科华恒盛股份有限公司 Remote upgrading method, terminal equipment and readable storage medium
CN112346765A (en) * 2020-11-06 2021-02-09 北京奇艺世纪科技有限公司 Application program upgrading method and device, electronic equipment and readable storage medium
CN113010197A (en) * 2020-06-11 2021-06-22 深圳市科脉技术股份有限公司 Application silence upgrading method, system, terminal equipment and storage medium
CN114040251A (en) * 2021-09-17 2022-02-11 北京旷视科技有限公司 Audio and video playing method, system, storage medium and computer program product

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111741087A (en) * 2020-06-09 2020-10-02 科华恒盛股份有限公司 Remote upgrading method, terminal equipment and readable storage medium
CN113010197A (en) * 2020-06-11 2021-06-22 深圳市科脉技术股份有限公司 Application silence upgrading method, system, terminal equipment and storage medium
CN112346765A (en) * 2020-11-06 2021-02-09 北京奇艺世纪科技有限公司 Application program upgrading method and device, electronic equipment and readable storage medium
CN114040251A (en) * 2021-09-17 2022-02-11 北京旷视科技有限公司 Audio and video playing method, system, storage medium and computer program product

Similar Documents

Publication Publication Date Title
US7940407B2 (en) Image forming apparatus, terminal apparatus and management apparatus
US8037198B2 (en) Firmware upgrade for thin clients using one or more servers
US8745610B2 (en) Maintenance system, maintenance method and program for maintenance
US7376944B2 (en) Hardware ROM upgrade through an internet or intranet service
KR101310218B1 (en) Method for installing an integrated file and image forming apparatus for installing the integrated file thereby
US20190171443A1 (en) Method of Updating Application and Recording Medium
CN110730090B (en) Batch updating method, device, medium and electronic equipment for agent terminals in cloud environment
CN110457049B (en) Method and device for realizing plug-in automation, electronic equipment and storage medium
CN106843947B (en) Method and device for processing code defects
CN111198703A (en) Version upgrading method, system, equipment and medium
US11704105B2 (en) Method, device, and computer program product for managing virtual machine upgrade
EP3260981B1 (en) Information processing apparatus, information processing system, and information processing method for updating firmware
CN111857758B (en) Application deployment method, device and medium
CN113596087A (en) Application upgrading method and device and computer readable storage medium
US9141321B1 (en) Configurable printer server device
GB2348987A (en) Upgrading firmware from a web site using an applet
CN115904462A (en) Application program upgrading method and device, electronic equipment and readable storage medium
CN111752576A (en) Forwarding system deployment method based on 5G data, terminal and storage medium
CN112363737B (en) System installation method and related device
KR20150029916A (en) Apparatus and method for setting up computting environments
CN110764803B (en) Software upgrading method and device
CN112711430A (en) ADB-based non-network equipment upgrading method and system and readable storage medium
CN112860300A (en) Distributed SDK (software development kit) hot update processing method and application server cluster
CN111796837A (en) Hot patch uninstalling method, equipment, storage medium and device of operating system
JP2015121887A (en) Information processing device and control method thereof, and program

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20230404