CN110837377A - Application program updating method and device, storage medium and electronic equipment - Google Patents

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

Info

Publication number
CN110837377A
CN110837377A CN201810929797.1A CN201810929797A CN110837377A CN 110837377 A CN110837377 A CN 110837377A CN 201810929797 A CN201810929797 A CN 201810929797A CN 110837377 A CN110837377 A CN 110837377A
Authority
CN
China
Prior art keywords
application program
state
graphical interface
updating
application
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.)
Granted
Application number
CN201810929797.1A
Other languages
Chinese (zh)
Other versions
CN110837377B (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 Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum 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 Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201810929797.1A priority Critical patent/CN110837377B/en
Publication of CN110837377A publication Critical patent/CN110837377A/en
Application granted granted Critical
Publication of CN110837377B publication Critical patent/CN110837377B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • 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

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides an updating method and device of an application program, a storage medium and electronic equipment, wherein the updating method of the application program comprises the following steps: establishing a graphical interface environment on which an application program depends, wherein the application program is the application program with a graphical interface; detecting whether the application program needs to be updated based on the graphical interface environment; when the application program is detected to need updating, detecting whether the current running state of the application program is a running stop state; if so, the application program is updated. Therefore, the scheme provided by the invention can improve the automation degree of updating the application program with the graphical interface.

Description

Application program updating method and device, storage medium and electronic equipment
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to an updating method and device of an application program, a storage medium and electronic equipment.
Background
With the development of computer technology, more and more applications with graphical interfaces having different functions are developed. The application programs can be applied to clients (such as intelligent devices including computers, mobile phones and tablet computers), and the daily life of people is greatly enriched.
At present, in the application process, the application program is updated and upgraded according to the problems in the application and the customer requirements. Now when an application is updated, a user is usually required to acquire a new version of the application and manually operate to update the application. That is, a person must be attended during the updating process of the application program, otherwise, the application program cannot be updated. Therefore, in the existing mode, the application program needs manual update by personnel.
Disclosure of Invention
In view of this, embodiments of the present invention provide an application program updating method and apparatus, a storage medium, and an electronic device, and mainly aim to improve an automation degree of updating an application program with a graphical interface.
In a first aspect, an embodiment of the present invention provides an update method for an application program, where the update method for the application program includes:
establishing a graphical interface environment on which an application program depends, wherein the application program is the application program with a graphical interface;
detecting whether the application program needs to be updated based on the graphical interface environment;
when the application program is detected to need updating, detecting whether the current running state of the application program is a running stop state;
if so, the application program is updated.
Optionally, the establishing a graphical interface environment on which the application depends includes:
acquiring a pre-registered login account, and logging in the application program through the login account so as to start a graphical interface of the application program when the login is successful;
and when the graphical interface is detected to be started, locking the graphical interface to obtain the graphical interface environment.
Optionally, the method further includes:
and when detecting that the current running state of the application program is not the running stop state, sending a running stop command to the application program so as to enable the application program to enter the running stop state according to the running stop command.
Optionally, the detecting whether the current running state of the application is a running stop state includes:
detecting whether a busy state identifier corresponding to the application program exists at the current time; the busy state identification is preset and exists when the application program is in a busy state;
if the busy state identification is detected to exist, determining that the current running state of the application program is a busy state;
if the busy state identification is detected to be absent, detecting whether an execution interface corresponding to the application program is started at the current time, and determining that the current running state of the application program is an idle state after the execution interface is detected to be started; and after detecting that the execution interface is not started, determining the current running state of the application program to be a running stop state.
Optionally, the detecting whether the application needs to be updated includes:
detecting whether the current version information of the application program is consistent with the latest version information of the application program in an external remote server in real time or in a preset period;
if not, determining that the application program needs to be updated;
otherwise, it is determined that the application does not need to be updated.
Optionally, the updating the application program includes:
downloading the latest version of the application program from an external remote server;
and updating the current version of the application program by using the latest version of the application program.
In a second aspect, an embodiment of the present invention provides an apparatus for updating an application program, where the apparatus for updating an application program includes:
the system comprises an establishing module, a judging module and a judging module, wherein the establishing module is used for establishing a graphical interface environment depended by an application program, and the application program is an application program with a graphical interface;
the updating detection module is used for detecting whether the application program needs to be updated or not based on the graphical interface environment established by the establishing module;
the state detection module is used for detecting whether the current running state of the application program is a running stop state or not when the update detection module detects that the application program needs to be updated, and if so, triggering the update module;
and the updating module is used for updating the application program under the triggering of the state detection module.
Optionally, the establishing module includes: logging in a submodule and forming a submodule;
the login submodule is used for acquiring a pre-registered login account and logging in the application program through the login account so as to start a graphical interface of the application program when the login is successful;
and the forming submodule is used for locking the graphical interface to obtain the graphical interface environment when the fact that the graphical interface is enabled is detected.
Optionally, the apparatus further comprises:
the command sending module is configured to send a stop operation command to the application program when the state detection module detects that the current operation state of the application program is not a stop operation state, so that the application program enters the stop operation state according to the stop operation command.
Optionally, the current operating state includes a busy state, an idle state and a stop operating state, and the state detecting module includes:
the first detection submodule is used for detecting whether a busy state identifier corresponding to the application program exists at the current time; the busy state identification is preset and exists when the application program is in a busy state;
the first determining submodule is used for determining that the current running state of the application program is a busy state after the first detecting submodule detects that the busy state identification exists;
the second detection submodule is used for detecting whether an execution interface corresponding to the application program is started at the current time or not after the first detection submodule detects that the busy state identification does not exist;
the second determining submodule is used for determining that the current running state of the application program is an idle state after the second detecting submodule detects that the execution interface is started;
and the third determining submodule is used for determining that the current running state of the application program is a running stop state after the second detecting submodule detects that the execution interface is not started.
Optionally, the update detecting module includes:
the third detection submodule is used for detecting whether the current version information of the application program is consistent with the latest version information of the application program in an external remote server in real time or in a preset period;
the fourth determining submodule is used for determining that the application program needs to be updated when the third detecting submodule detects that the version information is inconsistent; and when the third detection submodule detects that the version information is consistent, determining that the application program does not need to be updated.
Optionally, the update module includes: a download submodule and an update submodule;
the download submodule is used for downloading the application program of the latest version from an external remote server;
and the updating submodule is used for updating the application program of the current version by adopting the application program of the latest version downloaded by the downloading submodule.
In a third aspect, an embodiment of the present invention provides a storage medium, where the storage medium includes a stored program, and when the program runs, a device in which the storage medium is located is controlled to execute the method for updating an application program described in any one of the foregoing items.
In a fourth aspect, an embodiment of the present invention provides an electronic device, where the electronic device includes a processor, a memory, and a bus; the processor and the memory complete mutual communication through the bus; the processor is configured to call the program instructions in the memory to execute the method for updating an application program according to any one of the above items.
The embodiment of the invention provides an updating method and device of an application program, a storage medium and electronic equipment. The Graphical Interface may also be referred to as a Graphical User Interface (Graphical User Interface). When the application program needs to be updated, whether the current running state of the application program is the running stop state is detected. And when the current running state of the application program is detected to be the running stop state, updating the application program. Therefore, in the embodiment of the present invention, after the graphical interface environment on which the application depends is established, whether the application needs to be updated or not can be detected, and the application is updated according to the detection result. It can be seen that no human intervention is required during the update of the application. Therefore, the scheme provided by the embodiment of the invention can improve the automation degree of updating the application program with the graphical interface.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
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 introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a flowchart illustrating an update method for an application according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating a method for updating an application according to another embodiment of the present invention;
fig. 3 is a schematic structural diagram illustrating an apparatus for updating an application according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram illustrating an apparatus for updating an application according to another embodiment of the present invention;
fig. 5 is a schematic structural diagram illustrating an apparatus for updating an application according to another embodiment of the present invention;
fig. 6 is a schematic structural diagram illustrating an apparatus for updating an application according to another embodiment of the present invention;
fig. 7 is a schematic structural diagram illustrating an apparatus for updating an application according to another embodiment of the present invention;
fig. 8 is a schematic structural diagram illustrating an apparatus for updating an application according to another embodiment of the present invention;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
As shown in fig. 1, an embodiment of the present invention provides an update method for an application program, where the update method for the application program includes:
step 101: establishing a graphical interface environment on which an application program depends, wherein the application program is the application program with a graphical interface;
step 102: detecting whether the application program needs to be updated based on the graphical interface environment;
step 103: when detecting that the application program needs to be updated, detecting whether the current running state of the application program is a running stop state, if so, executing step 104;
step 104: and updating the application program.
According to the embodiment shown in fig. 1, a graphical interface environment on which an application with a graphical interface depends is established first, and then whether the application needs to be updated is detected based on the established graphical interface environment. The Graphical Interface may also be referred to as a Graphical User Interface (Graphical User Interface). When the application program needs to be updated, whether the current running state of the application program is the running stop state is detected. And when the current running state of the application program is detected to be the running stop state, updating the application program. Therefore, in the embodiment of the present invention, after the graphical interface environment on which the application depends is established, whether the application needs to be updated or not can be detected, and the application is updated according to the detection result. It can be seen that no human intervention is required during the update of the application. Therefore, the scheme provided by the embodiment of the invention can improve the automation degree of updating the application program with the graphical interface.
In an embodiment of the present invention, when step 103 in the flowchart shown in fig. 1 detects that the current running state of the application program is not the running stop state, a running stop command is sent to the application program, so that the application program enters the running stop state according to the running stop command.
In this embodiment, when it is detected that the current running state of the application is not the running stop state, a running stop command is sent to the application, so that the application enters the running stop state according to the running stop command. The specific type of the stop command may be determined according to the service requirements. However, it should be noted that the stop command should be agreed with the application program so that the application program can enter the stop state according to the stop command when receiving the stop command.
In this embodiment, at least three cases exist when the application enters the shutdown state according to the shutdown command:
first, when the application program receives a stop command, it immediately stops the currently executed task from entering a stop state.
And secondly, when the application program receives the operation stopping command, the application program continues to execute the currently executed task, and when the currently executed task is finished, other new tasks are not executed any more, and the application program enters the operation stopping state.
Thirdly, when the application program receives the operation stop command, the currently executed task is continuously executed. And when the time reaches a preset time point, if the currently executed task is not finished, stopping the currently executed task to enter a running stop state.
According to the above-described embodiment, when the application is not in the stop state, the application needs to be stopped by the stop command before the application is updated. So that the application is not running when the application is updated, thereby reducing the probability of errors and confusion in the application update.
In an embodiment of the present invention, the step 101 in the flowchart shown in fig. 1 for establishing a graphical interface environment on which an application depends may include:
acquiring a pre-registered login account, and logging in the application program through the login account so as to start a graphical interface of the application program when the login is successful;
and when the graphical interface is detected to be started, locking the graphical interface to obtain the graphical interface environment.
In this embodiment, the specific content included in the preset registered login account may be determined according to the service requirement. For example, the login account may include, but is not limited to, a username and password.
In this embodiment, the application may be deployed in the client. The login account is acquired after the client is started, and the application program can be logged in by using the login account immediately or at a preset time point, so that the image interface is started after the application program is successfully logged in.
In the embodiment, the graphical interface is locked to obtain the graphical interface environment when the graphical interface is detected to be enabled, so that the application program can be updated.
According to the embodiment, the graphical interface is started through the login of the pre-registered login account, the graphical interface is locked to obtain the graphical interface environment, and the graphical interface environment is established without manual operation of a user. Therefore, even in the unattended state, the graphical interface environment can be automatically established.
In an embodiment of the present invention, the detecting whether the application needs to be updated according to step 102 in the flowchart shown in fig. 1 may include:
detecting whether the current version information of the application program is consistent with the latest version information of the application program in an external remote server in real time or in a preset period;
if not, determining that the application program needs to be updated;
otherwise, it is determined that the application does not need to be updated.
In this embodiment, detecting whether the current version information of the application program is consistent with the latest version information of the application program in the external remote server, there may be at least the following three cases:
first, it is detected in real time whether the current version information of the application program is consistent with the latest version information of the application program in the external remote server.
Second, it is detected at a preset period whether the current version information of the application program is consistent with the latest version information of the application program in the external remote server. The preset period may be determined according to the service requirement, for example, 1 second, 0.5 second, 3 seconds, 1 minute, one day, one week, and one month.
Thirdly, when a detection instruction input from the outside is received, whether the current version information of the application program is consistent with the latest version information of the application program in the external remote server is detected.
The first and second cases described above have a high level of automation of detection since they can be detected automatically without intervention of service personnel. In the third case, the service personnel can send the detection instruction when having the detection requirement, so that the third service is more flexible in application. For example, when the preset period is not reached, it may also be detected whether the current version information of the application program is consistent with the latest version information of the application program in the external remote server by means of the detection instruction.
In this embodiment, the version information of the application program may include, but is not limited to, a version number. Detecting whether the current version information of the application program is consistent with the latest version information of the application program in the external remote server may include: and detecting whether the current version number of the application program is consistent with the latest version number of the application program in the remote server. If the application program is detected to be consistent with the original version, the application program in the remote server is indicated to be not required to be updated. If an inconsistency is detected, it is indicated that the application in the remote server is the latest version, and the application needs to be updated.
In the present embodiment, the following are exemplified: application a is present in client 1. And detecting whether the current version number of the application program A is consistent with the latest version number of the application program A in the remote server or not at a preset period of 1 second. The current version number of application a in client 1 is 1.0 and the latest version number of application a in the remote server is 2.0. Obviously, if the current version number of the application a is detected to be inconsistent with the latest version number of the application a in the remote server, it is detected that the application a in the client 1 needs to be updated.
According to the above-described embodiment, since whether the application needs to be updated is determined using the version information of the application. Therefore, once the version information of the application program in the remote server is changed, the application program can be timely detected to need to be updated.
In an embodiment of the present invention, the current operating states include a busy state, an idle state, and a stop operating state, where the busy state and the idle state may be considered as non-stop operating states, and the current operating states may include: the shutdown state and the non-shutdown state.
The step 103 of detecting whether the current running state of the application program is the stop running state in the flowchart shown in fig. 1 may include:
detecting whether a busy state identifier corresponding to the application program exists at the current time; the busy state identification is preset and exists when the application program is in a busy state;
if the busy state identification is detected to exist, determining that the current running state of the application program is a busy state;
if the busy state identification is detected to be absent, detecting whether an execution interface corresponding to the application program is started at the current time, and determining that the current running state of the application program is an idle state after the execution interface is detected to be started; and after detecting that the execution interface is not started, determining the current running state of the application program to be a running stop state.
In this embodiment, the specific type of busy status indicator may be determined according to the service requirement. For example, the busy status flag may be a file with a specific name and a specific file type, or may be an identifier. When the application program is in a busy state when the application program executes the task, the busy state identification automatically appears so as to be capable of visually seeing that the current application program executes the task. The busy status flag will automatically disappear when the application finishes executing the task.
In the present embodiment, the following are exemplified: the busy state is identified as "busy. Application a is performing a task at the current time, there is a busy status flag "busy. And if the busy state identifier 'busy, TXT' corresponding to the application program A exists at the current time, judging that the current running state of the application program A is the busy state. Since the application is in a busy state, there will be a busy state indication file. Therefore, whether the application program is in the busy state can be accurately judged according to the existence state of the busy state indication file.
In this embodiment, when it is detected that the current running state of the application program is a busy state, a stop command is sent to the application program, so that the application program enters a stop running state according to the stop command. The specific type of the stop command may be determined according to the service requirements. However, it should be noted that the stop command should be agreed with the application program so that the application program can enter the stop state according to the stop command when receiving the stop command.
In the present embodiment, the following are exemplified: it is judged that the current running state of the application a is the busy state in which the application a is performing the task 1. A stop command 1 is sent to application a. When the application a receives the stop command 1, the execution of the task 1 is immediately stopped to enter the stop state.
In this embodiment, when it is detected that there is no busy state identifier, it is continuously detected whether an execution interface corresponding to the application program is started at the current time. When detecting that the execution interface is started, the current program is in an idle state and does not execute the task, and at the moment, the execution interface needs to be closed so that the application program enters a running stop state. When detecting that the execution interface is not started, the current program is in a stop running state, and at this time, the relevant update operation can be directly executed on the application program.
According to the above-described embodiment, regardless of whether the current running state of the application is an idle state or a busy state, that is, when the current running state of the application is a non-stop running state, the application needs to be stopped before the application is updated. So that the application is not running when the application is updated, thereby reducing the probability of errors and confusion in the application update.
In an embodiment of the present invention, the updating the application program in step 104 in the flowchart shown in fig. 1 may include:
downloading the latest version of the application program from an external remote server;
and updating the current version of the application program by using the latest version of the application program.
In this embodiment, the specific type of the remote server may be determined according to the service requirement. For example, the remote server may be a cloud platform type remote server.
In the present embodiment, the following are exemplified: the latest version (2.0 version) of the application program A is downloaded from an external remote server, and the current version (1.0 version) of the application program A is updated by using the latest version (2.0 version) of the application program A.
In this embodiment, after downloading the latest version of the application program from the external remote server, and before updating the current version of the application program with the latest version of the application program, the method may further include: and verifying the downloaded application program of the latest version, and updating the application program of the current version by using the downloaded application program of the latest version when the safety of the downloaded application program of the latest version is verified. The verification method can utilize a signature verification method to perform verification, and can perform security processing such as virus elimination and Trojan horse elimination on the downloaded application program of the latest version.
According to the embodiment, since the application program of the latest version is downloaded from the remote server, the downloading source is clear. Therefore, the latest version of the application program has higher security.
In an embodiment of the present invention, the updating of the current version of the application program with the latest version of the application program in the previous embodiment may include at least the following two methods:
the first method comprises the following steps:
in an embodiment of the present invention, the updating the current version of the application program with the latest version of the application program in the previous embodiment may include:
determining all files corresponding to the application program of the latest version;
searching for target files which are different from the files corresponding to the application program of the current version and do not exist in the files corresponding to the application program of the current version in all the files;
and updating the application program of the current version by using the searched target file.
In this embodiment, searching for a target file that is different from the file corresponding to the application program of the current version and does not exist in the file corresponding to the application program of the current version, among all files corresponding to the application program of the latest version, may include:
executing the following steps respectively aiming at each file corresponding to the application program of the latest version:
judging whether a file corresponding to the file exists in the file corresponding to the application program of the current version;
if the file exists in the file corresponding to the application program of the current version, continuously judging whether the file is consistent with the corresponding file;
if the file is inconsistent with the corresponding file, determining that the file is a target file;
and if the file does not exist in the file corresponding to the application program of the current version, determining that the file is the target file.
In the present embodiment, the following are exemplified: all files corresponding to the latest version of the application include file 1, file 2, file 3, file 4, and file 5. In all the files corresponding to the application program of the latest version, it is found that the file 1 is different from the file 1 in the application program a of the current version and that the file 5 is not present in the file in the application program a of the current version. The found file 1 is used for replacing the file 1 in the application program A of the current version and the file 5 is directly added into the file of the application program A of the current version, so that the updating of the application program A of the current version is completed.
In this embodiment, when the update of the application program of the current version is completed, if the application program has a start requirement, the application program needs to be started, so that after the application program is started, the configuration file of the application program in the local (when the application program is installed on the client, the client is local) is updated, so as to provide an execution basis for the subsequent running of the application program.
According to the above-described embodiment, since the application is updated only with the target file that is different in the presence of the file corresponding to the application of the current version among all the files corresponding to the application of the latest version and that is not present in the file corresponding to the application of the current version. The amount of updating is reduced, thereby increasing the updating speed.
The second method comprises the following steps:
in an embodiment of the present invention, updating the current version of the application program with the latest version of the application program may include:
determining all files corresponding to the application program of the latest version;
and replacing all files corresponding to the application program of the current version with all the files.
According to the embodiment, the files corresponding to the application program of the current version are integrally replaced and updated by using all the files corresponding to the application program of the latest version, so that the updating process is simple and the error rate is low.
In an embodiment of the present invention, after the application program is updated at step 104 in the flowchart shown in fig. 1, step 102 in the flowchart shown in fig. 1 may be executed continuously, so that when the application program needs to be updated again, the application program is updated continuously.
In one embodiment of the invention, the number of applications may be determined according to business requirements.
When the number of the application programs is one, the established graphical interface environment is the graphical interface environment depended by the application program.
When the number of the application programs is multiple, the established graphical interface environment is the graphical interface environment depended by the multiple application programs. These multiple applications may be updated based on the graphical interface environment.
In this embodiment, the application may be an application deployed on the client. The type of the client can be determined according to the service requirements. For example, the client may include, but is not limited to, a cell phone, a platform computer, a desktop computer, a server, and the like.
Taking an application a deployed on a client a as an example, an update method of an application is described below, and as shown in fig. 2, the update method of an application may include:
step 201: and acquiring a pre-registered login account, and logging in a graphical interface corresponding to the application program through the login account so as to start the graphical interface of the application program when the login is successful.
In this step, when the client a is started, the graphical interface corresponding to the application a is logged in through the login account "user name and password" so as to enable the graphical interface of the application a when the login is successful.
Step 202: and when the graphical interface is detected to be started, locking the graphical interface to obtain a graphical interface environment.
In this step, when the graphical interface is enabled, the graphical interface is locked to form a graphical interface environment.
Step 203: detecting whether the current version information of the application program is consistent with the version information of the latest application program in an external remote server or not at a preset period based on a graphical interface environment; if yes, continuing to execute the step; otherwise, step 204 is performed.
In this step, it is detected at a cycle of 1 second whether the current version information "version number" of the application a coincides with the latest version information "version number" of the application a in the remote server. Step 204 is performed by detecting that the current version information "version number 1.0" of the application a is not consistent with the latest version information "version number 2.0" of the application a in the remote server.
Step 204: determining that the application program needs to be updated, and detecting whether a busy state identifier corresponding to the application program exists at the current time; the busy state identification is preset and exists when the application program is in the busy state. If yes, go to step 205; otherwise, step 206 is performed.
In this step, it is detected that the application a needs to be updated, and it is determined that the busy status flag "busy. TXT" corresponding to the application a exists at the current time, and step 205 is executed.
Step 205: detecting that the current running state of the application program is a busy state, sending a stop command to the application program to enable the application program to enter a stop running state according to the stop command, and executing step 209.
In this step, the current running state of the application program a is judged to be a busy state, and a running stop command is sent to the application program a, so that the application program a immediately enters a running stop state according to the running stop command.
Step 206: continuously detecting whether an execution interface corresponding to the application program is started at the current time, if so, executing step 207; otherwise, step 208 is performed.
Step 207: the current running state of the application program is detected as an idle state, and the execution interface is closed, so that the application program enters a running stop state, and step 209 is executed.
Step 208: and detecting that the current running state of the application program is a stop running state.
Step 209: when the application program is in the stop operation state, the latest version of the application program is downloaded from an external remote server.
In this step, the latest version of the application program "application program a of version 2.0" is downloaded from the remote server.
Step 210: and determining all files corresponding to the application program of the latest version.
In this step, all files corresponding to the latest version of the application include file 1, file 2, file 3, file 4, and file 5.
Step 211: and searching for target files which are different from the files corresponding to the application program of the current version and do not exist in the files corresponding to the application program of the current version in all the files corresponding to the application program of the latest version.
In this step, it is found that, among all the files corresponding to the application program of the latest version, the file 1 is different from the file 1 in the application program a of the current version and the file 5 is not present in the file in the application program a of the current version.
Step 212: the application program is updated with the found target file and step 203 is performed.
In this step, the found file 1 is used to replace the file 1 in the application program a of the current version and the file 5 is directly added to the file of the application program a of the current version, thereby completing the update of the application program a. Then, step 203 is executed continuously, so that when the version information of the application program a in the remote server changes, the update of the application program a in the client a can be continuously performed.
As shown in fig. 3, an embodiment of the present invention provides an application program updating apparatus, where the application program updating apparatus includes:
the establishing module 301 is used for establishing a graphical interface environment on which an application program depends;
an update detection module 302, configured to detect whether the application needs to be updated based on the graphical interface environment established by the establishment module 301;
a state detection module 303, configured to detect whether a current running state of the application program is a running stop state when the update detection module 302 detects that the application program needs to be updated, and if so, trigger the update module 304;
an updating module 304, configured to update the application program under the trigger of the state detecting module 303.
According to the embodiment shown in fig. 3, the establishing module first establishes the graphical interface environment on which the application program with the graphical interface depends, and then the update detecting module detects whether the application program needs to be updated based on the established graphical interface environment. And when the update detection module detects that the application program needs to be updated, the state detection module detects whether the current running state of the application program is a running stop state. And when the state detection module detects that the application program stops running, the updating module updates the application program. Therefore, in the embodiment of the present invention, after the graphical interface environment on which the application depends is established, whether the application needs to be updated or not can be detected, and the application is updated according to the detection result. It can be seen that no human intervention is required during the update of the application. Therefore, the scheme provided by the embodiment of the invention can improve the automation degree of updating the application program with the graphical interface.
In an embodiment of the present invention, as shown in fig. 4, the establishing module 301 may include a logging sub-module 3011 and a forming sub-module 3012;
the login submodule 3011 is configured to obtain a pre-registered login account, and log in the application program through the login account, so as to enable a graphical interface of the application program when the login is successful;
the forming sub-module 3012 is configured to lock the graphical interface when it is detected that the graphical interface is enabled, so as to obtain the graphical interface environment.
In one embodiment of the present invention, as shown in fig. 5, the apparatus further comprises:
the command sending module 305 is configured to send a stop operation command to the application program when the state detection module 303 detects that the current operation state of the application program is not a stop operation state, so that the application program enters the stop operation state according to the stop operation command.
In an embodiment of the present invention, as shown in fig. 6, the current operation state includes a busy state, an idle state, and a stop operation state, and the state detection module 303 may include:
a first detection submodule 3031, configured to detect whether a busy state identifier corresponding to the application program exists at the current time; the busy state identification is preset and exists when the application program is in a busy state;
a first determining submodule 3032, configured to determine, after the first detecting submodule 3031 detects that the busy state identifier exists, that the current running state of the application program is a busy state;
a second detection submodule 3033, configured to detect whether an execution interface corresponding to the application program is started at the current time after the first detection submodule 3031 detects that the busy state identifier does not exist;
a second determining submodule 3034, configured to determine, after the second detecting submodule 3033 detects that the execution interface is opened, that the current running state of the application program is an idle state;
a third determining submodule 3035, configured to determine, after the second detecting submodule 3033 detects that the execution interface is not opened, that the current operation state of the application program is a stop operation state.
In an embodiment of the present invention, as shown in fig. 7, the update detection module 304 includes:
a third detecting submodule 3041, configured to detect whether current version information of the application program is consistent with latest version information of the application program in an external remote server in real time or at a preset period;
a fourth determining submodule 3042, configured to determine that the application program needs to be updated when the third detecting submodule 3041 detects that the version information is inconsistent; and when the third detection submodule detects that the version information is consistent, determining that the application program does not need to be updated.
In one embodiment of the present invention, as shown in fig. 8, the update module 304 may include a download sub-module 3043 and an update sub-module 3044;
the download sub-module 3043 is configured to download the application program of the latest version from an external remote server;
the update sub-module 3044 is configured to update the application program of the current version with the application program of the latest version downloaded by the download sub-module 3043.
In an embodiment of the present invention, the update sub-module 3042 is configured to determine all files corresponding to the application program of the latest version; searching for target files which are different from the files corresponding to the application program of the current version and do not exist in the files corresponding to the application program of the current version in all the files; and updating the application program of the current version by using the searched target file.
An embodiment of the present invention provides a storage medium, where the storage medium includes a stored program, and when the program runs, a device in which the storage medium is located is controlled to execute the method for updating an application program in any one of the above.
In an embodiment of the present invention, an electronic device is provided, as shown in fig. 9, which includes a processor 401, a memory 402, and a bus 403; the processor 401 and the memory 402 complete communication with each other through the bus 403; the processor 401 is configured to call the program instructions in the memory 402 to execute the method for updating an application program according to any one of the above items.
Because the information interaction, execution process, and other contents between the units in the device are based on the same concept as the method embodiment of the present invention, specific contents may refer to the description in the method embodiment of the present invention, and are not described herein again.
Various embodiments of the invention may have one or more of the following benefits:
1. in the embodiment of the invention, firstly, a graphical interface environment which is depended by the application program with the graphical interface is established, and then whether the application program needs to be updated is detected based on the established graphical interface environment. The Graphical Interface may also be referred to as a Graphical User Interface (Graphical User Interface). When the application program needs to be updated, whether the current running state of the application program is the running stop state is detected. And when the current running state of the application program is detected to be the running stop state, updating the application program. Therefore, in the embodiment of the present invention, after the graphical interface environment on which the application depends is established, whether the application needs to be updated or not can be detected, and the application is updated according to the detection result. It can be seen that no human intervention is required during the update of the application. Therefore, the scheme provided by the embodiment of the invention can improve the automation degree of updating the application program with the graphical interface.
2. In the embodiment of the present invention, when the application is not in the stop state, the application may be stopped using the stop command before the application is updated. So that the application is not running when the application is updated, thereby reducing the probability of errors and confusion in the application update.
3. In the embodiment of the invention, the graphical interface is started through the login of the pre-registered login account, and the graphical interface is locked to obtain the graphical interface environment, so that the graphical interface environment is established without manual operation of a user. Therefore, even in the unattended state, the graphical interface environment can be automatically established.
4. In the embodiment of the invention, the version information of the application program is utilized to determine whether the application program needs to be updated. Therefore, once the version information of the application program in the remote server is changed, the application program can be timely detected to need to be updated.
5. In the embodiment of the present invention, whether the current running state of the application is an idle state or a busy state, the running of the application needs to be stopped before the application is updated. So that the application is not running when the application is updated, thereby reducing the probability of errors and confusion in the application update.
6. In the embodiment of the invention, because the application program of the latest version is downloaded from the remote server, the downloading source is more definite. Therefore, the latest version of the application program has higher security.
7. In the embodiment of the invention, the application program is updated only by using the target file which is different from the file corresponding to the application program of the current version in all the files corresponding to the application program of the latest version and does not exist in the file corresponding to the application program of the current version. The amount of updating is reduced, thereby increasing the updating speed.
8. In the embodiment of the invention, because the files corresponding to the target application program are used for integrally replacing and updating the files corresponding to the application program, the updating process is simpler and the error rate is lower.
It is noted that, herein, relational terms such as first and second, and the like may be 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. Also, 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 a" does not exclude the presence of other similar elements in a process, method, article, or apparatus that comprises the element.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it is to be noted that: the above description is only a preferred embodiment of the present invention, and is only used to illustrate the technical solutions of the present invention, and not to limit the protection scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. An update method for an application program, comprising:
establishing a graphical interface environment on which an application program depends, wherein the application program is the application program with a graphical interface;
detecting whether the application program needs to be updated based on the graphical interface environment;
when the application program is detected to need updating, detecting whether the current running state of the application program is a running stop state;
if so, the application program is updated.
2. The method for updating an application program according to claim 1, wherein the establishing of the graphical interface environment on which the application program depends comprises:
acquiring a pre-registered login account, and logging in the application program through the login account so as to start a graphical interface of the application program when the login is successful;
and when the graphical interface is detected to be started, locking the graphical interface to obtain the graphical interface environment.
3. The method for updating an application program according to claim 1 or 2, wherein the method further comprises:
and when detecting that the current running state of the application program is not the running stop state, sending a running stop command to the application program so as to enable the application program to enter the running stop state according to the running stop command.
4. The method for updating an application program according to claim 1 or 2, wherein the current running state includes a busy state, an idle state and a stop running state, and the detecting whether the current running state of the application program is the stop running state comprises:
detecting whether a busy state identifier corresponding to the application program exists at the current time; the busy state identification is preset and exists when the application program is in a busy state;
if the busy state identification is detected to exist, determining that the current running state of the application program is a busy state;
if the busy state identification is detected to be absent, detecting whether an execution interface corresponding to the application program is started at the current time, and determining that the current running state of the application program is an idle state after the execution interface is detected to be started; and after detecting that the execution interface is not started, determining the current running state of the application program to be a running stop state.
5. The method for updating an application program according to claim 1 or 2, wherein the detecting whether the application program needs to be updated comprises:
detecting whether the current version information of the application program is consistent with the latest version information of the application program in an external remote server in real time or in a preset period;
if not, determining that the application program needs to be updated;
otherwise, it is determined that the application does not need to be updated.
6. The method for updating an application program according to claim 5, wherein the updating the application program comprises:
downloading the latest version of the application program from an external remote server;
and updating the current version of the application program by using the latest version of the application program.
7. An apparatus for updating an application program, comprising:
the system comprises an establishing module, a judging module and a judging module, wherein the establishing module is used for establishing a graphical interface environment depended by an application program, and the application program is an application program with a graphical interface;
the updating detection module is used for detecting whether the application program needs to be updated or not based on the graphical interface environment established by the establishing module;
the state detection module is used for detecting whether the current running state of the application program is a running stop state or not when the update detection module detects that the application program needs to be updated, and if so, triggering the update module;
and the updating module is used for updating the application program under the triggering of the state detection module.
8. The apparatus for updating an application program according to claim 7,
the establishing module comprises: logging in a submodule and forming a submodule;
the login submodule is used for acquiring a pre-registered login account and logging in the application program through the login account so as to start a graphical interface of the application program when the login is successful;
and the forming submodule is used for locking the graphical interface to obtain the graphical interface environment when the fact that the graphical interface is enabled is detected.
9. A storage medium, characterized in that the storage medium comprises a stored program, wherein when the program runs, a device where the storage medium is located is controlled to execute the method for updating an application program according to any one of claims 1 to 6.
10. An electronic device, wherein the electronic device comprises a processor, a memory and a bus; the processor and the memory complete mutual communication through the bus; the processor is configured to call the program instructions in the memory to execute the method for updating an application program according to any one of claims 1 to 6.
CN201810929797.1A 2018-08-15 2018-08-15 Application program updating method and device, storage medium and electronic equipment Active CN110837377B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810929797.1A CN110837377B (en) 2018-08-15 2018-08-15 Application program updating method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810929797.1A CN110837377B (en) 2018-08-15 2018-08-15 Application program updating method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN110837377A true CN110837377A (en) 2020-02-25
CN110837377B CN110837377B (en) 2023-08-04

Family

ID=69573010

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810929797.1A Active CN110837377B (en) 2018-08-15 2018-08-15 Application program updating method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN110837377B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112254284A (en) * 2020-09-02 2021-01-22 海信(山东)空调有限公司 Air conditioner and remote upgrading method thereof
CN113176889A (en) * 2021-04-28 2021-07-27 维沃移动通信有限公司 Program updating method and device and electronic equipment
CN113986316A (en) * 2021-12-27 2022-01-28 北京结慧科技有限公司 Automatic deployment method of micro-service

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110289499A1 (en) * 2010-05-19 2011-11-24 Microsoft Corporation Techniques to automatically update software applications
CN104423989A (en) * 2013-09-02 2015-03-18 联想(北京)有限公司 Application updating method and electronic equipment
CN104699492A (en) * 2013-12-06 2015-06-10 中兴通讯股份有限公司 Method and device for software upgrading
CN106445609A (en) * 2016-09-30 2017-02-22 广东欧珀移动通信有限公司 Automatic updating method of application program and mobile terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110289499A1 (en) * 2010-05-19 2011-11-24 Microsoft Corporation Techniques to automatically update software applications
CN104423989A (en) * 2013-09-02 2015-03-18 联想(北京)有限公司 Application updating method and electronic equipment
CN104699492A (en) * 2013-12-06 2015-06-10 中兴通讯股份有限公司 Method and device for software upgrading
CN106445609A (en) * 2016-09-30 2017-02-22 广东欧珀移动通信有限公司 Automatic updating method of application program and mobile terminal

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112254284A (en) * 2020-09-02 2021-01-22 海信(山东)空调有限公司 Air conditioner and remote upgrading method thereof
CN113176889A (en) * 2021-04-28 2021-07-27 维沃移动通信有限公司 Program updating method and device and electronic equipment
CN113986316A (en) * 2021-12-27 2022-01-28 北京结慧科技有限公司 Automatic deployment method of micro-service

Also Published As

Publication number Publication date
CN110837377B (en) 2023-08-04

Similar Documents

Publication Publication Date Title
CA2919839C (en) Virtual computing instance migration
EP2790122B1 (en) System and method for correcting antivirus records to minimize false malware detections
US20150242627A1 (en) Apparatus and method for blocking actvity of malware
CN109918285B (en) Security identification method and device for open source software
US20140173735A1 (en) Computer program, method, and system for preventing execution of viruses and malware
CN110837377A (en) Application program updating method and device, storage medium and electronic equipment
CN112567709B (en) Enhancing security using anomaly detection
WO2019030698A1 (en) Method, system and apparatus for processing database updates
CN113805962A (en) Application page display method and device and electronic equipment
CN110574006B (en) System and method for automatically synchronizing responses and conditions on a device
CN114372256A (en) Application program running method, device, equipment and storage medium
CN108494749B (en) Method, device and equipment for disabling IP address and computer readable storage medium
US20210049083A1 (en) System and method of determining boot status of recovery servers
CN111045725B (en) Control method and device of code management system and storage medium
CN109032641B (en) Application version updating method and device
CN109348472B (en) OTA (over the air) upgrading method and system based on single-point pushing
CN111953633A (en) Access control method and access control device based on terminal environment
CN109408104B (en) Method and device for acquiring game integration information
CN105787359A (en) Course guarding method and device
KR101382549B1 (en) Method for pre-qualificating social network service contents in mobile environment
CN106603625B (en) Data protection method and device
CN114020313A (en) Application updating method and related equipment
CN114861160A (en) Method, device, equipment and storage medium for improving non-administrator account authority
CN114090055A (en) Application program updating method and device, terminal and storage medium
CN109101253B (en) Management method and device for host in cloud computing system

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