WO2016037314A1 - Software version upgrade method, apparatus and device - Google Patents

Software version upgrade method, apparatus and device Download PDF

Info

Publication number
WO2016037314A1
WO2016037314A1 PCT/CN2014/086133 CN2014086133W WO2016037314A1 WO 2016037314 A1 WO2016037314 A1 WO 2016037314A1 CN 2014086133 W CN2014086133 W CN 2014086133W WO 2016037314 A1 WO2016037314 A1 WO 2016037314A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
software version
link address
patch
running
Prior art date
Application number
PCT/CN2014/086133
Other languages
French (fr)
Chinese (zh)
Inventor
朱湘毅
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2014/086133 priority Critical patent/WO2016037314A1/en
Priority to CN201480049719.2A priority patent/CN105594184B/en
Publication of WO2016037314A1 publication Critical patent/WO2016037314A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Definitions

  • the present application relates to the field of communications technologies, and in particular, to a software version upgrade method, apparatus, and device.
  • the software version developer will release a patch file for the software version after the software version is released.
  • the client that installed the software version can download the patch file and use the patch file to upgrade the software version to fix the vulnerability in the software version or optimize the software version.
  • the application provides a software version upgrade method, device and device for reducing the impact on the service during the software version upgrade process.
  • a software version upgrade method including:
  • the process of triggering the running of the software version is executed, and the corresponding file linked by the link address of each file is run according to the link address of each file.
  • the process of triggering running the software version, after running the corresponding file of the link address link of each file according to the link address of each file also includes:
  • the process is triggered to run the file in the software version.
  • the method before the determining the patch file package for the software version, the method further includes:
  • a configuration file is further included in the patch file package, The configuration file is used to indicate the process running the patch file.
  • the process of triggering the running of the software version, according to the link address of each file, running the corresponding file of the link address link of each file includes:
  • the process of running the patch file indicated by the configuration file is triggered, and corresponding files of the link address links of the respective files are run according to the link address of the respective files.
  • the triggering the process of running the software version, according to the The link address of each file, the corresponding file of the link address link running the respective file includes:
  • the plug-in process is triggered to uninstall a plug-in that runs a file in the software version, and loads a plug-in that runs the file linked by the link address.
  • a software version upgrade apparatus including:
  • a first file determining module configured to determine a patch file package for the software version
  • a second file determining module configured to determine, according to the patch file in the patch file package, a file that is not required to be updated in the software version
  • An address determining module configured to determine a link address of each file included in an upgraded version of the software version, where a link address of each file includes a link address of the patch file and a link address of the file that does not need to be updated ;
  • An upgrade module configured to trigger a process of running the software version, according to a link of each file Address, the corresponding file that runs the link address link for each file.
  • the method further includes:
  • the rollback module is configured to trigger the process to run the file in the software version when the patch back command is detected.
  • the method further includes:
  • a patch installation module for downloading and installing the patch file.
  • the upgrading module is specifically configured to:
  • the process of running the patch file indicated by the configuration file is triggered, and corresponding files of the link address links of the respective files are run according to the link address of the respective files.
  • the upgrading module is specifically configured to:
  • the plug-in process is triggered to uninstall a plug-in that runs a file in the software version, and loads a plug-in that runs the file linked by the link address.
  • a software version upgrade device including a processor and a memory.
  • the memory user stores a set of program instructions
  • the processor is configured to invoke the program instruction of the memory, and perform the following operations:
  • the process of triggering the running of the software version is executed, and the corresponding file linked by the link address of each file is run according to the link address of each file.
  • the file that is not required to be updated in the software version is determined according to the patch file in the patch file package, and the link address of the file that is not to be updated and the patch file in the patch file package are determined.
  • Link address determine the link address of each file to be included in the upgrade version after the software version is upgraded, and then trigger the process running the software version, run the The corresponding file of the link address of each file, because the file linked by the link address includes the patch file and the file that is not required to be updated in the software version, the purpose of running the upgrade version file by the process is realized, thereby realizing the software version upgrade.
  • the process only needs to switch to the file corresponding to the running link address, without stopping for a long time, so the impact on the business can be reduced.
  • FIG. 1 is a schematic flowchart of a method for upgrading a software version according to an embodiment of the present disclosure
  • FIG. 2 is a schematic diagram of a directory of multiple files included in a software version V1.0.1.0.0 provided by an embodiment of the present application;
  • FIG. 3 is a schematic diagram of a directory of a patch file in a patch file package for software version V1.0.1.0.0 according to an embodiment of the present application;
  • FIG. 4 is a schematic diagram of a link relationship between a software version and an upgrade version according to an embodiment of the present application
  • FIG. 5 is a schematic structural diagram of an apparatus for upgrading a software version according to an embodiment of the present disclosure
  • FIG. 6 is a schematic structural diagram of an embodiment of a software version upgrading device according to an embodiment of the present disclosure.
  • FIG. 1 a flow chart of an embodiment of a software version upgrade method of the present application is shown.
  • the method of this embodiment may include:
  • the patch file in the patch file package may be a file that needs to be added to the software version, that is, a file included in the patch file package and not included in the software version; or a file that is updated in the software version, that is, the file
  • the software version and the patch file contain the same file name, but the data content contained in the file is different.
  • the link address of each file includes a link address of the patch file in the patch file package and a link address of the file that is not required to be updated in the software version.
  • the link address may specifically refer to location information of each file and the like.
  • the link addresses of the individual files that make up the upgrade version can be determined.
  • the process that originally runs the file in the software version triggers the corresponding file running the link of the link address.
  • the file linked by the link address includes the patch file (including the software version that needs to be updated).
  • the patch file corresponding to the file) and the file that is not required to be updated in the software version thus realizing the purpose of running the upgrade version file for the process, thereby implementing the software version upgrade.
  • the process only needs to switch to the file corresponding to the running link address. There is no need to stop for a long time, so the impact on the business corresponding to the process can be reduced. It also eliminates the need for complicated operations such as backing up files and overwriting files, saving upgrade time and improving upgrade efficiency.
  • a process may not need to run all the files in the software version, so you can run the corresponding file of the link address of each file according to your needs.
  • an upgrade command can be sent directly to the process running the file in the software version.
  • the process running the file in the software version responds to the upgrade instruction, and the corresponding file linked by the link address of each file may be run according to the link address of each file. That is, the implementation process is switched from the file that needs to be updated in the software version to the patch file in the patch file package, so that the files that need to be updated in the software version are upgraded to the patch file in the patch file package.
  • the method further includes:
  • the process is triggered to run the file in the software version.
  • the patch rollback command may be generated when the patch file is abnormally detected.
  • the patch file package and the software version are two separate software packages, and the link address of each file in the determined upgrade version is actually established in the patch file package and the software version does not need to be updated.
  • the link relationship of the files is two separate software packages, and the link address of each file in the determined upgrade version is actually established in the patch file package and the software version does not need to be updated. The link relationship of the files.
  • the file that is not required to be updated in the software version and the patch file in the patch file package may be first determined as a file included in the upgrade version after the software version is upgraded, and then the link address of the file that does not need to be updated is determined.
  • the link address of the patch file in the patch package which will not need to be updated.
  • the link address of the file and the link address of the patch file are combined to obtain the link address of each file in the upgraded version.
  • the software version contains the program file software, including: file1 to filen.
  • the software version also includes a plurality of data files date generated in the running software version, specifically including date1 to schemes, where n is a natural number greater than 1.
  • n is a natural number greater than 1.
  • FIG. 2 it is a directory diagram of files included in the software version V1.0.1.0.0.
  • the patch file for the software version V1.0.1.0.0 includes the patch files file3 and fileX, wherein the patch file file3 is an update file of the file file3 included in the software version V1.0.1.0.0, and the fileX is new. program files.
  • FIG. 3 a directory diagram of a patch file in a patch file package is shown, that is, the patch file package includes a patch file file3 and a patch file fileX.
  • the software version and the link address of each file in the patch file package are determined, and the link address of the file and the patch file of the software version that are not required to be updated are determined.
  • FIG. 4 it is a schematic diagram of the relationship between the files that need not be updated in the software version and the patch files in the patch file package. It can be seen that the files in the upgraded version include the patch file and the files that need to be updated in the linked software version.
  • the file in the software version of the process may not need to be updated.
  • the process can run the file in the software version without running the corresponding file linked by the link address.
  • the corresponding file of the link may specifically be a process of running a file that needs to be updated in the software version, and according to the link address of the respective file, running a corresponding file linked by the link address of each file.
  • the process that needs to run the upgraded version can be the process that runs the file that needs to be updated in the software version.
  • the process can continue to run the software version of the file.
  • the patch file package may further include a configuration file, where the configuration file includes process information for indicating each patch file in the patch file package.
  • the patch file includes the patch files file3 and fileX.
  • the configuration file it can be indicated that the patch file file3 is run by the process A of the file3 running the original software version, and the fileX is run by the process B.
  • the process of triggering the running of the software version, according to the link address of each file, running the corresponding file of the link address link of each file includes:
  • the process of running the patch file indicated by the configuration file is triggered, and corresponding files of the link address links of the respective files are run according to the link address of the respective files.
  • the process running the files in the software version is a normal process
  • the normal process may be triggered to terminate the operation, and at the same time The normal process is restarted in the corresponding file of the link address of each file.
  • the plug-in process is composed of multiple plug-ins or modules, each plug-in can be started, stopped, uninstalled, installed, etc. independently. Therefore, a plugin of the plugin process is upgraded and patched, which only affects the plugin. It is therefore possible to determine whether or not to insert the upgrade for the files in the software version inserted into the run.
  • FIG. 5 is a schematic structural diagram of an apparatus for upgrading a software version according to an embodiment of the present disclosure, where the apparatus may include:
  • the first file determining module 501 is configured to determine a patch file package for the software version.
  • the second file determining module 502 is configured to determine, according to the patch file in the patch file package, a file that is not required to be updated in the software version.
  • the patch file in the patch file package may be a file that needs to be added to the software version, that is, a file included in the patch file package and not included in the software version; or a file that is updated in the software version, that is, the file
  • the software version and the patch file contain the same file name, but the data content contained in the file is different.
  • the address determining module 503 is configured to determine a link address of each file included in the upgraded version of the software version.
  • the link address of each file includes a link address of the patch file and a link address of the file that does not need to be updated.
  • the link address may specifically refer to location information of each file and the like.
  • the patch file and the files in the software version it can be determined that the software version is upgraded after the upgrade.
  • the files included in the level version it can be determined that the software version is upgraded after the upgrade.
  • the link addresses of the individual files that make up the upgrade version can be determined.
  • the upgrading module 501 is configured to trigger a process of running the software version, and run a corresponding file linked by the link address of each file according to the link address of each file.
  • the process that originally runs the file in the software version triggers the corresponding file running the link of the link address.
  • the file linked by the link address includes the patch file (including the software version that needs to be updated).
  • the patch file corresponding to the file) and the file that is not required to be updated in the software version thus realizing the purpose of running the upgrade version file for the process, thereby implementing the software version upgrade.
  • the process only needs to switch to the file corresponding to the running link address, without stopping for a long time, so the impact on the business can be reduced. It also eliminates the need for complicated operations such as backing up files and overwriting files, saving upgrade time and improving upgrade efficiency.
  • a process may not need to run all the files in the software version, so you can run the corresponding file of the link address of each file according to your needs.
  • the original software version is not covered by the patch file, so that the original software version is still completely stored in the device, so that when the patch file package is abnormal, , you can directly switch the process back to the file in the running software version. Therefore, there is no need to back up files, and there is no need to interrupt the service when the patch is rolled back.
  • the device may further include:
  • the rollback module is configured to trigger the process to run the file in the software version when the patch back command is detected.
  • the patch rollback command may be generated when the patch file is abnormally detected.
  • the device may further comprise:
  • a patch installation module for downloading and installing the patch file.
  • the patch file package and the software version are two separate software packages, and the link address of each file in the determined upgrade version is actually established in the patch file package and the software version does not need to be updated.
  • the link relationship of the files is two separate software packages, and the link address of each file in the determined upgrade version is actually established in the patch file package and the software version does not need to be updated. The link relationship of the files.
  • the file in the software version of the process may not need to be updated.
  • the process can run the file in the software version without running the corresponding file linked by the link address.
  • the upgrade module when it is determined that there is a file that needs to be updated in the software version according to the patch file, the upgrade module may be specifically a process of running a file that needs to be updated in the software version, according to the The link address, the corresponding file that runs the link address link of each file.
  • the process that needs to run the upgraded version can be the process that runs the file that needs to be updated in the software version.
  • the process can continue to run the software version of the file.
  • the patch file package may further include a configuration file, where the configuration file includes process information for indicating each patch file in the patch file package. Therefore, the upgrade module can be specifically used for:
  • the process of running the patch file indicated by the configuration file is triggered, and corresponding files of the link address links of the respective files are run according to the link address of the respective files.
  • the upgrade module may trigger the normal process to terminate the operation, and restart the corresponding file in the corresponding file of the link address of the respective file.
  • the upgrade module may be the plug-in process uninstalling the plug-in that runs the file in the software version, and reloading the link address link running the respective file.
  • the plugin for the corresponding file may be the plug-in process uninstalling the plug-in that runs the file in the software version, and reloading the link address link running the respective file.
  • the plug-in process is composed of multiple plug-ins or modules, each plug-in can be started independently, Stop, uninstall, install, etc. Therefore, a plugin of the plugin process is upgraded and patched, which only affects the plugin. It is therefore possible to determine whether or not to insert the upgrade for the files in the software version inserted into the run.
  • the software version upgrade device described in the foregoing embodiment may be integrated into the software version upgrade device, and the software version upgrade device may be a network element device with a software version upgrade requirement.
  • the software version of the software version upgrade device of the embodiment of the present application is upgraded, and the process does not need to be stopped for a long time. Therefore, the service interruption time of the process can be detected, and the impact on the service is reduced. It also eliminates the need for complicated operations such as backing up files and overwriting files, saving upgrade time and improving upgrade efficiency.
  • the embodiment of the present application further provides a software version upgrading device, where the software version upgrading device includes at least a processor 601 and a memory 602.
  • the memory 602 stores a set of program instructions, which may be a high speed RAM memory or a non-volatile memory such as at least one disk memory or the like.
  • the processor 601 is configured to invoke the program instructions stored in the memory 602, and perform the following operations:
  • the process of triggering the running of the software version is executed, and the corresponding file linked by the link address of each file is run according to the link address of each file.
  • the processor may be a central processing unit CPU, or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention.
  • CPU central processing unit
  • ASIC application specific integrated circuit
  • the software version upgrade device may be used to perform the example provided in the embodiment of the present application.
  • the steps of a method or algorithm described in connection with the embodiments disclosed herein can be implemented directly in hardware, a software module executed by a processor, or a combination of both.
  • the software module can be placed in random access memory (RAM), memory, read only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or technical field. Any other form of storage medium known.

