CN107608706B - Automatic hot updating method for application program based on functional module - Google Patents

Automatic hot updating method for application program based on functional module Download PDF

Info

Publication number
CN107608706B
CN107608706B CN201710882395.6A CN201710882395A CN107608706B CN 107608706 B CN107608706 B CN 107608706B CN 201710882395 A CN201710882395 A CN 201710882395A CN 107608706 B CN107608706 B CN 107608706B
Authority
CN
China
Prior art keywords
update
version
information
application program
update package
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
CN201710882395.6A
Other languages
Chinese (zh)
Other versions
CN107608706A (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.)
Nanjing Halu Information Technology Co ltd
Original Assignee
Nanjing Halu Information 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 Nanjing Halu Information Technology Co ltd filed Critical Nanjing Halu Information Technology Co ltd
Priority to CN201710882395.6A priority Critical patent/CN107608706B/en
Publication of CN107608706A publication Critical patent/CN107608706A/en
Application granted granted Critical
Publication of CN107608706B publication Critical patent/CN107608706B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses an automatic hot updating method of an application program based on a functional module, which is characterized in that the application program sends a version query protocol containing self main program versions and version information of each functional module to a version server at regular time, receives description information of all matched and available update packages, and then sequentially executes downloading the update packages, recording update logs, replacing the functional modules, switching version information and recovering operation, wherein the logs to be updated are recorded before the functional modules are replaced, each functional module needing to be updated is informed to stop operating, and the update logs are recovered and the new version information is switched and recorded only after the update and the installation are successful; the version server can inform all the application programs running on line in real time to update, so that the technical aims of maximally not interfering the running of the original programs in the updating process, being capable of being installed successfully repeatedly under the conditions of updating errors and failures and informing the application programs to update at the first time in real time through the version server are achieved.

Description

