CN110837377B - 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
CN110837377B
CN110837377B CN201810929797.1A CN201810929797A CN110837377B CN 110837377 B CN110837377 B CN 110837377B CN 201810929797 A CN201810929797 A CN 201810929797A CN 110837377 B CN110837377 B CN 110837377B
Authority
CN
China
Prior art keywords
application program
state
graphical interface
updating
current
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810929797.1A
Other languages
Chinese (zh)
Other versions
CN110837377A (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

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 application program updating method and device, a storage medium and electronic equipment, wherein the application program updating method comprises the following steps: establishing a graphical interface environment on which an application program depends, wherein the application program is an application program with a graphical interface; detecting whether the application program needs to be updated or not based on the graphical interface environment; when the application program is detected to be updated, detecting whether the current running state of the application program is a stop running state or not; 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 graphic 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 have been developed. The application programs can be applied to clients (such as intelligent devices of computers, mobile phones, tablet computers and the like), and daily lives of people are greatly enriched.
Currently, in the application process, an application program can be updated and upgraded according to problems in the application and requirements of clients. Now when updating an application, a user is often required to acquire a new version of the application, and is required to manually operate to update the application. That is, personnel must be on duty during the update of the application, otherwise the application cannot be updated. It can be seen that in the existing manner, the application program requires manual updating by personnel.
Disclosure of Invention
In view of this, the embodiments of the present invention provide a method and apparatus for updating an application program, a storage medium, and an electronic device, which mainly aim to improve the automation degree of updating an application program with a graphical interface.
In a first aspect, an embodiment of the present invention provides an application program update method, where the application program update method includes:
establishing a graphical interface environment on which an application program depends, wherein the application program is an application program with a graphical interface;
detecting whether the application program needs to be updated or not based on the graphical interface environment;
when the application program is detected to be updated, detecting whether the current running state of the application program is a stop running state or not;
If so, the application program is updated.
Optionally, the building the graphical interface environment on which the application program depends includes:
acquiring a pre-registered login account, and logging in the application program through the login account so as to enable a graphical interface of the application program when 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 comprises:
and sending a stop operation command to the application program when the current operation state of the application program is not the stop operation state, so that the application program enters the stop operation state according to the stop operation command.
Optionally, 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 includes:
detecting whether busy state identifiers corresponding to the application programs exist at the current time; the busy state identification is preset, and the application program exists when 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 that the current running state of the application program is a stop running state.
Optionally, the detecting whether the application program 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 the application program is inconsistent, 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 adopting the latest version of the application program.
In a second aspect, an embodiment of the present invention provides an application updating apparatus, including:
The system comprises a building module, a display module and a display module, wherein the building module is used for building a graphical interface environment on which an application program depends, 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 establishment module;
the state detection module is used for detecting whether the current running state of the application program is a stop running state or not when the update detection module detects that the application program needs to be updated, and if so, the update module is triggered;
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 sub-module and forming the sub-module;
the login sub-module is used for acquiring a login account which is registered in advance, and logging in the application program through the login account so as to enable a graphical interface of the application program when login is successful;
and the forming sub-module is used for locking the graphical interface when the graphical interface is detected to be started, so as to obtain the graphical interface environment.
Optionally, the apparatus further includes:
and the command sending module is used for sending 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 the stop operation state, so that the application program enters the stop operation state according to the stop operation command.
Optionally, the current running state includes a busy state, an idle state and a stop running state, and the state detection module includes:
the first detection sub-module is used for detecting whether busy state identifiers corresponding to the application programs exist at the current time; the busy state identification is preset, and the application program exists when 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 identifier exists;
the second detection sub-module is used for detecting whether the execution interface corresponding to the application program is started at the current time after the first detection sub-module detects that the busy state identifier 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 stop running state after the second detecting submodule detects that the execution interface is not started.
Optionally, the update detection module includes:
the third detection sub-module 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;
a fourth determining sub-module, configured to determine that the application program needs to be updated when the third detecting sub-module detects that the version information is inconsistent; and when the third detection sub-module detects that the version information is consistent, determining that the application program does not need to be updated.
Optionally, the updating module includes: a download sub-module and an update sub-module;
the downloading sub-module is used for downloading the application program of the latest version from an external remote server;
and the updating sub-module is used for updating the application program of the current version by adopting the application program of the latest version downloaded by the downloading sub-module.
In a third aspect, an embodiment of the present invention provides a storage medium, where the storage medium includes a stored program, where when the program runs, the device where the storage medium is controlled to execute an update method of any one of the application programs described above.
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 communication with each other through the bus; the processor is configured to invoke the program instructions in the memory to execute the method for updating the application program according to any one of the above.
The embodiment of the invention provides an updating method and device of an application program, a storage medium and electronic equipment. Among other things, the graphical interface may also be referred to as a graphical user interface (Graphical User Interface). And when the application program is detected to be updated, detecting whether the current running state of the application program is a stop running state. And updating the application program when the current running state of the application program is detected to be the running stop state. As can be seen from the above, in the embodiment of the present invention, after the graphical interface environment on which the application program depends is established, whether the application program needs to be updated can be detected, and the application program is updated according to the detection result. It can be seen that no human intervention is required in the update process 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 graphic interface.
The foregoing description is only an overview of the present invention, and is intended to be implemented in accordance with the teachings of the present invention in order that the same may be more clearly understood and to make the same and other objects, features and advantages of the present invention more readily apparent.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart illustrating a method for updating an application program according to one embodiment of the present invention;
FIG. 2 is a flow chart of a method for updating an application program according to another embodiment of the present invention;
FIG. 3 is a schematic diagram of an update apparatus for an application according to an embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating an update apparatus for an application according to another embodiment of the present invention;
FIG. 5 is a schematic diagram illustrating an apparatus for updating an application according to another embodiment of the present invention;
FIG. 6 is a schematic diagram illustrating an apparatus for updating an application according to another embodiment of the present invention;
FIG. 7 is a schematic diagram illustrating an update apparatus for an application according to another embodiment of the present invention;
FIG. 8 is a schematic diagram illustrating an update apparatus for 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 application program update method, where the application program update method includes:
Step 101: establishing a graphical interface environment on which an application program depends, wherein the application program is an application program with a graphical interface;
step 102: detecting whether the application program needs to be updated or not based on the graphical interface environment;
step 103: when the application program is detected to be updated, detecting whether the current running state of the application program is a stop running state, and if so, executing step 104;
step 104: 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 first established, and then whether the application needs to be updated is detected based on the established graphical interface environment. Among other things, the graphical interface may also be referred to as a graphical user interface (Graphical User Interface). And when the application program is detected to be updated, detecting whether the current running state of the application program is a stop running state. And updating the application program when the current running state of the application program is detected to be the running stop state. As can be seen from the above, in the embodiment of the present invention, after the graphical interface environment on which the application program depends is established, whether the application program needs to be updated can be detected, and the application program is updated according to the detection result. It can be seen that no human intervention is required in the update process 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 graphic interface.
In one 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. It should be noted, however, that the shutdown command should be defined with the application program so that the shutdown state can be entered according to the shutdown command when the application program receives the shutdown command.
In this embodiment, at least three cases exist in which the application program enters the stop operation state according to the stop operation command:
first, when the application program receives the stop operation command, the currently executed task is immediately stopped and enters a stop operation state.
Secondly, when the application program receives the operation stopping command, the current executing task is continuously executed, and when the current executing task is finished, other new tasks are not executed any more, and the operation stopping state is entered.
Thirdly, when the application program receives the operation stopping 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 and entering a stop operation state.
According to the above embodiment, when the application is not in the stop-run state, it is necessary to stop running the application with the stop-run command before updating the application. 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 one embodiment of the present invention, the establishing a graphical interface environment on which an application depends in step 101 in the flowchart shown in fig. 1 may include:
acquiring a pre-registered login account, and logging in the application program through the login account so as to enable a graphical interface of the application program when 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, specific content included in the login account that is preset to be registered may be determined according to a service requirement. For example, a user name and password may be included in the login account, but are not limited to.
In this embodiment, the application may be deployed in the client. The login account is acquired after the client is started, and the login account can be used for logging in the application program immediately or at a preset time point, so that the image interface is started after the application program is successfully logged in.
In this embodiment, the graphical interface is locked upon detecting that the graphical interface is enabled to obtain a graphical interface environment so that the application program can be updated.
According to the embodiment, the graphical interface is started through the login account registered in advance, and the graphical interface is locked to obtain the graphical interface environment, so that the user does not need to manually establish the graphical interface environment when establishing the graphical interface environment. Thus, the graphical interface environment can be automatically established even in an unattended situation.
In one embodiment of the present invention, the detecting whether the application program 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 the application program is inconsistent, 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, it is detected whether the current version information of the application program coincides with the latest version information of the application program in the external remote server, and at least the following three cases may exist:
first, it is detected in real time whether the current version information of the application program is identical to the latest version information of the application program in the external remote server.
Second, it is detected whether the current version information of the application program coincides with the latest version information of the application program in the external remote server at a preset period. 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.
Third, when receiving an externally input detection instruction, it is detected whether the current version information of the application program coincides with the latest version information of the application program in the external remote server.
The first and second cases described above have a high level of automation of the detection, since the detection can be performed automatically without intervention of service personnel. In the third case, the detection instruction can be sent when the service personnel have detection requirements, so that the third service is flexible to apply. For example, when the preset period is not reached, 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 can also be detected by detecting instructions.
In this embodiment, version information of the application may include, but is not limited to, a version number. The 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: it is detected whether the current version number of the application is consistent with the latest version number of the application in the remote server. If the detected agreement indicates that the application program in the remote server is the original version, the application program does not need to be updated. If a discrepancy is detected, indicating that the application in the remote server is the most up-to-date version, the application needs to be updated.
In this embodiment, an example is illustrated: application a exists 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 in a preset period of 1 second. The current version number of application a in client 1 is 1.0, while the latest version number of application a in the remote server is 2.0. It is obvious that the current version number of the application program a is not consistent with the latest version number of the application program a in the remote server, and that the application program a in the client 1 needs to be updated is detected.
According to the above embodiment, since 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.
In one embodiment of the present invention, the current running state includes a busy state, an idle state, and a stop running state, wherein the busy state and the idle state may be considered as non-stop running states, and the current running state may include: the non-stop operation state and the stop operation state.
The detecting whether the current running state of the application program is the running stop state in step 103 in the flowchart shown in fig. 1 may include:
detecting whether busy state identifiers corresponding to the application programs exist at the current time; the busy state identification is preset, and the application program exists when 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 that the current running state of the application program is a stop running state.
In this embodiment, the specific pattern of the busy state identifier may be determined according to the service requirement. For example, alternatively, the busy state identifier may be a file with a specific name and a specific file type, or may be an identifier. The busy state identification will automatically appear when the application is in a busy state for executing a task, so that it can be intuitively seen that the current application is executing a task. The busy state identification will automatically disappear when the application program has completed the task.
In this embodiment, an example is illustrated: the busy state is identified as "busy.txt". Application a is performing a task at the current time, then there is a busy state identification "busy.txt". And if the busy state identifier 'busy.TXT' corresponding to the application program A exists in the current time, judging that the current running state of the application program A is the busy state. Since the application program is in a busy state, a busy state indication file exists. 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 running stop command is sent to the application program, so that the application program enters a running stop state according to the running stop command. The specific type of the stop command may be determined according to the service requirements. It should be noted, however, that the shutdown command should be defined with the application program so that the shutdown state can be entered according to the shutdown command when the application program receives the shutdown command.
In this embodiment, an example is illustrated: the current running state of the application program a is judged to be a busy state in which the application program a is in the execution of task 1. A stop-run command 1 is sent to application a. When the application program a receives the stop operation command 1, execution of the task 1 is immediately stopped to enter a stop operation state.
In this embodiment, when it is detected that the busy state identifier does not exist, it is continuously detected whether the execution interface corresponding to the application program is started at the current time. When the starting of the execution interface is detected, the current program is in an idle state and does not execute tasks, and the execution interface needs to be closed at the moment so that the application program enters a stop running state. When the un-started execution interface is detected, the current program is in a stop running state, and at the moment, related updating operation can be directly executed on the application program.
According to the above embodiment, whether the current running state of the application is the idle state or the busy state, that is, when the current running state of the application is the non-stop running state, it is necessary to stop running the application before updating the application. 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 one embodiment of the present invention, updating the application 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 adopting 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 this embodiment, an example is illustrated: the application program A of the latest version (2.0 version) is downloaded from an external remote server, and the application program A of the current version (1.0 version) is updated by adopting the application program A of the latest version (2.0 version).
In this embodiment, after downloading the application program of the latest version from the external remote server and before updating the application program of the current version with the application program of the latest version, 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 verifying the safety of the downloaded application program of the latest version. The verification method can utilize a signature verification method to verify, and can perform security treatment such as virus elimination and Trojan elimination on the downloaded application program of the latest version.
According to the above embodiment, since the latest version of the application program is downloaded from the remote server, the download source is clear. Therefore, the security of the latest version of the application program is high.
In one 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 at least include the following two methods:
the first method is as follows:
in one embodiment of the present invention, the updating of the current version of the application program with the latest version of the application program referred to in the previous embodiment may include:
determining all files corresponding to the application program of the latest version;
searching target files which are different in files corresponding to the application program of the current version and are not in files corresponding to the application program of the current version from all files;
and updating the current version of the application program by using the searched target file.
In this embodiment, searching for a target file that is different from a file corresponding to the current version of the application program and that is not present in a file corresponding to the current version of the application program from all files corresponding to the latest version of the application program may include:
And respectively executing the following steps for 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 corresponding to the application program of the current version exists in the file, continuing to judge whether the file is consistent with the corresponding file;
if the file is inconsistent with the corresponding file, determining the file as a target file;
and if the file corresponding to the application program of the current version does not exist in the file, determining the file as the target file.
In this embodiment, an example is illustrated: all files corresponding to the application program of the latest version comprise a file 1, a file 2, a file 3, a file 4 and a file 5. In all files corresponding to the application program of the latest version, the fact that the file 1 is different from the file 1 in the application program A of the current version and the fact that the file 5 does not exist in the file in the application program A of the current version are found. Then the found file 1 is used to replace the file 1 in the current version of application program a and the file 5 is directly added to the file of the current version of application program a, thereby completing the update of the current version of application program a.
In this embodiment, when the update of the application program of the current version is completed, if there is a start requirement for the application program, the application program needs to be started, so that after the application program is started, the application program is updated in a local configuration file (when the application program is installed in a client, the client is local), so as to provide an execution basis for the subsequent operation of the application program.
According to the above-described embodiment, since the application is updated with only the target file that is different in the files corresponding to the current version of the application and is not present in the files corresponding to the current version of the application among all the files corresponding to the latest version of the application. Thus reducing the amount of updates and thus increasing the update rate.
The second method is as follows:
in one 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 by using the files.
According to the embodiment, the files corresponding to the application program of the current version are replaced and updated integrally by using all the files corresponding to the application program of the latest version, so that the updating process is simpler and the error rate is lower.
In one embodiment of the present invention, after the application program is updated in step 104 in the flowchart shown in fig. 1, step 102 in the flowchart shown in fig. 1 may be continuously performed to continuously update the application program when the application program needs to be updated again.
In one embodiment of the invention, the number of applications may be determined based on business requirements.
When the number of the application programs is one, the established graphical interface environment is the graphical interface environment on which the application programs depend.
When the number of the application programs is a plurality of application programs, the established graphical interface environment is the graphical interface environment on which the application programs depend. These multiple applications may be updated based on the graphical interface environment.
In this embodiment, the application may be an application deployed on a client. The type of the client may be determined according to the service requirements. For example, clients may include, but are not limited to, cell phones, platform computers, desktop computers, servers, and the like.
Taking an application program a deployed on a client a as an example, an update method of the application program is described below, and as shown in fig. 2, the update method of the application program 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 enable the graphical interface of the application program when 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 that the graphical interface of the application a is started 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 started, 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 according to 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 period of 1 second whether or not the current version information "version number" of the application program a coincides with the latest version information "version number" of the application program a in the remote server. Step 204 is performed by detecting that the current version information "version number 1.0" of the application program a is inconsistent with the latest version information "version number 2.0" of the application program 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 a busy state. If so, go to step 205; otherwise, step 206 is performed.
In this step, it is detected that the application program a needs to be updated, and it is determined that the busy state identifier "busy.txt" corresponding to the application program a exists at the current time, and step 205 is executed.
Step 205: it is detected that the current running state of the application program is a busy state, and a running stop command is sent to the application program, so that the application program enters a running stop state according to the running stop command, and step 209 is executed.
In this step, it is determined that the current running state of the application program a is a busy state, and a running stop command is sent to the application program a, so that the application program a immediately enters the running stop state according to the running stop command.
Step 206: continuing to detect whether the execution interface corresponding to the application program is started at the current time, and executing step 207 if so; otherwise, step 208 is performed.
Step 207: it is detected that the current running state of the application is an idle state, and the execution interface is closed, so that the application enters a stopped running 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: and when the application program is in a stop running state, downloading the latest version of the application program from an external remote server.
In this step, the latest version of application program "application program a of version 2.0" is downloaded from the remote server.
Step 210: all files corresponding to the application program of the latest version are determined.
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 target files which are different in the files corresponding to the current version of application program and are not in the files corresponding to the current version of application program in all the files corresponding to the latest version of application program.
In this step, 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.
Step 212: and updating the application program by using the searched target file, and executing step 203.
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. Step 203 is then continued so that the update of application a in client a can continue when there is a change in version information of application a in the remote server.
As shown in fig. 3, an embodiment of the present invention provides an application updating apparatus, including:
a building module 301, configured to build a graphical interface environment on which an application depends;
an update detection module 302, configured to detect whether the application program needs to be updated based on the graphical interface environment established by the establishment module 301;
a state detection module 303, configured to detect, when the update detection module 302 detects that the application needs to be updated, whether a current running state of the application is a stopped running state, and if so, trigger an update module 304;
and the updating module 304 is configured to update the application program under the triggering of the state detection module 303.
According to the embodiment shown in fig. 3, the building module first builds a graphical interface environment on which the application with a graphical interface depends, and then the update detection module detects whether the application needs to be updated based on the built graphical interface environment. And the state detection module detects whether the current running state of the application program is a stop running state when the update detection module detects that the application program needs to be updated. When the state detection module detects that the application program stops running, the updating module updates the application program. As can be seen from the above, in the embodiment of the present invention, after the graphical interface environment on which the application program depends is established, whether the application program needs to be updated can be detected, and the application program is updated according to the detection result. It can be seen that no human intervention is required in the update process 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 graphic interface.
In one embodiment of the present invention, as shown in fig. 4, the setup module 301 may include a login sub-module 3011 and a formation sub-module 3012;
the login submodule 3011 is used for acquiring a login account which is registered in advance, and logging in the application program through the login account so as to enable a graphical interface of the application program when login is successful;
and the forming submodule 3012 is used for locking the graphical interface to obtain the graphical interface environment when the graphical interface is detected to be started.
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 the stop operation state, so that the application program enters the stop operation state according to the stop operation command.
In one 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 sub-module 3031, configured to detect whether a busy state identifier corresponding to the application exists at the current time; the busy state identification is preset, and the application program exists when in a busy state;
A first determining submodule 3032, configured to determine that a current running state of the application program is a busy state after the first detecting submodule 3031 detects that the busy state identifier exists;
a second detection sub-module 3033, configured to detect whether to start an execution interface corresponding to the application at the current time after the first detection sub-module 3031 detects that the busy state identifier does not exist;
a second determining submodule 3034, configured to determine that a current running state of the application program is an idle state after the second detecting submodule 3033 detects that the execution interface is turned on;
and a third determining submodule 3035, configured to determine that the current running state of the application program is a stop running state after the second detecting submodule 3033 detects that the execution interface is not turned on.
In one embodiment of the present invention, as shown in fig. 7, the update detection module 304 includes:
a third detection submodule 3041, configured to detect, in real time or in a preset period, whether current version information of the application program is consistent with latest version information of the application program in an external remote server;
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 sub-module 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 submodule 3043 and an update submodule 3044;
the downloading submodule 3043 is used for downloading 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 one embodiment of the present invention, the update submodule 3042 is configured to determine all files corresponding to the application program of the latest version; searching target files which are different in files corresponding to the application program of the current version and are not in files corresponding to the application program of the current version from all files; and updating the current version of the application program by using the searched target file.
In one embodiment of the present invention, a storage medium is provided, where the storage medium includes a stored program, and when the program runs, the device where the storage medium is controlled to execute the method for updating the application program of any one of the above.
In one embodiment of the invention, an electronic device is provided, as shown in FIG. 9, comprising 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 the application program according to any one of the above.
The content of information interaction and execution process between the units in the device is based on the same conception as the embodiment of the method of the present invention, and specific content can be referred to the description in the embodiment of the method of the present invention, which is not repeated here.
Various embodiments of the invention may have one or more of the following benefits:
1. in the embodiment of the invention, a graphical interface environment on which the application program with the graphical interface depends is firstly established, and then whether the application program needs to be updated is detected based on the established graphical interface environment. Among other things, the graphical interface may also be referred to as a graphical user interface (Graphical User Interface). And when the application program is detected to be updated, detecting whether the current running state of the application program is a stop running state. And updating the application program when the current running state of the application program is detected to be the running stop state. As can be seen from the above, in the embodiment of the present invention, after the graphical interface environment on which the application program depends is established, whether the application program needs to be updated can be detected, and the application program is updated according to the detection result. It can be seen that no human intervention is required in the update process 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 graphic interface.
2. In the embodiment of the invention, when the application program is not in the running stop state, the running stop command can be used for stopping running the application program before updating the application program. 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 account which is registered in advance, and is locked to obtain the graphical interface environment, and the graphical interface environment is established without manual establishment by a user. Thus, the graphical interface environment can be automatically established even in an unattended situation.
4. In the embodiment of the invention, whether the application program needs to be updated is determined by utilizing the version information of the application program. 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 invention, no matter the current running state of the application program is an idle state or a busy state, the running of the application program needs to be stopped before the application program 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, the latest version of the application program is downloaded from the remote server, so that the downloading source is clear. Therefore, the security of the latest version of the application program is high.
7. In the embodiment of the invention, the application program is updated by only using the target files which are different in all files corresponding to the application program of the latest version and are not present in the files corresponding to the application program of the current version. Thus reducing the amount of updates and thus increasing the update rate.
8. In the embodiment of the invention, the files corresponding to the application programs are replaced and updated integrally by utilizing all the files corresponding to the target application programs, so that the updating process is simpler and the error rate is lower.
It is noted that relational terms such as first and second, and the like, are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the statement "comprises one" does not exclude that an additional identical element is present in a process, method, article or apparatus that comprises the element.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the above method embodiments may be implemented by hardware related to program instructions, and the foregoing program may be stored in a computer readable storage medium, where the program, when executed, performs steps including the above method embodiments; and the aforementioned storage medium includes: various media in which program code may be stored, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the foregoing description is only illustrative of the preferred embodiments of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (6)

1. A method for updating an application program, comprising:
establishing a graphical interface environment on which an application program depends, wherein the application program is an application program with a graphical interface;
detecting whether the application program needs to be updated or not based on the graphical interface environment;
when the application program is detected to be updated, detecting whether the current running state of the application program is a stop running state or not;
If yes, updating the application program;
the establishment of the graphical interface environment on which the application program depends comprises the following steps:
acquiring a pre-registered login account, and logging in the application program through the login account so as to enable a graphical interface of the application program when login is successful;
when the graphical interface is detected to be started, locking the graphical interface to obtain the graphical interface environment;
logging in the application program through the login account, including: logging in an application program by using the login account at a preset time point;
the method further comprises the steps of: when the current running state of the application program is detected to be not the running stopping state, sending a running stopping command to the application program so that the application program enters the running stopping state according to the running stopping command;
detecting whether the current running state of the application program is a running stop state comprises the following steps: detecting whether busy state identifiers corresponding to the application programs exist at the current time; the busy state identification is preset, and the application program exists when 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 that the current running state of the application program is a stop running state.
2. The method for updating an application program according to claim 1, wherein the detecting whether the application program needs updating 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 the application program is inconsistent, determining that the application program needs to be updated;
otherwise, it is determined that the application does not need to be updated.
3. The method for updating an application program according to claim 2, 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 adopting the latest version of the application program.
4. An application program updating apparatus, comprising:
the system comprises a building module, a display module and a display module, wherein the building module is used for building a graphical interface environment on which an application program depends, 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 establishment module;
The state detection module is used for detecting whether the current running state of the application program is a stop running state or not when the update detection module detects that the application program needs to be updated, and if so, the update module is triggered;
the updating module is used for updating the application program under the triggering of the state detection module;
the establishing module comprises: logging in a sub-module and forming the sub-module;
the login sub-module is used for acquiring a login account which is registered in advance, and logging in the application program through the login account so as to enable a graphical interface of the application program when login is successful; logging in the application program through the login account, including: logging in an application program by using the login account at a preset time point;
the forming sub-module is used for locking the graphical interface when the graphical interface is detected to be started, so as to obtain the graphical interface environment;
the apparatus further comprises: the command sending module is used for sending 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 the stop operation state, so that the application program enters the stop operation state according to the stop operation command;
The state detection module is specifically 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 the application program exists when 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 that the current running state of the application program is a stop running state.
5. A storage medium comprising a stored program, wherein the program, when run, controls a device in which the storage medium is located to perform the method of updating an application program according to any one of claims 1 to 3.
6. An electronic device, comprising a processor, a memory and a bus; the processor and the memory complete communication with each other through the bus; the processor is configured to invoke program instructions in the memory to perform the method of updating an application program of any of claims 1 to 3.
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 CN110837377A (en) 2020-02-25
CN110837377B true 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)

