CN100442230C - Method and system for software multi-version upgrade - Google Patents
Method and system for software multi-version upgrade Download PDFInfo
- Publication number
- CN100442230C CN100442230C CNB2006101095235A CN200610109523A CN100442230C CN 100442230 C CN100442230 C CN 100442230C CN B2006101095235 A CNB2006101095235 A CN B2006101095235A CN 200610109523 A CN200610109523 A CN 200610109523A CN 100442230 C CN100442230 C CN 100442230C
- Authority
- CN
- China
- Prior art keywords
- upgrade
- version
- versions
- directory
- script
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Stored Programmes (AREA)
Abstract
本发明提供了一种软件多版本升级的方法及系统,该方法包括为不同指定版本间的升级任务分别建立不同的指定目录,所述指定目录用于存放与之对应的升级脚本,通过激活与指定版本间的升级任务相对应的指定目录下的公共组件升级脚本完成指定版本间的升级,所述公共组件升级脚本用于存放调用所需升级脚本所需要的执行命令。本发明高效、安全、快捷地实现多版本升级任务,如可以方便的完成不同旧版本到同一新版本的升级任务,即便在有多个旧版本到多个新版本升级等情况下,仍可高效、快捷、安全地完成软件多版本升级的任务,有效解决了升级脚本存放目录不合理、版本升级脚本命名混乱的问题;从而提高了多版本升级的工作效率以及多版本升级的可维护性。
The present invention provides a method and system for upgrading software with multiple versions. The method includes establishing different designated directories for the upgrade tasks between different designated versions. The designated directories are used to store corresponding upgrade scripts. By activating and The public component upgrade script in the specified directory corresponding to the upgrade task between the specified versions completes the upgrade between the specified versions, and the public component upgrade script is used to store the execution commands needed to call the required upgrade script. The present invention efficiently, safely and quickly realizes the multi-version upgrade task. For example, it can conveniently complete the upgrade task from different old versions to the same new version. Quickly and safely complete the task of software multi-version upgrade, effectively solving the problem of unreasonable storage directory of upgrade scripts and confusing naming of version upgrade scripts; thus improving the work efficiency of multi-version upgrade and the maintainability of multi-version upgrade.
Description
技术领域 technical field
本发明涉及软件领域,尤其涉及一种软件版本升级的方法及系统。The invention relates to the field of software, in particular to a method and system for upgrading software versions.
背景技术 Background technique
作为软件产品,每开发到一定阶段、可执行指定功能后,都需要将当前的软件固化下来,以版本形式作为产品发布。然后再在此基础上继续增加新的功能,或修改现有软件中的BUG。As a software product, every time the development reaches a certain stage and the specified functions can be performed, the current software needs to be solidified and released as a product in the form of a version. Then continue to add new functions on this basis, or modify the BUG in the existing software.
版本的内容包括编译出来的可执行程序、编译出来的动态库、用于控制软件功能的配置文件、版本描述性文档等等。The content of the version includes compiled executable programs, compiled dynamic libraries, configuration files for controlling software functions, version descriptive documents, and so on.
在软件产品使用过程中,客户针对软件产品会提出很多新的需求,或者发现很多需要修改的地方。该软件产品经过修改完后,会有新的版本出现,以满足产品的要求,此时就要考虑版本升级的问题了。During the use of software products, customers will put forward many new requirements for software products, or find many places that need to be modified. After the software product has been modified, a new version will appear to meet the requirements of the product. At this time, the issue of version upgrade must be considered.
软件产品版本升级可以增强软件的安全性、提高软件产品的可靠性及兼容性,也可以实现更多的功能,以满足更多的需求。The software product version upgrade can enhance the security of the software, improve the reliability and compatibility of the software product, and can also realize more functions to meet more demands.
在软件产品升级过程中,需要考虑软件产品在使用过程中,已经产生了很多有用的数据,即便是在软件产品的升级之后,能够实现更多更好的功能,也要完好地保留这些有用数据,保证这些有用的数据不会被覆盖掉。否则会为软件产品的继续使用带来极大的不便,例如,旧版本的某软件产品中,用户设置了很多配置项,配置文件已经被修改,如果在升级过程中所述配置数据丢失,那么用户修改的部分都将丢失,这是用户所不会接受。In the process of upgrading software products, it is necessary to consider that a lot of useful data has been generated during the use of software products. Even after the upgrading of software products, more and better functions can be realized, these useful data should be kept intact. , to ensure that these useful data will not be overwritten. Otherwise, it will bring great inconvenience to the continued use of the software product. For example, in an old version of a software product, the user has set many configuration items, and the configuration file has been modified. If the configuration data is lost during the upgrade process, then The part modified by the user will be lost, which is not acceptable to the user.
数据库不会自动升级,新版本往数据库中存储数据的方式可能同旧版本不一样了,数据表的格式可能发生了变化,如果只是简单的将新版本的可执行文件和库文件覆盖旧版本的相应文件,而数据库的格式仍保持旧版本的样子,那么就会发生数据库读写失败的问题。The database will not be automatically upgraded. The way the new version stores data in the database may be different from the old version, and the format of the data table may have changed. If you simply overwrite the old version's executable files and library files Corresponding files, but the format of the database remains the same as the old version, then the problem of database reading and writing failures will occur.
所以说软件产品版本升级,必须在保证用户现有劳动成果的基础上,增加新版本的功能,修改旧版本的BUG,比如对集成管理应用平台iMAP而言,就是要保存现有数据库中的数据以及现有的配置文件等。Therefore, the version upgrade of software products must add the functions of the new version and modify the bugs of the old version on the basis of ensuring the user's existing labor results. For example, for the integrated management application platform iMAP, it is necessary to save the data in the existing database. and existing configuration files etc.
目前,被采用的软件版本升级的方法有两种,第一种方法就是:为版本升级中需要升级的所有特性分别写各自的升级程序,将这些升级程序放到一个目录下;然后利用配置文件对这些升级程序进行控制;在配置文件中,罗列了每一组可能的升级,并且在后面指出该组升级需要调用哪些升级程序;用户升级时,只要提供原始版本号和新版本号,升级脚本就可以从配置文件中找到需要调用的升级程序,然后对升级程序进行调用,这种方法只适用于简单的软件升级,软件规模越大、升级程序越多,这种方法就越难控制。第二种方法是:需要针对新旧版本的特点,为每一个版本的升级写一个专门的升级程序,升级程序的命名方式和升级程序的存放位置不作特别规定。所述升级命令的脚本包括的功能有原软件产品各个模块数据库格式的升级(如果数据库格式发生变化的话)、各个模块配置文件的升级(将用户修改的配置项合入到新版本的配置文件中)等等。升级脚本是一个可执行文件,里面存放了将旧版本升级到新版本时,需要执行的命令集合。At present, there are two methods for upgrading the software version. The first method is: write individual upgrade programs for all the features that need to be upgraded in the version upgrade, and put these upgrade programs in a directory; then use the configuration file Control these upgrade programs; in the configuration file, each group of possible upgrades is listed, and which upgrade programs need to be called for this group of upgrades are indicated later; when the user upgrades, as long as the original version number and the new version number are provided, the upgrade script You can find the upgrade program that needs to be called from the configuration file, and then call the upgrade program. This method is only suitable for simple software upgrades. The larger the software scale and the more upgrade programs, the more difficult this method is to control. The second method is: it is necessary to write a special upgrade program for the upgrade of each version according to the characteristics of the new and old versions. There are no special regulations on the naming method of the upgrade program and the storage location of the upgrade program. The functions included in the script of the upgrade command include the upgrade of each module database format of the original software product (if the database format changes), the upgrade of each module configuration file (merging the configuration items modified by the user into the configuration file of the new version) )etc. The upgrade script is an executable file, which stores a set of commands that need to be executed when upgrading the old version to the new version.
下面将以iMAP的版本升级过程为例,对目前的软件产品升级方法二进行详细说明:The following will take the iMAP version upgrade process as an example to describe the current software product upgrade method 2 in detail:
iMAP作为一种集成管理应用平台,是一个基于CORBA标准开发的分布式系统。其目标是为产品提供一个集中的网管平台。iMAP包含故障管理、安全管理、拓扑管理、公共组件等多个模块,每个模块都由专人负责开发和维护。图1描述了iMAP版本的产生情况:在iMAP的开发过程中,依次产生version1、version2、......、version7等版本,图1中的圆点表示版本。iMAP利用专业的版本管理软件(Rational Clearcase)进行版本管理。在iMAP每个版本开发完成时,通过版本管理软件为iMAP当前的所有代码打一个版本标签,如version1、version2等。以后可以根据标签名从版本管理软件中获取对应的iMAP版本。当把某个iMAP版本提交给产品使用后,产品会对该版本提出许多新的需求,或者发现一些需要修改的问题。为了不和正在开发的主干版本相互影响,开发者会利用版本管理软件在某个版本上创建一个分支,然后再在该分支上,专门针对产品的需求来进行开发和维护。图2描述了iMAP版本分支的产生情况。As an integrated management application platform, iMAP is a distributed system developed based on CORBA standard. Its goal is to provide a centralized network management platform for products. iMAP includes multiple modules such as fault management, security management, topology management, and public components, and each module is developed and maintained by a dedicated person. Figure 1 describes the generation of iMAP versions: in the development process of iMAP, versions such as version1, version2, ..., version7 are generated in sequence, and the dots in Figure 1 represent the versions. iMAP uses professional version management software (Rational Clearcase) for version management. When the development of each version of iMAP is completed, use the version management software to mark a version label for all current codes of iMAP, such as version1, version2, etc. In the future, the corresponding iMAP version can be obtained from the version management software according to the tag name. When a certain iMAP version is submitted to the product, the product will put forward many new requirements for the version, or find some problems that need to be modified. In order not to interact with the main version being developed, developers will use version management software to create a branch on a certain version, and then develop and maintain it specifically for the needs of the product on this branch. Figure 2 describes the generation of iMAP version branches.
由图2可知,随着iMAP的不断开发和维护,iMAP的版本和分支将越来越多、越来越复杂。It can be seen from Figure 2 that with the continuous development and maintenance of iMAP, there will be more and more versions and branches of iMAP and more and more complex.
随着iMAP用户的不断增多,用户之间使用的版本差异性也就越来越大,这就造成在版本升级时,新、旧版本的之间的关系十分复杂,版本升级的工作量非常大。比如说,图2中的版本v7b1_version1发布了,而用户目前使用的版本可能包括version1、version2、version3、v2b1_version1、v2b1_version2等等,那么需要考虑的新、旧版本升级情况可能包括:version1=>v7b1_version1、version2=>v7b1_version1、version3=>v7b1_version1、v2b1_version1=>v7b1_version1、v2b1_version2=>v7b1_version1,等等。With the increasing number of iMAP users, the differences between the versions used by users are also increasing. This makes the relationship between the new version and the old version very complicated when the version is upgraded, and the workload of the version upgrade is very large. . For example, the version v7b1_version1 in Figure 2 is released, and the versions currently used by users may include version1, version2, version3, v2b1_version1, v2b1_version2, etc., then the new and old version upgrades that need to be considered may include: version1 => v7b1_version1, version2=>v7b1_version1, version3=>v7b1_version1, v2b1_version1=>v7b1_version1, v2b1_version2=>v7b1_version1, and so on.
版本升级必须在保证用户现有劳动成果的基础上,对iMAP来说,就是要在现有数据库中的数据和现有的配置文件的基础上,增加新版本的功能,修改旧版本的BUG。The version upgrade must be based on the guarantee of the user's existing labor results. For iMAP, it is to add the functions of the new version and modify the BUG of the old version on the basis of the data in the existing database and the existing configuration files.
因此,研发人员需要针对新旧版本的特点,写版本升级命令的脚本,升级命令的脚本包括的功能有很多,对于iMAP来说,升级脚本至少包括的功能有:各个模块数据库格式的升级(如果数据库格式发生变化的话)、各个模块配置文件的升级,即将用户修改的配置项合入到新版本的配置文件中。Therefore, R&D personnel need to write scripts for version upgrade commands based on the characteristics of the old and new versions. The scripts for upgrade commands include many functions. For iMAP, the upgrade scripts include at least the following functions: upgrade of each module database format (if the database If the format changes), the upgrade of each module configuration file is to incorporate the configuration items modified by the user into the new version of the configuration file.
综合上述关于软件版本升级的现有技术,仍以iMAP为例,可以总结出现有技术存在的缺陷有:Based on the above-mentioned existing technologies about software version upgrades, and still taking iMAP as an example, it can be concluded that the defects of existing technologies are as follows:
1、升级脚本的存放目录不合理。1. The storage directory of the upgrade script is unreasonable.
假设iMAP版本存放在IMAP_ROOT目录下,则升级脚本的存放目录为IMAP_ROOT/upgrade目录。升级的版本多时,这个目录下升级脚本文件的数量也随之增多,达到了分不清哪个版本该使用哪些升级脚本文件的程度。Assuming that the iMAP version is stored in the IMAP_ROOT directory, the storage directory of the upgrade script is the IMAP_ROOT/upgrade directory. When there are many upgraded versions, the number of upgrade script files in this directory also increases, reaching the point where it is hard to tell which upgrade script files should be used for which version.
2、版本升级脚本命名混乱。2. The name of the version upgrade script is confusing.
iMAP没有一个统一的脚本命名方法,编写升级脚本时,各模块的维护人员根据自己的习惯为各自模块的升级脚本命名。升级的版本多时,升级脚本文件的数量也随之增多,升级脚本命名就显得五花八门,令人眼花缭乱,时间长了之后,维护起来非常困难。iMAP does not have a unified script naming method. When writing upgrade scripts, the maintainers of each module name the upgrade scripts of their respective modules according to their own habits. When there are many versions to be upgraded, the number of upgrade script files also increases, and the names of the upgrade scripts appear to be varied and dazzling. After a long time, it is very difficult to maintain.
3、重复劳动太多。3. Too much repetitive work.
对于不同的新旧版本升级,升级内容虽然不完全一样,但也有相同的地方。而目前是针对每一个新旧版本的升级,都写一套独立的升级脚本,造成了很多重复劳动。For the upgrades of different old and new versions, although the upgrade content is not exactly the same, there are some similarities. At present, a set of independent upgrade scripts is written for each upgrade of the old and new versions, resulting in a lot of duplication of labor.
总之,软件产品现有的版本升级方法开发周期长,软件版本升级效率低,不易于管理、维护。In short, the existing version upgrade method for software products has a long development cycle, low software version upgrade efficiency, and is not easy to manage and maintain.
发明内容 Contents of the invention
鉴于上述现有技术所存在的问题,本发明的目的是提供一种软件多版本升级的方法及系统,以提高软件版本升级的效率,使得多版本升级软件更便于管理、维护。In view of the above-mentioned problems in the prior art, the object of the present invention is to provide a method and system for upgrading software with multiple versions, so as to improve the efficiency of software version upgrading and make the multi-version upgrading software easier to manage and maintain.
本发明提供的一种软件多版本升级的方法,包括:A method for upgrading software with multiple versions provided by the present invention includes:
a、为不同指定版本间的升级任务分别建立不同的指定目录,所述指定目录用于存放与之对应的升级脚本;a. Establish different designated directories for upgrade tasks between different designated versions, and the designated directories are used to store corresponding upgrade scripts;
b、通过激活与指定版本间的升级任务相对应的指定目录下的公共组件升级脚本,完成指定版本间的升级,所述公共组件升级脚本用于存放调用所需升级脚本所需要的执行命令。b. Complete the upgrade between the specified versions by activating the public component upgrade script in the specified directory corresponding to the upgrade task between the specified versions. The public component upgrade script is used to store the execution commands required to call the required upgrade script.
下述方法的技术方案为可选技术方案。The technical solutions of the following methods are optional technical solutions.
不同旧版本升级到同一新版本的各指定目录具有相同的上级目录,该上级目录称为该新版本目录,不同新版本对应不同的新版本目录,不同新版本目录具有相同的上级目录。The specified directories upgraded from different old versions to the same new version have the same upper-level directory, and the upper-level directory is called the new version directory. Different new versions correspond to different new version directories, and different new version directories have the same upper-level directory.
所述步骤a还包括:Said step a also includes:
将不同升级脚本中各升级任务通用的公共资源存放在固定目录下;Store common resources common to each upgrade task in different upgrade scripts in a fixed directory;
且所述步骤b还包括:所述公共组件升级脚本还用于存放调用所需公共资源时所需要的执行命令。And the step b further includes: the public component upgrade script is also used to store execution commands required for invoking required public resources.
所述公共资源包括:各个升级过程中都需要用到的通用工具和通用文档。The public resources include: general tools and general documents that are required in each upgrade process.
所述通用工具和通用文档分别设立有固定目录。The general tools and general documents have fixed directories respectively.
所述步骤a还包括:根据预定目标模块将升级脚本中执行预定目标模块升级的内容划分成预定目标模块升级脚本;且所述步骤b具体包括:The step a also includes: dividing the content of the upgrade script that executes the upgrade of the predetermined target module into predetermined target module upgrade scripts according to the predetermined target module; and the step b specifically includes:
各预定目标模块的升级脚本由与指定版本间的升级任务相对应的指定目录下的公共组件升级脚本统一调用,以完成指定版本间的升级。The upgrade scripts of each predetermined target module are uniformly invoked by the public component upgrade scripts in the specified directory corresponding to the upgrade tasks between specified versions, so as to complete the upgrade between specified versions.
本发明还提供有软件多版本升级系统,该系统包括:一个或多个指定目录单元,不同指定版本间的升级任务分别对应一个指定目录单元,各指定目录单元均存放与之对应的升级脚本,通过激活与指定版本间的升级任务相对应的指定目录单元下的公共组件升级脚本完成指定版本间的升级,所述公共组件升级脚本用于存放调用所需升级脚本所需要的执行命令。The present invention also provides a software multi-version upgrade system, the system includes: one or more designated directory units, the upgrade tasks between different designated versions correspond to a designated directory unit, each designated directory unit stores the corresponding upgrade script, The upgrade between the specified versions is completed by activating the public component upgrade script under the specified directory unit corresponding to the upgrade task between the specified versions. The public component upgrade script is used to store the execution commands needed to call the required upgrade script.
所述系统还包括公共资源存储单元,所述公共资源存储单元用于存储各个升级过程中都需要用到的公共资源,由与指定目录单元下的公共组件升级脚本调用,以完成升级任务;所述公共组件升级脚本还用于存放调用所需公共资源时所需要的执行命令的集合,以执行指定版本间的升级任务。The system also includes a public resource storage unit, the public resource storage unit is used to store the public resources needed in each upgrade process, and is called by the public component upgrade script under the specified directory unit to complete the upgrade task; The above-mentioned public component upgrade script is also used to store a set of execution commands required for invoking the required public resources, so as to perform upgrade tasks between specified versions.
所述公共资源存储单元包括通用工具存储子单元、通用文档存储子单元。The public resource storage unit includes a general tool storage subunit and a general document storage subunit.
所述升级脚本根据预定目标模块划分成预定目标模块升级脚本,由与指定版本间的升级任务相对应的指定目录单元下的公共组件升级脚本统一调用,执行指定升级任务。The upgrade scripts are divided into predetermined target module upgrade scripts according to the predetermined target modules, and are uniformly invoked by the public component upgrade scripts under the specified directory unit corresponding to the upgrade tasks between specified versions to execute the specified upgrade tasks.
通过上述技术方案的描述可以看出,本发明通过将不同版本间的升级任务对应的升级脚本存放在不同的指定目录中,能够高效、安全、快捷地实现多版本升级任务,如可以方便的完成旧版本1、旧版本2、旧版本3等不同旧版本到同一新版本的升级任务,即便在有多个旧版本到多个新版本升级等情况下,仍然可以高效、快捷、安全地完成软件多版本升级的任务,有效解决了升级脚本存放目录不合理、版本升级脚本命名混乱的问题;本发明通过将各升级任务都会用到的公共资源存放在固定目录下,如将通用的工具或者文档放在固定的目录下,避免了升级脚本的重复开发现象,减小了升级脚本的开发工作量;通过将升级脚本划分成多个预定目标模块升级脚本,在升级任务中不涉及某个目标模块时,则不需要维护相应的目标模块升级脚本,进一步减小了升级脚本的开发工作量,而且,使升级脚本便于管理和维护。从而通过本发明提供的技术方案实现了提高软件多版本升级的工作效率、提高软件多版本升级可维护性的目的。From the description of the above technical solution, it can be seen that the present invention can efficiently, safely and quickly realize multi-version upgrade tasks by storing the upgrade scripts corresponding to upgrade tasks between different versions in different designated directories, such as conveniently completing The upgrade tasks from different old versions such as old version 1, old version 2, and old version 3 to the same new version can be completed efficiently, quickly and safely even in the case of upgrading from multiple old versions to multiple new versions. The version upgrade task effectively solves the problem of unreasonable storage directory of the upgrade script and confusing name of the version upgrade script; the present invention stores the public resources used by each upgrade task in a fixed directory, such as putting common tools or documents in In a fixed directory, the repeated development of the upgrade script is avoided, and the development workload of the upgrade script is reduced; by dividing the upgrade script into multiple predetermined target module upgrade scripts, when a certain target module is not involved in the upgrade task , then there is no need to maintain the corresponding target module upgrade script, which further reduces the development workload of the upgrade script, and makes the upgrade script easy to manage and maintain. Therefore, through the technical solution provided by the present invention, the objectives of improving the work efficiency of software multi-version upgrade and improving the maintainability of software multi-version upgrade are realized.
附图说明 Description of drawings
图1为iMAP版本的产生情况;Figure 1 shows the generation of iMAP version;
图2为iMAP版本分支的产生情况;Figure 2 shows the generation of iMAP version branches;
图3为本发明实施例的软件多版本升级流程图;Fig. 3 is the software multi-version upgrade flowchart of the embodiment of the present invention;
图4为本发明实施例的iMAP多版本升级的目录结构。FIG. 4 is a directory structure of an iMAP multi-version upgrade according to an embodiment of the present invention.
具体实施方式 Detailed ways
本发明提供了一种方便灵活的方法来解决上述现有技术中存在的问题,当软件产品有新的版本需要更新、升级时,只需激活与指定版本间的升级任务相对应的指定目录下的升级脚本,即可完成指定版本间的升级。利用本发明所提供的技术使得软件产品不同版本间的升级更易于实现,从而提高了软件产品版本升级的工作效率。The present invention provides a convenient and flexible method to solve the above-mentioned problems in the prior art. When a software product has a new version that needs to be updated or upgraded, it only needs to activate the specified directory corresponding to the upgrade task between specified versions. The upgrade script can complete the upgrade between specified versions. Utilizing the technology provided by the invention makes it easier to realize the upgrade among different versions of the software product, thereby improving the working efficiency of the software product version upgrade.
本发明的核心是:为不同指定版本间的升级任务分别建立不同的指定目录,指定目录用于存放与之对应的升级脚本,通过激活与指定版本间的升级任务相对应的指定目录下的升级脚本完成指定版本间的升级。The core of the present invention is to establish different designated directories for the upgrade tasks between different designated versions, and the designated directories are used to store the corresponding upgrade scripts. The script completes the upgrade between the specified versions.
在本发明中,不同旧版本升级到同一新版本的各指定目录应该是同级目录并列关系,即不同旧版本升级到同一新版本的各指定目录具有相同的上级目录。这个上级目录即:为一个新版本建立的目录,不同新版本的目录可以具有相同的上级目录。In the present invention, the designated directories upgraded from different old versions to the same new version should be parallel directories of the same level, that is, the designated directories upgraded from different old versions to the same new version have the same upper-level directory. This upper-level directory is: a directory established for a new version, and directories of different new versions may have the same upper-level directory.
为了避免升级脚本的重复开发、提供软件版本的升级效率,本发明可以将不同升级脚本中各升级任务通用的公共资源存放在固定目录下,还可以为各预定目标模块分别设置升级脚本。In order to avoid repeated development of upgrade scripts and improve the upgrade efficiency of software versions, the present invention can store common resources common to each upgrade task in different upgrade scripts in a fixed directory, and can also set upgrade scripts for each predetermined target module.
具体一点讲,本发明实现软件产品版本升级时的设置步骤包括:Specifically, the setting steps when the present invention realizes software product version upgrade include:
(1)为软件产品每两个指定版本间的升级任务建立指定目录,指定目录用于存放指定版本间的升级脚本。(1) Establish a designated directory for the upgrade task between every two designated versions of the software product, and the designated directory is used to store the upgrade script between the designated versions.
为了便于理解,这里仍以iMAP为例进行说明。对于iMAP而言,如果存在version1=>v7b1_version1的升级任务,那么就为这个升级任务建立指定目录,如果不存在上述升级任务,就不需要建立该指定目录。For ease of understanding, iMAP is still taken as an example for illustration. For iMAP, if there is an upgrade task of version1=>v7b1_version1, then a designated directory is established for this upgrade task, and if the above upgrade task does not exist, the designated directory does not need to be established.
(2)按软件产品的功能模块即预定目标模块划分升级脚本,这样,可以对不同模块的升级脚本分别进行独立的维护,然后,由公共组件升级脚本来统一组织调用。(2) The upgrade scripts are divided according to the functional modules of the software product, that is, the predetermined target modules. In this way, the upgrade scripts of different modules can be independently maintained, and then, the common component upgrade scripts are used to uniformly organize and call them.
(3)将各个升级任务中需要用到的相对不变化的公共资源,如通用工具、通用文档等,放到固定目录下,由公共组件升级脚本来统一组织调用。这里的通用文档如升级指导文档等。通过该步骤的设置,使每个升级脚本均不需要包括公共资源部分的内容,从而避免了升级脚本的重复开发现象,减小了升级脚本的开发工作量。(3) Put the relatively unchanged public resources that need to be used in each upgrade task, such as general tools, general documents, etc., into a fixed directory, and the public component upgrade script is used to uniformly organize and call them. Common documents here include upgrade guidance documents, etc. Through the setting of this step, each upgrade script does not need to include the content of the public resource part, thereby avoiding the repeated development of the upgrade script and reducing the development workload of the upgrade script.
下面仍以iMAP为例、结合附图3、附图4对本发明提供的软件版本升级方法进行说明。Still taking iMAP as an example, the software version upgrading method provided by the present invention will be described in conjunction with accompanying drawings 3 and 4 .
图3中,在步骤31、为每个新版本建立一个目录,该新版本目录中包括多个指定目录,不同指定目录用于存放不同旧版本到该新版本的升级任务对应的升级脚本,本发明应保证一个升级任务对应一个指定目录。In Fig. 3, in
下面以图4为例对软件版本升级的目录结构进行说明。The directory structure of the software version upgrade is described below by taking FIG. 4 as an example.
图4中,所有的升级脚本都在一个upgrade目录中,在upgrade目录下,为每一个新版本建立一个目录,用于存放升级脚本,即由当前各旧版本升级到该新版本的升级脚本。需要注意的是:图4中只为一个新版本建立了目录,即Version_NEW目录,如果还有其他更新的版本时,比如说Version_NEW1(新版本1),则可以在upgrade目录下为这个更新的版本建立目录Version_NEW1。In Fig. 4, all upgrade scripts are in an upgrade directory. Under the upgrade directory, a directory is established for each new version to store upgrade scripts, that is, upgrade scripts from current old versions to the new version. It should be noted that in Figure 4, a directory is only created for a new version, that is, the Version_NEW directory. If there are other updated versions, such as Version_NEW1 (new version 1), you can create a directory for this updated version in the upgrade directory. Create directory Version_NEW1.
iMAP当前推出新版本Version_NEW时,需要升级当前的旧版本升级到Version_NEW,设定目前有三个地方在使用iMAP,相应的版本分别是Version_OLD_ONE(旧版本1)、Version_OLD_TWO(旧版本2)、Version_OLD_THREE(旧版本3),此时需要将iMAP版本分别从Version_OLD_ONE、Version_OLD_TWO、Version_OLD_THREE升级到Version_NEW,这样,就需要分别为Version_OLD_ONE=>Version_NEW、Version_OLD_TWO=>Version_NEW、Version_OLD_THREE=>Version_NEW,分别建立指定目录,即在目录Version_NEW1下分别建立三个子目录:Version_OLD_ONE子目录、Version_OLD_TWO子目录、Version_OLD_THREE子目录,从而使一个升级任务对应一个指定目录。When iMAP releases a new version Version_NEW, it is necessary to upgrade the current old version to Version_NEW. It is set that there are currently three places using iMAP, and the corresponding versions are Version_OLD_ONE (old version 1), Version_OLD_TWO (old version 2), Version_OLD_THREE (old Version 3), at this time, the iMAP version needs to be upgraded from Version_OLD_ONE, Version_OLD_TWO, Version_OLD_THREE to Version_NEW respectively. Like this, it is necessary to set up specified directories for Version_OLD_ONE=>Version_NEW, Version_OLD_TWO=>Version_NEW, Version_OLD_THREE=>Version_NEW respectively, that is, in the directory Three subdirectories are established under Version_NEW1: Version_OLD_ONE subdirectory, Version_OLD_TWO subdirectory, and Version_OLD_THREE subdirectory, so that an upgrade task corresponds to a specified directory.
到步骤32:按照预定目标模块即功能模块划分升级脚本,这里的预定目标模块如MOSve模块、FaultSvc模块、SecuritySvc模块等。Go to step 32: Divide the upgrade script according to the predetermined target modules, ie function modules, where the predetermined target modules are MOSve module, FaultSvc module, SecuritySvc module and so on.
图4中,本发明将所有在upgrade目录中的升级脚本按照预定目标模块划分为如下三个升级脚本:upgrade_MOSvc.sh、upgrade_FaultSvc.sh、upgrade_SecuritySvc.sh。这三个升级脚本分别对应MOSvc模块、FaultSvc模块、SecuritySvc模块。图4中的upgrade.sh作为公共组件升级脚本即平台模块的升级脚本。如果以后iMAP添加了新的功能模块,那么,需要在各指定目录中为新增的功能模块建立升级脚本。In Fig. 4, the present invention divides all the upgrade scripts in the upgrade directory into the following three upgrade scripts according to the predetermined target modules: upgrade_MOSvc.sh, upgrade_FaultSvc.sh, upgrade_SecuritySvc.sh. These three upgrade scripts correspond to the MOSvc module, FaultSvc module, and SecuritySvc module respectively. The upgrade.sh in Figure 4 is used as the upgrade script of the public component, that is, the upgrade script of the platform module. If a new functional module is added to iMAP in the future, an upgrade script needs to be created for the newly added functional module in each designated directory.
如果某个升级任务中不需要对某个功能模块进行升级,那么,该功能模块的升级脚本中可以为空,即不对该功能模块进行任何更新升级操作。升级版本的开发过程由此变得清晰可控。If a certain function module does not need to be upgraded in an upgrade task, then the upgrade script of the function module can be empty, that is, no update and upgrade operation is performed on the function module. The development process of the upgrade version thus becomes clear and controllable.
到步骤33:将各个升级任务中需要用到的相对不变化的公共资源,如通用工具、通用文档等,存放到一个固定的目录下,以避免在每次编写升级脚本时都需要重复进行公共资源的编写过程。Go to step 33: Store the relatively unchanged public resources that need to be used in each upgrade task, such as general tools, general documents, etc., in a fixed directory, so as to avoid the need to repeat common Resource authoring process.
图4中的公共资源目录为:在upgrade目录下建立的Tools、Docs子目录,Tools子目录用于存放各个升级任务中都需要用到的通用工具,Docs子目录用于存放各个升级任务中都需要用到的通用文档。如果以后还有其它表现形式的公共资源,且该表现形式的公共资源放在Tools和Docs目录下都不合适时,可以在upgrade目录下为该表现形式的公共资源建立新的子目录。The public resource directory in Figure 4 is: the Tools and Docs subdirectories established under the upgrade directory. The Tools subdirectory is used to store the general tools needed in each upgrade task, and the Docs subdirectory is used to store the General documentation needed. If there are public resources of other manifestations in the future, and it is not appropriate to place the public resources of this manifestation under the Tools and Docs directories, a new subdirectory can be created for the public resources of this manifestation under the upgrade directory.
到步骤34:将不同版本间对应的升级脚本存放在与之相应的指定目录下。Go to step 34: Store the upgrade scripts corresponding to different versions in the corresponding specified directory.
如图4中,将与升级任务Version_OLD_ONE→Version_NEW对应的升级脚本:upgrade.sh、upgrade_MOSvc.sh、upgrade_FaultSvc.sh、upgrade_SecuritySvc.sh存放到指定目录Version_OLD_ONE中;将与升级任务Version_OLD_TWO→Version_NEW对应的升级脚本:upgrade.sh、upgrade_MOSvc.sh、upgrade_FaultSvc.sh、upgrade_SecuritySvc.sh存放到指定目录Version_OLD_TWO中;将与升级任务Version_OLD_THREE→Version_NEW对应的升级脚本:upgrade.sh、upgrade_MOSvc.sh、upgrade_FaultSvc.sh、upgrade_SecuritySvc.sh存放到指定目录Version_OLD_THREE中。As shown in Figure 4, store the upgrade script corresponding to the upgrade task Version_OLD_ONE→Version_NEW: upgrade.sh, upgrade_MOSvc.sh, upgrade_FaultSvc.sh, upgrade_SecuritySvc.sh in the specified directory Version_OLD_ONE; save the upgrade script corresponding to the upgrade task Version_OLD_TWO→Version_NEW : upgrade.sh, upgrade_MOSvc.sh, upgrade_FaultSvc.sh, upgrade_SecuritySvc.sh are stored in the specified directory Version_OLD_TWO; upgrade scripts corresponding to the upgrade task Version_OLD_THREE→Version_NEW: upgrade.sh, upgrade_MOSvc.sh, upgrade_FaultSvc.sh, upgrade_SecuritySvc. Store in the specified directory Version_OLD_THREE.
到步骤35:在进行软件版本升级时,激活与指定版本间的升级任务对应的公共组件升级脚本,执行指定版本间的升级任务。Go to step 35: when upgrading the software version, activate the public component upgrade script corresponding to the upgrade task between the specified versions, and execute the upgrade task between the specified versions.
例如,当用户需要将iMAP从Version_OLD_TWO升级到Version_NEW时,用户可直接到与之相对应的指定目录upgrade/Version_NEW/Version_OLD_TWO/下找到upgrade.sh升级脚本,并激活upgrade.sh,执行从Version_OLD_TWO升级到Version_NEW的升级任务;用同样的方法可以完成任意版本间的升级任务。For example, when a user needs to upgrade iMAP from Version_OLD_TWO to Version_NEW, the user can directly find the upgrade.sh upgrade script in the corresponding specified directory upgrade/Version_NEW/Version_OLD_TWO/, activate upgrade.sh, and execute the upgrade from Version_OLD_TWO to Version_NEW The upgrade task of Version_NEW; use the same method to complete the upgrade task between any versions.
本发明还提供了一种软件多版本升级的系统,所述系统包括一个或多个指定目录单元,不同指定版本间的升级任务分别对应一个指定目录单元,各指定目录单元均存放与之对应的升级脚本。The present invention also provides a system for upgrading software with multiple versions. The system includes one or more specified directory units. The upgrade tasks between different specified versions correspond to one specified directory unit, and each specified directory unit stores the corresponding Upgrade script.
本发明中的升级脚本可以按预定目标模块划分成预定目标模块升级脚本,由与指定版本间的升级任务相对应的指定目录单元下的升级脚本单元中公共组件升级脚本统一调用。公共组件升级脚本中存放有调用不同预定目标模块升级脚本时所需要的执行命令的集合。通过激活指定目录单元下的公共自己升级脚本可以执行指定版本间的升级任务。执行指定版本间的升级任务。预定目标模块可以为功能模块,具体如上述方法中的说明。The upgrade scripts in the present invention can be divided into predetermined target module upgrade scripts according to the predetermined target modules, and are uniformly called by the public component upgrade scripts in the upgrade script units under the designated directory unit corresponding to the upgrade tasks between designated versions. The public component upgrade script stores a collection of execution commands required when calling the upgrade scripts of different predetermined target modules. Upgrade tasks between specified versions can be performed by activating the public self-upgrade script under the specified directory unit. Execute upgrade tasks between specified versions. The predetermined target module may be a functional module, specifically as described in the above method.
本发明的系统还包括公共资源存储单元,所述公共资源存储单元用于存储各个升级任务中都需要用到的公共资源。公共资源存储单元中存储的公共资源由与指定目录单元下的公共组件升级脚本调用,以完成升级任务。公共组件升级脚本中存放有调用不同预定目标模块升级脚本以及公共资源时所需要的执行命令的集合。通过激活指定目录单元下的公共资源升级脚本可以执行指定版本间的升级任务。具体如上述方法中的描述。The system of the present invention also includes a public resource storage unit, which is used for storing public resources needed in each upgrading task. The public resources stored in the public resource storage unit are invoked by the public component upgrade script under the specified directory unit to complete the upgrade task. The public component upgrade script stores a collection of execution commands required for invoking different predetermined target module upgrade scripts and public resources. The upgrade task between specified versions can be performed by activating the public resource upgrade script under the specified directory unit. Specifically as described in the above method.
上述公共资源存储单元可以包括:通用工具存储子单元、通用文档存储子单元等,以存储公共资源中的通用工具、通用文档如升级指导文档等。具体如上述方法中的描述。The above-mentioned public resource storage unit may include: a general tool storage subunit, a general document storage subunit, etc., to store general tools and general documents in the public resources, such as upgrade guidance documents, and the like. Specifically as described in the above method.
在上述实施例中,本发明是以iMAP为例对软件多版本升级的方法及系统进行说明的,但是本发明不只限于iMAP的软件升级,只要是通过为不同指定版本间的升级任务分别建立不同的指定目录实现软件多版本升级的技术方案均在本发明保护范围之内。In the above-mentioned embodiment, the present invention takes iMAP as an example to describe the method and system for software multi-version upgrade, but the present invention is not limited to the software upgrade of iMAP, as long as the upgrade tasks between different specified versions are established separately The technical solutions for realizing multi-version upgrade of software in the specified directory of the specified directory are all within the scope of protection of the present invention.
以上所述,仅为本发明较佳的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应该以权利要求书的保护范围为准。The above is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed in the present invention can easily think of changes or Replacement should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be determined by the protection scope of the claims.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2006101095235A CN100442230C (en) | 2006-08-04 | 2006-08-04 | Method and system for software multi-version upgrade |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2006101095235A CN100442230C (en) | 2006-08-04 | 2006-08-04 | Method and system for software multi-version upgrade |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1904837A CN1904837A (en) | 2007-01-31 |
CN100442230C true CN100442230C (en) | 2008-12-10 |
Family
ID=37674108
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB2006101095235A Expired - Fee Related CN100442230C (en) | 2006-08-04 | 2006-08-04 | Method and system for software multi-version upgrade |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100442230C (en) |
Families Citing this family (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101859250A (en) * | 2009-04-07 | 2010-10-13 | 盛趣信息技术(上海)有限公司 | Online game client system |
CN101968741A (en) * | 2009-07-27 | 2011-02-09 | 阿里巴巴集团控股有限公司 | Method, server and system for data update |
CN101625640B (en) * | 2009-08-05 | 2013-01-16 | 中兴通讯股份有限公司 | Device and method for combining software upgrade scripts in multiple environments |
CN102270174B (en) * | 2011-08-04 | 2013-11-20 | 北京星网锐捷网络技术有限公司 | Automatic test method and device |
CN102955702B (en) * | 2011-08-23 | 2016-08-10 | 腾讯科技(深圳)有限公司 | A kind of software is installed and upgrade method and device |
CN102722386B (en) * | 2012-05-28 | 2015-09-30 | 华为终端有限公司 | Generate the method and apparatus of radio firmware AKU |
CN104699492A (en) * | 2013-12-06 | 2015-06-10 | 中兴通讯股份有限公司 | Method and device for software upgrading |
CN103645928A (en) * | 2013-12-06 | 2014-03-19 | 浪潮(北京)电子信息产业有限公司 | Software function module processing method and system |
CN104007992A (en) * | 2014-06-09 | 2014-08-27 | 广州华多网络科技有限公司 | Methods and devices for program updating and starting |
CN104281471A (en) * | 2014-09-17 | 2015-01-14 | 天津云辰科技有限公司 | Multi-version software OTA (on the air) updating method |
CN105302595B (en) * | 2015-09-19 | 2018-11-06 | 暴风集团股份有限公司 | A kind of multi version parallel upgrade control method and system |
CN105183522B (en) * | 2015-09-26 | 2018-11-06 | 暴风集团股份有限公司 | Send out version multi-version upgrading method and system |
CN105677425A (en) * | 2016-01-12 | 2016-06-15 | 四川文轩教育科技有限公司 | Updating method of software system of C/S system structure |
CN113419771B (en) * | 2021-05-31 | 2023-01-24 | 济南浪潮数据技术有限公司 | Method and system for making upgrade package of application software and method and system for upgrading |
CN114416532A (en) * | 2021-12-24 | 2022-04-29 | 深圳哇哇鱼网络科技有限公司 | AB test configuration update method and system for game operation data |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040031028A1 (en) * | 2002-08-06 | 2004-02-12 | Aardwork Software Limited | Updating of software |
CN1477500A (en) * | 2002-08-19 | 2004-02-25 | 万达信息股份有限公司 | Software automatic upgrading and updating method under Client/Server frame |
US20040088694A1 (en) * | 2002-10-31 | 2004-05-06 | Ho Stanley M. | Systems and methods for updating software |
CN1168001C (en) * | 2000-05-25 | 2004-09-22 | 国际商业机器公司 | Method and system for applying updates to a collection of program and data files from version to version |
US20050055686A1 (en) * | 2003-09-08 | 2005-03-10 | Microsoft Corporation | Method and system for servicing software |
CN1218246C (en) * | 2002-07-15 | 2005-09-07 | 华为技术有限公司 | Automatic upgrading method for business management access point in intelligent network |
-
2006
- 2006-08-04 CN CNB2006101095235A patent/CN100442230C/en not_active Expired - Fee Related
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1168001C (en) * | 2000-05-25 | 2004-09-22 | 国际商业机器公司 | Method and system for applying updates to a collection of program and data files from version to version |
CN1218246C (en) * | 2002-07-15 | 2005-09-07 | 华为技术有限公司 | Automatic upgrading method for business management access point in intelligent network |
US20040031028A1 (en) * | 2002-08-06 | 2004-02-12 | Aardwork Software Limited | Updating of software |
CN1477500A (en) * | 2002-08-19 | 2004-02-25 | 万达信息股份有限公司 | Software automatic upgrading and updating method under Client/Server frame |
US20040088694A1 (en) * | 2002-10-31 | 2004-05-06 | Ho Stanley M. | Systems and methods for updating software |
US20050055686A1 (en) * | 2003-09-08 | 2005-03-10 | Microsoft Corporation | Method and system for servicing software |
Also Published As
Publication number | Publication date |
---|---|
CN1904837A (en) | 2007-01-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100442230C (en) | Method and system for software multi-version upgrade | |
US9304764B2 (en) | Automated merging in a software development environment | |
US8495564B2 (en) | Automated merging in a software development environment | |
US8255363B2 (en) | Methods, systems, and computer program products for provisioning software using dynamic tags to identify and process files | |
JP5367074B2 (en) | Virtual machine and application life cycle synchronization | |
US8255362B2 (en) | Methods, systems, and computer program products for provisioning software using local changesets that represent differences between software on a repository and a local system | |
CN102141919B (en) | Modularized java application software online updating system and method | |
Cinar | Android apps with Eclipse | |
US20060288054A1 (en) | Methods, systems, and computer program products for provisioning software via a file repository in which a version string is used to identify branches of a tree structure | |
WO2011000279A1 (en) | Patch generation method for dynamic software updating and control and apparatus thereof | |
TW201545067A (en) | A system and method thereof for creating dynamically attachable and detachable binary files | |
CN110647349B (en) | Method for realizing continuous delivery of iOS APP | |
CN114443294B (en) | Big data service component deployment method, system, terminal and storage medium | |
CN103645888B (en) | System and method for automatically building operation system | |
CN104881311A (en) | Method and apparatus for judging version compatibility | |
Van Gurp et al. | Version management tools as a basis for integrating product derivation and software product families | |
EP3166030B1 (en) | Exporting hierarchical data from a product lifecycle management (plm) system to a source code management (scm) system | |
CN100485618C (en) | Program actuating system, and its programming, analyzing, and managing system, and checking device | |
CN110990018B (en) | Compiling method and compiling system of embedded system | |
CN114265595A (en) | Cloud native application development and deployment system and method based on intelligent contracts | |
Clark et al. | Standardizing a Python Development Environment for Large Controls Systems | |
Berglund | Gradle Beyond the Basics: Customizing Next-Generation Builds | |
Korhonen et al. | The ESS EPICS Environment e3. Its build and deployment | |
Ritsch et al. | Modernising ATLAS Software Build Infrastructure | |
Wright et al. | Application Lifecycle Management |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20081210 Termination date: 20160804 |