Automatic hot updating method for application program based on functional module
Technical Field
The invention relates to a solution for automatic hot update of an application program, and belongs to the field of computer software.
Background
The existing program updating is usually performed by running a separate auxiliary process when the program is started, so that the service main process is updated. The program updating mode can be switched between two or more processes once or more times in the updating process to fulfill the purposes of version detection and version updating. The traditional updating method is not only cumbersome, but also limits the updating time to be after the host process exits.
In addition, if the user does not quit the main process for a long time, the time for updating and solving the problem can be infinitely prolonged, and the loss caused by the problem can be infinitely expanded.
The traditional whole package of updating of many application software platforms leads to the fact that the volume of updating each time is too large, redundant files are extremely large, and the cost of updating users is very high. Very wasting network traffic and user time.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention aims to provide an automatic hot updating method of an application program based on functional modules, the application program sends a version query protocol containing self main program versions and version information of each functional module to a version server at regular time through executing version query comparison, receives description information of all matched and available update packages, and then sequentially executes downloading the update packages, recording update logs, replacing the functional modules, switching version information and resuming operation, wherein logs to be updated are recorded before the functional modules are replaced, each functional module needing to be updated is informed to stop operating, and the updated logs are recovered and switched into new version information only after the functional modules are successfully updated and installed; when the version server detects that a new update package appears, the version server immediately informs all the application programs running on line of the description information of the update package, and prompts to select updating or force updating, so as to achieve the technical purposes that the operation of the original program is not interfered to the maximum extent in the update process of the application programs, the application programs can be installed successfully repeatedly under the conditions of errors, mismatching and installation failure in the update process, and the application programs can be informed of updating at the first time in real time through the version server.
To this end, an automatic hot update method for application programs based on functional modules comprises the following steps:
1) the method comprises the steps that version query comparison is carried out, an application program sends a version query protocol containing self main program versions and version information of each function module to a version server at regular time, and receives all matched and available update package description information, wherein the update package comprises an update script and an update program file and is expressed in a compressed file format, and the update package description information comprises a program name, a function module, a network path, a version number, a version application range, update mandatory property and release time corresponding to the update package description information;
2) downloading an update package, executing forced update or user selection update according to the description information of the available update package, connecting a version server to download an update script and an update program file in the update package, and performing integrity check on the update package, wherein the downloaded update script and the update program file are not in the same directory as an application program file in operation;
3) recording an update log, and storing the updated old version information, new version information and update description information into a local disk or a registry so as to continue the update process under the abnormal condition;
4) function module replacement, namely calling an update script by a main program, informing each function module needing to be updated to stop running, and then replacing a program file to be updated;
5) switching version information, namely restoring the update log recorded in the step 3), and switching and recording the real-time version information into updated new version information;
6) and (4) recovering operation, namely recovering the updated functional modules stopped in the updating process to normally operate one by one.
Further, the following preset operations are performed before step 1):
1-a) setting a record carrier for the version information of the main program and the version information of each functional module in an application program, wherein the carrier comprises a file or a registry or a database;
1-b) storing the update package and the description information of the update package at the version server side;
1-c) having the application have a network connection to a version server.
Further, the update package description information further includes applicable operating system, virtual machine environment, software environment, and environment variable information.
Further, the version query comparison process can occur at any time during the application startup process or during the running process.
Preferably, when the version server detects that a new update package appears, it immediately notifies all the applications running online of the description information of the update package, and prompts to select update or force update, in which case the version query comparison process is: the application program compares the application range of the function module and the version number corresponding to the description information of the update package with the constraint relation of the version information of each function module to judge whether the function module needs to be updated.
Furthermore, the precondition of the hot update is that the main program of the application program does not depend on each functional module, and can still run normally after each functional module stops or fails.
Preferably, after the main program is started, the update log can be automatically checked to determine whether an available update package exists at this time, and if so, the version update process of steps 4) to 6) is automatically executed.
The invention has the following beneficial effects:
in the process of replacing the functional module of the hot updating method, only the functional module to be updated can be stopped by the main program, so that the maximum limitation is ensured not to interfere with the operation of the original program, and the problem of failure in module updating caused by the dependence among the modules is solved; strict updating description information matching is executed in the version inquiry comparison and downloading updating processes, so that error and unmatched updating can not be executed; when any step of updating is wrong, mismatched and failed to install, the installation can be successfully completed through repeated installation; and notifying the application program to update at the first time in real time through the version server so as to ensure the requirement of timely solving the software emergency fault.
Drawings
FIG. 1 is a flow chart of a method for automatic hot update of an application based on functional modules,
FIG. 2 is a flowchart of the operation of presetting the automatic hot update method of the application program based on the function module,
FIG. 3 is a flow diagram of an automatic hot update method for application based function modules notifying updates at a version server.
Detailed Description
For the purpose of enhancing the understanding of the present invention, the present invention will be further explained with reference to the accompanying drawings and examples, which are only for the purpose of explaining the present invention and do not limit the scope of the present invention.
An automatic application program hot update method based on function modules, as shown in fig. 1, includes the following steps:
s101, version inquiry comparison is carried out, an application program sends a version inquiry protocol containing version information of a main program and versions of various functional modules to a version server at regular time, and all available updating package description information matched with the version inquiry protocol is received.
The updating package comprises an updating script and an updating program file, and is expressed in a compressed file format, wherein the updating script is used for indicating a processing method of the current updating on objects such as a disk file, a registry, an environment variable, a service and the like of a computer where the application program is located. The description information of the update package comprises a program name, a function module, a network path, a version number, a version application range, update mandatory property and release time corresponding to the update package, wherein the function module comprises a set of program files and other types of files which jointly form a complete and relatively independent function group, and one application program comprises a plurality of different function modules; the version application range indicates a target application program version range matched with the updating packet, and application programs outside the range cannot use the updating packet, otherwise, a program compatibility fault occurs; update mandatory indicates whether the user is required to select to install or automatically enforce installation of the application, and update packages with significant functionality changes or security improvements generally require the use of a mandatory update type.
In the version inquiry process, the version server can compare the version information of the main program version and each function module version sent by the application program item by item according to the version library stored by the version server, and only when the application program name, the function module and the version number are matched with the application range, the update package description information is used as a result item and sent to the application program for use. As a further measure, after receiving the update package information, the application program further checks the application range of the version number, the matching relationship among the operating system, the kernel and the functional module. This measure ensures that the application does not use unmatched update packages.
S102, downloading an update package, executing forced update or user selection update according to the description information of the available update package, connecting a version server to download an update script and an update program file in the update package, and performing integrity check on the update package, wherein the downloaded update script and the update program file are not necessarily in the same directory as the running application program file.
In the update package downloading process, the network path information in the update package description information is used to download the plurality of update packages in the update package list one by one. After all the downloads are completed, the process proceeds to step S103.
S103, recording an update log, and storing the updated old version information, new version information and update description information into a local disk or a registry so as to continue the update process under the abnormal condition.
This update log is an indication of events prior to the start of the update process, with the purpose of recording the original state information of the application environment.
And S104, replacing the function modules, namely calling an update script by the main program, informing each function module needing to be updated to stop running, and replacing the program file to be updated.
Before the function module replacement process starts, each function module corresponding to the update package list must be stopped, otherwise, an unpredictable error occurs. The stopping action can be realized by calling an update script by a main program of the application program, or by a stopping program entry contained in a main program execution function module plug-in (plugin or bundle) itself. In the process, other function modules which have no reason with the function module to be updated are not affected and can still run as usual, namely, the maximum limit is ensured not to interfere with the running of the original program, and the problem of module updating faults caused by the dependence among the modules is solved.
And S105, switching version information, restoring the update log recorded in the step 3), and switching and recording the real-time version information into updated new version information.
The step is only carried out under the condition that the replacement of the functional module is completely finished, firstly, the recorded update log in the step 3) is restored to indicate that the related program files, the registry, the environment variables or the services and the like are correctly replaced and installed, and the real-time version information is switched and recorded into the updated new version information. So far, the new version updated this time has been successfully applied.
And S106, restoring the operation, namely restoring the functional modules stopped in the S104 in the updating process to normally operate one by one.
Specifically, the following preset operations are performed before step S101, as illustrated in fig. 2:
s201, setting a record carrier for the version information of the main program and the version information of each functional module in the application program, wherein the carrier comprises a file or a registry or a database.
S202, the updating package and the description information of the updating package are saved on the version server side, and the saved carrier comprises a file or a database.
S203, the application is made to have a network connection to the version server.
The update package description information also includes applicable operating system, virtual machine environment, software environment, and environment variable information. The virtual machine environment includes, but is not limited to, the JVM virtual machine environment and the net environment, a software environment generally refers to third party software that is relied upon, such as Office.
The version query comparison process can occur either during the startup of the application or at any time during the operation. If the version inquiry, comparison, inquiry and update are carried out at any time in the running process supported by the application program, the urgent and important software update package version can be installed at the first time.
A better application program update scenario, as shown in fig. 3, when the version server detects that a new update package is present, in step S301, it immediately notifies all the applications running online of the description information of the update package, and prompts to select an update or to force an update.
The update execution procedure S302 in this case is: the application program compares the applicable range of the function module and the version number contained in the description information of the update package with the constraint relation of the version information of each function module of the application program to judge whether the function module of the local computer needs to be updated. Subsequent steps S303-S307 are compared to steps S102-S106 of FIG. 1, respectively.
The precondition of the hot update is that the main program of the application program does not depend on each functional module, and can still run normally after each functional module stops or breaks down. For this purpose, each functional module may be an independently running process (exe/sh/app), or may be a part of a library of an application program (DLL/so/plugin/library).
When the main program of the application program is started, the update log can be automatically checked to determine whether an available update package exists at this time, and if so, the version update process of steps S104 to S106 is automatically executed.
This step ensures successful installation by repeated installation or successful installation by restarting the application in the event of installation errors, mismatches, and installation failures. This feature is achieved by the update log, which records event indications before the update process starts, in order to record the original state information of the application environment, and in case of update error, match and failure of installation, the update log is reserved for repeated installation or installation under a scenario of restarting the application, and the update log and the switch record latest version information are not overwritten until the true installation is successful.
The embodiments of the present invention are disclosed as the preferred embodiments, but not limited thereto, and those skilled in the art can easily understand the spirit of the present invention and make various extensions and changes without departing from the spirit of the present invention.