Families Citing this family (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 (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (1)

* 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

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Also Published As

Publication number Publication date
CN110837377A (en) 2020-02-25

Similar Documents

Publication Publication Date Title
US10127057B2 (en) Method and apparatus for dynamically implementing application function
CN110837377B (en) Application program updating method and device, storage medium and electronic equipment
CN108121559B (en) Configuration file pushing method, server and storage medium
CN108681662B (en) Method and device for installing program
US11960869B2 (en) Android penetration method and device for implementing silent installation based on accessibility services
US9244758B2 (en) Systems and methods for repairing system files with remotely determined repair strategy
CN112567709B (en) Enhancing security using anomaly detection
US9524172B2 (en) Fast start
US20140130134A1 (en) Managing and Providing Access to Applications in an Application-Store Module
CN102279912A (en) Client program monitoring method and device and client
CN112486629A (en) Micro-service state detection method and device, electronic equipment and storage medium
CN110224854A (en) Dispositions method, device and the storage medium of block chain node
CN112968929B (en) Server management method and system
CN105704296B (en) Application environment cloning method and device
CN109284636B (en) Webpage tamper-proofing system and method
CN108494749B (en) Method, device and equipment for disabling IP address and computer readable storage medium
CN113434254A (en) Client deployment method, client deployment apparatus, computer device, and storage medium
CN105787359A (en) Course guarding method and device
CN111953633A (en) Access control method and access control device based on terminal environment
KR101483107B1 (en) Method for managing software install and system realizing it
EP3467693B1 (en) Identity verification method and apparatus
CN113360172B (en) Application deployment method, device, computer equipment and storage medium
CN113127883B (en) Locking method, device, equipment and medium for platform firmware protection recovery
CN110764840B (en) Method, device and system for wirelessly debugging android device
Cisco Installing TrafficDirector on Windows 2000 and Windows NT Systems

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