Abstract

Provided are a software version upgrade method and apparatus. The method comprises: determining a patch file package for a software version; according to a patch file in the patch file package, determining a file which does not need to be updated in the software version; determining link addresses of various files contained in an upgrade version of the software version, wherein the link addresses of the various files comprise a link address of the patch file and a link address of the file which does not need to be updated; and triggering a process for operating the software version, and operating corresponding files linked with the link addresses of the various files according to the link addresses of the various files. The embodiments of the present application reduce the influence on services when a software version is upgraded.

Description

软件版本升级方法、装置及设备Software version upgrade method, device and device 技术领域Technical field
本申请涉及通信技术领域,尤其涉及一种软件版本升级方法、装置及设备。The present application relates to the field of communications technologies, and in particular, to a software version upgrade method, apparatus, and device.
背景技术Background technique
为了对软件版本进行完善,软件版本的开发者在软件版本发布后,还会发布针对该软件版本的补丁文件。安装了该软件版本的客户端可以下载该补丁文件,并利用该补丁文件对该软件版本进行升级,以修复该软件版本中的漏洞或实现对该软件版本的优化。In order to improve the software version, the software version developer will release a patch file for the software version after the software version is released. The client that installed the software version can download the patch file and use the patch file to upgrade the software version to fix the vulnerability in the software version or optimize the software version.
现有技术中,利用补丁文件对软件版本进行升级的过程中,首先确定出该软件版本中需要更新的待修改文件,并对该待修改文件进行备份;然后,停止运行该待修改文件的进程,利用补丁文件覆盖该待修改文件;之后,重新启动进程。In the prior art, in the process of upgrading the software version by using the patch file, first, the file to be modified that needs to be updated in the software version is determined, and the file to be modified is backed up; then, the process of stopping the file to be modified is stopped. , use the patch file to overwrite the file to be modified; after that, restart the process.
可见,在软件版本的升级过程中,需要先停止进程,使得运行该软件版本的进程需要中断一段时间,从而会影响该进程对应的业务的运行。It can be seen that in the process of upgrading the software version, the process needs to be stopped first, so that the process running the software version needs to be interrupted for a period of time, which may affect the operation of the service corresponding to the process.
发明内容Summary of the invention
本申请提供一种软件版本升级方法、装置及设备,用于在软件版本升级过程,降低对业务造成的影响。The application provides a software version upgrade method, device and device for reducing the impact on the service during the software version upgrade process.
第一方面,提供了一种软件版本升级方法,包括:In a first aspect, a software version upgrade method is provided, including:
确定针对所述软件版本的补丁文件包;Determining a patch file package for the software version;
依据所述补丁文件包中的补丁文件,确定所述软件版本中无需更新的文件;Determining files that are not required to be updated in the software version according to the patch file in the patch file package;
确定所述软件版本的升级版本中包含的各个文件的链接地址,其中,所述各个文件的链接地址包括所述补丁文件的链接地址以及所述无需更新的文件的链接地址; Determining a link address of each file included in the upgraded version of the software version, where the link address of each file includes a link address of the patch file and a link address of the file that does not need to be updated;
触发运行所述软件版本的进程,依据所述各个文件的链接地址,运行所述各个文件的链接地址链接的相应文件。The process of triggering the running of the software version is executed, and the corresponding file linked by the link address of each file is run according to the link address of each file.
在所述第一方面的第一种可能实现方式中,所述触发运行所述软件版本的进程,依据所述各个文件的链接地址,运行所述各个文件的链接地址链接的相应文件之后,所述方法还包括:In a first possible implementation manner of the first aspect, the process of triggering running the software version, after running the corresponding file of the link address link of each file according to the link address of each file, The method also includes:
检测到补丁回退指令时,触发所述进程运行所述软件版本中的文件。When the patch fallback command is detected, the process is triggered to run the file in the software version.
在所述第一方面的第二种可能实现方式中,在所述确定针对所述软件版本的补丁文件包之前,还包括:In a second possible implementation manner of the first aspect, before the determining the patch file package for the software version, the method further includes:
下载并安装所述补丁文件。Download and install the patch file.
结合所述第一方面或所述第一方面的上述任一种可能实现方式,在所述第一方面的第三种可能实现方式中,在所述补丁文件包中还包括配置文件,所述配置文件用于指示运行补丁文件的进程。With reference to the first aspect or any one of the foregoing possible implementation manners of the first aspect, in a third possible implementation manner of the first aspect, a configuration file is further included in the patch file package, The configuration file is used to indicate the process running the patch file.
所述触发运行所述软件版本的进程,依据所述各个文件的链接地址,运行所述各个文件的链接地址链接的相应文件包括:The process of triggering the running of the software version, according to the link address of each file, running the corresponding file of the link address link of each file includes:
触发所述配置文件指示的运行所述补丁文件的进程,依据所述各个文件的链接地址,运行所述各个文件的链接地址链接的相应文件。The process of running the patch file indicated by the configuration file is triggered, and corresponding files of the link address links of the respective files are run according to the link address of the respective files.
结合所述第一方面或所述第一方面的上述任一种可能实现方式,在所述第一方面的第四种可能实现方式中,所述触发运行所述软件版本的进程,依据所述各个文件的链接地址,运行所述各个文件的链接地址链接的相应文件包括:With reference to the first aspect or any one of the foregoing possible implementation manners of the first aspect, in a fourth possible implementation manner of the first aspect, the triggering the process of running the software version, according to the The link address of each file, the corresponding file of the link address link running the respective file includes:
当运行所述软件版本的进程为插件进程时,触发所述插件进程卸载运行所述软件版本中的文件的插件,并加载运行所述链接地址链接的文件的插件。When the process running the software version is a plug-in process, the plug-in process is triggered to uninstall a plug-in that runs a file in the software version, and loads a plug-in that runs the file linked by the link address.
第二方面,提供了一种软件版本升级装置,包括:In a second aspect, a software version upgrade apparatus is provided, including:
第一文件确定模块,用于确定针对所述软件版本的补丁文件包;a first file determining module, configured to determine a patch file package for the software version;
第二文件确定模块,用于依据所述补丁文件包中的补丁文件,确定所述软件版本中无需更新的文件;a second file determining module, configured to determine, according to the patch file in the patch file package, a file that is not required to be updated in the software version;
地址确定模块,用于确定所述软件版本的升级版本中包含的各个文件的链接地址,其中,所述各个文件的链接地址包括所述补丁文件的链接地址以及所述无需更新的文件的链接地址;An address determining module, configured to determine a link address of each file included in an upgraded version of the software version, where a link address of each file includes a link address of the patch file and a link address of the file that does not need to be updated ;
升级模块,用于触发运行所述软件版本的进程,依据所述各个文件的链接 地址,运行所述各个文件的链接地址链接的相应文件。An upgrade module, configured to trigger a process of running the software version, according to a link of each file Address, the corresponding file that runs the link address link for each file.
在所述第二方面的第一种可能实现方式中,还包括:In the first possible implementation manner of the second aspect, the method further includes:
回退模块,用于检测到补丁回退指令时,触发所述进程运行所述软件版本中的文件。The rollback module is configured to trigger the process to run the file in the software version when the patch back command is detected.
在所述第二方面的第二种可能实现方式中,还包括:In a second possible implementation manner of the second aspect, the method further includes:
补丁安装模块,用于下载并安装所述补丁文件。A patch installation module for downloading and installing the patch file.
结合所述第二方面或所述第二方面的上述任一种可能实现方式,在所述第二方面的第三种可能实现方式中,所述升级模块具体用于:With reference to the second aspect or any one of the foregoing possible implementation manners of the second aspect, in the third possible implementation manner of the second aspect, the upgrading module is specifically configured to:
触发所述配置文件指示的运行所述补丁文件的进程,依据所述各个文件的链接地址,运行所述各个文件的链接地址链接的相应文件。The process of running the patch file indicated by the configuration file is triggered, and corresponding files of the link address links of the respective files are run according to the link address of the respective files.
结合所述第二方面或所述第二方面的上述任一种可能实现方式,在所述第二方面的第四种可能实现方式中,所述升级模块具体用于:With reference to the second aspect, or any one of the foregoing possible implementation manners of the second aspect, in the fourth possible implementation manner of the second aspect, the upgrading module is specifically configured to:
当运行所述软件版本的进程为插件进程时,触发所述插件进程卸载运行所述软件版本中的文件的插件,并加载运行所述链接地址链接的文件的插件。When the process running the software version is a plug-in process, the plug-in process is triggered to uninstall a plug-in that runs a file in the software version, and loads a plug-in that runs the file linked by the link address.
第三方面,提供了一种软件版本升级设备,包括处理器以及存储器,In a third aspect, a software version upgrade device is provided, including a processor and a memory.
所述存储器用户存储一组程序指令;The memory user stores a set of program instructions;
所述处理器用于调用所述存储器的所述程序指令,执行如下操作:The processor is configured to invoke the program instruction of the memory, and perform the following operations:
确定针对所述软件版本的补丁文件包;Determining a patch file package for the software version;
依据所述补丁文件包中的补丁文件,确定所述软件版本中无需更新的文件;Determining files that are not required to be updated in the software version according to the patch file in the patch file package;
确定所述软件版本的升级版本中包含的各个文件的链接地址,其中,所述各个文件的链接地址包括所述补丁文件的链接地址以及所述无需更新的文件的链接地址;Determining a link address of each file included in the upgraded version of the software version, where the link address of each file includes a link address of the patch file and a link address of the file that does not need to be updated;
触发运行所述软件版本的进程,依据所述各个文件的链接地址,运行所述各个文件的链接地址链接的相应文件。The process of triggering the running of the software version is executed, and the corresponding file linked by the link address of each file is run according to the link address of each file.
由上述的技术方案可知,确定了补丁文件包之后,依据该补丁文件包中补丁文件确定该软件版本中无需更新的文件,并基于该无需更新的文件的链接地址和该补丁文件包中补丁文件的链接地址,确定该软件版本升级之后的升级版本中需包含的各个文件的链接地址,然后触发运行该软件版本的进程,运行该 各个文件的链接地址链接的相应文件,由于链接地址链接的文件包括补丁文件以及软件版本中无需更新的文件,因此即实现了将进程运行升级版本文件的目的,从而实现了软件版本升级。进程只需切换到运行链接地址对应的文件即可,无需停止较长的时间,因此可以减少对业务的影响。According to the foregoing technical solution, after the patch file package is determined, the file that is not required to be updated in the software version is determined according to the patch file in the patch file package, and the link address of the file that is not to be updated and the patch file in the patch file package are determined. Link address, determine the link address of each file to be included in the upgrade version after the software version is upgraded, and then trigger the process running the software version, run the The corresponding file of the link address of each file, because the file linked by the link address includes the patch file and the file that is not required to be updated in the software version, the purpose of running the upgrade version file by the process is realized, thereby realizing the software version upgrade. The process only needs to switch to the file corresponding to the running link address, without stopping for a long time, so the impact on the business can be reduced.
附图说明DRAWINGS
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present application. Other drawings may also be obtained from those of ordinary skill in the art in light of the inventive work.
图1为本申请实施例提供的一种软件版本升级方法一个实施例的流程示意图;FIG. 1 is a schematic flowchart of a method for upgrading a software version according to an embodiment of the present disclosure;
图2为本申请实施例提供的软件版本V1.0.1.0.0中包含的多个文件的目录示意图;2 is a schematic diagram of a directory of multiple files included in a software version V1.0.1.0.0 provided by an embodiment of the present application;
图3为本申请实施例提供的针对软件版本V1.0.1.0.0的补丁文件包中的补丁文件的目录示意图;3 is a schematic diagram of a directory of a patch file in a patch file package for software version V1.0.1.0.0 according to an embodiment of the present application;
图4为本申请实施例提供的软件版本与升级版本之间的链接关系示意图;4 is a schematic diagram of a link relationship between a software version and an upgrade version according to an embodiment of the present application;
图5为本申请实施例提供的一种软件版本升级装置一个实施例的结构示意图;FIG. 5 is a schematic structural diagram of an apparatus for upgrading a software version according to an embodiment of the present disclosure;
图6为本申请实施例提供的一种软件版本升级设备一个实施例的结构示意图。FIG. 6 is a schematic structural diagram of an embodiment of a software version upgrading device according to an embodiment of the present disclosure.
具体实施方式detailed description
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application are clearly and completely described in the following with reference to the drawings in the embodiments of the present application. It is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.
参见图1,其示出了本申请一种软件版本升级方法一个实施例的流程示意 图,本实施例的方法可以包括:Referring to FIG. 1 , a flow chart of an embodiment of a software version upgrade method of the present application is shown. The method of this embodiment may include:
101,确定针对软件版本的补丁文件包。101. Determine a patch file package for the software version.
当需要对网元设备中的软件版本进行更新时,可以在下载并安装该补丁文件包后,利用该网元设备中存在的该补丁文件包中的补丁文件对软件版本进行升级。When you need to update the software version in the NE device, you can use the patch file in the patch file package in the NE device to upgrade the software version after downloading and installing the patch file package.
102,依据补丁文件包中的补丁文件,确定所述软件版本中无需更新的文件。102. Determine, according to the patch file in the patch file package, a file that is not required to be updated in the software version.
补丁文件包中补丁文件可以是需要向该软件版本中增加的文件,即补丁文件包中包含且该软件版本中不包含的文件;也可以是对软件版本中的文件进行更新的文件,即该软件版本和补丁文件包中包含的文件名称相同的文件,但是该文件中包含的数据内容不同。The patch file in the patch file package may be a file that needs to be added to the software version, that is, a file included in the patch file package and not included in the software version; or a file that is updated in the software version, that is, the file The software version and the patch file contain the same file name, but the data content contained in the file is different.
通过将该补丁文件包中的补丁文件与该软件版本中包含的文件进行比较,可以确定出该软件版本中不需要更新的文件和/或需要更新的文件。By comparing the patch file in the patch package with the files included in the software version, files that do not need to be updated in the software version and/or files that need to be updated can be determined.
103,确定该软件版本的升级版本中包含的各个文件的链接地址。103. Determine a link address of each file included in the upgraded version of the software version.
其中,该各个文件的链接地址包括该补丁文件包中补丁文件的链接地址以及该软件版本中无需更新的文件的链接地址。The link address of each file includes a link address of the patch file in the patch file package and a link address of the file that is not required to be updated in the software version.
链接地址可以具体是指各个文件的位置信息等。The link address may specifically refer to location information of each file and the like.
根据补丁文件以及软件版本中的文件,可以确定出软件版本升级之后的升级版本中包含的文件。Based on the patch file and the files in the software version, you can determine the files included in the upgraded version after the software version is upgraded.
由于软件版本中文件的位置,以及补丁文件包中补丁文件的位置已知,因此可以确定出构成升级版本的各个文件的链接地址。Due to the location of the files in the software version and the location of the patch files in the patch package, the link addresses of the individual files that make up the upgrade version can be determined.
104,触发运行所述软件版本的进程,依据所述各个文件的链接地址,运行所述各个文件的链接地址链接的相应文件。104. Trigger a process of running the software version, and running a corresponding file linked by a link address of each file according to a link address of each file.
本申请实施例中,无需利用补丁文件更新软件版本的文件,也无需备份该软件版本中的文件。只需确定出升级版本中各个文件的链接地址,将原来运行软件版本中文件的进程,触发运行该链接地址链接的相应文件,由于链接地址链接的文件包括补丁文件(包括软件版本中需要更新的文件对应的补丁文件)以及软件版本中无需更新的文件,因此即实现了将进程运行升级版本文件的目的,从而实现了软件版本升级。进程只需切换到运行链接地址对应的文件即可, 无需停止较长的时间,因此可以减少对进程对应的业务的影响。且也无需备份文件、覆盖文件等复杂的操作,节省了升级时间,提高了升级效率。In this embodiment of the present application, it is not necessary to use the patch file to update the software version of the file, and it is not necessary to back up the files in the software version. Just determine the link address of each file in the upgraded version, and the process that originally runs the file in the software version triggers the corresponding file running the link of the link address. The file linked by the link address includes the patch file (including the software version that needs to be updated). The patch file corresponding to the file) and the file that is not required to be updated in the software version, thus realizing the purpose of running the upgrade version file for the process, thereby implementing the software version upgrade. The process only needs to switch to the file corresponding to the running link address. There is no need to stop for a long time, so the impact on the business corresponding to the process can be reduced. It also eliminates the need for complicated operations such as backing up files and overwriting files, saving upgrade time and improving upgrade efficiency.
一个进程可能并不需要运行该软件版本中的全部文件,因此,可以根据自身需求,运行各个文件的链接地址链接的相应文件。A process may not need to run all the files in the software version, so you can run the corresponding file of the link address of each file according to your needs.
其中,在利用补丁文件进行升级时,可以直接向运行该软件版本中文件的进程发送升级指令。运行该软件版本中文件的进程响应该升级指令,即可依据所述各个文件的链接地址,运行所述各个文件的链接地址链接的相应文件。即实现进程由运行该软件版本中需要更新的文件切换到补丁文件包中的补丁文件,从而使得软件版本中需要更新的文件均升级到补丁文件包中的补丁文件。When upgrading with a patch file, an upgrade command can be sent directly to the process running the file in the software version. The process running the file in the software version responds to the upgrade instruction, and the corresponding file linked by the link address of each file may be run according to the link address of each file. That is, the implementation process is switched from the file that needs to be updated in the software version to the patch file in the patch file package, so that the files that need to be updated in the software version are upgraded to the patch file in the patch file package.
可以理解的是,由于本申请实施例在对软件版本进行升级的过程中,并没有利用补丁文件对原来的软件版本进行覆盖,使得原来的软件版本仍然完整保存在该设备中,这样当该补丁文件包出现异常时,可以直接将进程重新切换到运行软件版本中的文件。因此无需备份文件,也无需在补丁回退时由于先停止进程而导致业务中断时间较长,对业务造成的影响。It can be understood that, in the process of upgrading the software version in the embodiment of the present application, the original software version is not covered by the patch file, so that the original software version is still completely stored in the device, so that the patch is When an exception occurs in a package, you can directly switch the process back to the file in the running software version. Therefore, there is no need to back up files, and there is no need to interrupt the process when the patch is rolled back.
因此本申请实施例,在触发运行所述软件版本的进程,依据所述各个文件的链接地址,运行所述各个文件的链接地址链接的相应文件之后,所述方法还包括:Therefore, in the embodiment of the present application, after the process of triggering the running of the software version is performed, according to the link address of each file, after running the corresponding file linked to the link address of each file, the method further includes:
检测到补丁回退指令时,触发所述进程运行所述软件版本中的文件。When the patch fallback command is detected, the process is triggered to run the file in the software version.
其中,该补丁回退指令,可以是指检测到补丁文件运行异常等情况时生成的。The patch rollback command may be generated when the patch file is abnormally detected.
可以理解的是,在实际应用中,确定针对该软件版本的补丁文件之前需要下载补丁文件包并安装。It can be understood that in the actual application, it is necessary to download the patch file package and install it before determining the patch file for the software version.
补丁文件包安装后,该补丁文件包与该软件版本是两个独立的软件包,而确定的升级版本中各个文件的链接地址,实际上是建立了该补丁文件包与该软件版本中无需更新的文件的链接关系。After the patch file package is installed, the patch file package and the software version are two separate software packages, and the link address of each file in the determined upgrade version is actually established in the patch file package and the software version does not need to be updated. The link relationship of the files.
可选的,可以先将该软件版本中无需更新的文件以及该补丁文件包中的补丁文件确定为该软件版本升级之后的升级版本中包含的文件,然后确定该无需更新的文件的链接地址以及补丁文件包中补丁文件的链接地址,将该无需更新 的文件的链接地址以及补丁文件的链接地址进行组合,得到升级版本中各个文件的链接地址。Optionally, the file that is not required to be updated in the software version and the patch file in the patch file package may be first determined as a file included in the upgrade version after the software version is upgraded, and then the link address of the file that does not need to be updated is determined. The link address of the patch file in the patch package, which will not need to be updated. The link address of the file and the link address of the patch file are combined to obtain the link address of each file in the upgraded version.
下面以一个实例来进行介绍。假设网元设备当前安装并运行为软件版本V1.01.0.0,需要利用补丁文件包中的补丁文件将该软件版本升级为升级版本V1.01.0.1。其中可以理解的是,包含能够被运行的程序文件以及运行所述程序文件过程中所产生的数据文件。在软件版本升级的过程中数据文件不会发生改变,而程序文件则可能会存在更新。The following is an introduction to an example. Assume that the NE device is currently installed and running as software version V1.01.0.0. You need to upgrade the software version to the upgrade version V1.01.0.1 by using the patch file in the patch file package. It can be understood that the program file that can be run and the data file generated during the process of running the program file are included. The data files will not change during the software version upgrade, and the program files may be updated.
假设该软件版本中包含有程序文件software,具体包括:file1至filen。同时,该软件版本中还包括运行软件版本中产生的多个数据文件date,具体包括date1至daten,其中n为大于1的自然数。如图2所示,为该软件版本V1.0.1.0.0中包含的文件的目录示意图。Assume that the software version contains the program file software, including: file1 to filen. At the same time, the software version also includes a plurality of data files date generated in the running software version, specifically including date1 to daten, where n is a natural number greater than 1. As shown in FIG. 2, it is a directory diagram of files included in the software version V1.0.1.0.0.
假设针对该软件版本V1.0.1.0.0的补丁文件包括补丁文件file3和fileX,其中,补丁文件file3是该软件版本V1.0.1.0.0中包含的文件file3的更新文件,而该fileX为新增的程序文件。如图3所示,示出了补丁文件包中的补丁文件的目录示意图,即该补丁文件包中包括补丁文件file3和补丁文件fileX。Assume that the patch file for the software version V1.0.1.0.0 includes the patch files file3 and fileX, wherein the patch file file3 is an update file of the file file3 included in the software version V1.0.1.0.0, and the fileX is new. program files. As shown in FIG. 3, a directory diagram of a patch file in a patch file package is shown, that is, the patch file package includes a patch file file3 and a patch file fileX.
将图2和图3的文件目录进行对比可以看出,原来的软件版本V1.0.1.0.0中除了程序文件file3需要发生更新外,其他文件均不需要更新。根据软件版本V1.0.1.0.0中包含的文件目录以及补丁文件包中包含的补丁文件目录,可以确定出利用该补丁文件包对该软件版本V1.0.1.0.0进行升级后,升级版本中包含的文件包括该软件版本V1.0.1.0.0中无需更新的文件,即,程序文件file1、file2、file4至filen,以及该软件版本V1.0.1.0.0中所有的数据文件;同时,升级软件版本中还包括:补丁文件包中的补丁文件file3和新增文件filex。当网元设备中安装了软件版本和该补丁文件包后,该软件版本以及补丁文件包中各个文件的链接地址便是确定的,将该软件版本中无需更新的文件的链接地址以及补丁文件的链接地址进行组合,便可以得到升级后的升级版本中包含的各个文件的链接地址。如图4所示,为软件版本中无需更新的文件与该补丁文件包中补丁文件之间的关系示意图,可知升级版本中的文件包括补丁文件以及链接的软件版本中无需更新的文件。 Comparing the file directories of Figure 2 and Figure 3, it can be seen that the original software version V1.0.1.0.0 does not need to be updated except for the program file file3 that needs to be updated. According to the file directory included in the software version V1.0.1.0.0 and the patch file directory included in the patch file package, it can be determined that the software version V1.0.1.0.0 is upgraded by using the patch file package, and the upgrade version includes The file includes files that need not be updated in the software version V1.0.1.0.0, that is, the program files file1, file2, file4 to filen, and all the data files in the software version V1.0.1.0.0; Including: patch file file3 and new file filex in the patch package. After the software version and the patch file package are installed in the network element device, the software version and the link address of each file in the patch file package are determined, and the link address of the file and the patch file of the software version that are not required to be updated are determined. By combining the link addresses, you can get the link address of each file included in the upgraded version. As shown in FIG. 4, it is a schematic diagram of the relationship between the files that need not be updated in the software version and the patch files in the patch file package. It can be seen that the files in the upgraded version include the patch file and the files that need to be updated in the linked software version.
由以上过程也可以看出,本申请对软件版本进行升级的过程中,无需利用补丁文件覆盖该软件版本中需要更新的文件,即无需构建一个完整的升级版本,从而使得原来的该软件版本得到保留,这样在补丁文件包存在异常的情况,无需重新构建升级之前的版本,可以直接将进程切换到运行原软件版本中的文件。It can also be seen from the above process that in the process of upgrading the software version, the application does not need to use the patch file to overwrite the file that needs to be updated in the software version, that is, it is not necessary to construct a complete upgrade version, so that the original software version is obtained. Reserved, in the case of an exception in the patch file package, you do not need to rebuild the version before the upgrade, you can directly switch the process to the file in the original software version.
其中,由于进程运行的软件版本中的文件可能无需更新,此时,该进程则可以不需要运行链接地址链接的相应文件,直接运行软件版本中的文件即可。The file in the software version of the process may not need to be updated. In this case, the process can run the file in the software version without running the corresponding file linked by the link address.
需要运行升级版本的进程的确定可以有多种实现方式。There are several ways to implement the determination of a process that needs to run an upgraded version.
在一种可能实现方式中,当根据补丁文件确定软件版本中存在需要更新的文件时,则触发运行所述软件版本的进程,依据所述各个文件的链接地址,运行所述各个文件的链接地址链接的相应文件具体可以是运行所述软件版本中需要更新的文件的进程,依据所述各个文件的链接地址,运行所述各个文件的链接地址链接的相应文件。In a possible implementation manner, when it is determined that there is a file that needs to be updated in the software version according to the patch file, triggering a process of running the software version, and running a link address of each file according to a link address of each file The corresponding file of the link may specifically be a process of running a file that needs to be updated in the software version, and according to the link address of the respective file, running a corresponding file linked by the link address of each file.
也即需要运行升级版本的进程可以是运行的文件为软件版本中需要更新的文件的进程。That is, the process that needs to run the upgraded version can be the process that runs the file that needs to be updated in the software version.
若进程运行的软件版本中的文件无需更新,则进程可以继续运行该软件版本的文件。If the files in the software version running by the process do not need to be updated, the process can continue to run the software version of the file.
当然,作为另一种可能的实现方式,在该补丁文件包中还可以有包含配置文件,该配置文件中包括用于指示运行该补丁文件包中各个补丁文件的进程信息。如,在补丁文件包中包含有补丁文件file3和fileX,在该配置文件中可以指示出由运行原来的软件版本中file3的进程A运行该补丁文件file3,由进程B运行fileX。Of course, as another possible implementation manner, the patch file package may further include a configuration file, where the configuration file includes process information for indicating each patch file in the patch file package. For example, the patch file includes the patch files file3 and fileX. In the configuration file, it can be indicated that the patch file file3 is run by the process A of the file3 running the original software version, and the fileX is run by the process B.
因此,所述触发运行所述软件版本的进程,依据所述各个文件的链接地址,运行所述各个文件的链接地址链接的相应文件包括:Therefore, the process of triggering the running of the software version, according to the link address of each file, running the corresponding file of the link address link of each file includes:
触发所述配置文件指示的运行所述补丁文件的进程,依据所述各个文件的链接地址,运行所述各个文件的链接地址链接的相应文件。The process of running the patch file indicated by the configuration file is triggered, and corresponding files of the link address links of the respective files are run according to the link address of the respective files.
在以上任意一个实施例中,当运行软件版本中的文件的进程为普通进程 时,则在触发运行所述软件版本的进程,依据所述各个文件的链接地址,运行所述各个文件的链接地址链接的相应文件时,可以是触发所述普通进程终止运行,同时在所述各个文件的链接地址链接的相应文件中,重新启动所述普通进程。In any of the above embodiments, when the process running the files in the software version is a normal process At the time of triggering the process of running the software version, according to the link address of each file, when the corresponding file of the link address link of each file is run, the normal process may be triggered to terminate the operation, and at the same time The normal process is restarted in the corresponding file of the link address of each file.
当运行软件版本中的文件的进程为插进进程时,则在触发运行所述软件版本的进程,依据所述各个文件的链接地址,运行所述各个文件的链接地址链接的相应文件时,可以是所述插件进程卸载运行所述软件版本中的文件的插件,并重新加载运行所述各个文件的链接地址链接的相应文件的插件。When the process of running the file in the software version is an insertion process, when the process running the software version is triggered, according to the link address of each file, when the corresponding file of the link address of each file is run, It is the plugin process that uninstalls the plugin that runs the files in the software version and reloads the plugin that runs the corresponding file of the link address link of the respective file.
其中,插件进程就是由多个插件或者模块组成,每个插件可以独立启动、停止、卸载、安装等。因此插件进程的一个插件升级、打补丁,只对这个插件有影响。因此可以针对插进运行的软件版本中的文件是否需要更新,来确定是否对插进进行升级。Among them, the plug-in process is composed of multiple plug-ins or modules, each plug-in can be started, stopped, uninstalled, installed, etc. independently. Therefore, a plugin of the plugin process is upgraded and patched, which only affects the plugin. It is therefore possible to determine whether or not to insert the upgrade for the files in the software version inserted into the run.
图5为本申请实施例提供的一种软件版本升级装置一个实施例的结构示意图,该装置可以包括:FIG. 5 is a schematic structural diagram of an apparatus for upgrading a software version according to an embodiment of the present disclosure, where the apparatus may include:
第一文件确定模块501,用于确定针对所述软件版本的补丁文件包。The first file determining module 501 is configured to determine a patch file package for the software version.
第二文件确定模块502,用于依据所述补丁文件包中的补丁文件,确定所述软件版本中无需更新的文件。The second file determining module 502 is configured to determine, according to the patch file in the patch file package, a file that is not required to be updated in the software version.
补丁文件包中补丁文件可以是需要向该软件版本中增加的文件,即补丁文件包中包含且该软件版本中不包含的文件;也可以是对软件版本中的文件进行更新的文件,即该软件版本和补丁文件包中包含的文件名称相同的文件,但是该文件中包含的数据内容不同。The patch file in the patch file package may be a file that needs to be added to the software version, that is, a file included in the patch file package and not included in the software version; or a file that is updated in the software version, that is, the file The software version and the patch file contain the same file name, but the data content contained in the file is different.
通过将该补丁文件包中的补丁文件与该软件版本中包含的文件进行比较,可以确定出该软件版本中不需要更新的文件和/或需要更新的文件。By comparing the patch file in the patch package with the files included in the software version, files that do not need to be updated in the software version and/or files that need to be updated can be determined.
地址确定模块503,用于确定所述软件版本的升级版本中包含的各个文件的链接地址。其中,所述各个文件的链接地址包括所述补丁文件的链接地址以及所述无需更新的文件的链接地址。The address determining module 503 is configured to determine a link address of each file included in the upgraded version of the software version. The link address of each file includes a link address of the patch file and a link address of the file that does not need to be updated.
链接地址可以具体是指各个文件的位置信息等。The link address may specifically refer to location information of each file and the like.
根据补丁文件以及软件版本中的文件,可以确定出软件版本升级之后的升 级版本中包含的文件。According to the patch file and the files in the software version, it can be determined that the software version is upgraded after the upgrade. The files included in the level version.
由于软件版本中文件的位置,以及补丁文件包中补丁文件的位置已知,因此可以确定出构成升级版本的各个文件的链接地址。Due to the location of the files in the software version and the location of the patch files in the patch package, the link addresses of the individual files that make up the upgrade version can be determined.
升级模块501,用于触发运行所述软件版本的进程,依据所述各个文件的链接地址,运行所述各个文件的链接地址链接的相应文件。The upgrading module 501 is configured to trigger a process of running the software version, and run a corresponding file linked by the link address of each file according to the link address of each file.
本申请实施例中,无需利用补丁文件更新软件版本的文件,也无需备份该软件版本中的文件。只需确定出升级版本中各个文件的链接地址,将原来运行软件版本中文件的进程,触发运行该链接地址链接的相应文件,由于链接地址链接的文件包括补丁文件(包括软件版本中需要更新的文件对应的补丁文件)以及软件版本中无需更新的文件,因此即实现了将进程运行升级版本文件的目的,从而实现了软件版本升级。进程只需切换到运行链接地址对应的文件即可,无需停止较长的时间,因此可以减少对业务的影响。且也无需备份文件、覆盖文件等复杂的操作,节省了升级时间,提高了升级效率。In this embodiment of the present application, it is not necessary to use the patch file to update the software version of the file, and it is not necessary to back up the files in the software version. Just determine the link address of each file in the upgraded version, and the process that originally runs the file in the software version triggers the corresponding file running the link of the link address. The file linked by the link address includes the patch file (including the software version that needs to be updated). The patch file corresponding to the file) and the file that is not required to be updated in the software version, thus realizing the purpose of running the upgrade version file for the process, thereby implementing the software version upgrade. The process only needs to switch to the file corresponding to the running link address, without stopping for a long time, so the impact on the business can be reduced. It also eliminates the need for complicated operations such as backing up files and overwriting files, saving upgrade time and improving upgrade efficiency.
一个进程可能并不需要运行该软件版本中的全部文件,因此,可以根据自身需求,运行各个文件的链接地址链接的相应文件。A process may not need to run all the files in the software version, so you can run the corresponding file of the link address of each file according to your needs.
由于本申请实施例在对软件版本进行升级的过程中,并没有利用补丁文件对原来的软件版本进行覆盖,使得原来的软件版本仍然完整保存在该设备中,这样当该补丁文件包出现异常时,可以直接将进程重新切换到运行软件版本中的文件。因此无需备份文件,也无需在补丁回退时由于先停止进程而导致业务中断,对业务造成的影响。In the process of upgrading the software version in the embodiment of the present application, the original software version is not covered by the patch file, so that the original software version is still completely stored in the device, so that when the patch file package is abnormal, , you can directly switch the process back to the file in the running software version. Therefore, there is no need to back up files, and there is no need to interrupt the service when the patch is rolled back.
因此本申请实施例,该装置还可以包括:Therefore, in this embodiment of the present application, the device may further include:
回退模块,用于检测到补丁回退指令时,触发所述进程运行所述软件版本中的文件。The rollback module is configured to trigger the process to run the file in the software version when the patch back command is detected.
其中,该补丁回退指令,可以是指检测到补丁文件运行异常等情况时生成的。The patch rollback command may be generated when the patch file is abnormally detected.
在实际应用中,确定针对该软件版本的补丁文件之前需要下载补丁文件包并安装。因此,该装置还可以包括: In practical applications, it is necessary to download the patch package and install it before determining the patch file for the software version. Therefore, the device may further comprise:
补丁安装模块,用于下载并安装所述补丁文件。A patch installation module for downloading and installing the patch file.
补丁文件包安装后,该补丁文件包与该软件版本是两个独立的软件包,而确定的升级版本中各个文件的链接地址,实际上是建立了该补丁文件包与该软件版本中无需更新的文件的链接关系。After the patch file package is installed, the patch file package and the software version are two separate software packages, and the link address of each file in the determined upgrade version is actually established in the patch file package and the software version does not need to be updated. The link relationship of the files.
其中,由于进程运行的软件版本中的文件可能无需更新,此时,该进程则可以不需要运行链接地址链接的相应文件,直接运行软件版本中的文件即可。The file in the software version of the process may not need to be updated. In this case, the process can run the file in the software version without running the corresponding file linked by the link address.
需要运行升级版本的进程的确定可以有多种实现方式。There are several ways to implement the determination of a process that needs to run an upgraded version.
在一种可能实现方式中,当根据补丁文件确定软件版本中存在需要更新的文件时,则所述升级模块具体可以是运行所述软件版本中需要更新的文件的进程,依据所述各个文件的链接地址,运行所述各个文件的链接地址链接的相应文件。In a possible implementation, when it is determined that there is a file that needs to be updated in the software version according to the patch file, the upgrade module may be specifically a process of running a file that needs to be updated in the software version, according to the The link address, the corresponding file that runs the link address link of each file.
也即需要运行升级版本的进程可以是运行的文件为软件版本中需要更新的文件的进程。That is, the process that needs to run the upgraded version can be the process that runs the file that needs to be updated in the software version.
若进程运行的软件版本中的文件无需更新,则进程可以继续运行该软件版本的文件。If the files in the software version running by the process do not need to be updated, the process can continue to run the software version of the file.
当然,作为另一种可能的实现方式,在该补丁文件包中还可以有包含配置文件,该配置文件中包括用于指示运行该补丁文件包中各个补丁文件的进程信息。因此,所述升级模块可以具体用于:Of course, as another possible implementation manner, the patch file package may further include a configuration file, where the configuration file includes process information for indicating each patch file in the patch file package. Therefore, the upgrade module can be specifically used for:
触发所述配置文件指示的运行所述补丁文件的进程,依据所述各个文件的链接地址,运行所述各个文件的链接地址链接的相应文件。The process of running the patch file indicated by the configuration file is triggered, and corresponding files of the link address links of the respective files are run according to the link address of the respective files.
在上述描述中,当运行软件版本中的文件的进程为普通进程时,则升级模块可以是触发所述普通进程终止运行,同时在所述各个文件的链接地址链接的相应文件中,重新启动所述普通进程。In the above description, when the process of running the file in the software version is a normal process, the upgrade module may trigger the normal process to terminate the operation, and restart the corresponding file in the corresponding file of the link address of the respective file. General process.
当运行软件版本中的文件的进程为插进进程时,则所述升级模块可以是所述插件进程卸载运行所述软件版本中的文件的插件,并重新加载运行所述各个文件的链接地址链接的相应文件的插件。When the process of running the file in the software version is an insertion process, the upgrade module may be the plug-in process uninstalling the plug-in that runs the file in the software version, and reloading the link address link running the respective file. The plugin for the corresponding file.
其中,插件进程就是由多个插件或者模块组成,每个插件可以独立启动、 停止、卸载、安装等。因此插件进程的一个插件升级、打补丁,只对这个插件有影响。因此可以针对插进运行的软件版本中的文件是否需要更新,来确定是否对插进进行升级。Among them, the plug-in process is composed of multiple plug-ins or modules, each plug-in can be started independently, Stop, uninstall, install, etc. Therefore, a plugin of the plugin process is upgraded and patched, which only affects the plugin. It is therefore possible to determine whether or not to insert the upgrade for the files in the software version inserted into the run.
上述实施例所述的软件版本升级装置,在实际应用中,可以集成到软件版本升级设备中,该软件版本升级设备可以是指安装软件版本,具有软件版本升级需求的网元设备等。部署本申请实施例软件版本升级装置的软件版本升级设备,进程无需停止较长的时间,因此可以检测进程对应的业务的中断时间,减少对业务的影响。且也无需备份文件、覆盖文件等复杂的操作,节省了升级时间,提高了升级效率。The software version upgrade device described in the foregoing embodiment may be integrated into the software version upgrade device, and the software version upgrade device may be a network element device with a software version upgrade requirement. The software version of the software version upgrade device of the embodiment of the present application is upgraded, and the process does not need to be stopped for a long time. Therefore, the service interruption time of the process can be detected, and the impact on the service is reduced. It also eliminates the need for complicated operations such as backing up files and overwriting files, saving upgrade time and improving upgrade efficiency.
通过以上描述可知,本领域的技术人员可以清楚地了解到本申请可借助软件加必需的通用硬件平台的方式来实现。因此,参见图6,本申请实施例还提供了一种软件版本升级设备,该软件版本升级设备至少包括处理器601和存储器602。From the above description, those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Therefore, referring to FIG. 6, the embodiment of the present application further provides a software version upgrading device, where the software version upgrading device includes at least a processor 601 and a memory 602.
该存储器602存储一组程序指令,该存储器可以是是高速RAM存储器,也可能是非易失性存储器(non-volatile memory),例如至少一个磁盘存储器等。The memory 602 stores a set of program instructions, which may be a high speed RAM memory or a non-volatile memory such as at least one disk memory or the like.
该处理器601,用于调用该存储器602存储的程序指令,执行如下操作:The processor 601 is configured to invoke the program instructions stored in the memory 602, and perform the following operations:
确定针对所述软件版本的补丁文件包;Determining a patch file package for the software version;
依据所述补丁文件包中的补丁文件,确定所述软件版本中无需更新的文件;Determining files that are not required to be updated in the software version according to the patch file in the patch file package;
确定所述软件版本的升级版本中包含的各个文件的链接地址,其中,所述各个文件的链接地址包括所述补丁文件的链接地址以及所述无需更新的文件的链接地址;Determining a link address of each file included in the upgraded version of the software version, where the link address of each file includes a link address of the patch file and a link address of the file that does not need to be updated;
触发运行所述软件版本的进程,依据所述各个文件的链接地址,运行所述各个文件的链接地址链接的相应文件。The process of triggering the running of the software version is executed, and the corresponding file linked by the link address of each file is run according to the link address of each file.
其中,该处理器可能是一个中央处理器CPU,或者是特定集成电路ASIC(Application Specific Integrated Circuit),或者是被配置成实施本发明实施例的一个或多个集成电路。The processor may be a central processing unit CPU, or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention.
可选地,该软件版本升级设备可以用于执行本申请实施例提供的如图1 所示的软件版本升级方法。Optionally, the software version upgrade device may be used to perform the example provided in the embodiment of the present application. The software version upgrade method shown.
本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。The various embodiments in the present specification are described in a progressive manner, and each embodiment focuses on differences from other embodiments, and the same similar parts between the various embodiments may be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
专业人员还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。A person skilled in the art will further appreciate that the elements and algorithm steps of the various examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware, computer software or a combination of both, in order to clearly illustrate the hardware and software. Interchangeability, the composition and steps of the various examples have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods to implement the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present application.
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。The steps of a method or algorithm described in connection with the embodiments disclosed herein can be implemented directly in hardware, a software module executed by a processor, or a combination of both. The software module can be placed in random access memory (RAM), memory, read only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or technical field. Any other form of storage medium known.
对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本申请。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本申请的精神或范围的情况下,在其它实施例中实现。因此,本申请将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。 The above description of the disclosed embodiments enables those skilled in the art to make or use the application. Various modifications to these embodiments are obvious to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the application. Therefore, the application is not limited to the embodiments shown herein, but is to be accorded the broadest scope of the principles and novel features disclosed herein.