Claims (6)

1. An automatic hot updating method of an application program based on a function module is characterized by comprising the following steps:
1) the method comprises the steps that version query comparison is carried out, an application program sends a version query protocol containing self main program versions and version information of each function module to a version server at regular time, and receives all matched and available update package description information, wherein the update package comprises an update script and an update program file and is expressed in a compressed file format, and the update package description information comprises a program name, a function module, a network path, a version number, a version application range, update mandatory property and release time corresponding to the update package description information;
2) downloading an update package, executing forced update or user selection update according to the description information of the available update package, connecting a version server to download an update script and an update program file in the update package, and performing integrity check on the update package, wherein the downloaded update script and the update program file are not in the same directory as an application program file in operation;
3) recording an update log, and storing the updated old version information, new version information and update description information into a local disk or a registry so as to continue the update process under the abnormal condition;
4) function module replacement, namely calling an update script by a main program, informing each function module needing to be updated to stop running, and then replacing a program file to be updated;
5) switching version information, namely restoring the update log recorded in the step 3), and switching and recording the real-time version information into updated new version information;
6) and (4) recovering operation, namely recovering the updated functional modules stopped in the updating process to normally operate one by one.
2. The method for automatically updating heat of application program based on function module as claimed in claim 1, wherein the following preset operations are performed before step 1):
1-a) setting a record carrier for the version information of the main program and the version information of each functional module in an application program, wherein the carrier comprises a file or a registry or a database;
1-b) storing the update package and the description information of the update package at the version server side;
1-c) having the application have a network connection to a version server.
3. The method of claim 2, wherein the update package description information further comprises applicable operating system, virtual machine environment, software environment and environment variable information.
4. The method of claim 1, wherein the version query comparison process can occur during the startup process of the application program or at any time during the running process.
5. The method according to claim 1, wherein when the version server detects that a new update package is generated, the version server immediately notifies all online applications of the description information of the update package, and prompts to select an update or force an update, in which case the version query comparison process is: the application program compares the application range of the function module and the version number corresponding to the description information of the update package with the constraint relation of the version information of each function module to judge whether the function module needs to be updated.
6. The method for automatically updating the application programs based on the functional modules according to claim 1, wherein after the main program is started, the update log is automatically checked to determine whether the available update package exists at this time, and if so, the version updating process of the steps 4) to 6) is automatically executed.
CN201710882395.6A 2017-09-26 2017-09-26 Automatic hot updating method for application program based on functional module Active CN107608706B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710882395.6A CN107608706B (en) 2017-09-26 2017-09-26 Automatic hot updating method for application program based on functional module

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710882395.6A CN107608706B (en) 2017-09-26 2017-09-26 Automatic hot updating method for application program based on functional module