Claims (11)

  1. 一种软件版本升级方法,其特征在于,包括:A software version upgrade method, which is characterized by comprising:
    确定针对所述软件版本的补丁文件包;Determining a patch file package for the software version;
    依据所述补丁文件包中的补丁文件,确定所述软件版本中无需更新的文件;Determining files that are not required to be updated in the software version according to the patch file in the patch file package;
    确定所述软件版本的升级版本中包含的各个文件的链接地址,其中,所述各个文件的链接地址包括所述补丁文件的链接地址以及所述无需更新的文件的链接地址;Determining a link address of each file included in the upgraded version of the software version, where the link address of each file includes a link address of the patch file and a link address of the file that does not need to be updated;
    触发运行所述软件版本的进程,依据所述各个文件的链接地址,运行所述各个文件的链接地址链接的相应文件。The process of triggering the running of the software version is executed, and the corresponding file linked by the link address of each file is run according to the link address of each file.
  2. 根据权利要求1所述的方法,其特征在于,所述触发运行所述软件版本的进程,依据所述各个文件的链接地址,运行所述各个文件的链接地址链接的相应文件之后,所述方法还包括:The method according to claim 1, wherein the triggering the process of running the software version, after running the corresponding file of the link address link of each file according to the link address of each file, the method Also includes:
    检测到补丁回退指令时,触发所述进程运行所述软件版本中的文件。When the patch fallback command is detected, the process is triggered to run the file in the software version.
  3. 根据权利要求1所述的方法,其特征在于,在所述确定针对所述软件版本的补丁文件包之前,还包括:The method according to claim 1, wherein before the determining the patch file package for the software version, the method further comprises:
    下载并安装所述补丁文件。Download and install the patch file.
  4. 根据权利要求1~3任一项所述的方法,其特征在于,在所述补丁文件包中还包括配置文件,所述配置文件用于指示运行补丁文件的进程;The method according to any one of claims 1 to 3, further comprising a configuration file in the patch file package, where the configuration file is used to indicate a process of running a patch file;
    所述触发运行所述软件版本的进程,依据所述各个文件的链接地址,运行所述各个文件的链接地址链接的相应文件包括:The process of triggering the running of the software version, according to the link address of each file, running the corresponding file of the link address link of each file includes:
    触发所述配置文件指示的运行所述补丁文件的进程,依据所述各个文件的链接地址,运行所述各个文件的链接地址链接的相应文件。The process of running the patch file indicated by the configuration file is triggered, and corresponding files of the link address links of the respective files are run according to the link address of the respective files.
  5. 根据权利要求1~3任一项所述的方法,其特征在于,所述触发运行所述软件版本的进程,依据所述各个文件的链接地址,运行所述各个文件的链接地址链接的相应文件包括:The method according to any one of claims 1 to 3, wherein the triggering the process of running the software version, according to the link address of each file, running a corresponding file of a link address link of each file include:
    当运行所述软件版本的进程为插件进程时,触发所述插件进程卸载运行所述软件版本中的文件的插件,并加载运行所述链接地址链接的文件的插件。When the process running the software version is a plug-in process, the plug-in process is triggered to uninstall a plug-in that runs a file in the software version, and loads a plug-in that runs the file linked by the link address.
  6. 一种软件版本升级装置,其特征在于,包括: A software version upgrading device, comprising:
    第一文件确定模块,用于确定针对所述软件版本的补丁文件包;a first file determining module, configured to determine a patch file package for the software version;
    第二文件确定模块,用于依据所述补丁文件包中的补丁文件,确定所述软件版本中无需更新的文件;a second file determining module, configured to determine, according to the patch file in the patch file package, a file that is not required to be updated in the software version;
    地址确定模块,用于确定所述软件版本的升级版本中包含的各个文件的链接地址,其中,所述各个文件的链接地址包括所述补丁文件的链接地址以及所述无需更新的文件的链接地址;An address determining module, configured to determine a link address of each file included in an upgraded version of the software version, where a link address of each file includes a link address of the patch file and a link address of the file that does not need to be updated ;
    升级模块,用于触发运行所述软件版本的进程,依据所述各个文件的链接地址,运行所述各个文件的链接地址链接的相应文件。And an upgrade module, configured to trigger a process of running the software version, and run a corresponding file linked by the link address of each file according to the link address of each file.
  7. 根据权利要求6所述的装置,其特征在于,还包括:The device according to claim 6, further comprising:
    回退模块,用于检测到补丁回退指令时,触发所述进程运行所述软件版本中的文件。The rollback module is configured to trigger the process to run the file in the software version when the patch back command is detected.
  8. 根据权利要求6所述的装置,其特征在于,还包括:The device according to claim 6, further comprising:
    补丁安装模块,用于下载并安装所述补丁文件。A patch installation module for downloading and installing the patch file.
  9. 根据权利要求6~8任一项所述的装置,其特征在于,所述升级模块具体用于:The device according to any one of claims 6 to 8, wherein the upgrade module is specifically configured to:
    触发所述配置文件指示的运行所述补丁文件的进程,依据所述各个文件的链接地址,运行所述各个文件的链接地址链接的相应文件。The process of running the patch file indicated by the configuration file is triggered, and corresponding files of the link address links of the respective files are run according to the link address of the respective files.
  10. 根据权利要求6~8任一项所述的装置,其特征在于,所述升级模块具体用于:The device according to any one of claims 6 to 8, wherein the upgrade module is specifically configured to:
    当运行所述软件版本的进程为插件进程时,触发所述插件进程卸载运行所述软件版本中的文件的插件,并加载运行所述链接地址链接的文件的插件。When the process running the software version is a plug-in process, the plug-in process is triggered to uninstall a plug-in that runs a file in the software version, and loads a plug-in that runs the file linked by the link address.
  11. 一种软件版本升级设备,其特征在于,包括处理器以及存储器,A software version upgrading device, comprising: a processor and a memory,
    所述存储器用户存储一组程序指令;The memory user stores a set of program instructions;
    所述处理器用于调用所述存储器的所述程序指令,执行如下操作:The processor is configured to invoke the program instruction of the memory, and perform the following operations:
    确定针对所述软件版本的补丁文件包;Determining a patch file package for the software version;
    依据所述补丁文件包中的补丁文件,确定所述软件版本中无需更新的文件;Determining files that are not required to be updated in the software version according to the patch file in the patch file package;
    确定所述软件版本的升级版本中包含的各个文件的链接地址,其中,所述各个文件的链接地址包括所述补丁文件的链接地址以及所述无需更新的文件 的链接地址;Determining a link address of each file included in the upgraded version of the software version, wherein the link address of each file includes a link address of the patch file and the file that does not need to be updated Link address
    触发运行所述软件版本的进程,依据所述各个文件的链接地址,运行所述各个文件的链接地址链接的相应文件。 The process of triggering the running of the software version is executed, and the corresponding file linked by the link address of each file is run according to the link address of each file.