Publications (2)

Publication Number Publication Date
CN107608706A CN107608706A (en) 2018-01-19
CN107608706B true CN107608706B (en) 2020-05-01

Family

ID=61058510

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710882395.6A Active CN107608706B (en) 2017-09-26 2017-09-26 Automatic hot updating method for application program based on functional module

Country Status (1)

Country Link
CN (1) CN107608706B (en)

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108540452B (en) * 2018-03-15 2020-07-03 北京雷石天地电子技术有限公司 Data updating method and system
CN108459868A (en) * 2018-03-29 2018-08-28 武汉斗鱼网络科技有限公司 A kind of software start-up method, device, terminal and storage medium
CN110427198A (en) * 2018-04-27 2019-11-08 中兴通讯股份有限公司 Hot restorative procedure, device and the terminal of application program, storage medium
CN109062590A (en) * 2018-06-29 2018-12-21 武汉掌游科技有限公司 A kind of method and system of game SDK online updating
CN109298960A (en) * 2018-08-15 2019-02-01 中国平安人寿保险股份有限公司 Application crashes processing method, device, computer installation and storage medium
CN109343879B (en) * 2018-09-20 2021-08-31 郑州云海信息技术有限公司 Method for controlling application software upgrading and server
CN109491776B (en) * 2018-11-06 2022-05-31 北京百度网讯科技有限公司 Task arranging method and system
CN109800005B (en) * 2018-12-06 2022-04-05 广州西山居世游网络科技有限公司 Client hot update method and device
CN109857432B (en) * 2019-01-14 2022-05-20 珠海金山网络游戏科技有限公司 Hot updating method and device for game application
CN111679842B (en) * 2019-03-11 2023-06-23 阿里巴巴集团控股有限公司 Application program hot update processing method, device and system
CN110134615B (en) * 2019-04-10 2022-03-01 百度在线网络技术(北京)有限公司 Method and device for acquiring log data by application program
CN111831296A (en) * 2019-04-17 2020-10-27 天津五八到家科技有限公司 Application program updating method, terminal device and computer-readable storage medium
CN110231948B (en) * 2019-06-10 2024-02-13 腾讯科技(成都)有限公司 Application program method, device, system, storage medium and computer equipment
CN111988150B (en) * 2020-09-03 2023-04-18 深圳壹账通智能科技有限公司 Block chain certificate updating method and device, computer equipment and storage medium
CN112306532A (en) * 2020-11-20 2021-02-02 广州欢网科技有限责任公司 Version display method, device and system based on large-screen APP function update
CN112426722A (en) * 2020-12-09 2021-03-02 网易(杭州)网络有限公司 Node map hot updating method and device, storage medium and computer equipment
CN112698885B (en) * 2021-01-04 2023-07-21 联想(北京)有限公司 Method and device for operating
CN114768258A (en) * 2022-03-22 2022-07-22 广州简悦信息科技有限公司 Service starting method, service restarting method and service hot updating method
CN116541104B (en) * 2023-07-04 2023-09-29 宁德时代新能源科技股份有限公司 Program management method, control device, platform, device, and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103442077A (en) * 2013-09-04 2013-12-11 珠海金山网络游戏科技有限公司 Method and system for updating software client through network
CN105677425A (en) * 2016-01-12 2016-06-15 四川文轩教育科技有限公司 Updating method of software system of C/S system structure
CN106201578A (en) * 2016-06-25 2016-12-07 国云科技股份有限公司 A kind of software system more new frame

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9762766B2 (en) * 2015-05-11 2017-09-12 Ricoh Company, Ltd. Information processing system, information processing apparatus, and information processing method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103442077A (en) * 2013-09-04 2013-12-11 珠海金山网络游戏科技有限公司 Method and system for updating software client through network
CN105677425A (en) * 2016-01-12 2016-06-15 四川文轩教育科技有限公司 Updating method of software system of C/S system structure
CN106201578A (en) * 2016-06-25 2016-12-07 国云科技股份有限公司 A kind of software system more new frame