PCT/CN2014/086133 2014-09-09 2014-09-09 Software version upgrade method, apparatus and device WO2016037314A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2014/086133 WO2016037314A1 (en) 2014-09-09 2014-09-09 Software version upgrade method, apparatus and device
CN201480049719.2A CN105594184B (en) 2014-09-09 2014-09-09 Method for upgrading software version, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2014/086133 WO2016037314A1 (en) 2014-09-09 2014-09-09 Software version upgrade method, apparatus and device

Publications (1)

Publication Number Publication Date
WO2016037314A1 true WO2016037314A1 (en) 2016-03-17

Family

ID=55458239

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/086133 WO2016037314A1 (en) 2014-09-09 2014-09-09 Software version upgrade method, apparatus and device

Country Status (2)

Country Link
CN (1) CN105594184B (en)
WO (1) WO2016037314A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109976794A (en) * 2019-03-31 2019-07-05 联想(北京)有限公司 Update method, more new system and electronic equipment
CN112073994A (en) * 2020-09-03 2020-12-11 百度在线网络技术(北京)有限公司 Method and device for over-the-air upgrading, electronic equipment and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009081502A1 (en) * 2007-12-26 2009-07-02 Fujitsu Limited Communication terminal
CN102724308A (en) * 2012-06-13 2012-10-10 腾讯科技(深圳)有限公司 Software update method and software update system
CN103631629A (en) * 2013-12-17 2014-03-12 江苏名通信息科技有限公司 Method for obtaining and automatically updating remote update file

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1107907C (en) * 2000-02-21 2003-05-07 英业达股份有限公司 Increment mode method for upgrading data file

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009081502A1 (en) * 2007-12-26 2009-07-02 Fujitsu Limited Communication terminal
CN102724308A (en) * 2012-06-13 2012-10-10 腾讯科技(深圳)有限公司 Software update method and software update system
CN103631629A (en) * 2013-12-17 2014-03-12 江苏名通信息科技有限公司 Method for obtaining and automatically updating remote update file

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109976794A (en) * 2019-03-31 2019-07-05 联想(北京)有限公司 Update method, more new system and electronic equipment
CN112073994A (en) * 2020-09-03 2020-12-11 百度在线网络技术(北京)有限公司 Method and device for over-the-air upgrading, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
CN105594184B (en) 2019-05-24
CN105594184A (en) 2016-05-18

Similar Documents

Publication Publication Date Title
US9552201B2 (en) System and method for incremental software installation
JP5444368B2 (en) Application restore point
US8495615B2 (en) Method, system and computer program for distributing software patches
US7703090B2 (en) Patch un-installation
KR100965644B1 (en) Method and apparatus for run-time in-memory patching of code from a service processor
JP4842421B2 (en) Methods and systems for automatically uninstalling or reinstalling applications
US20170357515A1 (en) Multiple-stage bootloader and firmware for baseboard manager controller and primary processing subsystem of computing device
US8225037B2 (en) Apparatus and method for incremental package deployment
EP2840492A1 (en) Method and apparatus for modifying a computer program in a trusted manner
US20120304163A1 (en) Management of Software and Operating System Updates Required for the Process of Creating a Virtual Machine Facsimile of an Existing Physical or Virtual Machine
WO2013078951A1 (en) Method and system for upgrading software
CN107783776B (en) Processing method and device of firmware upgrade package and electronic equipment
WO2012116637A1 (en) System rescue method and device
US7627866B2 (en) Systems and methods for dynamic application patching
US20160328227A1 (en) Dynamically Applying A Software Patch To A Computer Program
US20110119434A1 (en) System And Method For Safely Updating Thin Client Operating System Over A Network
US20160162278A1 (en) System and method for applying an update to a device system via a system snapshot
WO2020029967A1 (en) Method and apparatus for repairing fault in operating system
US8806477B2 (en) Space efficient software package management
US8453141B1 (en) High performance install update
WO2016037314A1 (en) Software version upgrade method, apparatus and device
US20060085685A1 (en) System and method for computer system rejuvenation
US8132047B2 (en) Restoring application upgrades using an application restore point
TWI514279B (en) Server system and firmware update method
US11550918B2 (en) Package-based remote firmware update

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14901765

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14901765

Country of ref document: EP

Kind code of ref document: A1