Also Published As

Publication number Publication date
CN107608706A (en) 2018-01-19

Similar Documents

Publication Publication Date Title
CN107608706B (en) Automatic hot updating method for application program based on functional module
CN101699399B (en) Software update system and method
CN100456246C (en) Method and device for updating firmware program
EP1713198B1 (en) A method for upgrading software of communication equipment
CN109491698B (en) System updating method and device based on hot patch
US20090013317A1 (en) Software Management for Software Defined Radio in a Distributed Network
US20060218545A1 (en) Server system and online software update method
CN107493290B (en) OTA (over the air) upgrading method for Android smart television system software
CN114328101A (en) Method and system for positioning and repairing software fault
TWI533216B (en) Operating system updating method
CN109634638B (en) Cluster software upgrading method, device, equipment and medium
WO2017198156A1 (en) Service deployment method, apparatus and system
MXPA05014131A (en) Network equipment and a method for monitoring the start up of a such an equipment.
WO2012116637A1 (en) System rescue method and device
CN112905230A (en) Application program management method and device, terminal equipment and storage medium
CN112698846B (en) Method and system for automatically installing patches in Linux system
CN108829420A (en) A kind of distributed memory system method for upgrading software based on RPM packet
CN105045640A (en) Software upgrading method and device and intelligent equipment
CN109933351B (en) Method and device for repairing and upgrading Linux system
CN116382753A (en) High-reliability remote upgrading method for equipment firmware based on network
US20110173428A1 (en) Computer system, method for booting a computer system, and method for replacing a component
CN116107596A (en) Automatic system deployment method and related device
JP2005284902A (en) Terminal device, control method and control program thereof, host device, control method and control program thereof, and method, system, and program for remote updating
GB2532076A (en) Backup method, pre-testing method for environment updating and system thereof
CN105594184B (en) Method for upgrading software version, device and equipment

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